aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Jones <bjones@galois.com>2013-10-25 16:53:11 -0700
committerGravatar Benjamin Jones <bjones@galois.com>2013-10-25 16:53:11 -0700
commitdd5cfc60bb8fdc8cea4335c8a24937afbd65c090 (patch)
tree7b840157c69c5040475b06cce07f8d1fd9cc2b54
parent860bdc583ef67c63380a001280f4600b4a8504cb (diff)
ASM guideline 8.5 and test files
-rw-r--r--guidelines/ASM/.gitignore1
-rw-r--r--guidelines/ASM/asm-8.5.js93
-rw-r--r--guidelines/ASM/test-8.5.html24
-rw-r--r--guidelines/ASM/test-guideline.json5
-rw-r--r--guidelines/ASM/test_L4_LSG_FURN_1.htm23151
5 files changed, 23274 insertions, 0 deletions
diff --git a/guidelines/ASM/.gitignore b/guidelines/ASM/.gitignore
new file mode 100644
index 0000000..1e107f5
--- /dev/null
+++ b/guidelines/ASM/.gitignore
@@ -0,0 +1 @@
+examples
diff --git a/guidelines/ASM/asm-8.5.js b/guidelines/ASM/asm-8.5.js
new file mode 100644
index 0000000..c74181d
--- /dev/null
+++ b/guidelines/ASM/asm-8.5.js
@@ -0,0 +1,93 @@
+/*
+ * Abnormal Situation Management - Guidelines
+ *
+ * 8.5 - p2: Use consistent numeric formats to enable quick reading.
+ * Notes: Don't use leading 0's for integer values, *do* provide leading 0 for
+ * fractional values < 1, justify columns on decimal point, include units.
+ * Some easy, some hard. (how do we map units to numbers? can we get the screen
+ * coordinates for every '.' in the dom?)
+ *
+ */
+exports.name='Inconsistent numerical formatting';
+exports.description='Use consistent numeric formats to enable quick reading.';
+
+exports.rule = function (report) {
+
+ // Predicate used on DOM elements below.
+ var hasText = function(i) { return ($5(this).text().trim().length); };
+
+ // Rule specifications:
+ // (we assume re's below run on strings which already match the general
+ // number format given in getNums.)
+ var bads = [ { re: '[+-]?0\\d' // e.g. 032
+ , msg: 'numbers larger than 1 should not lead with a zero' }
+
+ , { re: '^[+-]?\\.\\d' // e.g. -.145
+ , msg: 'fractional numbers less than 1 should have a leading zero' }
+
+ , { re: '\\.$' // e.g. 32.
+ , msg: 'numbers should not end with a decimal' } ];
+
+ /* Returns a function from a rule specification. */
+ var checkBad = function(b) {
+ var res = {};
+ var f = function (n) {
+ var r = new RegExp(b.re);
+ if (r.exec(n)) { return true; }
+ else { return false; }
+ };
+ res.fcn = f;
+ res.rule = b; // save the rule
+ return res;
+ };
+ var fcns = _.map(bads, checkBad);
+
+ // DOM element -> it's full text content including children separeted by
+ // spaces. We do this instead of just calling text() or .textContent because
+ // we want text of children separeted from each other with whitespace.
+ var betterText= function (e) {
+ if (!$5(e).children()) {
+ return $5(e).text();
+ }
+ else {
+ // extract text from the children recursively
+ var ctxts = _.map($5(e).children(), betterText);
+ // remove the children and extract text
+ ctxts.push($(e).clone().children().remove().end().text());
+ return ctxts.join(' ');
+ }
+ };
+
+ /* Returns an array of the numbers found in the given DOM node's text. */
+ var getNums = function (e) {
+ //var txt = $5(e).text().trim();
+ var txt = betterText(e);
+ var re = new RegExp('(^|\\b)[+-]?(\\d+(\\.)?\\d*|\\.\\d+)(\\b|$)', 'g');
+ var matches = [], found;
+ while (found = re.exec(txt)) {
+ matches.push(found[0]);
+ }
+ // FUUUCCCKKKK
+ return matches;
+ };
+
+ // Main rule query
+ $5("*").filter(hasText).each(function(i, elt) {
+ var nums = getNums(elt);
+ _.each(fcns, function (rul, ii, l) {
+ var m = _.map(nums, rul.fcn);
+ if (_.some(m)) { // some number in nums is bad for this rule
+ // check if a child node has the same problem
+ var childNums = _.flatten(_.map($5(elt).children(), getNums));
+ if (_.some(_.map(childNums, rul.fcn))) {
+ return; // don't report it, break out of _.each iteration
+ }
+ else { // no child has the same problem
+ report.error(rul.msg, elt);
+ }
+ }
+ });
+ });
+
+}
+
diff --git a/guidelines/ASM/test-8.5.html b/guidelines/ASM/test-8.5.html
new file mode 100644
index 0000000..66c6d14
--- /dev/null
+++ b/guidelines/ASM/test-8.5.html
@@ -0,0 +1,24 @@
+<html>
+ <head>
+ <title>Test asm 8.5</title>
+ </head>
+ <body>
+
+ <p>
+ Hello World!
+ </p>
+
+ <table>
+ <tbody>
+ <tr><td>123</td><td>bob -123.0</td></tr>
+ <tr><td>.445</td><td>-0452 foo</td></tr>
+ <tr><td>27818.</td><td>my age is 6.</td></tr>
+ <tr><td>27818</td><td>my age is 7</td></tr>
+ </tbody>
+ </table>
+
+ <p>-.3333333</p>
+
+ <p>00123</p>
+
+</body></html>
diff --git a/guidelines/ASM/test-guideline.json b/guidelines/ASM/test-guideline.json
new file mode 100644
index 0000000..8ccec82
--- /dev/null
+++ b/guidelines/ASM/test-guideline.json
@@ -0,0 +1,5 @@
+{ "name": "ASM guideline-test"
+, "description": "Test ASM guidelines"
+, "license": "BSD3"
+, "rules": [ "asm-8.5.js" ]
+}
diff --git a/guidelines/ASM/test_L4_LSG_FURN_1.htm b/guidelines/ASM/test_L4_LSG_FURN_1.htm
new file mode 100644
index 0000000..b4019e2
--- /dev/null
+++ b/guidelines/ASM/test_L4_LSG_FURN_1.htm
@@ -0,0 +1,23151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o =
+"urn:schemas-microsoft-com:office:office" xmlns:p =
+"urn:schemas-microsoft-com:office:powerpoint" xmlns:w =
+"urn:schemas-microsoft-com:office:word"><HEAD><TITLE></TITLE>
+<META http-equiv=Content-Type content="text/html; charset=windows-1252">
+<META content=5.4 name=DisplayVersion-PS>
+<META content="Create a blank HMIWeb display." name=HMIWebTemplateDescription>
+<STYLE>v\:* {
+ BEHAVIOR: url(#default#VML)
+}
+o\:* {
+ BEHAVIOR: url(#default#VML)
+}
+p\:* {
+ BEHAVIOR: url(#default#VML)
+}
+w\:* {
+ BEHAVIOR: url(#default#VML)
+}
+.shape {
+ BEHAVIOR: url(#default#VML)
+}
+</STYLE>
+
+<OBJECT id=HDXPageBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:56144F51-84F2-11D3-8114-00C04F68E0F9></OBJECT>
+<OBJECT id=HDXVectorFactory
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:45A29A51-418F-11D4-816B-00C04F68E0F9></OBJECT>
+<OBJECT id=HDXAlphaBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:00FD97E5-43FE-11D3-964E-00609738C4CB></OBJECT>
+<OBJECT id=HDXPushButtonBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:ACB6C25A-20A8-11D4-B86C-00C04F6022AA></OBJECT>
+<OBJECT id=HSCComboboxBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:87E1DD39-48A6-4188-95F5-26ECF7D6493B></OBJECT>
+<OBJECT id=HSCCheckBoxBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:65CF3A90-0165-4CAE-8DF2-6242FA186238></OBJECT>
+<OBJECT id=HSCIndicatorBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:ABAAEE25-63F3-4F67-9C1C-0AC96A186A73></OBJECT>
+<OBJECT id=HoverBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:51A1B6EC-7507-4A0B-A06D-5FA2742F033D></OBJECT>
+<OBJECT id=HDXPopupBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:034DB16E-AE01-11D3-BE8D-00C04F7915FE></OBJECT>
+<OBJECT id=BindingBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:31C15D64-63ED-11D3-80D0-00C04F6847A2></OBJECT>
+<OBJECT id=HSCShapeLinkBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:0A7E026C-957B-4548-9BB7-7835EF5F8D4D></OBJECT>
+<OBJECT id=HSCActiveXDocumentBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:A4FE97D2-5EC5-4273-A00F-88D8447A0D9A></OBJECT>
+<OBJECT id=HSCBreakpointBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:43C8EF2D-9001-43BA-9ECA-82818E8281D5></OBJECT>
+<OBJECT id=HDXLevelFillBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:9E860844-C032-46A8-A3F7-FB950475A292></OBJECT>
+<OBJECT id=HDXElementsFactory
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:2592890C-11DD-4818-BB62-9640E4A050D1></OBJECT>
+<OBJECT id=AlarmStateIconFactory
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:32C06040-FF05-4F15-90EB-9C56D098D188></OBJECT>
+<OBJECT id=DTFormat
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:9E5DB1FD-CE13-4459-BA06-30845E6633AB></OBJECT>
+<OBJECT id=HSCScriptDataBehavior
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:15C2FF21-998F-4226-A7A9-221580D5F19F></OBJECT>
+<OBJECT id=StnEvtReflector
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:F5585C3E-DFE6-41A7-98EF-FD6E9547809D></OBJECT>
+<OBJECT id=DisplayDataRepository
+style="LEFT: 0px; WIDTH: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 0px"
+codeBase="" classid=clsid:0113964D-CFC2-453a-BA5F-DF740C170064></OBJECT>
+<META content="MSHTML 6.00.5730.11" name=GENERATOR><LINK id=HDXStylesheet
+href=".\..\_CSS\HCS.CSS" type=text/css rel=stylesheet>
+<SCRIPT language=VBScript event=onperiodicupdate for=Page defer>call GSH_ONPERIODIC_FOCUSUPDATEHANDLER</SCRIPT>
+
+<SCRIPT language=VBScript defer>Const PAGE_DISPLAYTYPE = 4
+dim g_PageCurrentFocusTag
+g_PageCurrentFocusTag = ""
+dim g_PageShapesInit
+g_PageShapesInit = 0
+dim g_PageCurrentTagLabelVisible
+g_PageCurrentTagLabelVisible = ""</SCRIPT>
+
+<SCRIPT language=VBScript event=onunload for=Page
+defer> call GSH_PageUnload</SCRIPT>
+
+<SCRIPT language=VBScript event=onpagecomplete for=Page defer>on error resume next
+
+Dim sType2FileName,sType3FileName,sType4FileName
+'****************** To Do Begins ****************************************
+'Enter the type of the graphic. Valid entries are 2/3/4
+ Const DisplayType = 4
+
+' Enter the default display file names in UPPER case without the .HTM extensions e.g sgType2FileName = "CokeDr_T2"
+' If a file doesn't exist, leave blank (e.g. "")
+
+ sType2FileName = "L2_LSG_RXN"
+ sType3FileName = "L3_LSG_FURN"
+ sType4FileName = "L4_LSG_FURN_1"
+
+'****************** To Do Ends ****************************************
+call GSH_initDisplay (DisplayType, sType2FileName, sType3FileName, sType4FileName, me)</SCRIPT>
+</HEAD>
+<SCRIPT language=VBScript event=onmousedown for=shape071_rec_DataScript defer>If (me.parentElement.parentElement.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYLEVEL) = 2) then
+ If window.event.button = 2 Then call GSH_TYPE2TABRBUTTONCLICK(me.parentElement.parentElement) else call GSH_NAVTAB_LCLICK (me.parentElement.parentElement) end if
+Else
+ call GSH_NAVTAB_LCLICK (me.parentElement.parentElement)
+End if</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=shape001 defer> dim VERSION
+ VERSION = "1.3.10"
+ call GSH_PRINT_VERSION(me,VERSION)</SCRIPT>
+
+<SCRIPT language=VBScript id=9AD748A9-63A3-4F20-B029-8144F6FB00EA defer
+shaperefcount="1">''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'''' General Script Holder Shape '''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'
+' COPYRIGHT (c) 2007, 2008, 2009, 2010
+' Human Centered Solutions, LLP
+'
+' ALL RIGHTS RESERVED
+'
+' This software is copyrighted work and the intellectual property of
+' Human Centered Solutions, LLP. This software can not be used without
+' the expressed written consent of Human Centered Solutions, LLP.
+'
+'
+'Purpose:
+' Keeper of constants, functions, sub procedures used
+' through out the HCS advanced operator interface displays and shape
+' library.
+'Standards:
+'1. All names of objects in this shape are prefixed with "GSH_"
+'2. All constant should be all capital letters
+'3. All subroutines/functions related to page display must be put in the "PAGE DISPLAY" section
+'4. All subroutines/functions related to faceplate display must be put in the "FACEPLATE DISPLAY" section
+'5. All subroutines related to all shapes in general must be put in the "SHAPE GENERAL" section
+'6. All subroutines related to SCADA shapes must be put in the "SCADA SPECIFIC" section
+'7. All subroutines related to C200 shapes must be put in the "C200 SPECIFIC" section
+'8. All subroutines related to TPS shapes must be put in the "TPS SPECIFIC" section
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''Debugging tools ''''''''''''''''''''''''''''''''''''''''
+'Logging Method Options
+'0=None
+'1=Msgbox
+'2=Logfile at C:\Documents and Settings\All Users\Application Data\Honeywell\HMIWebLog
+'3=All of Above
+Const GSH_LOGGING_MODE = 2
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure Log Start ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' Used to Log Information at the beginning of functions or procedures
+' must be implemented in each function or procedure
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub gsh_log_s(txt)
+ gsh_log "START>" & txt
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure Log End ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' Used to Log Information at the end of functions or procedures
+' must be implemented in each function or procedure
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub gsh_log_e(txt)
+ gsh_log "END>" & txt
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure Log ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' Used to Log Information to either the server display log file or
+' message boxes (alerts) on the GUI. Uses constants to control behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub gsh_log(txt)
+Select Case GSH_LOGGING_MODE
+ Case 1
+ msgbox txt
+ Case 2
+ window.external.Parent.LogMessage txt
+ Case 3
+ window.external.Parent.LogMessage txt
+ msgbox txt
+ Case else
+ Exit sub
+ End Select
+end sub
+
+'COLORS
+Const GSH_EMERGCOLOR = "#FF0000"
+Const GSH_HIGHCOLOR = "#FFBE00"
+Const GSH_LOWCOLOR = "#C800C8"
+Const GSH_PRINCIPLEFOCUSCOLOR = "#00008C"
+Const GSH_ASSOCIATEDFOCUSCOLOR = "#C8DCFF"
+Const GSH_DISPLAYBKGRNDCOLOR = "#EBEBEB"
+Const GSH_OBJECTOUTLINECOLOR = "#AAAAAA"
+Const GSH_INDICATORFILLCOLOR = "#E2E2E2"
+Const GSH_OFFNORMALCOLOR = "#FF00A8"
+Const GSH_DISABLEDALARMCOLOR = "#FF00A8"
+Const GSH_NORMALCOLOR = "#B4B4B4"
+Const GSH_ALARMOUTLINETHICKNESS = 3
+Const GSH_FOCUSOUTLINETHICKNESS = 2
+Const GSH_OUTLINETHICKNESS = 1
+Const GSH_FILLTRANSPARENT = 1
+Const GSH_FILLSOLID = 0
+Const GSH_LEVELINDICATORFLOATHEIGHT = 15
+'GRAY SCALE
+Const GSH_LIGHTGRAYCOLOR = "#B4B4B4"
+Const GSH_WHITE = "#FFFFFF"
+Const GSH_LIGHTLIGHTGRAYCOLOR = "#E1E1E1"
+Const GSH_DARKGRAYCOLOR = "#787878"
+
+'CSS Styles .... must match hcs.css file
+'Focus
+Const GSH_CSSFOCUSASSOCIATED = "FocusAssociated"
+Const GSH_CSSFOCUSASSOCIATEDTABORGANIZER = "FocusAssociatedTabOrganizer"
+'TODO:clean up
+Const GSH_CSSFOCUSPRINCIPAL = "FocusPrincipal"
+Const GSH_CSSFOCUSNONE = "FocusNone"
+Const GSH_CSSFOCUSOFFNORMAL = "FocusOffNormal"
+Const GSH_CSS_ALARMDISABLED = "AlarmDisabled"
+Const GSH_CSSANALOGINDICATORDISABLEDALARM = "AlarmDisabled"
+Const GSH_CSSANALOGINDICATORNORMAL = "AnalogIndicatorNormal"
+Const GSH_CSSANALOGINDICATOROFFNORMAL = "AnalogIndicatorOffNormal"
+Const GSH_CSSBGALARM_NONE = "BarGraphAlarmNone"
+Const GSH_CSSBGALARM_ACKEMERG = "BarGraphAlarmEmergencyAcknowledged"
+Const GSH_CSSBGALARM_UNACKEMERG = "BarGraphAlarmEmergencyUnAcknowledged"
+Const GSH_CSSBGALARM_UNACKHIGH = "BarGraphAlarmHighUnAcknowledged"
+Const GSH_CSSBGALARM_ACKHIGH = "BarGraphAlarmHighAcknowledged"
+Const GSH_CSSBGALARM_UNACKLOW = "BarGraphAlarmLowUnAcknowledged"
+Const GSH_CSSBGALARM_ACKLOW = "BarGraphAlarmLowAcknowledged"
+Const GSH_CSSBGALARM_DISABLED = "BarGraphAlarmDisabled"
+Const GSH_CSSMOTORINDICATORDISABLEDALARM = "AlarmDisabled"'"MotorIndicatorDisabledAlarm"
+Const GSH_CSSMOTORINDICATORNORMAL = "MotorIndicatorNormal"
+Const GSH_CSSMOTOROFF = "MotorIndicatorMotorNotRunning"
+Const GSH_CSSMOTORON = "MotorIndicatorMotorRunning"
+Const GSH_CSSMINIMOTORINDICATORDISABLEDALARM = "MiniMotorIndicatorDisabledAlarm"
+Const GSH_CSSMINIMOTORINDICATORNORMAL = "MiniMotorIndicatorNormal"
+Const GSH_CSSLEVELINDICATORDISABLEDALARM = "LevelIndicatorDisabledAlarm"
+Const GSH_CSSLEVELINDICATORBADPV = "LevelIndicatorBadPV"
+Const GSH_CSSLEVELINDICATORNORMAL = "LevelIndicatorNormal"
+Const GSH_CSSLEVELINDICATORFLOAT = "LevelIndicatorFloat"
+Const GSH_CSSLEVELINDICATORSP = "LevelIndicatorSP"
+Const GSH_CSSLEVELINDICATORBADPVTEXT = "LevelIndicatorBadPVText"
+Const GSH_CSSLEVELINDICATORNORMALPVTEXT = "LevelIndicatorNormalPVText"
+const GSH_CSSLVLINDICATORSMALLALARMWIDTH="LineWidth2"
+Const GSH_CSSDIGITALINDICATORDISABLEDALARM = "AlarmDisabled"'"DigitalIndicatorDisabledAlarm"
+Const GSH_CSSDIGITALINDICATORNORMAL = "DigitalIndicatorNormal"
+Const GSH_CSSDIGITALINDICATOROFFNORMAL = "DigitalIndicatorOffNormal"
+Const GSH_CSSDIGITALOUTPUTINDICATORNORMAL = "DigitalOutputIndicatorNormal"
+Const GSH_CSSDIGITALOUTPUTINDICATORDISABLEDALARM = "AlarmDisabled"'"DigitalOutputIndicatorDisabledAlarm"
+Const GSH_CSSDIGITALOUTPUTINDICATORDEFAULT = ""
+Const GSH_CSSGROUPANALOGNORMAL = "GroupAnalogNormal"
+Const GSH_CSSGROUPANALOGDISABLEDALARM = "AlarmDisabled"'"GroupAnalogDisabledAlarm"
+Const GSH_CSSGROUPDATAENTRY = "Group_DataEntry"
+Const GSH_CSSGROUPDIGITALCOMPOSITEDISABLEDALARM = "AlarmDisabled"'"GroupDigitalCompositeDisabledAlarm"
+Const GSH_CSSGROUPDIGITALCOMPOSITENORMAL = "GroupDigitalCompositeNormal"
+Const GSH_CSSGROUPDIGITALCOMPOSITEDEFAULT = ""
+Const GSH_CSSGROUPDIGITALINPUTDISABLEDALARM = "AlarmDisabled"'"GroupDigitalInputDisabledAlarm"
+Const GSH_CSSGROUPDIGITALINPUTNORMAL = "GroupDigitalInputNormal"
+Const GSH_CSSGROUPDIGITALINPUTDEFAULT = ""
+Const GSH_CSSGROUPORSELDISABLEDALARM = "AlarmDisabled"'"GroupOrselDisabledAlarm"
+Const GSH_CSSGROUPORSELNORMAL = "GroupOrselNormal"
+Const GSH_CSSGROUPORSELDEFAULT = ""
+Const GSH_CSSGROUPREGULATORYCONTROLDISABLEDALARM = "AlarmDisabled"'"GroupRegulatoryControlDisabledAlarm"
+Const GSH_CSSGROUPREGULATORYCONTROLNORMAL = "GroupRegulatoryControlNormal"
+Const GSH_CSSGROUPREGULATORYCONTROLDEFAULT = ""
+Const GSH_CSSNUMERICINDICATORNORMAL = "NumericIndicatorNormal"
+Const GSH_CSSREGULATORYCONTROLINDICATORDISABLEDALARM = "AlarmDisabled"' "RegulatoryControlIndicatorDisabledAlarm"
+Const GSH_CSSREGULATORYCONTROLINDICATORNORMAL = "RegulatoryControlIndicatorNormal"
+Const GSH_CSSVALVEDIGITALOPEN = "ValveDigitalOpen"
+Const GSH_CSSVALVEDIGITALCLOSED = "ValveDigitalClosed"
+Const GSH_CSSVALVEDIGITALTRAVEL = "ValveDigitalTravel"
+Const GSH_CSSVALVEDIGITALDISABLEDALARM = "AlarmDisabled"'"ValveDigitalDisabledAlarm"
+Const GSH_CSSVALVEREGULATORYCONTROLSATURATED = "RegulatoryControlValveSaturated"
+Const GSH_CSSVALVEREGULATORYCONTROLNORMAL = "RegulatoryControlValveNormal"
+Const GSH_CSSREGULATORYCONTROLVALVEOFFNORMAL = "RegulatoryControlValveOffNormal"
+Const GSH_CSSTABFOCUSNORMAL = "TabFocusNormal"
+Const GSH_CSSTABOUTLINENORMAL = "TabOutlineNormal"
+Const GSH_CSSTABORGANIZEROUTLINENORMAL = "TabOrganizerOutlineNormal"
+Const GSH_CSSValveOutlineBackground= "ValveOutlineBackground"
+Const GSH_CSSANALOGOUTPUTINDICATORNORMAL = "AnalogOutputIndicatorNormal"
+Const GSH_CSSSENSORNORMAL = "SensorNormal"
+Const GSH_CSSWHITE = "White"
+Const GSH_CSSFOCUSNONEOFFNORMAL = "FocusNoneOffNormal"
+Const GSH_CSSFIRSTOUT_ON = "FirstOutLineOn"
+Const GSH_CSSFIRSTOUT_OFF = "FirstoutLineOff"
+Const GSH_CSSMOTOROFFNORMALFILL = "OffNormalLineFill"
+Const GSH_CSSFRAMEMF = "FrameMF" 'added 07Jan08 for MF Frames when normal and not in focus
+Const GSH_CSSSAFILL = "SituationAwarenessOn" 'added 28May09 for SA Frame color
+Const GSH_CSSSSOLOUTOFLIMIT = "SOLOutOfLimit" 'added 14Sept09 for SOL color
+Const GSH_CSSSSOLINLIMIT = "SOLWithinLimit" 'added 14Sept09 for SOL color
+Const GSH_CSSOFFNORMALLINEFILL = "OffNormalLineFill" 'added 7Dec09 for TPS Bypass Status
+Const GSH_CSSNORMALLINEFILL = "NormalLineFill" 'NormalLineFill
+Const GSH_CSSLINEUTILITY = "LineUtility" 'added 7Dec09 for TPS Bypass Status
+
+
+'Added Nov 19, 2009 for TPS digital color box
+Const GSH_FILLEDREDCOLOR = "FilledRed"
+Const GSH_FILLEDGREENCOLOR = "FilledGreen"
+Const GSH_FILLEDYELLOWCOLOR = "FilledYellow"
+
+'Alarms
+Const GSH_CSSALARMEMERGENCYACK = "AlarmEmergencyAcknowledged"
+Const GSH_CSSALARMHIGHACK = "AlarmHighAcknowledged"
+Const GSH_CSSALARMLOWACK = "AlarmLowAcknowledged"
+Const GSH_CSSALARMEMERGENCYUNACK = "AlarmEmergencyUnAcknowledged"
+Const GSH_CSSALARMHIGHUNACK = "AlarmHighUnAcknowledged"
+Const GSH_CSSALARMLOWUNACK = "AlarmLowUnAcknowledged"
+Const GSH_CSSALARMNONE = "AlarmNone"
+Const GSH_CSSSENSORDISABLEDALARM = "SensorAlarmDisabled"
+Const GSH_CSSSENSORALARMEMERGENCYACK = "SensorAlarmEmergencyAcknowledged"
+Const GSH_CSSSENSORALARMHIGHACK = "SensorAlarmHighAcknowledged"
+Const GSH_CSSSENSORALARMLOWACK = "SensorAlarmLowAcknowledged"
+Const GSH_CSSSENSORALARMEMERGENCYUNACK = "SensorAlarmEmergencyUnAcknowledged"
+Const GSH_CSSSENSORALARMHIGHUNACK = "SensorAlarmHighUnAcknowledged"
+Const GSH_CSSSENSORALARMLOWUNACK = "SensorAlarmLowUnAcknowledged"
+Const GSH_CSSSENSORALARMNONE = "SensorAlarmNone"
+
+'Display Static Objects
+Const GSH_CSSFOCUSASSOCIATED_COLOUR = "FocusAssociated_Colour"
+Const GSH_CSSBLACK = "Black"
+Const GSH_CSSDARK_GRAY = "Dark_Gray"
+Const GSH_CSSEQUIPMENT_GRAY = "Equipment_Gray"
+Const GSH_CSSLIGHT_GRAY = "Light_Gray"
+Const GSH_CSSBACKGROUND_GRAY = "Background_Gray"
+
+'Custom Properties
+'Types of CP's
+Const GSH_CPVALUE = "Value"
+Const GSH_CPPOINT = "Point"
+Const GSH_CPPARAMETER = "Parameter"
+'Names of CP's .... the values must match those in each shape
+Const GSH_CPPOINTTYPE = "PointType"
+Const GSH_CPENTITY = "Entity"
+Const GSH_CPGROUPPOINT = "GroupPoint"
+Const GSH_CPENTITYALARM = "EntityAlarm"
+Const GSH_CPASSOCTYPE2 = "AssocLevel2"
+Const GSH_CPASSOCTYPE3 = "AssocLevel3"
+Const GSH_CPASSOCTYPE4 = "AssocLevel4"
+Const GSH_CPDISPLAYLEVEL = "DisplayLevel"
+Const GSH_CPDISPLAYNAME = "DisplayName"
+Const GSH_CPTABLABEL = "TabLabel"
+Const GSH_CPASSOCLEVEL4 = "AssocLevel4"
+Const GSH_CPLABEL = "Label"
+const GSH_CPRANGEMAX = "RangeMax"
+const GSH_CPRANGEMIN = "RangeMin"
+Const GSH_CPHIDEPV = "HidePV"
+const GSH_CPSALOWERLIMIT = "LowerSALimit"
+const GSH_CPSAUPPERLIMIT = "UpperSALimit"
+
+Const GSH_CPENTITY_ALARMGROUP = "Entity_AlarmGroup"
+Const GSH_CPENTITY_LOWTRIP = "EntityLowTrip"
+Const GSH_CPENTITY_HIGHTRIP = "EntityHighTrip"
+Const GSH_CPENTITY_SPHI = "Entity_SPHi"
+Const GSH_CPENTITY_SPLO = "Entity_SPLo"
+
+Const GSH_CPENTITY_RES = "Entity_Reset"
+Const GSH_CPENTITY_SOR = "Entity_SOR"
+Const GSH_CPENTITY_MOS = "Entity_MOS"
+Const GSH_CPENTITY_HHFF = "Entity_HH_Fail"
+Const GSH_CPENTITY_LLFF = "Entity_LL_Fail"
+Const GSH_CPENTITY_HHHTRIP = "Entity_HHH_Trip"
+Const GSH_CPENTITY_LLLTRIP = "Entity_LLL_Trip"
+Const GSH_CPENTITY_HHTRIP = "Entity_HH_Trip"
+Const GSH_CPENTITY_LLTRIP = "Entity_LL_Trip"
+Const GSH_CPENTITY_DEVIATION = "Entity_Deviation"
+
+Const GSH_CPPARAM_RES_PARA = "Entity_Reset_Para"
+Const GSH_CPPARAM_SOR_PARA = "Entity_SOR_Para"
+Const GSH_CPPARAM_MOS_PARA = "Entity_MOS_Para"
+'Const GSH_CPPARAM_HHFF_PARA = "Entity_HH_Fail_Para"
+'Const GSH_CPPARAM_LLFF_PARA = "Entity_LL_Fail_Para"
+Const GSH_CPPARAM_HHHTRIP_PARA = "Entity_HHH_Trip_Para"
+Const GSH_CPPARAM_LLLTRIP_PARA = "Entity_LLL_TRIP_Para"
+Const GSH_CPPARAM_HHTRIP_PARA = "Entity_HH_Trip_Para"
+Const GSH_CPPARAM_LLTRIP_PARA = "Entity_LL_Trip_Para"
+Const GSH_CPPARAM_DEVIATION_PARA = "Entity_Deviation_Para"
+
+Const GSH_CPPARAM_ENTITY_SPHI_PARA = "Entity_SPHi_Para"
+Const GSH_CPPARAM_ENTITY_SPLO_PARA = "Entity_SPLo_Para"
+
+Const GSH_CPX1 = "X1_Position"
+Const GSH_CPX2 = "X2_Position"
+Const GSH_CPX3 = "X3_Position"
+Const GSH_CPDIVERTMIN = "DivertMin"
+Const GSH_CPDIVERTMAX = "DivertMax"
+Const GSH_CPTHROUGHMIN = "ThroughMin"
+Const GSH_CPTHROUGHMAX = "ThroughMax"
+Const GSH_CPINPUTDIRECTION = "InputDirection"
+Const GSH_CPJUSTIFYLABEL = "JustifyLabel"
+
+'Point Types ... the values here are the only possibles for the PointType Custom property
+'entered by the display designer at design time.
+Const GSH_CPPOINTTYPE_SCADA = "SCADA"
+Const GSH_CPPOINTTYPE_TPS = "TPS"
+Const GSH_CPPOINTTYPE_C200 = "C200"
+Const GSH_CPPOINTTYPE_C300 = "C300"
+
+'PARAMETERS TEMPLATE IS GSH_'<pointtype>_PARAM_<item>'
+Const GSH_EXPERION_PARAM_ALARMPRIORITY= "ALARMPRIORITY"
+Const GSH_EXPERION_PARAM_UNACKALARMEXISTS = "UNACKALARMEXISTS"
+Const GSH_SCADA_PARAM_ALARMDISABLED = "ALARMDISABLED"
+const GSH_SCADA_PARAM_ALARMPRIORITY = "ALARMPRIORITY"
+Const GSH_SCADA_PARAM_INITIALIZATION = "INITMAN"
+Const GSH_SCADA_PARAM_INTRANSMITTERHIGHALARM = "InTransmitterHighAlarm"
+Const GSH_SCADA_PARAM_INTRANSMITTERLOWALARM = "InTransmitterLowAlarm"
+Const GSH_SCADA_PARAM_INUNREASONABLYHIGHALARM = "InUnreasonablyHighAlarm"
+Const GSH_SCADA_PARAM_INUNREASONABLYLOWALARM = "InUnreasonablyLowAlarm"
+Const GSH_SCADA_PARAM_MODATTR = "MODATTR"
+Const GSH_SCADA_PARAM_MODE = "MODE"
+Const GSH_SCADA_PARAM_MODEINERROR = "ModeInError"
+Const GSH_SCADA_PARAM_PVINERROR = "PVInError"
+Const GSH_SCADA_PARAM_PVSOURCE = "PVSOURCE"
+Const GSH_SCADA_PARAM_PVTVINERROR = "PVTVInError"
+Const GSH_SCADA_PARAM_OPINERROR = "OutputInError"
+Const GSH_SCADA_PARAM_RAMP = "TVPROC"
+Const GSH_SCADA_PARAM_REDTAG = "REDTAG"
+Const GSH_SCADA_PARAM_SHUTDOWN = "SHUTDOWN"
+Const GSH_SCADA_PARAM_SPINERROR = "SetPointInError"
+Const GSH_SCADA_PARAM_SSTSMSG = "STSMSG"
+Const GSH_SCADA_PARAM_TOTALDISABLEDALARMS ="TOTALDISABLEDALARMS"
+const GSH_SCADA_PARAM_UNACKALARMEXISTS = "UNACKALARMEXISTS"
+Const GSH_SCADA_PARAM_WINDUP = "ARWOP"
+Const GSH_TPS_PARAM_ALARM_ACKNOWLEGED = "ACKSTAT"
+Const GSH_TPS_PARAM_ALARM_ENABLED = "ALENBST"
+Const GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY = "HIGHALPR"
+Const GSH_TPS_PARAM_INITIALIZATION = "INITMAN"
+Const GSH_TPS_PARAM_MODATTR = "MODATTR"
+Const GSH_TPS_PARAM_MODE = "MODE"
+Const GSH_TPS_PARAM_PVINERROR = "PVInError"
+Const GSH_TPS_PARAM_PVSOURCE = "PVSOURCE"
+Const GSH_TPS_PARAM_RAMP = "TVPROC"
+Const GSH_TPS_PARAM_RAMPOPTION ="SPOPT"
+Const GSH_TPS_PARAM_RAMPTARGETVALUE = "SPTV"
+Const GSH_TPS_PARAM_RAMPTIMEVALUE = "RAMPTIME"
+Const GSH_TPS_PARAM_REDTAG = "REDTAG"
+Const GSH_TPS_PARAM_SHUTDOWN = "SHUTDOWN"
+Const GSH_TPS_PARAM_STATUSMESSAGE = "STSMSG"
+Const GSH_TPS_PARAM_TOTALDISABLEDALARMS = "TOTALDISABLEDALARMS"
+Const GSH_TPS_PARAM_WINDUP = "ARWOP"
+Const GSH_TPS_PARAM_ALARMMSG = "HIGHAL"
+Const GSH_C200_PARAM_ALARMDISABLED = "ALMENBSTATE"
+Const GSH_C200_PARAM_ALARMMSG ="HIALM.TYPE"
+Const GSH_C200_PARAM_BADPVFL = "PVSTSFL.BAD"
+Const GSH_C200_PARAM_MODEATTR = "MODEATTR"
+Const GSH_C200_PARAM_PVSOURCE = "PVSource"
+Const GSH_C200_PARAM_RAMPOPTION ="SPTVOPT"
+Const GSH_C200_PARAM_RAMPTIMEVALUE = "SPTVTIME"
+Const GSH_C200_PARAM_RAMPTARGETVALUE = "SPTV"
+Const GSH_C200_PARAM_WINDUP = "ARWOP"
+
+Const GSH_CPPARAM_BADMODE = "CP_BADMODE"
+Const GSH_CPPARAM_BADOP = "CP_BADOP"
+Const GSH_CPPARAM_BADPV = "CP_BadPV"
+Const GSH_CPPARAM_BADPVTV = "CP_BADPVTV"
+Const GSH_CPPARAM_BADSP = "CP_BADSP"
+Const GSH_CPPARAM_HIGHTRIP = "CP_HighTripPV"
+Const GSH_CPPARAM_INITIALIZATION = "CP_INITIALIZATION"
+Const GSH_CPPARAM_LOWTRIP = "CP_LowTripPV"
+Const GSH_CPPARAM_MODATTR = "CP_MODATTR"
+Const GSH_CPPARAM_MODE = "CP_Mode"
+Const GSH_CPPARAM_MODEATTR = "CP_MODEATTR"
+Const GSH_CPPARAM_OFFNORMAL = "CP_OFFNORMAL"
+Const GSH_CPPARAM_OP = "CP_OP"
+Const GSH_CPPARAM_PV = "CP_PV"
+Const GSH_CPPARAM_PVTV = "CP_PVTV"
+Const GSH_CPPARAM_RAMP = "CP_RAMP"
+Const GSH_CPPARAM_REDTAG = "CP_RedTag"
+Const GSH_CPPARAM_STSMSG = "CP_STSMSG"
+Const GSH_CPPARAM_SELINPUT = "CP_SELINPUT"
+Const GSH_CPPARAM_SELOUT = "CP_SELOUT"
+Const GSH_CPPARAM_SHUTDOWN = "CP_SHUTDOWN"
+Const GSH_CPPARAM_SP = "CP_SP"
+Const GSH_CPPARAM_SPHIGH = "CP_SPHIGH"
+Const GSH_CPPARAM_SPLOW = "CP_SPLOW"
+Const GSH_CPPARAM_STATUSMSG = "CP_STATUSMSG"
+Const GSH_CPPARAM_VLV1 = "CP_VLV1"
+Const GSH_CPPARAM_VLV2 = "CP_VLV2"
+Const GSH_CPPARAM_WINDUP = "CP_WINDUP"
+Const GSH_CPPARAM_LOCALMAN = "CP_LOCALMAN"
+Const GSH_CPPARAM_INTERLOCK = "CP_INTERLOCK"
+Const GSH_CPPARAM_IP1 = "CP_IP1"
+Const GSH_CPPARAM_IP2 = "CP_IP2"
+Const GSH_CPPARAM_IP3 = "CP_IP3"
+Const GSH_CPPARAM_IP4 = "CP_IP4"
+Const GSH_CPTRENDDIR="TrendDir"
+'Added for showing alarm lines on C200 SA levels (May 29 2009, CL)
+Const GSH_CPPARAM_AlarmPriority1 = "CP_AlarmPriority1"
+Const GSH_CPPARAM_AlarmPriority2 = "CP_AlarmPriority2"
+Const GSH_CPPARAM_AlarmPriority3 = "CP_AlarmPriority3"
+Const GSH_CPPARAM_AlarmPriority4 = "CP_AlarmPriority4"
+Const GSH_CPPARAM_AlarmLimit1 = "CP_AlarmLimit1"
+Const GSH_CPPARAM_AlarmLimit2 = "CP_AlarmLimit2"
+Const GSH_CPPARAM_AlarmLimit3 = "CP_AlarmLimit3"
+Const GSH_CPPARAM_AlarmLimit4 = "CP_AlarmLimit4"
+
+Const GSH_EXPECTEDVAL1 = "CP_ExpectedVal1"
+Const GSH_EXPECTEDVAL2 = "CP_ExpectedVal2"
+
+Const GSH_SCADA_INITIALIZATION_VALUE = -1
+Const GSH_TPS_INITIALIZATION_VALUE = -1
+Const GSH_WINDUP_HI = "HI"
+Const GSH_WINDUP_LO = "LO"
+Const GSH_WINDUP_HILO = "HILO"
+Const GSH_WINDUP_INIT = "INITIALIZATION"
+Const GSH_WINDUP_NONE = "NONE"
+Const GSH_RAMPING_RUN = "RUN"
+Const GSH_RAMPING_PRESET = "PRESET"
+Const GSH_RAMPING_NONE = "OFF"
+Const GSH_CAS = "CAS"
+Const GSH_AUTO = "AUTO"
+Const GSH_MAN = "MAN"
+Const GSH_OFF = "OFF"
+Const GSH_PRESET = "PRESET"
+Const GSH_RUN = "RUN"
+Const GSH_PROCESSVALUE = "PV"
+Const GSH_SETPOINTVALUE = "SP"
+Const GSH_OUTPUTVALUE = "OP"
+Const GSH_OPHI = "OPHI" 'Added 03Jan2008 - JE for Scada_AO_fp
+Const GSH_OPLO = "OPLO" 'Added 03Jan2008 - JE for Scada_AO_fp
+Const GSH_PVTVVALUE = "PVTV"
+const GSH_MODEVALUE = "MODE"
+Const GSH_RAMPVALUE = "SPTV"
+Const GSH_INTERLOCK = "SI"
+Const GSH_LOCALMAN = "LOCALMAN"
+Const GSH_F1_1 = "F1_1"
+Const GSH_F1_0 = "F1_0"
+Const GSH_F2_1 = "F2_1"
+Const GSH_F2_0 = "F2_0"
+Const GSH_F3_1 = "F3_1"
+Const GSH_F3_0 = "F3_0"
+Const GSH_F4_1 = "F4_1"
+Const GSH_F4_0 = "F4_0"
+'Const GSH_RAMPTARGETVALUE = "SPTV" 'REPLACED BY GSH_C200_PARAM_RAMPTARGETVALUE Apr 18
+'Const GSH_RAMPTIMEVALUE = "SPTVTIME" 'REPLACED BY GSH_C200_PARAM_RAMPTIMEVALUE Apr 18
+'Const GSH_RAMPSTATUSVALUE = "SPTVSTATE" 'not used?
+
+'ALARMS
+
+'Alarm Code
+Const GSH_NOALARMCODE = "NONE"
+Const GSH_ACKLOW = "ACKLOW"
+Const GSH_ACKHIGH = "ACKHIGH"
+Const GSH_ACKEMERG = "ACKEMERGENGY"
+Const GSH_UNACKLOW = "UNACKL0W"
+Const GSH_UNACKHIGH = "UNACKHIGH"
+Const GSH_UNACKEMERG = "UNACKEMERGENGY"
+
+const GSH_NOACTION = "NOACTION"
+const GSH_EMERGENCY = "EMERGNCY"
+const GSH_HIGH = "HIGH"
+const GSH_LOW = "LOW"
+Const GSH_ON = "ON"
+const GSH_NONE = "NONE"
+Const GSH_EMPTYSTRING = ""
+
+const GSH_NOALARM = "NOALARM"
+const GSH_UNAKALRM = "UNAKALRM"
+const GSH_AKDALRM = "AKDALRM"
+
+Const GSH_ALARMLIM1 = "alarmlimit1"
+Const GSH_ALARMLIM2 = "alarmlimit2"
+Const GSH_ALARMLIM3 = "alarmlimit3"
+Const GSH_ALARMLIM4 = "alarmlimit4"
+Const GSH_ALARMTYPE1 = "alarmtype1"
+Const GSH_ALARMTYPE2 = "alarmtype2"
+Const GSH_ALARMTYPE3 = "alarmtype3"
+Const GSH_ALARMTYPE4 = "alarmtype4"
+Const GSH_ALARMPRI1 = "alarm1priority"
+Const GSH_ALARMPRI2 = "alarm2priority"
+Const GSH_ALARMPRI3 = "alarm3priority"
+Const GSH_ALARMPRI4 = "alarm4priority"
+
+Const GSH_EUHI = "EUHI"
+Const GSH_EULO = "EULO"
+Const GSH_PVEUHI = "PVEUHI"
+Const GSH_PVEULO = "PVEULO"
+
+Const GSH_TOTALLOWACKALARMS = "TOTALLOWACKALARMS"
+Const GSH_TOTALHIGHACKALARMS = "TOTALHIGHACKALARMS"
+Const GSH_TOTALURGENTACKALARMS = "TOTALURGENTACKALARMS"
+Const GSH_TOTALLOWUNACKALARMS = "TOTALLOWUNACKALARMS"
+Const GSH_TOTALHIGHUNACKALARMS = "TOTALHIGHUNACKALARMS "
+Const GSH_TOTALURGENTUNACKALARMS = "TOTALURGENTUNACKALARMS"
+
+'REMOVED CAUSE NOT USED
+'const GSH_DISABLED = "ALARM DISABLED"
+'const GSH_ENABLED = "ALARM ENABLED"
+Const GSH_ENABLE = "ENABLE"
+const GSH_BADDATA = "BADDATA"
+const GSH_GOODDATA = "GOODDATA"
+Const GSH_TRUE = "true"
+Const GSH_FALSE = "false"
+
+'Registy
+Const GSH_REGISTRY_BASE = "HKCU\SOFTWARE\HCS\"
+Const GSH_REGISTRY_DISPLAYNAMES = "DisplayNames\"
+Const GSH_REGISTRY_DISPLAYINFO = "DisplayInformation\"
+Const GSH_REGISTRY_DISPLAYCOMM = "HMIDisplay\DisplayCommunication\"
+Const GSH_REGISTRY_LOG = "HMIDisplay\Log\"
+Const GSH_REGISTRY_OPDEVMONITOR="OPDevMonitor\"
+Const GSH_REGISTRY_DEMANDTRD = "HKCU\SOFTWARE\Matrikon\Operator Trend\DemandTrend\"
+Const GSH_REGISTRY_SETTINGS = "Settings"
+Const GSH_REGISTRY_MENUCONFIG = "MenuConfig\"
+Const GSH_REGISTRY_MENUCONFIG_EQUIPMENT = "MenuConfig_Equipment\"
+Const GSH_REGISTRY_TAGINFORMATION = "TagInformation\"
+Const GSH_REGISTRY_FACEPLATE_TAGS = "HMIDisplay\FaceplateTags\"
+Const GSH_REGISTRY_OPERATORTREND = "HKCU\SOFTWARE\Matrikon\Operator Trend\"
+Const GSH_REGISTRY_DETAILTREND = "HKCU\SOFTWARE\Matrikon\Operator Trend\DetailTrend\"
+Const GSH_REGISTRY_TRENDCONFIG = "HKCU\SOFTWARE\Matrikon\Operator Trend\TrendConfig\"
+Const GSH_REGISTRY_STSMSGLISTS = "StatusMessage\"
+
+Const GSH_REGKEY_ACTIVE = "Active"
+Const GSH_REGKEY_AUTOSCALE = "AUTOSCALE"
+
+'10/06/2008 (CL)
+Const GSH_REGKEY_TREND_RANGE_HIGH = "TREND_RANGE_HIGH"
+Const GSH_REGKEY_TREND_RANGE_LOW = "TREND_RANGE_LOW"
+
+Const GSH_REGKEY_CMDSTR = "CmdDspStr"
+Const GSH_REGKEY_CMDSTRING = "Command"
+Const GSH_REGKEY_FACEPLATE_CURRENT = "current"
+Const GSH_REGKEY_FACEPLATE_PRIOR = "prior"
+Const GSH_REGKEY_FPPAGEDELAY = "FaceplateFocusUpdateDelay"
+Const GSH_REGKEY_FPPAGEDELAY_DEFAULTMS = "3000"
+Const GSH_REGKEY_DEMANDTREND = "DemandTrend"
+Const GSH_REGKEY_DEMANDTRENDPREV = "DemandTrendPrevious"
+Const GSH_REGKEY_DESCR = "Description"
+Const GSH_REGKEY_DISPLAYLOC = "DisplayLocation"
+Const GSH_REGKEY_FacePlateFN = "faceplateFileName"
+Const GSH_REGKEY_FOCUSTAG = "FocusTag"
+Const GSH_REGKEY_HDAPATH = "HDA_ITEM_PATH"
+'Added 08/21/2008 (CL) to work with Sasol PHD historian interface
+'Issue#21: http://wss-edm-1/clients/hcs/services/ISE-HCS8227/ClientProjectAccess/Lists/Issue%20Tracker/DispForm.aspx?ID=21
+Const GSH_REGKEY_USESHORTNAME_FOR_HDAPATH = "USE_SHORTNAME_FOR_HDA_ITEMPATH"
+Const GSH_REGKEY_ITEMALIAS = "ITEM_ALIAS"
+Const GSH_REGKEY_KEYWORD= "Keyword"
+Const GSH_REGKEY_LEVELPAGEDELAY = "LevelPageFocusUpdateDelay"
+Const GSH_REGKEY_LEVELPAGEDELAY_DEFAULTMS = "500"
+Const GSH_REGKEY_NMODATTR = "NMODATTR"
+Const GSH_REGKEY_NMODE = "NMODE"
+Const GSH_REGKEY_NUMCMDS = "NoofCommands"
+Const GSH_REGKEY_NUMOFT3 = "NumberOfType3"
+Const GSH_REGKEY_NUMTRENDPARAMS = "NoOfTrendingParams"
+Const GSH_REGKEY_OPCKEY1PREFIX = "OPC_KEY_1_PREFIX"
+Const GSH_REGKEY_OPCKEY2PREFIX = "OPC_KEY_2_PREFIX"
+Const GSH_REGKEY_OPCITEMPATH = "OPC_ITEM_PATH"
+Const GSH_REGKEY_OPC2ITEMPATH = "OPC2_ITEM_PATH"
+Const GSH_REGKEY_PATHPREFIX = "PATHPREFIX"
+Const GSH_REGKEY_PRIORT3 = "PriorType3"
+Const GSH_REGKEY_PRIORT4 = "PriorType4"
+Const GSH_REGKEY_PVNORMAL_STATE = "PVNormalState"
+Const GSH_REGKEY_OPNORMAL_STATE = "OPNormalState"
+Const GSH_REGKEY_PV_NORMAL_STATE = "PVNormalState"
+Const GSH_REGKEY_SA_STATE = "SAState"
+Const GSH_REGKEY_SOL_HI = "SOLHILimit"
+Const GSH_REGKEY_SOL_LO = "SOLLOLimit"
+Const GSH_REGKEY_OP_NORMAL_STATE = "OPNormalState"
+Const GSH_REGKEY_T1FN = "Type1FileName"
+Const GSH_REGKEY_T2FN = "Type2FileName"
+Const GSH_REGKEY_T3FN = "Type3FileName"
+Const GSH_REGKEY_T4FN = "Type4FileName"
+Const GSH_REGKEY_TagFacePlate = "faceplate"
+Const GSH_REGKEY_TAGFAM = "TagFamily"
+Const GSH_REGKEY_TAGDESCRIPTION = "TagDescription"
+Const GSH_REGKEY_TAGEUDESC = "EUDESC"
+Const GSH_REGKEY_TAGNAME_ALIAS = "TagName_Alias"
+Const GSH_REGKEY_TAGNAMEHDA = "TagName_HDA"
+Const GSH_REGKEY_TRENDPARAM = "TrendParam"
+
+'10/06/2008 (CL)
+Const GSH_REGKEY_EUHIGH = "EUHIGH"
+Const GSH_REGKEY_EULOW = "EULOW"
+
+Const GSH_REGKEY_TRENDSTEPPED = "Stepped"
+Const GSH_REGKEY_TRENDTRACE = "Trace_"
+Const GSH_REGKEY_TREND_YMAX = "Y_MAX"
+Const GSH_REGKEY_TREND_YMIN = "Y_MIN"
+Const GSH_REGKEY_USET4 = "UseT4Default"
+Const GSH_REGKEY_UNITS = "EUDesc"
+Const GSH_REGKEY_SAME_SATELLITE_LINK = "SAME_SATELLITE_LINK"
+
+Const GSH_REGKEY_STSMSGLIST = "StsMsgList"
+Const GSH_REGKEY_STATUSMESSAGE = "StatusMessage"
+Const GSH_REGKEY_TAGNAMELABLESTATUS = "TagNameLabelVisibilityStatus"
+
+'registry key for OPDevMonitor shapes
+Const GSH_REGKEY_OPDEVMON_NOOFOP="NoOfOPs"
+Const GSH_REGKEY_OPDEVMON_DEADBAND="DeadBand"
+Const GSH_REGKEY_OPDEVMON_FILTER="Filter"
+Const GSH_REGKEY_OPDEVMON_RESETDATE="ResetDate"
+Const GSH_REGKEY_OPDEVMON_RESETTIME="ResetTime"
+Const GSH_REGKEY_OPDEVMON_DIFF_OLD="Diff_Old"
+Const GSH_REGKEY_OPDEVMON_ENTITY="Entity"
+Const GSH_REGKEY_OPDEVMON_OPPARAMETER="OPParameter"
+Const GSH_REGKEY_OPDEVMON_OPREFVAL="OPRefVal"
+
+'TODO - CHANGE KEY BELOW FORMAT
+Const GSH_PVFORMATKEY = "PVFORMAT"
+
+Const GSH_DISPLAYDEFAULT_LOC = ""
+Const GSH_BINARY = "REG_BINARY"
+Const GSH_TEXT = "REG_SZ"
+Const GSH_DWORD = "REG_DWORD"
+Const GSH_DISPLAYFILEEXTENSION = ".htm"
+'Const GSH_CSSTAGNAMELABEL = "TagNameLabel"
+
+'Station Data Repository
+Const GSH_SDR_CURRENTPOINT = "CurrentPoint"
+Const GSH_SDR_INTERIMPOINT = "InterimPoint"
+'
+Const GSH_DEFAULTPVFORMAT = "D1"
+Const GSH_DEFAULT_NULL = "default null"
+Const GSH_NOT_IMPLEMENTED = "Not Implemented"
+'Shape Library Constants - do not modify
+Const GSH_SHAPEPREFIX = "shape" 'used when comparing against the prefix of objects on displays
+Const GSH_GSHShapeName = "shapegsh" 'name of General Script holder shape, in order to omit on reloading
+Const GSH_HIDDEN = "hidden" 'used in object visibility property of any object
+Const GSH_VISIBLE = "visible" 'used in object visibility property of any object
+
+Const GSH_SVIEW_TYPE2 = "Level2Display"
+Const GSH_SVIEW_TYPE3 = "Level3Display"
+Const GSH_SVIEW_TYPE4 = "Level4Display"
+Const GSH_GRPSCRIPT_OBJNAME = "rec_DataScript"
+
+'Specific to Regulator Control Indicator
+Const GSH_REGULATORYCONTORLINDICATOR_RUN = "R"
+Const GSH_REGULATORYCONTORLINDICATOR_PRESET = "P"
+Const GSH_MODE_AUTO_TEXT_INDICATOR = "A"
+Const GSH_MODE_MAN_TEXT_INDICATOR = "M"
+Const GSH_MODE_CASC_TEXT_INDICATOR = "C"
+Const GSH_MODE_BCAS_TEXT_INDICATOR = "B"
+Const GSH_MODE_COMP_TEXT_INDICATOR = "P"
+Const GSH_MODE_AUTO = "AUTO"
+Const GSH_MODE_MAN = "MAN"
+Const GSH_MODE_CASC = "CASC"
+Const GSH_MODE_BCAS = "BCAS"
+Const GSH_MODE_COMP = "COMP"
+
+Const GSH_INTERLOCK_TXT = "I"
+Const GSH_LOCALMAN_TXT = "L"
+
+'Specific to Digital Valve
+Const GSH_VALVEDIGITALOFFNORMAL = "ValveDigitalOffNormal"
+Const GSH_VALVEDIGITALPOSITION_OPEN = "OPEN"
+Const GSH_VALVEDIGITALPOSITION_CLOSED = "CLOSED"
+Const GSH_VALVEDIGITALPOSITION_TRAVEL = "TRAVEL"
+
+'Specific to Valve
+Const GSH_TRAVEL = "TRAVEL"
+Const GSH_MOVING = "MOVING"
+Const GSH_MOVING_TEXT = "MOVING"
+Const GSH_REDTAG = "REDTAG"
+Const GSH_REDTAG_TEXT = "REDTAG"
+Const GSH_HANDJACK = "HANDJACK"
+Const GSH_HANDJACK_TEXT = "HANDJK"
+Const GSH_ISOLATED = "ISOLATED"
+Const GSH_ISOLATED_TEXT = "ISOLATD"
+Const GSH_BADPV = "BadPV"
+Const GSH_SHUTDOWN_TEXT_MESSAGE = "S/D"
+Const GSH_BYPASSED = "BYPASSED"
+Const GSH_BYPASSED_TEXT_MESSAGE = "BYPASS"
+Const GSH_MODE_PROGRAM = "PROGRAM"
+Const GSH_MODE_PROGRAM_TEXT = "P-"
+const GSH_PVNORMALSTATE_OFFNORMAL = "NONE"
+Const GSH_ALLOWOPEDIT_MODE = "MAN"
+Const GSH_ALLOWSPEDIT_MODE = "AUTO"
+Const GSH_BADPV_TEXT = "---"
+Const GSH_BADOP_TEXT = "---"
+Const GSH_BADMODE_TEXT = "---"
+Const GSH_BADPVTV_TEXT = "---"
+Const GSH_NODATA = "1.#QNAN"
+Const GSH_LEVELINDICATORDECIMALS = 1
+Const GSH_OUTPUTINDICATORDECIMALS = 1
+Const GSH_SELX1 = 1
+Const GSH_SELX2 = 2
+Const GSH_SELX3 = 3
+Const GSH_CPIN1 = "IN1_Position"
+Const GSH_CPIN2 = "IN2_Position"
+Const GSH_SELIN1 = "Off"
+Const GSH_SELIN2 = "On"
+Const GSH_LEFT = "LEFT"
+Const GSH_RIGHT = "RIGHT"
+Const GSH_CENTER = "CENTER"
+
+'Groups Timeout (Seconds)
+Const GSH_GroupTimeout = 10
+
+'Faceplates
+Const GSH_FacePlateTagNameTimeout = 10
+'Const GSH_FPTIMEOUT = 7
+'10/01/2008 Changed to 12 to give operator more time as requested by Sasol (CL)
+Const GSH_FPTIMEOUT = 12
+Const GSH_FP_TAGNAMEENTRY_TIMEOUT = 20
+Const GSH_DETAILTRENDUPDATEPERIOD_SECS = 5
+Const GSH_FP_SHOWNAMESBTNUPDATEPERIOD_SECS = 10
+Const GSH_FP_DEFAULTFACEPLATE = "GENERAL_FP"
+Const GSH_FP_PVHH = 9
+Const GSH_FP_PVHH_LABEL = "HiHi"
+Const GSH_FP_PVH = 7
+Const GSH_FP_PVH_LABEL = "Hi"
+Const GSH_FP_PVL = 6
+Const GSH_FP_PVL_LABEL = "Lo"
+Const GSH_FP_PVLL = 8
+Const GSH_FP_PVLL_LABEL = "LoLo"
+
+'Global Variables
+
+dim GSH_DetailTrendUpdateTimerId
+dim GSH_GroupTimerId
+dim GSH_FPTimerId
+dim GSH_FP_ShowNamesBtnTimerId
+dim changeOP,mode,mdfcs,countOP,countSP, IgnoreServerDelects
+dim g_PageLoadCompleted
+dim g_PageLoadTimerID
+
+changeOP=false
+mode=100
+mdfcs=true
+countOP=0
+countSP=0
+SpHitLimit = 0
+RiseUpDown = 0
+IgnoreServerDelects = 0
+g_PageLoadCompleted = false
+
+Const GSH_C200_DEVCTLA_STATENUMOFFSET = 4
+
+'Used for all Digital Shapes
+Const GSH_STATETXT_DOESNOTEXIST_LBL = "---"
+
+'Test: Make WshShell create once on page load.
+'Will remove it at onpageunload
+dim WshShell
+set WshShell = CreateObject("WScript.Shell")
+
+sub GSH_PageUnload
+ set WshShell = Nothing
+end sub
+'-------------------------------------START SHAPE GENERAL----------------------------------------------'
+' .oooooo. oooo
+'d8P' `Y8b `888
+'888 .ooooo. ooo. .oo. .ooooo. oooo d8b .oooo. 888
+'888 d88' `88b `888P"Y88b d88' `88b `888""8P `P )88b 888
+'888 ooooo 888ooo888 888 888 888ooo888 888 .oP"888 888
+'`88. .88' 888 .o 888 888 888 .o 888 d8( 888 888
+' `Y8bood8P' `Y8bod8P' o888o o888o `Y8bod8P' d888b `Y888""8o o888o
+'-------------------------------------------------------------------------------------------------------
+''''''''''''''''''''''''''''''''''''''''''''''''''
+' Error handling function
+' How to use:
+' sub/function sub/functionName(args)
+' on error resume next
+' ...........do something.
+' if Err then
+' call GSH_SHAPE_ERROR_HANDLING("sub/functionName",oShape)
+' end if
+' end sub/function
+'
+''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHAPE_ERROR_HANDLING(subName,oShape)
+ oShape.title = "Shape contains Error. Please check log file for details"
+ gsh_log("ERROR: " &Err.description &" at " &subName &" for " &oShape.id)
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+' msgbox("ERROR: " &Err.description &" at " &subName &" for " &oShape.id)
+ Err.clear
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''
+' Error handling function
+' How to use:
+' sub/function sub/functionName(args)
+' on error resume next
+' ...........do something.
+' if Err then
+' call GSH_ERROR_HANDLING("sub/functionName")
+' end if
+' end sub/function
+'
+''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ERROR_HANDLING(subName)
+ gsh_log("ERROR: " &Err.description &" at " &subName)
+ Err.clear
+end sub
+''''''''''''''''''''''''''''''''''''''''''
+'GSH_PRINT_VERSION
+' Require
+''''''''''''''''''''''''''''''''''''''''''
+sub GSH_PRINT_VERSION(oShape, versionString)
+on error resume next
+ dim tempString, strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_LOG & "VERSION_LOG"
+ tempString = GSH_READREGISTRY(strRegLocation,defaultString)
+ If(StrComp(tempString,"On",vbtextcompare) = 0) then
+ gsh_log("VERSION> shapeID = " &oShape.id &", Shape File = " &oShape.src &" version_" &versionString)
+ end if
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_PRINT_VERSION",oShape)
+ end if
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_SETTOOLTIP'''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape - object whose tool tip is being set
+'Action: Determines if the custom property Entity exists. Sets the Tag
+' name alias as the tool tip, but if the alias does not exist then
+' displays tagname as tool tip
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETTOOLTIP(oShape)
+ dim sEntityPoint
+ sEntityPoint = UCASE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY))
+ if strcomp(sEntityPoint, "", vbtextcompare) <> 0 then
+ oShape.title = GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, GSH_REGKEY_TAGNAME_ALIAS, sEntityPoint)
+ end if
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Read Registry''''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' strRegLocation - Path of Registry Item
+' defaultString - Default Value if error of nothing found
+'Returns:
+' value of registry item or parameter of defaultString
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READREGISTRY(strRegLocation, defaultString)
+'gsh_log_s("GSH_READREGISTRY strRegLocation=" & strRegLocation & ",defaultString=" & defaultString)
+on error resume next
+' dim WshShell,
+ dim tempString, tempReturn
+' set WshShell = CreateObject("WScript.Shell")
+ tempString = WshShell.RegRead (cstr(strRegLocation))
+ if strcomp(tempString,"",vbtextcompare)=0 or tempString = null then
+ tempReturn = defaultString
+ else
+ tempReturn = tempString
+ End If
+' set WshShell = Nothing
+ GSH_READREGISTRY = tempReturn
+
+
+'gsh_log_e("GSH_READREGISTRY returning >>>" & tempReturn&"<<< Time <<" &RegistryReadTime)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Write toRegistry''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' strRegLocation - Path of Registry item
+' strValue - Registry item value
+' strType - type of Registry item (use constants defined: GSH_BINARY, GSH_TEXT,GSH_DWORD)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_WRITETOREGISTRY(strRegLocation,strValue,strType)
+'gsh_log_s("GSH_WRITETOREGISTRY " & "strRegLocation=" & strRegLocation & ",strValue=" & strValue & ",strType=" & strType )
+
+' dim WshShell
+' set WshShell = CreateObject("WScript.Shell")
+ WshShell.RegWrite cstr(strRegLocation), cstr(strValue), cstr(strType)
+' set WshShell = Nothing
+'gsh_log_e("GSH_WRITETOREGISTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Read Tag Information Key Value''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' strTagName - Part of path to Registry Item in "TagInformation"
+' strKey - Part of path to Registry Item
+' defaultString - Default Value if error or nothing found
+'Returns:
+' value of registry item or parameter of defaultString
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READTAGINFORMATIONKEYVALUE(strTagName, strKey, defaultString)
+'gsh_log_s("GSH_READTAGINFORMATIONKEYVALUE" & " strTagName=" & strTagName & ",strKey=" & strKey & ",defaultString=" & defaultString)
+on error resume next
+ dim tempString, strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & "TagInformation\" &strTagName & "\" & strKey
+' gsh_log ("GSH_READTAGINFORMATIONKEYVALUE checkPoint strRegLocation=" & strRegLocation)
+ tempString = GSH_READREGISTRY(strRegLocation,defaultString)
+ if strcomp(tempString,"",vbtextcompare)=0 then
+ tempReturn = defaultString
+ else
+ tempReturn = tempString
+ End If
+ GSH_READTAGINFORMATIONKEYVALUE = tempReturn
+'gsh_log_e("GSH_READTAGINFORMATIONKEYVALUE returning >>> " & tempReturn&"<<<" )
+end function
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Read Display Information Key Value''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' strTagName - Part of path to Registry Item in "TagInformation"
+' strKey - Part of path to Registry Item
+' defaultString - Default Value if error or nothing found
+'Returns:
+' value of registry item or parameter of defaultString
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READDISPLAYINFO(strTagName, strKey, defaultString)
+'gsh_log_s("GSH_READDISPLAYINFO" & " strTagName=" & strTagName & ",strKey=" & strKey & ",defaultString=" & defaultString)
+ dim tempString, strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_DISPLAYINFO &strTagName & "\" & strKey
+ 'gsh_log("GSH_READDISPLAYINFO checkPoint strRegLocation=" & strRegLocation)
+ tempString = GSH_READREGISTRY( strRegLocation,defaultString)
+ if tempString = "" then
+ tempReturn = defaultString
+ else
+ tempReturn = tempString
+ End If
+ GSH_READDISPLAYINFO = tempReturn
+'gsh_log_e("GSH_READDISPLAYINFO returning >>> " & tempReturn&"<<<" )
+end function
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'SHOULD RENAME
+'
+'Function: GSH_READDISPLAYNAMES''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sdefaultLocation - Default OS Path if error or nothing found
+'Returns:
+' String, OS path of display files
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READDISPLAYNAMES(sdefaultLocation)
+'gsh_log_s("GSH_READDISPLAYNAMES" & " sdefaultLocation=" & sdefaultLocation)
+ dim tempString, tempReturn
+ 'gsh_log("GSH_READDISPLAYNAMES checkPoint strRegLocation=" & GSH_REGISTRY_BASE & GSH_REGISTRY_DISPLAYNAMES & GSH_REGKEY_DISPLAYLOC)
+ tempString = GSH_READREGISTRY ( GSH_REGISTRY_BASE & GSH_REGISTRY_DISPLAYNAMES & GSH_REGKEY_DISPLAYLOC,"" )
+ if tempString = "" then
+ tempReturn = sdefaultLocation
+ else
+ tempReturn = tempString
+ End If
+ GSH_READDISPLAYNAMES = tempReturn
+'gsh_log_e("GSH_READDISPLAYNAMES returning >>>" & tempReturn&"<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: READ DISPLAY COMMUNICATION KEY VALUE '''''''''''''''''''''''''
+'Parameters:
+' strKey - Part of path to Registry Item
+' defaultString - Default Value if error or nothing found
+'Returns:
+' value of registry item or parameter of defaultString
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READDISPLAYCOMMUNICATIONKEYVALUE(strKey, defaultString)
+'gsh_log_s("GSH_READDISPLAYCOMMUNICATIONKEYVALUE" & " strKey=" & strKey & ",defaultString=" & defaultString )
+ dim tempString, strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_DISPLAYCOMM & strKey
+ 'gsh_log("GSH_GETDISPLAYCOMMUNICATIONKEY checkPoint strRegLocation=" & strRegLocation)
+ tempString = GSH_READREGISTRY(strRegLocation,defaultString)
+ if tempString = "" then
+ tempReturn = defaultString
+ else
+ tempReturn = tempString
+ End If
+ GSH_READDISPLAYCOMMUNICATIONKEYVALUE = tempReturn
+'gsh_log_e("GSH_READDISPLAYCOMMUNICATIONKEYVALUE returning >>>" & tempReturn&"<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_READSTSMSGLISTSKEYVALUE '''''''''''''''''''''''''
+'Parameters:
+' strKey - Part of path to Registry Item (ex. RegCtl\StatusMessage1
+' defaultString - Default Value if error or nothing found
+'Returns:
+' value of registry item or parameter of defaultString
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READSTSMSGLISTSKEYVALUE(strKey, defaultString)
+'gsh_log_s("GSH_READSTSMSGLISTSKEYVALUE" & " strKey=" & strKey & ",defaultString=" & defaultString )
+ dim tempString, strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_STSMSGLISTS & strKey
+' gsh_log("GSH_READSTSMSGLISTSKEYVALUE checkPoint strRegLocation=" & strRegLocation)
+ tempString = GSH_READREGISTRY(strRegLocation,defaultString)
+ if tempString = "" then
+ tempReturn = defaultString
+ else
+ tempReturn = tempString
+ End If
+ GSH_READSTSMSGLISTSKEYVALUE = tempReturn
+'gsh_log_e("GSH_READSTSMSGLISTSKEYVALUE returning >>>" & tempReturn&"<<<")
+end function
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE'''''''''''''''''''''''''''''''
+'Parameters:
+' strKey - Part of path to Registry Item
+' strValue - Value of string key
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE(strKey, strValue)
+'gsh_log_s("GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE " & "strKey=" & strKey & ",strValue=" & strValue )
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_DISPLAYCOMM & strKey
+ 'gsh_log("GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_WRITEDISPLAYINFORMATION'''''''''''''''''''''''''''''''''
+'Parameters:
+' strTagName - Part of path to Registry Item
+' strKey - Part of path to Registry Item
+' strValue - Value of string key
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_WRITEDISPLAYINFORMATION(strTagName, strKey, strValue)
+'gsh_log_s("GSH_WRITEDISPLAYINFORMATION " & "strTagName=" & strTagName & ",strKey=" & strKey & ",strValue=" & strValue )
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_DISPLAYINFO &strTagName& "\" & strKey
+' gsh_log("GSH_WriteDisplayInformation checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_WRITEDISPLAYINFORMATION")
+end sub
+
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_HIDESUBSHAPE''''''''''''''''''''''''''''''''''''''''''''
+' Hides the sub shapes within the HCS Shape
+'Parameters:
+' oShape - object to hide
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_HIDESUBSHAPE(oObject)
+'gsh_log_s("GSH_HIDESUBSHAPE "& "oObject=" & oObject.id)
+ oObject.style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_HIDESUBSHAPE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_SHOWSUBSHAPE''''''''''''''''''''''''''''''''''''''''''''
+' Shows the sub shapes within the HCS Shape
+'Parameters:
+' oObject - object to show
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWSUBSHAPE(oObject)
+'gsh_log_s("GSH_SHOWSUBSHAPE "& "oObject=" & oObject.id)
+ oObject.style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_SHOWSUBSHAPE")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Shape Clicked
+' Called when user clicks HCS shape on display
+'Parameters:
+' oShape - HCS Shape (Example: Analog Indicator
+'Sept 30, 2009 - Added associated Level 2 support for loading Level2 from L1 shapes (CL)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHAPECLICKED(oShape)
+on error resume next
+ Dim sAssocDispT2, sAssocDispT3, sAssocDispT4
+
+ 'Determine what is the associated display Type3
+ sAssocDispT2 = UCase(oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCTYPE2))
+
+ 'Determine what is the associated display Type3
+ sAssocDispT3 = UCase(oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCTYPE3))
+ 'Determine what is the associated display Type4 from the shape custom property
+ sAssocDispT4 = Ucase(oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCTYPE4))
+ 'call GSH_SHAPECLICKEDPARAMETERS(oShape, sAssocDispT3, sAssocDispT4)
+ call GSH_SHAPECLICKEDPARAMETERS1(oShape, sAssocDispT2, sAssocDispT3, sAssocDispT4)
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Shape Clicked No Assoc Display
+' Called when user clicks HCS shape on display
+'Parameters:
+' oShape - HCS Shape (Example: Analog Indicator
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHAPECLICKEDNOASSOCDISP(oShape)
+on error resume next
+ call GSH_SHAPECLICKEDPARAMETERS1(oShape, "", "", "")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Shape Clicked Parameters
+' Called when user clicks HCS shape on display
+'Parameters:
+' oShape - HCS Shape (Example: Analog Indicator
+' sAssocDispT3 - Associated Display Type 3
+' sAssocDispT4 - Associated Display Type 4
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHAPECLICKEDPARAMETERS(oShape, sAssocDispT3, sAssocDispT4)
+on error resume next
+'gsh_log_s("Performance Time: GSH_SHAPECLICKED "& "oShape=" & oShape.id &" , sAssocDispT3="&sAssocDispT3)
+ Dim sOnDispT2, shapeTagName, vTagFamily, iPageNavigateDelayMs
+ 'Determine what is on display Type2 from Display Communication Mailbox
+ sOnDispT2 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,"")
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+ 'Store Tag Name in Display Communication Mailbox
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_FOCUSTAG,shapeTagName
+ 'Get Tag Family using Tag Information in Registry
+ vTagFamily = GSH_READTAGINFORMATIONKEYVALUE(shapeTagName, GSH_REGKEY_TAGFAM, "")
+ 'Store Tag Family in Display Communication Mailbox
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_TAGFAM,vTagFamily
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE "AssocDisplay3",sAssocDispT3
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE "AssocDisplay4",sAssocDispT4
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_USET4,"NO" 'Ensure that T4Default is not on. Assume there will always be an AssocL3 and L4 specified together.
+ iPageNavigateDelayMs = cint(GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_FPPAGEDELAY,GSH_REGKEY_FPPAGEDELAY_DEFAULTMS))
+ call setTimeout ("GSH_UpdateFaceplate()", iPageNavigateDelayMs)
+ call window.external.RaiseCustomEvent("ShapeClicked","OnShapeClickEvent",sAssocDispT3&"%"&sAssocDispT4)
+'gsh_log_e("Performance Time:GSH_SHAPECLICKED iPageNavigateDelayMs="& iPageNavigateDelayMs)
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_SHAPECLICKEDPARAMETERS1
+' Called when user clicks HCS shape on display
+'Parameters:
+' oShape - HCS Shape (Example: Analog Indicator
+' sAssocDispT2 - Associated Display Type 2
+' sAssocDispT3 - Associated Display Type 3
+' sAssocDispT4 - Associated Display Type 4
+'Sept 30, 2009 - Added associated Level 2 support for loading Level2 from L1 shapes (CL)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHAPECLICKEDPARAMETERS1(oShape, sAssocDispT2, sAssocDispT3, sAssocDispT4)
+on error resume next
+'gsh_log_s("Performance Time: GSH_SHAPECLICKEDPARAMETERS1 "& "oShape=" & oShape.id)
+ Dim sOnDispT2
+ Dim sOnDispT3
+ Dim sOnDispT4
+ Dim vTagFamily
+ Dim sTemp
+ Dim sErrorMsg
+ Dim shapeTagName
+ Dim objShpFocus
+ Dim sFaceplate
+'initialize local variables
+
+ If(g_PageLoadCompleted) then
+
+ g_PageLoadCompleted = false
+ window.clearTimeout g_PageLoadTimerID
+ g_PageLoadTimerID=window.setTimeout("g_PageLoadCompleted = true",1500)
+
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+
+ 'Determine what is on display Type3 from Display Communication Mailbox
+ sOnDispT2 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,"")
+
+ 'Determine what is on display Type3 from Display Communication Mailbox
+ sOnDispT3 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T3FN,"")
+ 'Determine what is on display Type4
+ sOnDispT4 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T4FN,"")
+ sDisplayLocation = GSH_READDISPLAYNAMES("")
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+ 'Store Tag Name in Display Communication Mailbox
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_FOCUSTAG,shapeTagName
+
+ 'Get Tag Family using Tag Information in Registry
+ vTagFamily = GSH_READTAGINFORMATIONKEYVALUE(shapeTagName, GSH_REGKEY_TAGFAM, "")
+ 'Store Tag Family in Display Communication Mailbox
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_TAGFAM,vTagFamily
+ call GSH_UpdateFaceplate()
+
+ If strcomp(sAssocDispT2,"",vbtextcompare)<>0 and strcomp(Ucase(sOnDispT2),sAssocDispT2,vbtextcompare)<>0 Then
+ sTemp = sDisplayLocation & sAssocDispT2 & GSH_DISPLAYFILEEXTENSION
+ 'call GSH_WRITEDISPLAYINFORMATION ("", GSH_REGKEY_PRIORT2, sAssocDispT2)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sAssocDispT2)
+ window.navigate(sTemp)
+ End If
+
+ If strcomp(sAssocDispT3,"",vbtextcompare)<>0 and strcomp(Ucase(sOnDispT3),sAssocDispT3,vbtextcompare)<>0 Then
+ sTemp = sDisplayLocation & sAssocDispT3 & GSH_DISPLAYFILEEXTENSION
+ call GSH_WRITEDISPLAYINFORMATION (sOnDispT2, GSH_REGKEY_PRIORT3, sAssocDispT3)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sAssocDispT3)
+ window.navigate(sTemp)
+ End If
+
+ If strcomp(sAssocDispT4,"",vbtextcompare)<>0 Then
+ If Ucase(sOnDispT4) <> sAssocDispT4 Then
+ sTemp = sDisplayLocation & sAssocDispT4 & GSH_DISPLAYFILEEXTENSION
+ ''25June08 - JE
+ 'call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sPriorT4)
+ 'Should be this line instead
+ call GSH_WRITEDISPLAYINFORMATION (sOnDispT2, GSH_REGKEY_PRIORT4, sAssocDispT4)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sAssocDispT4)
+ window.navigate(sTemp)
+ End if
+ ' Else
+ '''Should not need to set this to on - 25June08 - JE
+ ''' GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_USET4,"YES"
+ End If
+
+ else
+' gsh_log("GSH_SHAPECLICKEDPARAMETERS1:gPageLoadcompleted = false")
+ End If
+'gsh_log_e("Performance Time:GSH_SHAPECLICKEDPARAMETERS1")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_ONSHAPECLICKEVENTHANDLER
+' Event Handling routine on each Level Display for the CustomEvent "OnShapeClickEvent"
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ONSHAPECLICKEVENTHANDLER
+'gsh_log_s "GSH_ONSHAPECLICKEVENTHANDLER >>> "& PAGE_DISPLAYTYPE
+ dim sAssocDisp, sOnDisp, sOnDispT2
+ 'Determine what is on display Type2 from Display Communication Mailbox
+ sOnDispT2 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,"")
+ 'Determine what is on display from Display Communication Mailbox
+ sOnDisp = GSH_READDISPLAYCOMMUNICATIONKEYVALUE("Type"&cstr(PAGE_DISPLAYTYPE)&"Filename","")
+ if (PAGE_DISPLAYTYPE = 2) then
+ GSH_UPDATESHAPESONDISPLAY sOnDisp&GSH_DISPLAYFILEEXTENSION
+ else
+ sAssocDisp = GSH_READDISPLAYCOMMUNICATIONKEYVALUE("AssocDisplay"&cstr(PAGE_DISPLAYTYPE),"")
+ If strcomp(sAssocDisp,"",vbtextcompare) <> 0 Then
+ If strcomp(sOnDisp,sAssocDisp,vbtextcompare)<>0 Then
+ dim iPageNavigateDelayMs
+ call GSH_WRITEDISPLAYINFORMATION (sOnDispT2, "PriorType"&cstr(PAGE_DISPLAYTYPE), sAssocDisp)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE ("Type"&cstr(PAGE_DISPLAYTYPE)&"Filename",sAssocDisp)
+ iPageNavigateDelayMs = cint(GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_LEVELPAGEDELAY,GSH_REGKEY_LEVELPAGEDELAY_DEFAULTMS))
+ call setTimeout ("GSH_UPDATEDISPLAYPAGE()", iPageNavigateDelayMs)
+ Else
+ GSH_UPDATESHAPESONDISPLAY sOnDisp&GSH_DISPLAYFILEEXTENSION
+ End If
+ Else
+ GSH_UPDATESHAPESONDISPLAY sOnDisp&GSH_DISPLAYFILEEXTENSION 'Update all shapes on Display Type4
+ End If
+ End if
+'gsh_log_e "GSH_ONSHAPECLICKEVENTHANDLER iPageNavigateDelayMs="&iPageNavigateDelayMs
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_ONPERIODIC_FOCUSUPDATEHANDLER
+' Event Handling routine on each Level Display for the CustomEvent "OnShapeClickEvent"
+' 06/20/2007 Added a check to see if the TagNameLabelVisible tag has changed
+' if so then update the TagNameLabelShapes with GSH_UPDATETAGNAMELABELONDISPLAY
+' 06/27/07 calls GSH_UPDATEPAGELINKONDISPLAY when the PageLinkAlarmGroup has changed
+' 07/25/07 only calls GSH_UPDATEPAGELINKONDISPLAY when the PAGE_DISPLAYTYPE = 2
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ONPERIODIC_FOCUSUPDATEHANDLER
+On error resume next
+'gsh_log_s "GSH_ONPERIODIC_FOCUSUPDATEHANDLER >>> "& PAGE_DISPLAYTYPE & "," & g_PageShapesInit
+
+ if g_PageShapesInit = 1 then
+ dim sOnDisp, sFocusTagName, sRegPageLinkAlarmGroup
+ sFocusTagName = GSH_READDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_FOCUSTAG,"NoTag")
+' gsh_log "sFocusTagName ="&sFocusTagName&", g_PageCurrentFocusTag = "&g_PageCurrentFocusTag
+ if strcomp(sFocusTagName,g_PageCurrentFocusTag,vbtextcompare) <> 0 then
+ 'Determine what is on display from Display Communication Mailbox
+ sOnDisp = GSH_READDISPLAYCOMMUNICATIONKEYVALUE ("Type"&cstr(PAGE_DISPLAYTYPE)&"Filename","")
+ if (strcomp(sOnDisp,"",vbtextcompare) <> 0) or (PAGE_DISPLAYTYPE = 1) then
+ GSH_UPDATESHAPESONDISPLAY sOnDisp
+ End if
+ g_PageCurrentFocusTag = sFocusTagName
+ End If
+
+ dim currentTagLabelVisible
+ currentTagLabelVisible = GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS
+ if strcomp(currentTagLabelVisible,g_PageCurrentTagLabelVisible,vbtextcompare) <> 0 then
+ GSH_UPDATETAGNAMELABELONDISPLAY sOnDisp
+ g_PageCurrentTagLabelVisible = currentTagLabelVisible
+ End if
+ if (PAGE_DISPLAYTYPE = 2) then
+ sRegPageLinkAlarmGroup = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_PAGELINKALARMGROUP,"NoPgLink")
+ if strcomp(sRegPageLinkAlarmGroup,g_PageCurrentPageLink,vbtextcompare) <> 0 and (PAGE_DISPLAYTYPE = 2) then
+ GSH_UPDATEPAGELINKONDISPLAY sOnDisp
+ g_PageCurrentPageLink = sRegPageLinkAlarmGroup
+ End if
+ end if
+ End If
+'gsh_log_e "GSH_ONPERIODIC_FOCUSUPDATEHANDLER "
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is Alarming Enabled
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+' pointName - the point name
+' parameter - Alarm disabled paramter. i.e.:
+' GSH_SCADA_PARAM_ALARMDISABLED for SCADA points
+' GSH_C200_PARAM_ALARMDISABLED for C200 points
+' GSH_TPS_PARAM_ALARMDISABLED for TPS points
+' and so on
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_ISALARMINGENABLED(oDataBoundObject, pointName, parameter)
+'gsh_log_s("GSH_ISALARMINGENABLED oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName &", parameter = " &parameter)
+on error resume next
+
+ Dim tempReturn
+
+ if (GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, parameter) <> 0) then
+ tempReturn = true
+ else
+ tempReturn = false
+ end if
+ GSH_ISALARMINGENABLED = tempReturn
+
+'gsh_log_e("GSH_ISALARMINGENABLED returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is TPS Alarming Enabled
+' TPS point is different:
+' ALENBST = 0 -> enabled
+' ALENBST = 1 -> disabled
+' ALENBST = 0 -> inhibit
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+' pointName - the point name
+'
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_TPS_ISALARMINGENABLED(oDataBoundObject, pointName, parameter)
+'gsh_log_s("GSH_TPS_ISALARMINGENABLED oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName &", parameter = " &parameter)
+on error resume next
+
+ Dim tempReturn
+
+ if (GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, parameter) <> 0) then
+ tempReturn = false
+ else
+ tempReturn = true
+ end if
+ GSH_TPS_ISALARMINGENABLED = tempReturn
+
+'gsh_log_e("GSH_TPS_ISALARMINGENABLED returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is Alarming Disabled
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+' pointName - the point name
+' parameter - Alarm disabled paramter. i.e.:
+' GSH_SCADA_PARAM_ALARMDISABLED for SCADA points
+' GSH_C200_PARAM_ALARMDISABLED for C200 points
+' GSH_TPS_PARAM_ALARMDISABLED for TPS points
+' and so on
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_ISALARMINGDISABLED(oDataBoundObject, pointName, parameter)
+'gsh_log_s("GSH_ISALARMINGDISABLED oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName &", parameter = " &parameter)
+on error resume next
+
+ Dim tempReturn
+
+ if (GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, parameter) <> 0) then
+ tempReturn = true
+ else
+ tempReturn = false
+ end if
+ GSH_ISALARMINGDISABLED = tempReturn
+
+'gsh_log_e("GSH_ISALARMINGDISABLED returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+
+'---------------------- START REGULATORY CONTROL INDICATOR GENERAL -----------------
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETREGULATORYCONTROLINDICATORFOCUS''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETREGULATORYCONTROLINDICATORFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_SETREGULATORYCONTROLINDICATORFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oDataBoundObject)
+ if (not(oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, outline must be transparent
+ 'alert(1)
+ oDataBoundObject.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+'added 17july2008
+ else
+ oDataBoundObject.objects("outline").fillstyle = GSH_FILLSOLID
+ end if
+'gsh_log_e("GSH_SETREGULATORYCONTROLINDICATORFOCUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETREGULATORYCONTROLINDICATORMODE'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETREGULATORYCONTROLINDICATORMODE(oDataBoundObject)
+'gsh_log_s("GSH_SETREGULATORYCONTROLINDICATORMODE oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+dim sMode, tempText
+ sMode = "MODE" 'default
+ Select Case GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,GSH_CPPOINTTYPE,GSH_CPVALUE)
+ Case GSH_CPPOINTTYPE_SCADA
+ sMode = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE)
+ Case GSH_CPPOINTTYPE_TPN
+ sMode = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_TPN_PARAM_MODE)
+ Case GSH_CPPOINTTYPE_C200
+ sMode = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_TPN_PARAM_MODE)
+ CASE GSH_CPPOINTTYPE_C300
+' sMode = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_TPN_PARAM_MODE)
+ End Select
+ Select Case sMode
+ Case GSH_MODE_AUTO
+ tempText = GSH_MODE_AUTO_TEXT_INDICATOR
+ Case GSH_MODE_MAN
+ tempText = GSH_MODE_MAN_TEXT_INDICATOR
+ Case GSH_MODE_CASC
+ tempText = GSH_MODE_CASC_TEXT_INDICATOR
+ Case GSH_MODE_BCAS
+ tempText = GSH_MODE_BCAS_TEXT_INDICATOR
+ Case GSH_MODE_COMP
+ tempText = GSH_MODE_COMP_TEXT_INDICATOR
+ End Select
+oDataBoundObject.parentelement.parentelement.objects("txt_mode").value = tempText
+'gsh_log_e("GSH_SETREGULATORYCONTROLINDICATORMODE set mode indicator to >>" & tempText & "<<")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOWNORMAL'''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' mode =
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ oDataBoundObject.objects("txt_AnalogValue").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_ramp").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_mode").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORShowNormal")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ if (oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORSHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOWBADPV''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOWBADPV(oDataBoundObject)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_Analogvalue").value = GSH_BADPV_TEXT
+ oDataBoundObject.objects("txt_AnalogValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORSHOWBADPV")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOWCOMMUNICATIONERROR'''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOWCOMMUNICATIONERROR(oDataBoundObject)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOWCOMMUNICATIONERROR oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'SAME BEHAVIOR AS BAD PV
+ GSH_REGULATORYCONTROLINDICATORSHOWBADPV(oDataBoundObject)
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORSHOWCOMMUNICATIONERROR")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'Change focus outline color
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSREGULATORYCONTROLINDICATORDISABLEDALARM
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOWINITIALIZATION'''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOWINITIALIZATION(oDataBoundObject)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOWINITIALIZATION oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_Intialization").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORSHOWINITIALIZATION")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATORSHOW_RAMP''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' txtValue = text to be shown in RAMP shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oDataBoundObject,txtValue)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATORSHOW_RAMP oDataBoundObject=" & oDataBoundObject.id & ",txtValue =" &txtValue )
+on error resume next
+ oDataBoundObject.objects("txt_ramp").value = txtValue
+ oDataBoundObject.objects("txt_ramp").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATORSHOW_RAMP")
+end sub
+
+'---------------------- END REGULATORY CONTROL INDICATOR GENERAL -----------------
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_ISDATABAD
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+' bCheckNAN - check for PV value that is not a number
+' bCheckPVSts - check if PVSts indicate that PV value is bad
+'Returns:
+' true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_ISDATABAD(oDataScriptObject, parameter, bCheckNAN, bCheckPVSts)
+'gsh_log_s("GSH_ISDATABAD " & "oDataScriptObject=" & oDataScriptObject.ID &" parameter = " &parameter)
+on error resume next
+ Dim bValueIsNAN, bPVInError, bAllTests
+ bValueIsNAN = false
+ bPVInError = false
+
+' gsh_log_e("bValueIsNAN " & oDataScriptObject.IsNan(GSH_CPENTITY & "." & parameter))
+ if bCheckNAN then
+ if oDataScriptObject.IsNan(GSH_CPENTITY & "." & parameter) then bValueIsNAN = true
+ end if
+
+' gsh_log_e("bCheckPVSts " &GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_BADPV))
+ if bCheckPVSts then
+ if (GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_BADPV)<> 0) then
+ bPVInError = true
+ end if
+ end if
+
+ bAllTests = ( bValueIsNAN or bPVInError )
+
+'gsh_log_e("GSH_ISDATABAD returing " & bAllTests )
+GSH_ISDATABAD = bAllTests
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_Show_StatusMessageFlag''''''''''''''''''''''''''''''''''''''''''
+'Show Status Message flag on a C200/TPS Regulatory Control shapes.
+' stsMsg_flag = 0 => Off (No Message shown) - Default
+' stsMsg_flag = 1 => Bypass (shown as Bypass)
+' stsMsg_flag = 2 => HandJack (shown as Hand)
+' stsMsg_flag = 3 => Isolated (shown as Isolate)
+'08/08/07 - Created the sub routine (Cuong Ly)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_Show_StatusMessageFlag(oShape, stsMsg_flag)
+
+ if IsNumeric(stsMsg_flag) then
+
+ Select Case stsMsg_flag
+ Case 0
+ 'hide the message
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+ Case 1
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_BYPASSED_TEXT_MESSAGE)
+ Case 2
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_HANDJACK_TEXT)
+ Case 3
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_ISOLATED_TEXT)
+ Case else
+ 'hide the message
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+ End Select
+ end if
+
+end sub
+
+
+
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_UPDATEDISPLAYPAGE
+' Used in conjunction with GSH_ONSHAPECLICKEVENTHANDLER to launch associated page
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_UPDATEDISPLAYPAGE
+ Dim sOnDisp
+ sOnDisp = GSH_READDISPLAYCOMMUNICATIONKEYVALUE("Type"&cstr(PAGE_DISPLAYTYPE)&"Filename","")
+ if strcomp(sOnDisp, "", vbtextcompare) <> 0 then
+ window.navigate( sOnDisp & GSH_DISPLAYFILEEXTENSION )
+ end if
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_UpdateFaceplate
+' Launches new faceplate based on Registry Display Communication info
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_UpdateFaceplate()
+'gsh_log_s("GSH_UpdateFaceplate")
+dim sTagname, sTagFaceplate
+
+ sTagname = GSH_READDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_FOCUSTAG ,"")
+ sTagFaceplate = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_TagFacePlate, "")
+' GSH_UpdateFaceplate_Old(sTagName)
+
+' gsh_log("sTagName="&sTagname)
+' gsh_log("sTagFaceplate="&sTagFaceplate)
+
+ if strcomp(sTagFaceplate,"",vbtextcompare) <> 0 then
+ HDXPopupbehavior.CreatePopupWindow Ucase(sTagFaceplate) & GSH_DISPLAYFILEEXTENSION&"?"&"currentpoint="&sTagname,10,10,1
+ else
+ HDXPopupbehavior.CreatePopupWindow GSH_READDISPLAYNAMES("") & GSH_FP_DEFAULTFACEPLATE & GSH_DISPLAYFILEEXTENSION&"?"&"currentpoint="&sTagname,10,10,1
+ end if
+'gsh_log_e("GSH_UpdateFaceplate sTagFaceplate = "&sTagFaceplate&", sTagname ="&sTagname)
+end sub
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Set Shape Focus
+' Determines proper focusing for shape
+'Parameters:
+' oShape - HCS Shape that needs to test for focusing, must have shp_focus sub shape
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETSHAPEFOCUS(oShape)
+'gsh_log_s("GSH_SETSHAPEFOCUS " & "oShape=" & oShape.id)
+On error resume next
+ call GSH_SHOWSUBSHAPE(oShape.objects("focus"))
+ Dim shapeTag, shapeFocusStyle
+ shapeTag = GSH_GETSHAPETAG(oShape)
+ If GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS(shapeTag) then
+ shapeFocusStyle = GSH_CSSFOCUSPRINCIPAL
+ else if GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS(shapeTag) then
+ shapeFocusStyle = GSH_CSSFOCUSASSOCIATED
+ else
+ shapeFocusStyle = GSH_CSSFOCUSNONE
+ end if
+ end if
+ 'apply focus style
+ oShape.objects("focus").styleClass = shapeFocusStyle
+'gsh_log_e("GSH_SETSHAPEFOCUS shapeFocusStyle, err = " &shapeFocusStyle & ", " & err)
+end sub
+
+sub GSH_SETSASHAPEFOCUS(oShape, objectName)
+'gsh_log_s("GSH_SETSHAPEFOCUS " & "oShape=" & oShape.id)
+On error resume next
+ call GSH_SHOWSUBSHAPE(oShape.objects(objectName))
+ Dim shapeTag, shapeFocusStyle
+ shapeTag = GSH_GETSHAPETAG(oShape)
+ If GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS(shapeTag) then
+ shapeFocusStyle = GSH_CSSFOCUSASSOCIATED
+' gsh_log "Pfocus"
+ else if GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS(shapeTag) then
+ shapeFocusStyle = GSH_CSSFOCUSASSOCIATED
+' gsh_log "Afocus"
+ else
+ shapeFocusStyle = GSH_CSSFOCUSNONE
+' GSH_LOG "Nofocus"
+ end if
+ end if
+'apply focus style
+ oShape.objects(objectName).styleClass = shapeFocusStyle
+'gsh_log_e("GSH_SETSHAPEFOCUS shapeForcusStyle = " &shapeFocusStyle)
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function Does Shape Require Principle Focus
+' Determines if shape tag matches tag currently in focus
+'Parameters:
+' shapeTag - tagname
+'Returns:
+' true (tagname passed in matches focusTag in Registry)
+' false (tagnmae passed in does not match focusTag in Registry)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS(shapeTag)
+'gsh_log_s("GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS " & "shapeTag=" & shapeTag)
+On error resume next
+ Dim tempReturn,currentFocusTag
+ tempReturn = false 'default
+ currentFocusTag = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_FOCUSTAG,"")
+ 'gsh_log("GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS comparing currentFocusTag="&currentFocusTag&" to shapeTag="&shapeTag)
+ if (strComp(currentFocusTag,shapeTag,vbTextCompare)=0) then
+ tempReturn = true
+ end if
+ GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS = tempReturn
+'gsh_log_e("GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS retruning >>> " & cstr(tempReturn) & "<<<")
+end function
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function Does Shape Require Associated Focus
+' Determines if tag family or tag passed in matches current tag family
+' in registry
+'Parameters:
+' shapeTag - tagname
+'Returns:
+' true (tagFamily information of tagname passed in matches tagFamily in Registry)
+' false (tagFamily information of tagname passed in does not matche tagFamily in Registry)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS(shapeTag)
+'gsh_log_s("GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS " & "shapeTag=" & shapeTag)
+on error resume next
+ Dim tempReturn,shapeTagFamily, currentTagFamily
+ tempReturn = false 'default
+ currentTagFamily = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_TAGFAM,"")
+ shapeTagFamily = GSH_READTAGINFORMATIONKEYVALUE(shapeTag,GSH_REGKEY_TAGFAM,"")
+ 'gsh_log("GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS comparing currentTagFamily="&currentTagFamily&" to shapeTagFamily="&shapeTagFamily)
+ if shapeTagFamily <> "" then
+ if (strComp(currentTagFamily, shapeTagFamily, vbTextCompare) = 0) then
+ tempReturn = true
+ end if
+ end if
+ GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS = tempReturn
+'gsh_log_e("GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS retruning >>> " & cstr(tempReturn) & "<<<")
+end function
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function Get Shape Tag
+' Gets the tag associated with the Shape (a custom property)
+'Parameters:
+' oShape - HCS Shape with a custom property of type 'Point' and named 'Entity'
+'Returns:
+' Shape Custom property GSH_CPENTITY ("Entity")
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETSHAPETAG(oShape)
+'gsh_log_s("GSH_GETSHAPETAG " & "oShape=" & oShape.id)
+on error resume next
+ Dim tempReturn
+ tempReturn = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPENTITY, GSH_CPPOINT)
+ GSH_GETSHAPETAG = tempReturn
+'gsh_log_e("GSH_GETSHAPETAG returning >>>" & tempReturn & "<<<" )
+end function
+
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is Alarming Disabled
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_ISALARMINGDISABLED(oDataBoundObject)
+'gsh_log_s("GSH_SCADA_ISALARMINGDISABLED oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim tempReturn
+ tempReturn = GSH_SCADA_ISALARMINGDISABLEDPARAMETER(oDataBoundObject, GSH_CPENTITY)
+GSH_SCADA_ISALARMINGDISABLED = tempReturn
+'gsh_log_e("GSH_SCADA_ISALARMINGDISABLED returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is Alarming Disabled Parameter
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+' paramName - Parameter Name
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_ISALARMINGDISABLEDPARAMETER(oDataBoundObject, pointName)
+'gsh_log_s("GSH_ISALARMINGDISABLEDPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName)
+on error resume next
+Dim tempReturn
+tempReturn = false
+Select Case GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,GSH_CPPOINTTYPE,GSH_CPVALUE)
+ Case GSH_CPPOINTTYPE_SCADA
+ if (GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, GSH_SCADA_PARAM_ALARMDISABLED) <> 0) then
+ tempReturn = true
+ end if
+ Case GSH_CPPOINTTYPE_C200
+ tempReturn = false
+ Case GSH_CPPOINTTYPE_C300
+ tempReturn = false
+ case else
+ tempReturn = false
+ End Select
+GSH_ISALARMINGDISABLEDPARAMETER = tempReturn
+'gsh_log_e("GSH_ISALARMINGDISABLEDPARAMETER returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is Alarming Disabled Parameter
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+' paramName - Parameter Name
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_ISALARMINGDISABLEDPARAMETER(oDataBoundObject, pointName)
+'gsh_log_s("GSH_SCADA_ISALARMINGDISABLEDPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName)
+on error resume next
+Dim tempReturn
+tempReturn = false
+ if (GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, GSH_SCADA_PARAM_ALARMDISABLED) <> 0) then
+ tempReturn = true
+ end if
+GSH_SCADA_ISALARMINGDISABLEDPARAMETER = tempReturn
+'gsh_log_e("GSH_SCADA_ISALARMINGDISABLEDPARAMETER returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Get Shape Custom Property
+'Parameters:
+' oShape - HCS Shape
+'Returns:
+' The value of the Custom Property
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,propertyName, propertyType)
+'gsh_log_s("GSH_GETSHAPE_CUSTOM_PROPERTY " & "oShape=" & oShape.id & ",propertyName=" & propertyName& ",propertyType=" & propertyType)
+on error resume next
+ Dim tempReturn
+ tempReturn = oShape.GetCustomProperty(propertyType,propertyName)
+ GSH_GETSHAPE_CUSTOM_PROPERTY = tempReturn
+'gsh_log_e("GSH_GETSHAPE_CUSTOM_PROPERTY returning >>>" & tempReturn&"<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Get Shape Custom Property
+'Parameters:
+' oShape - HCS Shape
+'Returns:
+' The value of the Custom Property
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETSHAPE_CUSTOM_PROPERTY(oShape,propertyName, propertyType, propertyValue)
+'gsh_log_s("GSH_SETSHAPE_CUSTOM_PROPERTY " & "oShape=" & oShape.id & ",propertyName=" & propertyName& ",propertyType=" & propertyType & ",propertyValue=" & propertyValue)
+on error resume next
+
+ oShape.SetCustomProperty propertyType, propertyName, propertyValue
+
+'gsh_log_e("GSH_SETSHAPE_CUSTOM_PROPERTY returning >>>" & tempReturn&"<<<")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Is PV Data Bad
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+' bCheckNAN - check for PV value that is not a number
+' bCheckTransmitter - check device sending data for errors
+' bCheckRange - check PV value for value way out of range (station configurable unreasonably hi / lo alarm
+'Returns:
+' true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_ISDATABAD(oDataScriptObject,bCheckNAN,bCheckTransmitter,bCheckRange)
+'gsh_log_s("GSH_SCADA_ISDATABAD " & "oDataScriptObject=" & oDataScriptObject.ID)
+on error resume next
+ Dim bPVInError
+' , bInUnreasonablyLowAlarm, bInUnreasonablyHighAlarm, bInTransmitterLowAlarm, bInTransmitterHighAlarm
+ bPVInError = false
+' bInUnreasonablyLowAlarm = false
+' bInUnreasonablyHighAlarm = false
+' bInTransmitterLowAlarm = false
+' bInTransmitterHighAlarm = false
+ if bCheckNAN then
+ if GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_BADPV)<> 0 then
+ bPVInError = true
+ end if
+ end if
+ 'gsh_log ("PVInError"&bPVInError)
+' if bCheckTransmitter then
+' bInTransmitterLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INTRANSMITTERLOWALARM))
+' bInTransmitterHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INTRANSMITTERHIGHALARM))
+' end if
+' if bCheckRange then
+' bInUnreasonablyLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INUNREASONABLYLOWALARM))
+' bInUnreasonablyHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INUNREASONABLYHIGHALARM))
+' end if
+' bAllTests = bPVInError
+' bAllTests = ( bPVInError or bInUnreasonablyLowAlarm or bInUnreasonablyHighAlarm or bInTransmitterLowAlarm or bInTransmitterHighAlarm )
+'GSH_SCADA_ISDATABAD = bAllTests
+GSH_SCADA_ISDATABAD = bPVInError
+'gsh_log_e("GSH_SCADA_ISDATABAD returing " & bAllTests )
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_FP_SCADA_IsDataBad
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+' bCheckNAN - check for PV value that is not a number
+' bCheckTransmitter - check device sending data for errors
+' bCheckRange - check PV value for value way out of range (station configurable unreasonably hi / lo alarm
+'Returns:
+' true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_FP_SCADA_IsDataBad(oDataScriptObject,bCheckNAN,bCheckTransmitter,bCheckRange)
+'gsh_log_s("GSH_FP_SCADA_IsDataBad " & "oDataScriptObject=" & oDataScriptObject.ID)
+on error resume next
+ Dim bPVInError, bInUnreasonablyLowAlarm, bInUnreasonablyHighAlarm, bInTransmitterLowAlarm, bInTransmitterHighAlarm
+ bPVInError = false
+ bInUnreasonablyLowAlarm = false
+ bInUnreasonablyHighAlarm = false
+ bInTransmitterLowAlarm = false
+ bInTransmitterHighAlarm = false
+ if bCheckNAN then
+ if (oDataScriptObject.DataValue(GSH_SDR_CURRENTPOINT&"."&GSH_SCADA_PARAM_PVINERROR)<> 0) then : bPVInError = true: end if
+ end if
+ if bCheckTransmitter then
+ 'bInTransmitterLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INTRANSMITTERLOWALARM))
+ 'bInTransmitterHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INTRANSMITTERHIGHALARM))
+ end if
+ if bCheckRange then
+ 'bInUnreasonablyLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INUNREASONABLYLOWALARM))
+ 'bInUnreasonablyHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_SCADA_PARAM_INUNREASONABLYHIGHALARM))
+ end if
+ bAllTests = ( bPVInError or bInUnreasonablyLowAlarm or bInUnreasonablyHighAlarm or bInTransmitterLowAlarm or bInTransmitterHighAlarm )
+GSH_FP_SCADA_IsDataBad = bAllTests
+'gsh_log_e("GSH_FP_SCADA_IsDataBad returning " & bAllTests )
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Compare Highest Alarm Priority ''''''''''''''''''''''''''''''
+'Parameters:
+' iAlarmCode1 = Alarm Code 1
+' iAlarmCode2 = Alarm Code 2
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_COMPAREHIGHESTALARMPRIORITY(iAlarmCode1, iAlarmCode2)
+'gsh_log_s("GSH_COMPAREHIGHESTALARMPRIORITY iAlarmCode1=" & iAlarmCode1 & ", iAlarmCode2=" & iAlarmCode2)
+on error resume next
+
+Dim iAlarmCode
+
+ iAlarmCode = GSH_NOALARMCODE
+
+ if ((iAlarmCode1 = GSH_UNACKEMERG) or (iAlarmCode2 = GSH_UNACKEMERG)) then
+ iAlarmCode = GSH_UNACKEMERG
+ elseif ((iAlarmCode1 = GSH_UNACKHIGH) or (iAlarmCode2 = GSH_UNACKHIGH)) then
+ iAlarmCode = GSH_UNACKHIGH
+ elseif ((iAlarmCode1 = GSH_UNACKLOW) or (iAlarmCode2 = GSH_UNACKLOW)) then
+ iAlarmCode = GSH_UNACKLOW
+ elseif ((iAlarmCode1 = GSH_ACKEMERG) or (iAlarmCode2 = GSH_ACKEMERG)) then
+ iAlarmCode = GSH_ACKEMERG
+ elseif ((iAlarmCode1 = GSH_ACKHIGH) or (iAlarmCode2 = GSH_ACKHIGH)) then
+ iAlarmCode = GSH_ACKHIGH
+ elseif((iAlarmCode1 = GSH_ACKLOW) or (iAlarmCode2 = GSH_ACKLOW)) then
+ iAlarmCode = GSH_ACKLOW
+ end if
+
+
+ GSH_COMPAREHIGHESTALARMPRIORITY = iAlarmCode
+'gsh_log_e("GSH_COMPAREHIGHESTALARMPRIORITY returing " & iAlarmCode)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Get Highest Alarm Priority ''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETHIGHESTALARMPRIORITY(oDataBoundObject)
+'gsh_log_s("GSH_GETHIGHESTALARMPRIORITY oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+
+Dim iAlarmCode
+
+ iAlarmCode = GSH_GETHIGHESTALARMPRIORITYPARAMETER(oDataBoundObject, GSH_CPENTITY)
+ GSH_GETHIGHESTALARMPRIORITY = iAlarmCode
+'gsh_log_e("GSH_GETHIGHESTALARMPRIORITY returing " & iAlarmCode)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'TODO: hardcoded to fix.
+'Function: Get Highest Alarm Priority Parameter'''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+' paraName - Script Data parameter Name
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETHIGHESTALARMPRIORITYPARAMETER(oDataBoundObject, pointName)
+'gsh_log_s("GSH_GETHIGHESTALARMPRIORITYPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName)
+on error resume next
+ Dim iAlarmCode, iAlarmSeverity, iUnackAlarmExists
+ iUnackAlarmExists = 0
+ iAlarmSeverity = 0
+
+ '0 = no, 1 = low, 2= high, 3= urgent
+ iAlarmSeverity = oDataBoundObject.AlarmSeverity(pointName & "." & GSH_CPPARAM_PV)
+
+ if oDataBoundObject.UnacknowledgedAlarm(pointName & "." & GSH_CPPARAM_PV) then
+ iUnackAlarmExists = 1
+ else
+ iUnackAlarmExists = 0
+ end if
+ iAlarmCode = GSH_NOALARMCODE
+
+' gsh_log "GSH_GETHIGHESTALARMPRIORITYPARAMETER error Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & oDataBoundObject.UnacknowledgedAlarm(pointName & "." & GSH_CPPARAM_PV)
+
+ select case(2*iAlarmSeverity+iUnackAlarmExists)
+ case 0
+ iAlarmCode = GSH_NOALARMCODE
+ case 1
+ iAlarmCode = GSH_NOALARMCODE
+ case 2
+ iAlarmCode = GSH_ACKLOW
+ case 3
+ iAlarmCode = GSH_UNACKLOW
+ case 4
+ iAlarmCode = GSH_ACKHIGH
+ case 5
+ iAlarmCode = GSH_UNACKHIGH
+ case 6
+ iAlarmCode = GSH_ACKEMERG
+ case 7
+ iAlarmCode = GSH_UNACKEMERG
+ case else
+ 'gsh_log "GSH_GETHIGHESTALARMPRIORITYPARAMETER error Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & oDataBoundObject.UnacknowledgedAlarm(pointName & "." & GSH_CPPARAM_PV)
+ end select
+ 'return alarm code
+ GSH_GETHIGHESTALARMPRIORITYPARAMETER = iAlarmCode
+'gsh_log "GSH_GETHIGHESTALARMPRIORITYPARAMETER info Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & oDataBoundObject.UnacknowledgedAlarm(pointName & "." & GSH_CPPARAM_PV)
+'gsh_log_e("GSH_GETHIGHESTALARMPRIORITYPARAMETER returing " & iAlarmCode)
+end function
+
+
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_GETHIGHESTALARMPRIORITY_OP ''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETHIGHESTALARMPRIORITY_OP(oDataBoundObject)
+'gsh_log_s("GSH_GETHIGHESTALARMPRIORITY_OP oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim iAlarmCode
+ iAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oDataBoundObject, GSH_CPENTITY, GSH_CPPARAM_OP)
+ GSH_GETHIGHESTALARMPRIORITY_OP = iAlarmCode
+'gsh_log_e("GSH_GETHIGHESTALARMPRIORITY_OP returing " & iAlarmCode)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER'''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+' paraName - Script Data parameter Name
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oDataBoundObject, pointName, parameter)
+'gsh_log_s("GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", paraName=" & pointName & "." &parameter)
+on error resume next
+ Dim iAlarmCode, iAlarmSeverity, iUnackAlarmExists
+ '0 = no, 1 = low, 2= high, 3= urgent
+
+ iAlarmSeverity = oDataBoundObject.AlarmSeverity(pointName & "." & parameter)
+
+ if oDataBoundObject.UnacknowledgedAlarm(pointName & "." & parameter) then
+ iUnackAlarmExists = 1
+ else
+ iUnackAlarmExists = 0
+ end if
+ iAlarmCode = GSH_NOALARMCODE
+
+ select case(2*iAlarmSeverity+iUnackAlarmExists)
+ case 0
+ iAlarmCode = GSH_NOALARMCODE
+ case 1
+ iAlarmCode = GSH_NOALARMCODE
+ case 2
+ iAlarmCode = GSH_ACKLOW
+ case 3
+ iAlarmCode = GSH_UNACKLOW
+ case 4
+ iAlarmCode = GSH_ACKHIGH
+ case 5
+ iAlarmCode = GSH_UNACKHIGH
+ case 6
+ iAlarmCode = GSH_ACKEMERG
+ case 7
+ iAlarmCode = GSH_UNACKEMERG
+ case else
+
+ end select
+ 'return alarm code
+' gsh_log "GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER info Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & oDataBoundObject.UnacknowledgedAlarm(pointName & "." & parameter)
+' gsh_log_e("GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER returing " & iAlarmCode)
+
+ GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER = iAlarmCode
+end function
+
+function GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oDataBoundObject, pointName, parameter)
+'gsh_log_s("GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", paraName=" & pointName & "." &parameter)
+on error resume next
+ Dim iAlarmCode, iAlarmPriority, iUnackAlarmExists
+ '0 = no, 1 = low, 2= high, 3= urgent
+
+ iAlarmPriority = oDataBoundObject.DataValue(pointName & "." & parameter)
+
+ if oDataBoundObject.UnacknowledgedAlarm(pointName & "." & parameter) then
+ iUnackAlarmExists = 1
+ else
+ iUnackAlarmExists = 0
+ end if
+ iAlarmCode = GSH_NOALARMCODE
+
+ select case(2*iAlarmPriority+iUnackAlarmExists)
+ case 0
+ iAlarmCode = GSH_NOALARMCODE
+ case 1
+ iAlarmCode = GSH_NOALARMCODE
+ case 2
+ iAlarmCode = GSH_ACKLOW
+ case 3
+ iAlarmCode = GSH_UNACKLOW
+ case 4
+ iAlarmCode = GSH_ACKHIGH
+ case 5
+ iAlarmCode = GSH_UNACKHIGH
+ case 6
+ iAlarmCode = GSH_ACKEMERG
+ case 7
+ iAlarmCode = GSH_UNACKEMERG
+ case else
+' gsh_log "GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER error Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & oDataBoundObject.UnacknowledgedAlarm(pointName & "." & parameter)
+ end select
+ 'return alarm code
+ 'gsh_log "GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER info iAlarmPriority = " & iAlarmPriority & ", Unacknowledged Alarm = " &iUnackAlarmExists
+
+ GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER = iAlarmCode
+'gsh_log_e("GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER returing " & iAlarmCode)
+end function
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Get Point PVSource ''''''''' ''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape - data bound object within an HCS Shape
+'Returns: GSH_AUTO, GSH_MAN
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'return: GSH_AUTO, GSH_MAN
+'Might be able to OMIT!
+function GSH_GET_POINT_PVSOURCE(oDataBoundObject)
+'gsh_log_s("GSH_GET_POINT_PVSOURCE " & "oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ dim tempReturn
+ Select Case GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject,GSH_CPVALUE,GSH_CPPOINTTYPE)
+ Case GSH_CPPOINTTYPE_SCADA
+ select case oDataBoundObject.DataValue(GSH_CPENTITY&"."&GSH_SCADA_PARAM_PVSOURCE)
+ case 0
+ tempReturn = GSH_MAN
+ case 1
+ tempReturn = GSH_AUTO
+ case else
+ tempReturn = GSH_AUTO 'Default
+ end select
+ Case GSH_CPPOINTTYPE_TPN
+ select case oDataBoundObject.DataValue(GSH_CPENTITY&"."&GSH_TPN_PARAM_PVSOURCE)
+ case 0
+ tempReturn = GSH_MAN
+ case 1
+ tempReturn = GSH_AUTO
+ case else
+ tempReturn = GSH_AUTO 'Default
+ end select
+ Case GSH_CPPOINTTYPE_C200
+ tempReturn = GSH_NONE
+ CASE GSH_CPPOINTTYPE_C300
+ tempReturn = GSH_NONE
+ End Select
+ GSH_GET_POINT_PVSOURCE = tempReturn
+'gsh_log_e("GSH_GET_POINT_PVSOURCE returning >>>"&tempReturn&"<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Format Decimal Points'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject - data bound alphanumeric of HCS shape
+'Returns:
+' variant of formatted text to correct decimal places
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FORMATDECIMALPOINTS(oDataBoundObject)
+'gsh_log_s("GSH_FORMATDECIMALPOINTS " & "oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ dim temp
+ temp = Right(GSH_READTAGINFORMATIONKEYVALUE(oDataBoundObject.parentElement.parentElement.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ oDataBoundObject.numericDisplayFormat = "%." & Right(GSH_READTAGINFORMATIONKEYVALUE(oDataBoundObject.parentElement.parentElement.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1) & "f"
+'gsh_log_e("GSH_FORMATDECIMALPOINTS decimal points=" & temp)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Format State Descriptor'''''''''''''''''''''''''''''''''''''''
+'Parameters: stateValue - Value
+'Returns: State value with 1st letter upper case and rest lowercase
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_FORMATSTATEDESCRIPTOR(sValue)
+'gsh_log_s("GSH_FORMATSTATEDESCRIPTOR " & "sValue= " & sValue)
+on error resume next
+ Dim formatValue
+ formatValue = Ucase(Left(sValue, 1)) & LCase(Right(sValue, len(sValue) - 1))
+ GSH_FORMATSTATEDESCRIPTOR = formatValue
+'gsh_log_e("GSH_FORMATSTATEDESCRIPTOR returns "& formatValue)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Get Parameter Value
+'Parameters:
+' oDataBoundObject - HCS Shape with Entity (of type Point)Custom Property and Scripted Data tab
+' enabled with parameters of entity (point)
+' pointName - Name of the point
+' pointParameter - parameter of point (must be set up in scripted data tab
+'Returns:
+' DataValue of pointName.pointParameter from Experion point database
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, pointParameter)
+'gsh_log_s("GSH_GETPARAMETERVALUE " & "oDataBoundObject=" & oDataBoundObject.id & ",pointName=" & pointName & ",pointParameter=" & pointParameter)
+ Dim tempReturn
+' gsh_log("GSH_GETPARAMETERVALUE>>" & oDataBoundObject.DataValue(pointName&"."&pointParameter))
+ tempReturn = oDataBoundObject.DataValue(pointName&"."&pointParameter)
+ GSH_GETPARAMETERVALUE = tempReturn
+'gsh_log_e("GSH_GETPARAMETERVALUE returning >>>" & tempReturn&"<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: Get Entity Parameter Value
+'Parameters:
+' oDataBoundObject - HCS Shape with Entity (of type Point) Custom Property and Scripted Data tab
+' enabled with parameters of entity (point)
+' parameter - parameter of point (must be set up in scripted data tab
+'Returns:
+' DataValue of GSH_CPENTITY("Entity").parameter from Experion point database
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,parameter)
+'gsh_log_s("GSH_GETENTITYPARAMETERVALUE " & "oDataBoundObject=" & oDataBoundObject.id & ",parameter=" & parameter)
+ Dim tempReturn
+' gsh_log("GSH_GETENTITYPARAMETERVALUE>>" & oDataBoundObject.DataValue(GSH_CPENTITY&"."&parameter))
+
+ tempReturn = oDataBoundObject.DataValue(GSH_CPENTITY&"."&parameter)
+ If (StrComp(tempReturn,"1.#QNAN",vbTextCompare)=0) then
+ tempReturn = GSH_BADPV_TEXT
+ end If
+
+ GSH_GETENTITYPARAMETERVALUE = tempReturn
+'gsh_log_e("GSH_GETENTITYPARAMETERVALUE returning >>>" & tempReturn&"<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Show High Alarm
+' sets the common High Alarm behaviour of HCS Shapes by using CSS
+'Parameters:
+' oShape - HCS Shape with 'shp_outline (object) with internal object named 'outline'
+' shp_EAlarm, shp_HAlarm, shp_LAlarm
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWHIGHALARM(oShape,unAcknowledged)
+'gsh_log_s("GSH_SHOWHIGHALARM oShape=" & oShape.id & ",unAcknowledged=" & cstr(unAcknowledged))
+on error resume next
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+' oShape.objects("outlinestatic").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_HAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_HAlarm").style.visibility = GSH_VISIBLE
+ if unAcknowledged then oShape.objects("outline").styleClass = GSH_CSSALARMHIGHUNACK else oShape.objects("outline").styleClass = GSH_CSSALARMHIGHACK end if
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_SHOWHIGHALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Show Low Alarm
+' sets the common Low Alarm behaviour of HCS Shapes by using CSS
+'Parameters:
+' oShape - HCS Shape with 'shp_outline (object) with internal object named 'outline'
+' shp_EAlarm, shp_HAlarm, shp_LAlarm
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWLOWALARM(oShape,unAcknowledged)
+'gsh_log_s("GSH_SHOWLOWALARM oShape=" & oShape.id & ",unAcknowledged=" & cstr(unAcknowledged))
+on error resume next
+
+ oShape.objects("txt_LAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_VISIBLE
+ if unAcknowledged then oShape.objects("outline").styleClass = GSH_CSSALARMLOWUNACK else oShape.objects("outline").styleClass = GSH_CSSALARMLOWACK end if
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+' oShape.objects("outlinestatic").style.visibility = GSH_VISIBLE
+
+'gsh_log_e("GSH_SHOWLOWALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Show Emergency Alarm
+' sets the common Emergency Alarm behaviour of HCS Shapes by using CSS
+'Parameters:
+' oShape - HCS Shape with 'shp_outline (object) with internal object named 'outline'
+' shp_EAlarm, shp_HAlarm, shp_LAlarm
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWEMERGENCYALARM(oShape,unAcknowledged)
+'gsh_log_s("GSH_SHOWEMERGENCYALARM oShape=" & oShape.id & ",unAcknowledged=" & cstr(unAcknowledged))
+on error resume next
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+' oShape.objects("outlinestatic").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_EAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("plg_EAlarm").style.visibility = GSH_VISIBLE
+ if unAcknowledged then oShape.objects("outline").styleClass = GSH_CSSALARMEMERGENCYUNACK else oShape.objects("outline").styleClass = GSH_CSSALARMEMERGENCYACK end if
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_SHOWEMERGENCYALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: Show No Alarm
+' sets the common Alarm objects to not visible when point is not in alarm.
+'Parameters:
+' oShape - HCS Shape with 'shp_outline (object) with internal object named 'outline'
+' shp_EAlarm, shp_HAlarm, shp_LAlarm
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWNOALARM(oShape)
+'gsh_log_s("GSH_SHOWNOALARM oShape=" & oShape.id)
+on error resume next
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").styleClass = GSH_CSSALARMNONE
+' oShape.objects("outlinestatic").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_SHOWNOALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'INIT DISPLAY ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_INITDISPLAY(DisplayType, sT2FileName, sT3FileName, sT4FileName, displayObject)
+on error resume next
+'gsh_log_s("GSH_INITDISPLAY " & "DisplayType=" & DisplayType & ",sT2FileName=" & sT2FileName & ",sT3FileName=" & sT3FileName & ",sT4FileName=" & sT4FileName & ",displayObject=" & displayObject.id)
+ Dim sDisplayLocation
+ Dim sTemp
+ Dim sUseT4Default
+ sDisplayLocation = GSH_READDISPLAYNAMES(GSH_DISPLAYDEFAULT_LOC)
+ Select Case DisplayType
+ Case 2
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_T2FN,sT2FileName
+ Case 3
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_T3FN,sT3FileName
+ GSH_WRITEDISPLAYINFORMATION sT2FileName, GSH_REGKEY_PRIORT3, sT3FileName
+
+''' was commented out 1June08 - but lost the right click to level 4n from tabs - JE
+ sUseT4Default = GSH_READDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_USET4,"NO")
+ If sUseT4Default = "YES" And sT4FileName <> "" Then
+ sTemp = sDisplayLocation & sT4FileName & GSH_DISPLAYFILEEXTENSION
+ 'GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_T4FN,sT4FileName
+
+ 'Sept 12, 2008 - use window.external.CurrentPage instread of using safeview (CL)
+ 'because the safeview's function SetFocus does not work.
+ 'window.navigate call does not work either as it will display L4 on L3 place.
+ window.external.CurrentPage = sTemp
+ 'GSH_INVOKEDISPLAY GSH_SVIEW_TYPE4,sTemp
+ 'window.navigate(sTemp)
+
+
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_USET4,"NO"
+ End If
+'' to here
+ Case 4
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_T4FN,sT4FileName
+ GSH_WRITEDISPLAYINFORMATION sT2FileName, GSH_REGKEY_PRIORT4, sT4FileName
+ End Select
+ g_PageCurrentFocusTag = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_FOCUSTAG,"")
+ g_PageShapesInit = 1
+
+ g_PageLoadTimerID=window.setTimeout("g_PageLoadCompleted = true",1500/DisplayType)
+'gsh_log_e("GSH_INITDISPLAY DisplayType=" & DisplayType)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'INIT Faceplate '''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_INITFACEPLATE(sFaceplateFileName, displayObject)
+'gsh_log_s("GSH_INITFACEPLATE " & "sFaceplateFileName=" & sFaceplateFileName & ",displayObject=" & displayObject.id)
+on error resume next
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_FacePlateFN,sFaceplateFileName
+ txt_Description.value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_DESCR, defaultString)
+ txt_Keyword.value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_KEYWORD, defaultString)
+ txt_Units.value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_UNITS, defaultString)
+ txt_alarmlim1.value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_ALARMLIM1)
+ txt_alarmlim2.value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_ALARMLIM2)
+ txt_alarmlim3.value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_ALARMLIM3)
+ txt_alarmlim4.value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_ALARMLIM4)
+ txt_euhi.value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_EUHI)
+ txt_eulo.value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_EULO)
+
+'Setup Alarm Limits
+call showAlarmLimits
+
+ call FP_RetrieveRegistryValues
+ call GSH_DetailTrendInitialize(ConAlpTagname.value)
+ call GSH_STARTDETAILTRENDTIMER(ConAlpTagname)
+'gsh_log_e("GSH_INITFACEPLATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_INVOKEDISPLAY
+'Use this function to open a URL in a specified Safeview Window
+'sWindowType = SafeView Window Type
+'sURL = URL of the Display
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_INVOKEDISPLAY (sWindowType, sURL)
+'gsh_log_s("GSH_INVOKEDISPLAY sWindowType="&sWindowType&", sURL="&sURL)
+ dim sview
+ set sview = GetObject("" ,"Honeywell.Workspace.Client")
+ If sview.IsManagerActive = true then
+ 'dim bResult
+ 'bResult = sview.SetOutputFocus(sWindowType)
+ 'Sept12,2008 - Comment out because bResult is alway false (CL)
+ 'gsh_log("SetOutputFocus result "&bResult)
+ 'if bResult then
+ ' window.external.CurrentPage = sURL
+ 'end if
+ End if
+ window.external.CurrentPage = sURL
+ 'window.navigate(sURL)
+ set sview = nothing
+'gsh_log_e("GSH_INVOKEDISPLAY")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_UPDATESHAPESONDISPLAY
+' This function fires the focus.onupdate event for all shapes' on the page
+' It is called from the GSH_ONSHAPECLICKEVENTHANDLER on the page level
+'***Assumes that the shape structure contains an object called
+'*** focus
+'sURL = URL of the Display
+'06/07/07 removed check for shapename; now shapes can be renamed on the display
+'06/07/07 use rec_datascript.onupdate instead of focus.update because it's
+' still performant and has consistent updates for all shapes e.g. valves and levels
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_UPDATESHAPESONDISPLAY (sURL)
+'gsh_log_s("GSH_UPDATESHAPESONDISPLAY sURL="&sURL)
+
+on error resume next
+
+Dim tempShape
+ For k=0 To (window.external.Page.children.length - 1)
+ set tempShape = window.external.Page.children(k).Objects("focus")
+' set tempShape = window.external.Page.children(k).Objects("rec_datascript")
+ if tempShape then
+ tempShape.onupdate
+ end if
+ Next
+set tempShape = nothing
+'gsh_log_e("GSH_UPDATESHAPESONDISPLAY Focus SuppressedOnPgInit sURL="&sURL)
+end sub
+
+'
+'-------------------------------------END SHAPE GENERAL----------------------------------------------'
+'
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' GSH_UPDATETAGNAMELABELONDISPLAY
+' Updates the state of the TagNameLabel shape based on TagNameLabelVisible flag
+' in the StationDataRespository
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_UPDATETAGNAMELABELONDISPLAY (sURL)
+'gsh_log_s("GSH_UPDATETAGNAMELABELONDISPLAY sURL="&sURL)
+on error resume next
+Dim tempShape
+ For k=0 To (window.external.Page.children.length - 1)
+ set tempShape = window.external.Page.children(k).Objects("TagNameLabel_Script")
+ if tempShape then
+ tempShape.onupdate
+ end if
+ Next
+set tempShape = nothing
+'gsh_log_e("GSH_UPDATETAGNAMELABELONDISPLAY sURL="&sURL)
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' GSH_UPDATE_OPDEVMON_ONDISPLAY
+' Updates the state of the OPDevMonitor shapes
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_UPDATE_OPDEVMON_ONDISPLAY (sURL)
+'gsh_log_s("GSH_UPDATE_OPDEVMON_ONDISPLAY sURL="&sURL)
+on error resume next
+Dim tempShape
+ For k=0 To (window.external.Page.children.length - 1)
+ set tempShape = window.external.Page.children(k).Objects("OPDevMonitor_Script")
+ if tempShape then
+ tempShape.onupdate
+ end if
+ Next
+set tempShape = nothing
+'gsh_log_e("GSH_UPDATE_OPDEVMON_ONDISPLAY sURL="&sURL)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' GSH_UPDATEPAGELINKONDISPLAY
+' Updates the state of the GEN_PageLink shape based on PageLinkAlarmGroup
+' in the Registry
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_UPDATEPAGELINKONDISPLAY (sURL)
+'gsh_log_s("GSH_UPDATEPAGELINKONDISPLAY sURL="&sURL)
+on error resume next
+Dim tempShape
+ For k=0 To (window.external.Page.children.length - 1)
+ set tempShape = window.external.Page.children(k).Objects("PageLink_Script")
+ if tempShape then
+ tempShape.onupdate
+ end if
+ Next
+set tempShape = nothing
+'gsh_log_e("GSH_UPDATEPAGELINKONDISPLAY sURL="&sURL)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GETDEMANDTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified Demand\Trend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETDEMANDTREND(strSection,strKey,defaultString)
+'gsh_log_s("GSH_GETDEMANDTREND " & "strSection=" & strSection & ",strKey=" & strKey & ",defaultString=" & defaultString )
+on error resume next
+ dim strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_DEMANDTRD & strSection & "\" & strKey
+ tempReturn = GSH_READREGISTRY(strRegLocation,defaultString)
+ GSH_GETDEMANDTREND = tempReturn
+'gsh_log_e("GSH_GETDEMANDTREND returning " & tempReturn)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETDEMANDTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified Demand\Trend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETDEMANDTREND(strSection,strKey,strValue)
+'gsh_log_s("GSH_SETDEMANDTREND " & "strSection=" & strSection & ",strKey=" & strKey & ",strValue=" & strValue )
+on error resume next
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_DEMANDTRD & strSection & "\"& strKey
+' 'gsh_log("GSH_SETDEMANDTREND checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_SETDEMANDTREND")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETANYTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sTrendApp - trend application name
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified Demand\Trend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETANYTREND(strTrendApp,strSection,strKey,strValue)
+'gsh_log_s("GSH_SETANYTREND " & "strTrendApp=" & strTrendApp & ", strSection=" & strSection & ", strKey=" & strKey & ", strValue=" & strValue )
+on error resume next
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_OPERATORTREND & "\" & strTrendApp & "\" & strSection & "\"& strKey
+' gsh_log("GSH_SETANYTREND checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_SETANYTREND")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GETMENUCONFIG'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified MenuConfig subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETMENUCONFIG(strKey,defaultString)
+'gsh_log_s("GSH_GETMENUCONFIG " & "strKey=" & strKey & ",defaultString=" & defaultString )
+on error resume next
+ dim strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_MENUCONFIG & strKey
+ 'gsh_log("GSH_GETMENUCONFIG checkPoint strRegLocation=" & strRegLocation)
+ tempReturn = GSH_READREGISTRY(strRegLocation,defaultString)
+ GSH_GETMENUCONFIG = tempReturn
+'gsh_log_e("GSH_GETMENUCONFIG returning & " & tempReturn)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GETMENUCONFIG_EQUIPMENT'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified MenuConfig subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETMENUCONFIG_EQUIPMENT(strKey,defaultString)
+'gsh_log_s("GSH_GETMENUCONFIG_EQUIPMENT " & "strKey=" & strKey & ",defaultString=" & defaultString )
+on error resume next
+ dim strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_MENUCONFIG_EQUIPMENT & strKey
+' gsh_log("GSH_GETMENUCONFIG_EQUIPMENT checkPoint strRegLocation=" & strRegLocation)
+ tempReturn = GSH_READREGISTRY(strRegLocation,defaultString)
+ GSH_GETMENUCONFIG_EQUIPMENT = tempReturn
+'gsh_log_e("GSH_GETMENUCONFIG_EQUIPMENT returning " & tempReturn)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_RIGHTCLICK ''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_RIGHTCLICK(oDataBoundObject)
+'gsh_log_s("GSH_RIGHTCLICK " & "oDataBoundObject=" & oDataBoundObject)
+Dim sTagName
+ sTagName = oDataBoundObject.getCustomProperty("point","Entity")
+ call GSH_RIGHTCLICKTAGNAME(oDataBoundObject, sTagName)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_RIGHTCLICKTAGNAME '''''''''''''''''''''''''''''''''''''''''''''''''
+'06/01/07 Added sTagNameHDA from the TagInformation because the Historian names do not match the tagname
+'06/01/07 parse out the function block for storing the itemAlias
+'08/21/2008 (CL) Add a check to determine if we should use shortname for HDA Item path in order to work with Sasol PHD historian interface (Issue#21)
+'10/06/2008 (CL) Add writing value of tag euhigh and eulow to trend range high and trend range low to allow the trend use
+' the range from registry when the range is not available from the historian
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_RIGHTCLICKTAGNAME(oDataBoundObject, sTagName)
+'gsh_log_s("GSH_RIGHTCLICKTAGNAME " & "oDataBoundObject=" & oDataBoundObject & " sTagName=" & sTagName)
+Dim DispStr(), asCommandStr(), asTrendParams(),asDeleteParams(8), asTraceNames(8), asStepped(8),asPVFormat(8), asActive(8), asTrendParamShort(8), asEUHIGH(8), asEULOW(8)
+Dim nRetVal,nNumTrendParams, nNumCommands, nCount, nIndex, nAddIndex, nDeleteIndex, nCommandIndex, nCancelIndex, istrLen, iPosition
+Dim nNumTrends, vTrendAvail, sParseStr, sTemp, nActiveCount, sPathPrefix, sPVFormat, sTagNameAlias, sPVeuhigh, sPVeulow
+ 'Check Registry for Tag Name Alias
+ sTagNameAlias = GSH_READTAGINFORMATIONKEYVALUE(sTagName, GSH_REGKEY_TAGNAME_ALIAS, sTagName)
+ nIndex = 0
+ nNumTrends = 8
+ nNumTrendParams = GSH_READTAGINFORMATIONKEYVALUE(sTagName, "NoOfTrendingParams", 0)
+ nNumCommands = GSH_GETMENUCONFIG(GSH_REGKEY_NUMCMDS, 0)
+ sPVFormat = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT)
+ sPathPrefix = GSH_GETDEMANDTREND (GSH_REGISTRY_SETTINGS,GSH_REGKEY_PATHPREFIX, "")
+
+ '10/06/2008 CL
+ sPVeuhigh = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_EUHIGH, 0)
+ sPVeulow = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_EULOW, 0)
+
+ If nNumTrendParams > 0 Then
+ ReDim asTrendParams(nNumTrendParams-1)
+ End If
+
+ If nNumCommands > 0 Then
+ ReDim asCommandStr(nNumCommands-1)
+ End If
+
+ nActiveCount = 0
+ For nCount = 1 To nNumTrends Step 1
+ asTraceNames(nCount) = GSH_GETDEMANDTREND (GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, "")
+ asActive(nCount) = GSH_GETDEMANDTREND (GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, "OFF")
+ asDeleteParams(nCount) = ""
+ If asActive(nCount) <> "OFF" Then
+ nActiveCount = nActiveCount + 1
+ asDeleteParams(nCount) = asTraceNames(nCount)
+ End If
+ Next
+
+ If (nNumTrendParams > 0) Then
+ For nCount = 1 To nNumTrendParams Step 1
+ asTrendParams(nCount-1) = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TRENDPARAM & nCount, "")
+ istrLen = len(asTrendParams(nCount-1))
+ iPosition= Instr(1, asTrendParams(nCount-1) , ".",vbtextcompare)
+ asTrendParamShort(nCount-1) = right(asTrendParams(nCount-1), istrLen - iPosition)
+ asStepped(nCount) = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TRENDSTEPPED & nCount, "OFF")
+ Select Case asTrendParamShort(nCount-1)
+' Select Case asTrendParams(nCount-1)
+ Case "PV"
+ asPVFormat(nCount) = sPVFormat
+
+ '10/06/2008 CL
+ asEUHIGH(nCount) = sPVeuhigh
+ asEULOW(nCount) = sPVeulow
+ Case "SP"
+ asPVFormat(nCount) = sPVFormat
+ asEUHIGH(nCount) = sPVeuhigh
+ asEULOW(nCount) = sPVeulow
+ Case "OP"
+ asPVFormat(nCount) = "D1"
+ asEUHIGH(nCount) = 106.9
+ asEULOW(nCount) = -6.9
+ Case Else
+ asPVFormat(nCount) = "D1"
+ asEUHIGH(nCount) = 100
+ asEULOW(nCount) = 0
+ End Select
+ Next
+ End If
+
+ If (nNumCommands > 0) Then
+ For nCount = 1 To nNumCommands Step 1
+ asCommandStr(nCount-1) = GSH_GETMENUCONFIG(GSH_REGKEY_CMDSTR & nCount, "")
+ Next
+ End If
+
+ dim tempNumber
+ tempNumber = nNumTrendParams + 5 + nNumCommands + nActiveCount
+
+ ReDim DispStr(tempNumber)
+ DispStr(nIndex) = "Tag : " & sTagNameAlias
+ nIndex = nIndex + 1
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+ If (nNumTrendParams > 0) Then
+ nAddIndex = nIndex
+ For nCount = 0 To UBound(asTrendParams) Step 1
+ DispStr(nIndex) = "Add Trace " & sTagNameAlias & "." & asTrendParams(nCount)
+ nIndex = nIndex + 1
+ Next
+ End If
+ If (nActiveCount > 0) Then
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+ nDeleteIndex = nIndex
+ For nCount = 1 To nNumTrends Step 1
+ If asDeleteParams(nCount) <> "" Then
+ DispStr(nIndex) = "Delete Trace " & asDeleteParams(nCount)
+ nIndex = nIndex + 1
+ End If
+ Next
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+ Else
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+ End If
+ If (nNumCommands > 0) Then
+ nCommandIndex = nIndex
+ For nCount = 0 To UBound(asCommandStr) Step 1
+ DispStr(nIndex) = asCommandStr(nCount)
+ nIndex = nIndex + 1
+ Next
+ End If
+ nCancelIndex = nIndex
+
+ If nNumCommands = 0 Then
+ nCommandIndex = nCancelIndex
+ End If
+
+ 'CallAgain:
+ nRetVal = 0
+ do while nRetVal = 0
+
+ Dim ArrMenu ' As ArrPopupMenuX
+ Set ArrMenu = CreateObject("ArrPopupMenuXControl.ArrPopupMenuX")
+ ArrMenu.ShowMenuArr DispStr
+ nRetVal = ArrMenu.Item
+ If nActiveCount = 0 Then 'added this to handle case when all traces are inactive
+ nDeleteIndex = nAddIndex + nNumTrendParams
+ End If
+ loop
+ Set ArrMenu = Nothing
+ Dim sOPC1_PathPrefix,sOPC2_PathPrefix, sTagNameHDA, bUseShortNameForHDA
+ sOPC1_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY1PREFIX,"")
+ sOPC2_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY2PREFIX,"")
+ bUseShortNameForHDA = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_USESHORTNAME_FOR_HDAPATH,"")
+
+ If ((nRetVal >= nAddIndex) And (nRetVal < nDeleteIndex)) Then
+ For nCount = 1 To nNumTrends Step 1
+ If asActive(nCount) = GSH_OFF Then
+ sTagNameHDA = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TAGNAMEHDA, sTagName)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, sTagNameAlias & "." & asTrendParamShort(nRetVal - nAddIndex)
+
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, sOPC1_PathPrefix & sTagName & "." & asTrendParams(nRetVal - nAddIndex)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, sOPC2_PathPrefix & sTagName & "." & asTrendParams(nRetVal - nAddIndex)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_ON
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(nRetVal - nAddIndex + 1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(nRetVal - nAddIndex + 1)
+
+ 'Added 10/06/2008 (CL) add to allows trend to use range from registry if they are not available from historian
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH, asEUHIGH(nRetVal - nAddIndex + 1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW, asEULOW(nRetVal - nAddIndex + 1)
+
+ 'Added 08/21/2008 (CL) to work with Sasol PHD historian interface
+ 'Issue#21: http://wss-edm-1/clients/hcs/services/ISE-HCS8227/ClientProjectAccess/Lists/Issue%20Tracker/DispForm.aspx?ID=21
+ If(UCASE(bUseShortNameForHDA) = "ON") then
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParamShort(nRetVal - nAddIndex)
+
+ Else
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParams(nRetVal - nAddIndex)
+ End If
+
+ Exit Sub
+ End If
+ Next
+ msgbox "Sorry ! No Traces available. Please delete a Trace before adding a new one." & Chr(13),,"HMI Operator Interface"
+ ElseIf ((nRetVal >= nDeleteIndex) And (nRetVal < nCommandIndex)) Then
+ nCount = nRetVal - nDeleteIndex + 1
+ nDelete = 1
+ For n = 1 To nNumTrends ' Step 1
+ 'gsh_log("nCount"&nCount&",n"&n&", nDelete"&nDelete)
+ If asActive(n) <> GSH_OFF Then
+ If nDelete = nCount Then
+ 'gsh_log ("DELETE TRACE_"&n)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE&n,GSH_REGKEY_ACTIVE, GSH_OFF
+ Exit Sub
+ End If
+ nDelete = nDelete + 1
+ End If
+ Next
+
+ ElseIf (nRetVal >= nCommandIndex) And (nRetVal < nCancelIndex) Then
+ 'gsh_log("GSH_RIGHTCLICKTAGNAME nRetVal=" & nRetVal)
+ Dim nLen, nTemp, sCommandLeft, sCommandRight, sCommand
+ sParseStr = GSH_GETMENUCONFIG(GSH_REGKEY_CMDSTRING & ((nRetVal-nCommandIndex)+1), "")
+ nLen = Len(sParseStr)
+ nTemp = Instr(1,sParseStr,"XXXXXX",1)
+
+ If nTemp = 0 Then ' do not need to add tag name to command
+ sCommand = sParseStr
+ Else
+ sCommandLeft = left(sParseStr,(nTemp - 1))
+ nTemp = nLen - nTemp - 5
+ If nTemp < 1 Then
+ sCommandRight = ""
+ Else
+ sCommandRight = right(sParseStr,(nTemp))
+ End If
+ sCommand = sCommandLeft & sTagName & sCommandRight
+ End If
+ 'gsh_log("GSH_RIGHTCLICKTAGNAME sCommand=" & sCommand)
+ id = window.parent.external.shell(sCommand,1)
+ ElseIf (nRetVal = nCancelIndex) Then
+' gsh_log_e("GSH_RIGHTCLICKTAGNAME1")
+ Exit Sub
+ End If
+' gsh_log_e("GSH_RIGHTCLICKTAGNAME2")
+ Exit Sub
+'gsh_log_e("GSH_RIGHTCLICKTAGNAME3")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_RIGHTCLICKEQUIPMENTNAME '''''''''''''''''''''''''''''''''''''''''''''''''
+'25Mar2008 created for Sasol - JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_RIGHTCLICKEQUIPMENTNAME(oDataBoundObject)
+'gsh_log_s("GSH_RIGHTCLICKEQUIPMENTNAME ")
+Dim DispStr(), asCommandStr()
+Dim nRetVal, nNumCommands, nCount, nIndex, nCommandIndex, nCancelIndex, istrLen, iPosition
+Dim sParseStr, sTemp, sPathPrefix, sEquipmentName, sSearchstring
+
+ sEquipmentName = oDataBoundObject.GetCustomProperty("Value","TxtLabel")
+ sSearchstring = oDataBoundObject.GetCustomProperty("Value","Searchstring")
+
+ nIndex = 0
+ nNumCommands = GSH_GETMENUCONFIG_EQUIPMENT(GSH_REGKEY_NUMCMDS, 0)
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME sEquipmentName=" & sEquipmentName & ",nIndex=" & nIndex & ",nNumCommands=" & nNumCommands)
+
+ nActiveCount = 0
+ If nNumCommands > 0 Then
+ ReDim asCommandStr(nNumCommands-1)
+ For nCount = 1 To nNumCommands Step 1
+ asCommandStr(nCount-1) = GSH_GETMENUCONFIG_EQUIPMENT(GSH_REGKEY_CMDSTR & nCount, "")
+ Next
+ End If
+
+ dim tempNumber
+ tempNumber = 5 + nNumCommands
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME tempNumber=" &tempNumber)
+
+ ReDim DispStr(tempNumber)
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME Dim of DispStr=" & UBound(DispStr))
+ DispStr(nIndex) = "Tag : " & sEquipmentName
+ nIndex = nIndex + 1
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME nIndex=" &nIndex)
+
+ If (nNumCommands > 0) Then
+ nCommandIndex = nIndex
+ For nCount = 0 To UBound(asCommandStr) Step 1
+ DispStr(nIndex) = asCommandStr(nCount)
+ nIndex = nIndex + 1
+ Next
+ End If
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME after nNumCommands nIndex=" &nIndex)
+ nCancelIndex = nIndex
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME DispStr populated: nIndex=" & nIndex)
+
+ 'Debugging
+' For nCount = 0 To nIndex Step 1
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME nCount=" &nCount&"DispStr(nCount)"& DispStr(nCount))
+' Next
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME nCommandIndex=" &nCommandIndex)
+
+ If nNumCommands = 0 Then
+ nCommandIndex = nCancelIndex
+ End If
+
+ 'CallAgain:
+ nRetVal = 0
+ do while nRetVal = 0
+
+ Dim ArrMenu ' As ArrPopupMenuX
+ Set ArrMenu = CreateObject("ArrPopupMenuXControl.ArrPopupMenuX")
+ ArrMenu.ShowMenuArr DispStr
+ nRetVal = ArrMenu.Item
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME nRetVal=" & nRetVal)
+ loop
+ Set ArrMenu = Nothing
+ If (nRetVal >= nCommandIndex) And (nRetVal < nCancelIndex) Then
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME nRetVal=" & nRetVal)
+ Dim nLen, nTemp, sCommandLeft, sCommandRight, sCommand
+ sParseStr = GSH_GETMENUCONFIG_EQUIPMENT(GSH_REGKEY_CMDSTRING & ((nRetVal-nCommandIndex)+1), "")
+ nLen = Len(sParseStr)
+ nTemp = Instr(1,sParseStr,"XXXXXX",1)
+
+ If nTemp = 0 Then ' do not need to add search string to command
+ sCommand = sParseStr
+ Else
+ sCommandLeft = left(sParseStr,(nTemp - 1))
+ nTemp = nLen - nTemp - 5
+ If nTemp < 1 Then
+ sCommandRight = ""
+ Else
+ sCommandRight = right(sParseStr,(nTemp))
+ End If
+ sCommand = sCommandLeft & sSearchString & sCommandRight
+ End If
+' gsh_log("GSH_RIGHTCLICKEQUIPMENTNAME sCommand=" & CStr(sCommand) & " sCommandLeft=" & sCommandLeft &" sCommandRight=" & sCommandRight)
+ id = window.parent.external.shell(CStr(sCommand),1)
+ ElseIf (nRetVal = nCancelIndex) Then
+' gsh_log_e("GSH_RIGHTCLICKEQUIPMENTNAME1")
+ Exit Sub
+ End If
+' gsh_log_e("GSH_RIGHTCLICKEQUIPMENTNAME2")
+ Exit Sub
+'gsh_log_e("GSH_RIGHTCLICKEQUIPMENTNAME3")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GET_POINT_RAMPING_VALUE''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = grp subshape name or me, if calling within subshape
+'Returns GSH_RAMPING_NONE or GSH_RAMPING_RUN or GSH_RAMPING_PRESET or value from control database
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GET_POINT_RAMPING_VALUE(oDataBoundObject)
+'gsh_log_s("GSH_GET_POINT_RAMPING_VALUE oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim tempReturn
+tempReturn = GSH_RAMPING_NONE
+ Select Case GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_RAMP)
+ Case GSH_RAMPING_RUN
+ tempReturn = GSH_RAMPING_RUN
+ Case GSH_RAMPING_PRESET
+ tempReturn = GSH_RAMPING_PRESET
+ Case else
+ tempReturn = GSH_RAMPING_NONE
+ End Select
+GSH_GET_POINT_RAMPING_VALUE = tempReturn
+'gsh_log_e("GSH_GET_POINT_RAMPING_VALUE returning >>>" & tempReturn & "<<<")
+end function
+
+function GSH_SHOWWINDUPSTATUS(sWindupCode,oShape)
+'gsh_log_s("GSH_SHOWWINDUPSTATUS " & "sWindupCode=" & sWindupCode & ",oShape=" & oShape.id)
+dim tempReturn: tempReturn = true
+ Select Case sWindupCode
+ Case GSH_WINDUP_LO
+ oShape.objects("plg_OpLow").style.visibility = GSH_VISIBLE
+ Case GSH_WINDUP_HI
+ oShape.objects("plg_OpHigh").style.visibility = GSH_VISIBLE
+ Case GSH_WINDUP_INIT
+ oShape.objects("txt_Initialization").style.visibility = GSH_VISIBLE
+ Case else
+ tempReturn = false 'do nothing because visibility is hidden by default and in Show Normal
+ end Select
+GSH_SHOWWINDUPSTATUS = tempReturn
+'gsh_log_e("GSH_SHOWWINDUPSTATUS returns >>>>>>>>> "&tempReturn)
+end function
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_C200_ISALARMINGDISABLEDPARAMETER
+'Parameters:
+' oDataBoundObject - HCS Group Shape
+' pointName - point Name
+'Returns:
+' boolean
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_ISALARMINGDISABLEDPARAMETER(oDataBoundObject, pointName)
+'gsh_log_s("GSH_C200_ISALARMINGDISABLEDPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName)
+on error resume next
+ Dim tempReturn
+ tempReturn = GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, GSH_C200_PARAM_ALARMDISABLED)
+ if ( tempReturn = 0) then: tempReturn = true: else: tempReturn = false: end if
+GSH_C200_ISALARMINGDISABLEDPARAMETER = tempReturn
+'gsh_log_e("GSH_C200_ISALARMINGDISABLEDPARAMETER returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOG_POINT_IS_OFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam)
+'gsh_log_s("GSH_C200_ANALOG_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn
+
+'''''Jamie Jan. 24, 2010'''''
+
+ tempReturn = false
+ temp = GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam)
+ if strComp(temp,GSH_NODATA,vbTextCompare)<> 0 then
+ if strComp(temp,GSH_AUTO,vbTextCompare) <> 0 then
+ tempReturn = true
+ end if
+ end if
+GSH_C200_ANALOG_POINT_IS_OFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_ANALOG_POINT_IS_OFFNORMAL returning >>>" & tempReturn & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITAL_POINT_IS_OFFNORMAL'''''''''''''''''''''''''''''''''
+'Function: only checks if Digital State is offnormal
+'Parameters:
+' oDataBoundObject = id of object with script data tab
+' sPointName = Point name from to access tagname
+' sDigitalStateTxt = string value to compare to registry tag info to determine if its offnormal
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName, sDigitalStateTxt)
+'gsh_log_s("GSH_C200_DIGITAL_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName)
+on error resume next
+ Dim sTagname, sIsDigitalStateOffnormal
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ sIsDigitalStateOffnormal = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_PVNORMAL_STATE, sDigitalStateTxt)
+ GSH_C200_DIGITAL_POINT_IS_OFFNORMAL = sIsDigitalStateOffnormal
+'gsh_log_e("GSH_C200_DIGITAL_POINT_IS_OFFNORMAL returning >>>" & sIsDigitalStateOffnormal & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITAL_POINT_OP_ISOFFNORMAL'''''''''''''''''''''''''''''''''
+'Function: only checks if Digital State is offnormal
+'Parameters:
+' oDataBoundObject = id of object with script data tab
+' sPointName = Point name from to access tagname
+' sDigitalStateTxt = string value to compare to registry tag info to determine if its offnormal
+'Returns true or false
+'Author: Didi Ekaette - August 1, 2007
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_DIGITAL_POINT_OP_ISOFFNORMAL(oDataBoundObject,sPointName, sDigitalStateTxt)
+'gsh_log_s("GSH_C200_DIGITAL_POINT_OP_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName)
+on error resume next
+ Dim sTagname, sIsDigitalStateOffnormal
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ sIsDigitalStateOffnormal = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_OPNORMAL_STATE, sDigitalStateTxt)
+ GSH_C200_DIGITAL_POINT_OP_ISOFFNORMAL = sIsDigitalStateOffnormal
+'gsh_log_e("GSH_C200_DIGITAL_POINT_IS_OFFNORMAL returning >>>" & sIsDigitalStateOffnormal & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITAL_GETOFFNORMALSTATUS'''''''''''''''''''''''''''''''''
+'Parameters:
+' sTagname = tag to access registry info for
+' sRegKey = where to access registry tag information(GSH_REGKEY_PV_NORMAL_STATE, GSH_REGKEY_NMODATTR, GSH_REGKEY_NMODE)
+' sParameterValue = string value to compare to registry tag info to determine if its offnormal
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, sRegKey, sParameterValue)
+'gsh_log_s("GSH_DIGITAL_GETOFFNORMALSTATUS sTagname="&sTagname&", sRegKey="&sRegKey&", sParameterValue="&sParameterValue)
+on error resume next
+ Dim sOffNormalIndicatorStatus, sPVNormalState: sOffNormalIndicatorStatus = false
+ sPVNormalState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, sRegKey, GSH_NONE)
+ if (strComp(sPVNormalState,GSH_NONE,vbTextCompare) <> 0) then 'if Registry key is not None
+ if (strComp(sParameterValue,sPVNormalState,vbTextCompare) <> 0) then
+ sOffNormalIndicatorStatus = true
+ end if
+ end if
+GSH_DIGITAL_GETOFFNORMALSTATUS = sOffNormalIndicatorStatus
+'gsh_log_e("GSH_DIGITAL_GETOFFNORMALSTATUS returning >>>" & sOffNormalIndicatorStatus & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_DIGITAL_GETOFFNORMALINDSTATUS'''''''''''''''''''''''''''''''''
+'Parameters:
+' sTagname = tag to access registry info for
+' sRegKey = where to access registry tag information(GSH_REGKEY_PV_NORMAL_STATE, GSH_REGKEY_NMODATTR, GSH_REGKEY_NMODE)
+' sParameterValue = string value to compare to registry tag info to determine if its offnormal
+'Returns GSH_HIDDEN or GSH_VISIBLE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_FP_DIGITAL_GETOFFNORMALINDSTATUS(sTagname, sRegKey, sParameterValue)
+'gsh_log_s("GSH_FP_DIGITAL_GETOFFNORMALINDSTATUS sTagname="&sTagname&", sParameterValue="&sParameterValue)
+on error resume next
+ Dim sOffNormalIndicatorStatus, sPVNormalState: sOffNormalIndicatorStatus = GSH_HIDDEN
+ sPVNormalState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, sRegKey, GSH_NONE)
+ if (strComp(sPVNormalState,GSH_NONE,vbTextCompare) <> 0) then 'if Registry key is not None
+ if (strComp(sParameterValue,sPVNormalState,vbTextCompare) <> 0) then
+ sOffNormalIndicatorStatus = GSH_VISIBLE
+ end if
+ end if
+GSH_FP_DIGITAL_GETOFFNORMALINDSTATUS = sOffNormalIndicatorStatus
+'gsh_log_e("GSH_FP_DIGITAL_GETOFFNORMALINDSTATUS returning >>>" & sOffNormalIndicatorStatus & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITAL_OP_POINT_IS_OFFNORMAL'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+'06/09/07 not needed for digital output indicator
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'function GSH_C200_DIGITAL_OP_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName)
+'gsh_log_s("GSH_C200_DIGITAL_OP_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName)
+'on error resume next
+ 'Dim tempReturn,shapePoint, bOffNormalTest1, sPVNormalState
+ 'shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ 'tempReturn = false
+ 'bOffNormalTest1 = false
+ 'sPVNormalState = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_PV_NORMAL_STATE, GSH_PVNORMALSTATE_OFFNORMAL)
+ 'if (strComp(sPVNormalState,GSH_PVNORMALSTATE_OFFNORMAL,vbTextCompare) <> 0) then 'if Registry PVNormalState is None
+ 'if (strComp(GSH_GETPARAMETERVALUE(oDataBoundObject,sPointName, GSH_CPPARAM_OP),sPVNormalState,vbTextCompare) <> 0) then
+ 'bOffNormalTest1 = true
+ 'end if
+ 'end if
+'GSH_C200_DIGITAL_OP_POINT_IS_OFFNORMAL = bOffNormalTest1
+'gsh_log_e("GSH_C200_DIGITAL_OP_POINT_IS_OFFNORMAL returning >>>" & bOffNormalTest1 & "<<<")
+'end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_REGCTL_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to check isNAN
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_REGCTL_POINT_ISOFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam)
+'gsh_log_s("GSH_C200_REGCTL_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1,bOffNormalTest2, bOffNormalTest3
+Dim sNModAttr, sNMode
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false
+ bOffNormalTest2 = false
+ bOffNormalTest3 = false
+ tempReturn = false 'default
+
+'''''Jamie Jan. 24, 2010'''''
+ temp = GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam)
+ if strComp(temp,GSH_NODATA,vbTextCompare)<> 0 then
+ if strComp(temp,GSH_AUTO,vbTextCompare) <> 0 then
+ bOffNormalTest1 = true
+ end if
+ end if
+' if (strcomp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_AUTO,vbtextcompare)<>0) then
+' bOffNormalTest1 = true
+' end if
+ sNModAttr = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODATTR, GSH_NONE)
+ dim modAttr
+ modAttr = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR)
+ if (strComp(sNModAttr,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NModAttr is None
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR),sNModAttr,vbTextCompare) <> 0) then
+ bOffNormalTest2 = true
+ end if
+ end if
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest3 = true
+ end if
+ end if
+ tempReturn = ( ( bOffNormalTest1 ) or ( bOffNormalTest2) or (bOffNormalTest3) )
+ GSH_C200_REGCTL_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_REGCTL_POINT_ISOFFNORMAL returning >>>"&bOffNormalTest1& " " & bOffNormalTest2 & " " & bOffNormalTest3 & cstr(tempReturn) & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to check isNAN
+'Returns true or false
+'13/08/07 - Create the function to handle the cases where Mode and ModeAttr can be blank.
+' In those cases, their values should not be used for checking offnormal.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam)
+'gsh_log_s("GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1,bOffNormalTest2, bOffNormalTest3
+Dim sNModAttr, sNMode
+Dim sModAttr, sMode
+
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false
+ bOffNormalTest2 = false
+ bOffNormalTest3 = false
+ tempReturn = false 'default
+ if (strcomp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_AUTO,vbtextcompare)<>0) then
+ bOffNormalTest1 = true
+ end if
+
+ 'Check for ModeAttr
+ sNModAttr = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODATTR, GSH_NONE)
+
+ sModAttr = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR)
+ if (strComp(sNModAttr,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NModAttr is None
+ if (strComp(sModAttr,GSH_NODATA,vbTextCompare) <> 0 and strComp(sModAttr,sNModAttr,vbTextCompare) <> 0) then
+ bOffNormalTest2 = true
+ end if
+ end if
+
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ sMode = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE)
+
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(sModAttr,GSH_NODATA,vbTextCompare) <> 0 and strComp(sMode,sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest3 = true
+ end if
+ end if
+
+ tempReturn = ( ( bOffNormalTest1 ) or ( bOffNormalTest2) or (bOffNormalTest3) )
+
+ GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL = tempReturn
+
+' gsh_log("sNModAttr = " &sNModAttr &" sModAttr = " &sModAttr)
+' gsh_log_e("GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL returning >>>"&bOffNormalTest1& " " & bOffNormalTest2 & " " & bOffNormalTest3 & cstr(tempReturn) & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOG_MODE_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to check isNAN
+'Returns true or false
+'Author: Didi Ekaette - Aug 3, 2007
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_ANALOG_MODE_ISOFFNORMAL(oDataBoundObject,sPointName)
+'gsh_log_s("GSH_C200_ANALOG_MODE_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1, bOffNormalTest2
+Dim sNModAttr, sNMode
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false
+ bOffNormalTest2 = false
+ tempReturn = false 'default
+ sNModAttr = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODATTR, GSH_NONE)
+
+ if (strComp(sNModAttr,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NModAttr is None
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR),sNModAttr,vbTextCompare) <> 0) then
+ bOffNormalTest1 = true
+ end if
+ end if
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest2 = true
+ end if
+ end if
+ tempReturn = ( ( bOffNormalTest1) or (bOffNormalTest2) )
+GSH_C200_ANALOG_MODE_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_ANALOG_MODE_ISOFFNORMAL returning >>>" & bOffNormalTest1 & " " & bOffNormalTest2 & cstr(tempReturn) & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL(oDataBoundObject,sPointName)
+'gsh_log_s("GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1,bOffNormalTest2
+Dim sNModAttr, sNMode
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false
+ bOffNormalTest2 = false
+ tempReturn = false 'default
+ sNModAttr = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODATTR, GSH_NONE)
+ if (strComp(sNModAttr,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NModAttr is None
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR),sNModAttr,vbTextCompare) <> 0) then
+ bOffNormalTest1 = true
+ end if
+ end if
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest2 = true
+ end if
+ end if
+ tempReturn = ( ( bOffNormalTest1 ) or ( bOffNormalTest2) )
+GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL returning >>>"&bOffNormalTest1& " " & bOffNormalTest2 & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'''''''''GSH_SCADA_POINT_MODE_ISOFFNORMAL ''''''''''''''''''''''''''
+'''''' Check if the given object is off normal in term of MODE '''''
+''parameter: oScriptDataObject: the data object to be checked ''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_POINT_MODE_ISOFFNORMAL(oScriptDataObject)
+
+ dim shapePoint, offNormalTest, sNMode
+
+ shapePoint = GSH_GETSHAPETAG(oScriptDataObject.parentElement.parentElement)
+ offNormalTest = false
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oScriptDataObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ offNormalTest = true
+ end if
+ end if
+
+ GSH_SCADA_POINT_MODE_ISOFFNORMAL = offNormalTest
+end function
+
+
+'GSH_C200_AUTOMAN_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oDataBoundObject,sPointName)
+'gsh_log_s("GSH_C200_AUTOMAN_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1,bOffNormalTest2
+Dim sNModAttr, sNMode
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false:bOffNormalTest2 = false: tempReturn = false 'default
+ sNModAttr = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODATTR, GSH_NONE)
+ if (strComp(sNModAttr,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NModAttr is None
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR),sNModAttr,vbTextCompare) <> 0) then
+ bOffNormalTest1 = true
+ end if
+ end if
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest2 = true
+ end if
+ end if
+ tempReturn = ( bOffNormalTest1 ) or ( bOffNormalTest2)
+GSH_C200_AUTOMAN_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_AUTOMAN_POINT_ISOFFNORMAL returning >>>"&bOffNormalTest1& " " & bOffNormalTest2 & " " & cstr(tempReturn) & "<<<")
+end function
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to check isNAN
+' 08/13/07 - Add the check if sModAttr <> "" then do check for modeAttr. Reference issue #439 (Cuong Ly)
+' 09/06/07 - Remove ModeAttr check because DACA function block does not has ModeAttr parameter.
+' and rename function to GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL (CL)
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam)
+'gsh_log_s("GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn, bOffNormalTest1
+
+ bOffNormalTest1 = false
+ tempReturn = false 'default
+ if (strcomp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_AUTO,vbtextcompare)<>0) then
+ bOffNormalTest1 = true
+ end if
+
+
+ tempReturn = bOffNormalTest1
+GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL returning >>>"&bOffNormalTest1& " " & bOffNormalTest2 &" " & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam, sDigitalStateText)
+'gsh_log_s("GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam & ",sDigitalStateText=" & sDigitalStateText)
+on error resume next
+ Dim tempReturn,sTagname, bOffNormalTest1,bOffNormalTest2, bOffNormalTest3, sPVNormalState,sNModAttr
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ tempReturn = false: bOffNormalTest1 = false: bOffNormalTest2 = false: bOffNormalTest3 = false
+ if (strcomp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_AUTO,vbTextCompare)<>0) then
+ bOffNormalTest1 = true
+ end if
+ bOffNormalTest2 = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_PVNORMAL_STATE, sDigitalStateText)
+ bOffNormalTest3 = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_NMODATTR, GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR))
+ 'gsh_log("bOffNormalTest1="& bOffNormalTest1 &",bOffNormalTest2="&bOffNormalTest2& ",bOffNormalTest3="&bOffNormalTest3)
+ tempReturn = (bOffNormalTest1 or bOffNormalTest2 or bOffNormalTest3)
+GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL returning >>>" & tempReturn & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sPointName = Entity
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL(oDataBoundObject,sPointName)
+'gsh_log_s("GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1, sNMode
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false
+ tempReturn = false 'default
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest1 = true
+ end if
+ end if
+ tempReturn = bOffNormalTest1
+GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_IS_POINT_OFF_NORMAL removed Apr 13, 2007
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOG_POINT_IS_OFFNORMAL no longer needed as it was only checking if PV was NaN
+' approved by HCS issue #284 06/08/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOG_SCADA_POINT_IS_OFFNORMAL no longer needed as it was only checking if PV was NaN
+' approved by HCS issue #284 06/08/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITAL_SCADA_POINT_IS_OFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to other offnormal checks, this function also checks PVNormalState in the Registry
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to compare to PVNormalState, eg. PV or OP
+' sOffNormalParam = name of the off normal param to check, eg. PVSource
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName,sPVStateText)
+'gsh_log_s("GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ", sPVStateText=" &sPVStateText)
+ Dim sIsDigitalStateOffnormal,sTagname, nPVNumValue, sPVNormalState: sIsDigitalStateOffnormal = false
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(ODataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ sPVNormalState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_PV_NORMAL_STATE, GSH_NONE)
+ if (strComp(sPVNormalState,GSH_NONE,vbTextCompare) <> 0) then 'if Registry PVNormalState is NOT None
+ if (strComp(sPVStateText,sPVNormalState,vbTextCompare) <> 0) then
+ sIsDigitalStateOffnormal = true
+ end if
+ end if
+GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL =sIsDigitalStateOffnormal
+'gsh_log_e("GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL returning >>>" & sIsDigitalStateOffnormal & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITAL_SCADA_POINT_OP_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to other offnormal checks, this function also checks OPNormalState in the Registry
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to compare to OPNormalState
+' sOffNormalParam = name of the off normal param to check, eg. OPSource
+'Returns true or false
+'Author: Didi Ekaette August 1, 2007
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_DIGITAL_POINT_OP_ISOFFNORMAL(oDataBoundObject,sPointName,sOPStateText)
+'gsh_log_s("GSH_SCADA_DIGITAL_POINT_OP_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ", sOPStateText=" &sOPStateText)
+ Dim sIsDigitalStateOffnormal,sTagname, nOPNumValue, sOPNormalState: sIsDigitalStateOffnormal = false
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(ODataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ sOPNormalState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_OP_NORMAL_STATE, GSH_NONE)
+ if (strComp(sOPNormalState,GSH_NONE,vbTextCompare) <> 0) then 'if Registry OPNormalState is NOT None
+ if (strComp(sOPStateText,sOPNormalState,vbTextCompare) <> 0) then
+ sIsDigitalStateOffnormal = true
+ end if
+ end if
+GSH_SCADA_DIGITAL_POINT_OP_ISOFFNORMAL =sIsDigitalStateOffnormal
+'gsh_log_e("GSH_SCADA_DIGITAL_POINT_OP_ISOFFNORMAL returning >>>" & sIsDigitalStateOffnormal & "<<<")
+end function
+
+
+'NOTE: This function is replaced by GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName,sPVStateText)
+'function above
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGCTL_POINT_ISOFFNORMAL remove Apr 13, 2007'''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'
+'''''''''''''''''''''''''''''''''''''
+' Only checks if Mode is offnormal
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to check isNAN
+'Returns true or false
+'06/08/07 Optimized code as this function no longer needs to call GSH_ANALOG_POINT_IS_OFFNORMAL
+' and only checks mode.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oScriptDataObject,sTagName,sParamName)
+'gsh_log_s("GSH_REGCTL_SCADA_POINT_ISOFFNORMAL oScriptDataObject=" & oScriptDataObject.id & ",sTagName=" &sTagName)
+on error resume next
+Dim tempReturn,shapePoint, sNMode
+ shapePoint = GSH_GETSHAPETAG(oScriptDataObject.parentElement.parentElement)
+ tempReturn = false 'default
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oScriptDataObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ tempReturn = true
+ end if
+ end if
+GSH_REGCTL_SCADA_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_REGCTL_SCADA_POINT_ISOFFNORMAL returning >>>" & cstr(tempReturn) & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_C200_ANALOG_ISDATABAD
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+' bCheckNAN - check for PV value that is not a number
+' bCheckTransmitter - check device sending data for errors
+' bCheckRange - check PV value for value way out of range (station configurable unreasonably hi / lo alarm
+'Returns:
+' true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_ANALOG_ISDATABAD(oDataScriptObject,bCheckPVSts,bCheckTransmitter,bCheckRange)
+'gsh_log_s("GSH_C200_ANALOG_ISDATABAD " & "oDataScriptObject=" & oDataScriptObject.ID)
+on error resume next
+ Dim bPVInError, bAllTests, bInUnreasonablyLowAlarm, bInUnreasonablyHighAlarm, bInTransmitterLowAlarm, bInTransmitterHighAlarm
+ bPVInError = false
+ bInUnreasonablyLowAlarm = false
+ bInUnreasonablyHighAlarm = false
+ bInTransmitterLowAlarm = false
+ bInTransmitterHighAlarm = false
+ if bCheckPVSts then
+ if GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_BADPV)<> 0 or oDataScriptObject.IsNan(GSH_CPENTITY & "." & GSH_CPPARAM_PV) then bPVInError = true end if
+ end if
+ 'gsh_log ("GSH_C200_ANALOG_ISDATABAD PVInError = "&bPVInError)
+ if bCheckTransmitter then
+ bInTransmitterLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INTRANSMITTERLOWALARM))
+ bInTransmitterHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INTRANSMITTERHIGHALARM))
+ end if
+ if bCheckRange then
+ bInUnreasonablyLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INUNREASONABLYLOWALARM))
+ bInUnreasonablyHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INUNREASONABLYHIGHALARM))
+ end if
+ bAllTests = ( bPVInError or bInUnreasonablyLowAlarm or bInUnreasonablyHighAlarm or bInTransmitterLowAlarm or bInTransmitterHighAlarm )
+GSH_C200_ANALOG_ISDATABAD = bAllTests
+'gsh_log_e("GSH_C200_ANALOG_ISDATABAD returing " & bAllTests )
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_C200_DIGITAL_ISDATABAD (used in faceplates)
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+' bCheckNAN - check for PV value that is not a number
+' bCheckTransmitter - check device sending data for errors
+' bCheckRange - check PV value for value way out of range (station configurable unreasonably hi / lo alarm
+'Returns:
+' true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_DIGITAL_ISDATABAD(oDataScriptObject,bCheckPVSts,bCheckTransmitter,bCheckRange)
+'gsh_log_s("GSH_C200_DIGITAL_ISDATABAD " & "oDataScriptObject=" & oDataScriptObject.ID)
+on error resume next
+ Dim bPVInError, bAllTests, bInUnreasonablyLowAlarm, bInUnreasonablyHighAlarm, bInTransmitterLowAlarm, bInTransmitterHighAlarm
+ bPVInError = false
+ bInUnreasonablyLowAlarm = false
+ bInUnreasonablyHighAlarm = false
+ bInTransmitterLowAlarm = false
+ bInTransmitterHighAlarm = false
+ if bCheckPVSts then
+ if GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_PV)<> 0 then bPVInError = true end if
+ end if
+ 'gsh_log ("GSH_C200_DIGITAL_ISDATABAD PVInError"&bPVInError)
+ if bCheckTransmitter then
+ bInTransmitterLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INTRANSMITTERLOWALARM))
+ bInTransmitterHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INTRANSMITTERHIGHALARM))
+ end if
+ if bCheckRange then
+ bInUnreasonablyLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INUNREASONABLYLOWALARM))
+ bInUnreasonablyHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INUNREASONABLYHIGHALARM))
+ end if
+ bAllTests = ( bPVInError or bInUnreasonablyLowAlarm or bInUnreasonablyHighAlarm or bInTransmitterLowAlarm or bInTransmitterHighAlarm )
+GSH_C200_DIGITAL_ISDATABAD = bAllTests
+'gsh_log_e("GSH_C200_DIGITAL_ISDATABAD returing " & bAllTests )
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_C200_DIGITALCOMPOSITE_ISDATABAD
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+'Returns: true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oDataScriptObject)
+'gsh_log_s("GSH_C200_DIGITALCOMPOSITE_ISDATABAD " & "oDataScriptObject=" & oDataScriptObject.ID)
+on error resume next
+ Dim bPVInError
+ bPVInError = false
+ 'oDataBoundObject.DataValue(GSH_CPENTITY&"."&parameter)
+ if strComp(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_PV),"Bad",vbtextcompare) = 0 then
+ bPVInError = true
+ end if
+ GSH_C200_DIGITALCOMPOSITE_ISDATABAD = bPVInError
+'gsh_log_e("GSH_C200_DIGITALCOMPOSITE_ISDATABAD returing " & bPVInError )
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_C200_REGCTL_ISDATABAD
+'Parameters:
+' oDataScriptObject - data bound object within HCS shape
+' bCheckNAN - check for PV value that is not a number
+' bCheckTransmitter - check device sending data for errors
+' bCheckRange - check PV value for value way out of range (station configurable unreasonably hi / lo alarm
+'Returns:
+' true of false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_C200_REGCTL_ISDATABAD(oDataScriptObject,bCheckPVSts,bCheckTransmitter,bCheckRange)
+'gsh_log_s("GSH_C200_REGCTL_ISDATABAD " & "oDataScriptObject=" & oDataScriptObject.ID)
+on error resume next
+ Dim bPVInError, bAllTests, bInUnreasonablyLowAlarm, bInUnreasonablyHighAlarm, bInTransmitterLowAlarm, bInTransmitterHighAlarm
+ bPVInError = false
+ bInUnreasonablyLowAlarm = false
+ bInUnreasonablyHighAlarm = false
+ bInTransmitterLowAlarm = false
+ bInTransmitterHighAlarm = false
+ if bCheckPVSts then
+ if GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_CPPARAM_BADPV)<> 0 then bPVInError = true end if
+ end if
+' gsh_log ("GSH_C200_REGCTL_ISDATABAD PVInError"&bPVInError)
+ if bCheckTransmitter then
+ bInTransmitterLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INTRANSMITTERLOWALARM))
+ bInTransmitterHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INTRANSMITTERHIGHALARM))
+ end if
+ if bCheckRange then
+ bInUnreasonablyLowAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INUNREASONABLYLOWALARM))
+ bInUnreasonablyHighAlarm = cbool(GSH_GETENTITYPARAMETERVALUE(oDataScriptObject,GSH_C200_PARAM_INUNREASONABLYHIGHALARM))
+ end if
+ bAllTests = ( bPVInError or bInUnreasonablyLowAlarm or bInUnreasonablyHighAlarm or bInTransmitterLowAlarm or bInTransmitterHighAlarm )
+GSH_C200_REGCTL_ISDATABAD = bAllTests
+'gsh_log_e("GSH_C200_REGCTL_ISDATABAD returing " & bAllTests )
+end function
+
+'GSH_IS_POINT_INITIALIZING remove 06/27/07
+
+'Returns GSH_WINDUP_HI, GSH_WINDUP_LO, GSH_WINDUP_INIT or GSH_WINDUP_NONE
+function GSH_GET_POINT_WINDUP_VALUE(oDataBoundObject)
+'gsh_log_s("GSH_GET_POINT_WINDUP_VALUE oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim tempReturn
+ tempReturn = GSH_WINDUP_NONE
+ tempReturn = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_WINDUP )
+' gsh_log "tempReturn ="& tempReturn
+ Select Case tempReturn
+ Case GSH_WINDUP_HI
+ tempReturn = GSH_WINDUP_HI
+ Case GSH_WINDUP_LO
+ tempReturn = GSH_WINDUP_LO
+ Case GSH_WINDUP_HILO
+ tempReturn = GSH_WINDUP_INIT
+ Case else
+ tempReturn = GSH_WINDUP_NONE
+ End Select
+ GSH_GET_POINT_WINDUP_VALUE = tempReturn
+'gsh_log_e("GSH_GET_POINT_WINDUP_VALUE returning >>>" & tempReturn & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ISINFOCUS''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_ISINFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_ISINFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ dim tempReturn
+ tempReturn = (not(oDataBoundObject.parentElement.objects("focus").styleClass = GSH_CSSFOCUSNONE))
+ GSH_ISINFOCUS = tempReturn
+'gsh_log_e("GSH_ISINFOCUS returning >>>>"&tempReturn&"<<<<")
+end function
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SHOWALARMS''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWALARMS(sAlarmPriority,bUnAcknowledge,oShape)
+'gsh_log_s("GSH_SHOWALARMS " & "sAlarmPriority=" & sAlarmPriority & ",bUnAcknowledge=" & bUnAcknowledge & ",oShape=" & oShape.id)
+ select case sAlarmPriority
+ Case 0 'GSH_NOALARMCODE
+ Case 3 'GSH_UNACKEMERG
+ call GSH_SHOWEMERGENCYALARM(oShape,bUnAcknowledge)
+ Case 2 'GSH_UNACKHIGH
+ call GSH_SHOWHIGHALARM(oShape,bUnAcknowledge)
+ Case 1 'GSH_UNACKLOW
+ call GSH_SHOWLOWALARM(oShape,bUnAcknowledge)
+ End Select
+'gsh_log_e("GSH_SHOWALARMS ")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_SHOWPOINTALARMS
+'Parameters:
+' sAlarmCode - Code that describes alarm priority and ack status
+' oShape - reference to the shape going into alarm
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWPOINTALARMS(sAlarmCode,oShape)
+'gsh_log_s("GSH_SHOWPOINTALARMS " & "sAlarmCode=" & sAlarmCode & ",oShape=" & oShape.id)
+ Select Case sAlarmCode
+ Case GSH_NOALARMCODE
+ call GSH_SHOWNOALARM(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_SHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_SHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_SHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_SHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_SHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_SHOWLOWALARM(oShape,false)
+ Case Else
+ call GSH_SHOWNOALARM(oShape)
+ End Select
+'gsh_log_e("GSH_SHOWPOINTALARMS ")
+end sub
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_SHOWALARMS_WOOUTLINE
+'Parameters:
+' sAlarmCode - Code that describes alarm priority and ack status
+' oShape - reference to the shape going into alarm
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SHOWALARMS_WOOUTLINE(sAlarmCode,oShape)
+'gsh_log_s ("GSH_SHOWALARMS_WOOUTLINE " & "sAlarmCode=" & sAlarmCode & ",oShape=" & oShape.id)
+ Select Case sAlarmCode
+ Case GSH_NOALARMCODE
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_NONE
+ Case GSH_UNACKEMERG
+ oShape.objects("txt_EAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("plg_EAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_UNACKEMERG
+ Case GSH_ACKEMERG
+ oShape.objects("txt_EAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("plg_EAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_ACKEMERG
+ Case GSH_UNACKHIGH
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_HAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_UNACKHIGH
+ Case GSH_ACKHIGH
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_HAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_ACKHIGH
+ Case GSH_UNACKLOW
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_LAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_UNACKLOW
+ Case GSH_ACKLOW
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_LAlarm").style.visibility = GSH_VISIBLE
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_ACKLOW
+ Case Else
+ 'Show no alarms
+ oShape.objects("txt_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_EAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_HAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ovl_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_LAlarm").style.visibility = GSH_HIDDEN
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_NONE
+ End Select
+'gsh_log_e("GSH_SHOWALARMS_WOOUTLINE ")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TYPE2TABRBUTTONCLICK'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = subshape name or me, if calling within subshape
+'
+' Revised Jan 2, 2008 - JE to support smaller lists of displays and menu for selected L2 tab
+' May 27, 2008 - fix problem when Registry key GSH_REGKEY_NUMOFT3 does not existed or = 0
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TYPE2TABRBUTTONCLICK(oShape)
+'gsh_log_s("GSH_TYPE2TABRBUTTONCLICK oShape = "& oShape)
+'On Error GoTo ErrorHandler
+
+ Dim DispStr(), asAssocDisplays(), asAssocLabels()
+ Dim nRetVal, nAssocDisplays, nCnt, nIndex, nCancelIndex, nStartIndex
+ Dim sTabDisplayName, sTabLabel, sTemp, sPriorT3, sPriorT4, sPriorT4A, sDispLocation
+ Dim ArrMenu
+
+ sDispLocation = GSH_READDISPLAYNAMES("")
+ sTabDisplayName = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYNAME)
+ sTabLabel = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPTABLEVEL)
+
+ 'if the clicked tab is the same as the current Type 2 Diplay, exit sub
+ ' Remove this check to provide continuous shortcut menu --- JE - Jan 2, 2008
+'' If sTabDisplayName = GSH_READDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,"") Then
+'' Exit Sub
+'' End If
+
+ nAssocDisplays = CSng(GSH_READDISPLAYINFO(sTabDisplayName, GSH_REGKEY_NUMOFT3, "0"))
+ if nAssocDisplays > 0 then 'this was set for nAssocDisplays > 3 --- JE - Jan 2, 2008 changed to >0
+ ReDim asAssocDisplays(nAssocDisplays)
+ ReDim asAssocLabels(nAssocDisplays)
+ else 'add this path so that the next for loop won't produce error when #OfAssociatedDisplay = 0) (CL - May 27,2008)
+ Set ArrMenu = CreateObject("ArrPopupMenuXControl.ArrPopupMenuX")
+ ReDim DispStr(1)
+ DispStr(0) = "No associated display available"
+ ArrMenu.ShowMenuArr DispStr
+ Set ArrMenu = Nothing
+ Exit Sub
+ end if
+
+ For nCnt = 1 To nAssocDisplays
+ sDisplay = "File3_" & nCnt
+ sLabel = "Label3_" & nCnt
+ asAssocDisplays(nCnt) = GSH_READDISPLAYINFO(sTabDisplayName, sDisplay, "")
+ 'gsh_log("asAssocDisplays("&nCnt&") is "&asAssocDisplays(nCnt))
+
+ asAssocLabels(nCnt) = GSH_READDISPLAYINFO(sTabDisplayName, sLabel, "")
+ Next
+
+ asAssocDisplays(0) = sTabDisplayName
+ asAssocLabels(0) = sTabLabel
+
+ nIndex = 0
+ ' If nAssocDisplays <= 0 Then
+' Exit Sub
+' Else
+ ReDim DispStr(nAssocDisplays+4)
+ DispStr(nIndex) = sTabLabel
+ 'gsh_log("DispStr("&nIndex&") is "&DispStr(nIndex))
+ nIndex = nIndex + 1
+ DispStr(nIndex) = ""
+ 'gsh_log("DispStr("&nIndex&") is "&DispStr(nIndex))
+ nStartIndex = nIndex
+
+ nIndex = nIndex + 1
+ For nCnt = 1 To nAssocDisplays
+ DispStr(nIndex) = asAssocLabels(nCnt)
+ 'gsh_log("DispStr("&nIndex&") is "&DispStr(nIndex))
+ nIndex = nIndex + 1
+ Next
+
+ nCancelIndex = nIndex
+
+ 'CallAgain:
+' Dim ArrMenu
+ Set ArrMenu = CreateObject("ArrPopupMenuXControl.ArrPopupMenuX")
+ ArrMenu.ShowMenuArr DispStr
+ nRetVal = ArrMenu.Item
+ Set ArrMenu = Nothing
+' gsh_log ("GSH_TYPE2TABRBUTTONCLICK nRetVal = "&nRetVal)
+
+ If nRetVal < 0 Then
+ Exit Sub
+ Else
+ If nRetVal = nCancelIndex Then
+ Exit Sub
+ ElseIf nRetVal = 0 Then
+ If asAssocDisplays(0) <> "" Then
+ sTemp = sDispLocation & sTabDisplayName & GSH_DISPLAYFILEEXTENSION
+' gsh_log("sTemp is "&sTemp)
+ 'path of the Prior Type3 Display page
+ sPriorT3 = GSH_READDISPLAYINFO(sTabDisplayName,"PriorType3","")
+' gsh_log ("sPriorT3 = "& sPriorT3)
+ sPriorT3A = sDispLocation & sPriorT3 & GSH_DISPLAYFILEEXTENSION
+ 'path of the Prior Type4 Display page
+ sPriorT4 = GSH_READDISPLAYINFO(sTabDisplayName,"PriorType4","")
+' gsh_log ("sPriorT4 = "& sPriorT4)
+ sPriorT4A = sDispLocation & sPriorT4 & GSH_DISPLAYFILEEXTENSION
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+ If sTabDisplayName <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sTabDisplayName)
+ 'gsh_log("Navigating to sTemp "&sTemp)
+ window.navigate(sTemp)
+ End If
+ If sPriorT3 <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sPriorT3)
+ window.navigate(sPriorT3A)
+ End If
+ If sPriorT4 <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sPriorT4)
+ window.navigate(sPriorT4A)
+ End If
+ End If
+ Else
+ 'Selected Tab is a Type2 Display
+ If asAssocDisplays(nRetVal-nStartIndex) <> "" Then
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+ 'Selected Associated Type3 Display from RClick Menu
+ sTemp = sDispLocation & asAssocDisplays(nRetVal-nStartIndex) & GSH_DISPLAYFILEEXTENSION
+ If asAssocDisplays(nRetVal-nStartIndex) <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_USET4,"YES")
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,asAssocDisplays(nRetVal-nStartIndex))
+' gsh_log("Navigating to sTemp "&sTemp)
+ window.navigate(sTemp)
+ End If
+ sTemp = sDispLocation & sTabDisplayName & GSH_DISPLAYFILEEXTENSION
+ If sTabDisplayName <> "" Then
+ ' Added check for current Type 2 as now allow right click on active Type 2 display ---- JE Jan. 2, 2008
+ 'if the clicked tab is the same as the current Type 2 Diplay, exit sub
+ If sTabDisplayName = GSH_READDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,"") Then
+ Exit Sub
+ End if
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sTabDisplayName)
+' gsh_log("Navigating to sTemp "&sTemp)
+ window.navigate(sTemp)
+ End If
+ End If
+ End If
+ End If
+' End If
+'gsh_log_e("GSH_TYPE2TABRBUTTONCLICK")
+end sub
+
+
+'09/04/2007 - Added g_PageLoadCompleted check to make sure the page is completely loaded
+' before user click b/c this generate problem of L4 loaded on L2 or L3 location. (CL)
+'01/11/2008 - Modified so that the function will find and load a L3 page which is on the same
+' satellite instead of loading the Prior L3 when the SAME_SATELLITE_LINK option in
+' the registry is set to ON
+'27Feb2008 - Added function to define the L4 display if the satellie option is on (JE)
+'04Mar2008 - Added L1 tab handling
+'18July2008 - Remove duplicated call to L4 display at the end of Case 2.
+'
+'Note: avoid using window.external.Parent.stationWindows because it might cause problems that requires
+' the whole station to restart
+
+Sub GSH_NAVTAB_LCLICK (oShape)
+'gsh_log_s("GSH_NAVTAB_LCLICK oShape = "& oShape.id &"Page Load Completed = " &g_PageLoadCompleted)
+
+
+ If(g_PageLoadCompleted) then
+
+ Dim sTemp, sPriorT3, sPriorT3A, sPriorT4, sPriorT4A, sDispLocation, sDisplayName, sAssocDisplayName, sT2FileOnDisplay, sT3FileOnDisplay, sT4FileOnDisplay
+ sDispLocation = GSH_READDISPLAYNAMES("")
+ sDisplayName = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYNAME)
+ Dim displayLevel
+ displayLevel = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYLEVEL)
+
+ window.clearTimeout g_PageLoadTimerID
+ g_PageLoadCompleted = false
+ g_PageLoadTimerID=window.setTimeout("g_PageLoadCompleted = true",2400/displayLevel)
+
+ Select Case displayLevel
+ Case 1
+ sTemp = sDispLocation & sDisplayName & ".htm"
+ If sDisplayName <> "" Then
+ window.navigate(sTemp)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T1FN,sDisplayName)
+ End if
+ Case 2
+ sAssocDisplayName = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCLEVEL4) ' Added June 25, 2008 - JE - to catch L4_Blanks for Wintershall
+ sT2FileOnDisplay = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,"")
+
+
+ 'Compare DisplayName to Currently Displayed Type2FileName
+ If Ucase(sDisplayName) <> UCase(sT2FileOnDisplay) Then
+
+ 'path of the Type2 Display page
+ sTemp = sDispLocation & sDisplayName & ".htm"
+ 'path of the Prior Type3 Display page
+ 'sPriorT3 = GSH_READDISPLAYINFO(sDisplayName,"PriorType3","")
+ sPriorT3 = FIND_L3PAGE(sDisplayName)
+ sPriorT3A = sDispLocation & sPriorT3 & ".htm"
+ 'path of the Prior Type4 Display page
+
+ sPriorT4 = GSH_READDISPLAYINFO(sDisplayName,"PriorType4","")
+
+ If sAssocDisplayName = "" Then ' Added June 25, 2008
+ sPriorT4 = FIND_L4PAGE(sDisplayName,sPriorT3)
+ sPriorT4A = sDispLocation & sPriorT4 & ".htm"
+ Else '
+ sPriorT4 = sAssocDisplayName '
+ sPriorT4A = sDispLocation & sPriorT4 & ".htm" '
+ End if
+ '
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+
+
+
+ '' Moved T4 Call ahead of T2 to try and stop the T4 being put into wrong window - 25June08 JE
+ If sPriorT4 <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sPriorT4)
+ window.navigate(sPriorT4A)
+ End If
+
+
+ If sPriorT3 <> "" Then 'Navigate to L3 display first so that the PageLinkAlarmGroup is updated before the L2 display is refreshed.
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sPriorT3)
+ window.navigate(sPriorT3A)
+ End If
+
+ If sDisplayName <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sDisplayName)
+ window.navigate(sTemp)
+ End If
+
+ End If
+ Case 3
+ sAssocDisplayName = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCLEVEL4)
+
+ 'path of the Type3 Display page
+ sTemp = sDispLocation & sDisplayName & ".htm"
+ sT3FileOnDisplay = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T3FN,"")
+ 'Compare DisplayName to Currently Displayed Type3FileName
+
+ If Ucase(sTemp) <> Ucase(sT3FileOnDisplay) Then
+
+ 'path of the Prior Type4 Display page
+ sPriorT4 = sDispLocation & sAssocDisplayName & ".htm"
+
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+
+ If sAssocDisplayName <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sAssocDisplayName)
+ window.navigate(sPriorT4)
+ End If
+
+ If sDisplayName <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sDisplayName)
+ window.navigate(sTemp)
+ End If
+ End If
+ Case 4
+ sT4FileOnDisplay = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T4FN,"")
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+ 'Compare DisplayName to Currently Displayed Type4FileName
+ If Ucase(sDisplayName) <> Ucase(sT4FileOnDisplay) Then
+ 'path of the Type4 Display page
+ sTemp = sDispLocation & sDisplayName & ".htm"
+ If sDisplayName <> "" Then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sDisplayName)
+ window.navigate(sTemp)
+
+ End If
+ End If
+ End Select
+
+ End If
+'gsh_log_e("GSH_NAVTAB_LCLICK")
+End Sub
+
+function FIND_L3PAGE(sDisplayName)
+'gsh_log_s("FIND_L3PAGE sDisplayName = "& sDisplayName)
+
+ dim same_satellite_link, L3_page, i
+
+ L3_page = ""
+
+ same_satellite_link = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_SAME_SATELLITE_LINK,GSH_NONE)
+
+ if strcomp (same_satellite_link, GSH_ON, vbtextcompare) <> 0 then
+ L3_page = GSH_READDISPLAYINFO(sDisplayName,"PriorType3","")
+ else
+ dim last_L3_page, satellite_code, satellite, numOfType3
+ last_L3_page = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T3FN,GSH_NONE)
+ satellite_code = Mid(last_L3_page, 1, 4)
+ satellite_code = Replace(satellite_code, "_", "")
+
+ numOfType3 = GSH_READDISPLAYINFO(sDisplayName,GSH_REGKEY_NUMOFT3,0)
+ dim type3Tmp
+
+ for i=1 to numOfType3
+ type3Tmp = GSH_READDISPLAYINFO(sDisplayName,"File3_"&i,"")
+ satellite = Mid(type3Tmp, 1, 4) 'new
+ satellite = Replace(satellite, "_", "") 'new
+ if strcomp (satellite,satellite_code, vbtextcompare) = 0 then
+ ' if InStr(type3Tmp,satellite_code)>0 then
+ L3_page=type3Tmp
+' gsh_log("L3_page = " & L3_page)
+ Exit For
+ end if
+ next
+ 'This is for exceptional handle b/c the for loop should practically
+ 'handle all the cases.
+ if strcomp (L3_page, "", vbtextcompare) = 0 then
+ L3_page = GSH_READDISPLAYINFO(sDisplayName,"PriorType3","")
+' gsh_log ("into exception L3_Page = " & L3_page)
+ end if
+
+ end if
+ FIND_L3PAGE = L3_page
+'gsh_log_e("FIND_L3PAGE oShape L3_PAGE="&L3_page)
+end function
+
+function FIND_L4PAGE(sDisplayName,sL3Name)
+'gsh_log_s("FIND_L4PAGE sDisplayName = "& sDisplayName)
+
+ dim same_satellite_link, L4_page, i
+
+ L4_page = ""
+
+ same_satellite_link = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_SAME_SATELLITE_LINK,GSH_NONE)
+
+ if strcomp (same_satellite_link, GSH_ON, vbtextcompare) <> 0 then
+ L4_page = GSH_READDISPLAYINFO(sDisplayName,"PriorType4","")
+ else
+ dim last_L3_page, satellite_code, satellite, numOfType3
+ last_L3_page = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T3FN,GSH_NONE)
+ L4_page = Replace(sL3Name, "_L3_", "_L4_")
+ L4_page = L4_page & "_1"
+' gsh_log("L4_page="&L4_page)
+ 'just in case
+ if strcomp (L4_page, "", vbtextcompare) = 0 then
+' L4_page = GSH_READDISPLAYINFO(sDisplayName,"PriorType3","") - April 11, 2008 JE
+ L4_page = GSH_READDISPLAYINFO(sDisplayName,"PriorType4","")
+ end if
+ end if
+ FIND_L4PAGE = L4_page
+'gsh_log_e("FIND_L4PAGE oShape L4_PAGE="&L4_page)
+end function
+
+Const GSH_REGKEY_PAGELINKALARMGROUP = "PageLinkAlarmGroup"
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: GSH_PAGELINK_LCLICK
+' Updates the PageLinkAlarmGroup registry key; Updates shapes on L2 Display;
+' Launches associated L3 and L4 displays
+'Parameters:
+' oShape - required to access the Shape property CPEntity value
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_PAGELINK_LCLICK (oShape)
+'gsh_log_s("GSH_PAGELINK_LCLICK oShape = "& oShape.id)
+ Dim sTemp, sDispLocation, sPgLinkTagName
+ Dim sAssocDisplayName3, sAssocDisplayName4, sT2FileOnDisplay, sT3FileOnDisplay, sT4FileOnDisplay
+ 'Store Tag Name in Display Communication Mailbox
+ sPgLinkTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_PAGELINKALARMGROUP,sPgLinkTagName
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+ 'Compare DisplayName to Currently Displayed Type2FileName
+ sDispLocation = GSH_READDISPLAYNAMES("")
+ sT2FileOnDisplay = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,"")
+ 'Update all shapes on Display Level 2
+ GSH_UPDATESHAPESONDISPLAY sT2FileOnDisplay & GSH_DISPLAYFILEEXTENSION
+ 'Launch the associated display Level 3 if not currently displayed
+ sAssocDisplayName3 = UCase(oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCTYPE3))
+ sT3FileOnDisplay = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T3FN,"")
+ If sAssocDisplayName3 <> "" Then
+ If Ucase(sT3FileOnDisplay) <> sAssocDisplayName3 Then
+ sTemp = sDisplayLocation & sAssocDisplayName3 & GSH_DISPLAYFILEEXTENSION
+ call GSH_WRITEDISPLAYINFORMATION (sT2FileOnDisplay, GSH_REGKEY_PRIORT3, sAssocDisplayName3)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sAssocDisplayName3)
+ window.navigate(sTemp)
+ End If
+ 'Else What To do if custom prop is empty? Error Msg?
+ End if
+ 'Launch the associated display Type4 if not currently displayed
+ sAssocDisplayName4 = UCase(oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPASSOCTYPE4))
+ sT4FileOnDisplay = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T4FN,"")
+ If sAssocDisplayName4 <> "" Then
+ If Ucase(sT4FileOnDisplay) <> sAssocDisplayName4 Then
+ sTemp = sDisplayLocation & sAssocDisplayName4 & GSH_DISPLAYFILEEXTENSION
+ call GSH_WRITEDISPLAYINFORMATION (sT2FileOnDisplay, GSH_REGKEY_PRIORT4, sAssocDisplayName4)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sAssocDisplayName4)
+ window.navigate(sTemp)
+ End If
+ Else 'What To do if custom prop is empty?
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_USET4,"YES")
+ End If
+'gsh_log_e("GSH_PAGELINK_LCLICK")
+End Sub
+
+Sub GSH_PAGELINK_ONUPDATE (oShape)
+'gsh_log_s("GSH_PAGELINK_ONUPDATE oShape = "& oShape.id & " flag = "& flag)
+on error resume next
+ call GSH_INITTABNORMAL(oShape)
+ If (strComp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_PAGELINKALARMGROUP,""),vbTextCompare) = 0) Then
+ call GSH_INITTABFOCUS (oShape)
+ End If
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("PageLink_Script"),GSH_CPENTITY)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("PageLink_Script"),GSH_CPENTITY)
+ 'gsh_log ("sAlarmPriority = " & sAlarmPriority & "bUnack = " & bUnack )
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+'gsh_log_e("GSH_PAGELINK_ONUPDATE")
+End Sub
+
+sub GSH_TABORGANIZER_UPDATEFOCUS (oShape)
+Dim sFN(4)
+ 'oShape.Objects("focus").StyleClass = GSH_CSSTABFOCUSNORMAL
+ oShape.Objects("focus").StyleClass = GSH_CSSTABORAGANIZEROUTLINENORMAL 'Added 09Jan08 JE
+ For i = 1 to 4
+ sFN(i) = oShape.GetCustomProperty("Text", "Filename"&i)
+ If (strComp(sFN(i),GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,""),vbTextCompare) = 0) Then
+ oShape.Objects("focus").StyleClass = GSH_CSSFOCUSASSOCIATEDTABORGANIZER 'GSH_CSSFOCUSASSOCIATED
+ exit for
+ end if
+ Next
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_NAVTAB_ONUPDATE
+' Event handler for GEN_NAVIGATIONTAB shape.
+' 05/31/07 Check if Entity is blank. If so then do not update alarms. AL(332)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_NAVTAB_ONUPDATE (oShape)
+'gsh_log_s("GSH_NAVTAB_ONUPDATE oShape = "& oShape.id)
+on error resume next
+ call GSH_INITTABNORMAL(oShape)
+ Dim sRegKey
+ sRegKey = 0
+ Select Case oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYLEVEL)
+ Case 1
+ sRegKey = GSH_REGKEY_T1FN
+ Case 2
+ sRegKey = GSH_REGKEY_T2FN
+ Case 3
+ sRegKey = GSH_REGKEY_T3FN
+ Case 4
+ sRegKey = GSH_REGKEY_T4FN
+ End Select
+ If (strComp(oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYNAME),GSH_READDISPLAYCOMMUNICATIONKEYVALUE(sRegKey,""),vbTextcompare) = 0) Then
+ call GSH_INITTABFOCUS (oShape)
+ End If
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT, GSH_CPENTITY), "", VBTEXTCOMPARE) <> 0 then
+ If oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYLEVEL) = 1 then
+ ' skip alarm checking
+ exit sub
+ else
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITY)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITY)
+ 'gsh_log ("sAlarmPriority = " & sAlarmPriority & " bUnack = " & bUnack )
+ oShape.Objects("focus").linewidth = 0
+
+ if(sAlarmPriority > 0) then
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+ else
+ call GSH_SHOWNOALARM(oShape)
+ oShape.Objects("outline").styleClass = GSH_CSSTABOUTLINENORMAL
+ ' gsh_log ("setting outline")
+ end if
+ end if
+ end if
+'gsh_log_e("GSH_NAVTAB_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_GETALARMGROUPPRIORITYPARAMETER'''''''''''''''''''''''''
+'Alarm Groups are Experion Points aggregates all point types
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+' paraName - Script Data parameter Name
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETALARMGROUPPRIORITYPARAMETER(oDataBoundObject, pointName)
+'gsh_log_s("GSH_GETALARMGROUPPRIORITYPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", pointName=" & pointName)
+on error resume next
+ Dim iAlarmCode
+ iAlarmCode = 0
+ 'Check total alarms
+ iAlarmCode = GSH_GETPARAMETERVALUE(oDataBoundObject, pointName, GSH_EXPERION_PARAM_ALARMPRIORITY)
+ 'return alarm code
+ GSH_GETALARMGROUPPRIORITYPARAMETER = iAlarmCode
+'gsh_log_e("GSH_GETALARMGROUPPRIORITYPARAMETER returning " & iAlarmCode)
+end function
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_GETALARMGROUPPRIORITYPARAMETER'''''''''''''''''''''''''
+'Alarm Groups are Experion Points aggregates all point types
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+' paraName - Script Data parameter Name
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETALARMGROUPUNACKPARAMETER(oDataBoundObject, pointName)
+'gsh_log_s("GSH_GETALARMGROUPUNACKPARAMETER oDataBoundObject=" & oDataBoundObject.id & ", paraName=" & pointName)
+on error resume next
+ Dim bUnack
+ bUnack = false
+ if (oDataBoundObject.DataValue(pointName & "." & GSH_EXPERION_PARAM_UNACKALARMEXISTS) = 1) then
+ bUnack = True
+ end if
+ GSH_GETALARMGROUPUNACKPARAMETER = bUnack
+'gsh_log_e("GSH_GETALARMGROUPUNACKPARAMETER returning " & bUnack)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_INITTABNORMAL''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_INITTABNORMAL(oShape)
+'gsh_log_s("GSH_INITTABNORMAL " & "oShape=" & oShape.id)
+ oShape.Objects("focus").styleClass = GSH_CSSTABFOCUSNORMAL
+ oShape.Objects("outline").styleClass = GSH_CSSTABOUTLINENORMAL
+'gsh_log_e("GSH_INITTABNORMAL ")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_INITTABFOCUS''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_INITTABFOCUS(oShape)
+'gsh_log_s("GSH_INITTABFOCUS " & "oShape=" & oShape.id)
+ 'show these objects
+ oShape.Objects("focus").StyleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.Objects("outline").styleClass = GSH_CSSTABOUTLINENORMAL
+'gsh_log_e("GSH_INITTABFOCUS ")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GEN_SETSHAPEFOCUS''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GEN_SETSHAPEFOCUS(oShape)
+'gsh_log_s("GSH_GEN_SETSHAPEFOCUS oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ if (strcomp(oShape.objects("focus").styleClass,GSH_CSSFOCUSNONE,vbtextcompare) = 0) then
+ oShape.objects("outline").fillstyle = GSH_FILLSOLID
+ else
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT 'in focus, outline must be transparent
+ end if
+'gsh_log_e("GSH_GEN_SETSHAPEFOCUS")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'ANALOGINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGINDICATORSETFOCUS'''''
+'Parameters: oShape = Shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGINDICATORSETFOCUS(oShape)
+'gsh_log_s("GSH_ANALOGINDICATORSETFOCUS oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_ANALOGINDICATORSETFOCUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGINDICATORSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+'gsh_log_s("GSH_ANALOGINDICATORSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ call GSH_SHOWNOALARM(oShape)
+'gsh_log_e("GSH_ANALOGINDICATORSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ '06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+ End If
+
+ If flag = 0 then
+
+ 'Bad Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+ End If
+ End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'DIGITALINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATORSETFOCUS'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = calling shape.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALINDICATORSETFOCUS(oShape)
+'gsh_log_s("GSH_DIGITALINDICATORSETFOCUS oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show DIGITAL value and outline
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_DIGITALINDICATORSETFOCUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATORSHOWNORMAL'''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = calling shape.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+'gsh_log_s("GSH_DIGITALINDICATORSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("shp_focus").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_DIGITALINDICATORSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+
+If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+End If
+
+If flag <=1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+If flag = 0 then
+ 'Bad Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = sPVStateTxt
+ End If
+
+End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATOR_SCADA_P6A_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+'12/19/2007: Added to handle SCADA_DI_P6A shape
+'01/11/2008: Modified to handle the change that input parameter are F1,..,F4 instread of F1_0, F1_1, ...
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALINDICATOR_SCADA_P6A_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_DIGITALINDICATOR_SCADA_P6A_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+
+' If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+' End If
+
+' If flag <=1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ dim alarmPara
+ alarmPara = GSH_CPPARAM_IP1
+
+ 'Find value of GSH_CPPARAM_PV_IP1
+ dim input1_val, input2_val, expected_input1_val, expected_input2_val, sPVStateTxt
+
+ sPVStateTxt = GSH_NONE
+ input1_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP1))
+ input2_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP2))
+
+ expected_input1_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL1))
+ expected_input2_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL2))
+
+ if((input1_val=expected_input1_val) And (input2_val=expected_input2_val)) then
+ sPVStateTxt = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),"BothOn","")
+ elseif ((input1_val=expected_input1_val) And (input2_val<>expected_input2_val)) then
+ sPVStateTxt = GSH_GET_STATE_TEXT_P6A(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), oShape.GetCustomProperty(GSH_CPPARAMETER,GSH_CPPARAM_IP1)&"_"&input1_val)
+ alarmPara=GSH_CPPARAM_IP1
+ elseif ((input1_val<>expected_input1_val) And (input2_val=expected_input2_val)) then
+ sPVStateTxt = GSH_GET_STATE_TEXT_P6A(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), oShape.GetCustomProperty(GSH_CPPARAMETER,GSH_CPPARAM_IP2)&"_"&input2_val)
+ alarmPara=GSH_CPPARAM_IP2
+ else
+ sPVStateTxt = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),"BothOff","")
+ end if
+
+
+ oShape.objects("txt_PVvalue").value = sPVStateTxt
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"), GSH_CPENTITY, alarmPara),oShape)
+ End If
+
+ 'Check for Off Normal if not in focus - To be checked with Rich if need offnormal checking
+' if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+' if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+' if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+' oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+' else
+' oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+' end if
+' end if
+' end if
+' End If
+
+
+'gsh_log_e("GSH_DIGITALINDICATOR_SCADA_P6A_ONUPDATE oShape=")
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+'Author: Didi Ekaette July 31, 2007
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALOUTPUTINDICATORALARMS_ONUPDATE (oShape, flag)
+on error resume next
+
+If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")),oShape)
+ End If
+End If
+
+If flag <=1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ dim sOPStateTxt
+ sOPStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_OP_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sOPStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+If flag = 0 then
+ oShape.objects("txt_OPvalue").value = sOPStateTxt
+End if
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATOR_SCADA_NOFORMAT_ONUPDATE'''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALINDICATOR_SCADA_NOFORMAT_ONUPDATE (oShape)
+on error resume next
+call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+
+'Alarming
+if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+End If
+
+
+'Set the focus
+call GSH_DIGITALINDICATORSETFOCUS(oShape)
+
+'Check for Off Normal if not in focus
+if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_DIGITAL_SCADA_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_PV, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+end if
+
+'Bad Data Check
+If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+Else
+ oShape.objects("txt_PVvalue").value = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'MOTORINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MOTORINDICATORSETFOCUS replaced BY GSH_GEN_SETSHAPEFOCUS
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MOTORINDICATORSHOWNORMAL'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MOTORINDICATORSHOWNORMAL(oShape)
+'gsh_log_s("GSH_MOTORINDICATORSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("outline").styleClass = GSH_CSSMOTORINDICATORNORMAL
+'gsh_log_e("GSH_MOTORINDICATORShowNormal")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MOTORINDICATORMOTORSETRUNSTATE''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape object
+' currentState = Entity's PV value
+' sTagName = Shape Tag Name
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MOTORINDICATORMOTORSETRUNSTATE(oShape,currentState, sTagName)
+'gsh_log_s("GSH_MOTORINDICATORMOTORSETRUNSTATE oShape=" & oShape.id & "currentState=" & currentState & "sTagName=" & sTagName)
+on error resume next
+Dim sRecMotorCssStyle
+ Dim sStateTxt0, sStateTxt1, sStateTxt2, sStateStyle0, sStateStyle1, sStateStyle2
+ sStateTxt0 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(0)","")
+ sStateTxt1 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(1)","")
+ sStateTxt2 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(2)","")
+ sStateStyle0 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(0)","")
+ sStateStyle1 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(1)","")
+ sStateStyle2 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(2)","")
+ 'gsh_log("GSH_MOTORINDICATORMOTORSETRUNSTATE checkpoint1 sStateTxt0 = "&sStateTxt0&",sStateTxt1 = "&sStateTxt1&",sStateTxt2 = "&sStateTxt2&",currentState = "&currentState)
+
+ sRecMotorCssStyle = GSH_CSSMOTORINDICATORMOTOROFFNORMAL
+ If strComp(currentState,sStateTxt0,vbTextCompare)=0 Then
+ sRecMotorCssStyle = sStateStyle0
+ Else If strComp(currentState,sStateTxt1,vbTextCompare)=0 Then
+ sRecMotorCssStyle = sStateStyle1
+ Else If strComp(currentState,sStateTxt2,vbTextCompare)=0 Then
+ sRecMotorCssStyle = sStateStyle2
+ Else
+ sRecMotorCssStyle = GSH_CSSMOTORINDICATORMOTOROFFNORMAL
+ End If
+ End If
+ End If
+
+ oShape.objects("rec_Motor").styleClass = sRecMotorCssStyle
+'gsh_log_e("GSH_MOTORINDICATORMOTORSETRUNSTATE set to "& sRecMotorCssStyle)
+end sub
+
+sub GSH_MOTORINDICATORSETNUMERICSTATE(oShape,nNumericStateValue,sParameterName)
+'gsh_log_s("GSH_MOTORINDICATORSETNUMERICSTATE oShape=" & oShape.id & "nNumericStateValue=" & nNumericStateValue)
+on error resume next
+ Dim sTagName, sStateStyle
+ sTagName = GSH_GETSHAPETAG(oShape)
+ sStateStyle = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE("&nNumericStateValue&")",GSH_CSSMOTOROFFNORMALFILL)
+ oShape.objects("rec_Motor").styleClass = sStateStyle
+'gsh_log_e("GSH_MOTORINDICATORSETNUMERICSTATE set to "& sStateStyle)
+end sub
+
+'sub GSH_MOTORINDICATOR_P6A_SETNUMERICSTATE(oShape,nNumericStateValue,sParameterName)
+'gsh_log_s("GSH_MOTORINDICATOR_P6A_SETNUMERICSTATE oShape=" & oShape.id & "nNumericStateValue=" & nNumericStateValue)
+'on error resume next
+' Dim sTagName, sStateStyle
+' sTagName = GSH_GETSHAPETAG(oShape)
+' sStateStyle = GSH_READTAGINFORMATIONKEYVALUE(sTagName,sParameterName&"STATESTYLE",GSH_CSSMOTORINDICATORMOTOROFFNORMAL)
+' oShape.objects("rec_Motor").styleClass = sStateStyle
+'gsh_log_e("GSH_MOTORINDICATOR_P6A_SETNUMERICSTATE set to "& sStateStyle)
+'end sub
+
+sub GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericStateValue,sParameterName)
+'gsh_log_s("GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE oShape=" & oShape.id & "nNumericStateValue=" & nNumericStateValue)
+on error resume next
+ Dim sTagName, sStateStyle
+ sTagName = GSH_GETSHAPETAG(oShape)
+' gsh_log("GSH_ValveDigitalSetValveState checkpoint1 sStateStyle = "&sStateStyle)
+ sStateStyle = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE("&nNumericStateValue&")",GSH_CSSVALVEDIGITALTRAVEL)
+ oShape.objects("txt_PVValue").style.visibility = GSH_HIDDEN
+ If strComp(sStateStyle,GSH_CSSVALVEDIGITALTRAVEL,vbTextCompare)=0 Then 'if the style is travel then make txt_PVValue visible
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+ end if
+ call GSH_ValveDigitalSetValveCSSStyle(oShape,sStateStyle)
+'gsh_log_e("GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_MOTORINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 06/13/07 use GSH_GEN_SETSHAPEFOCUS to display focus
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_SCADA_MOTORINDICATOR_ONUPDATE(oShape, flag)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'check offnormal
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_MOTORINDICATOR_P6A_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 12/19/2007: Added the function to handle MOTORINDICATOR_P6A shape (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_SCADA_MOTORINDICATOR_P6A_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SCADA_MOTORINDICATOR_P6A_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+
+ dim alarmPara
+ alarmPara = GSH_CPPARAM_IP1
+
+ 'set motor to running or not based on registry
+ 'Find value of GSH_CPPARAM_PV_IP1
+ dim input1_val, input2_val, expected_input1_val, expected_input2_val, sPVStateTxt
+
+ sPVStateTxt = GSH_NONE
+ input1_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP1))
+ input2_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP2))
+
+ expected_input1_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL1))
+ expected_input2_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL2))
+
+ if((input1_val=expected_input1_val) And (input2_val=expected_input2_val)) then
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,2,GSH_CPPARAM_IP1)
+ elseif ((input1_val=expected_input1_val) And (input2_val<>expected_input2_val)) then
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,0,GSH_CPPARAM_IP1)
+ alarmPara=GSH_CPPARAM_IP1
+ elseif ((input1_val<>expected_input1_val) And (input2_val=expected_input2_val)) then
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,1,GSH_CPPARAM_IP1)
+ alarmPara=GSH_CPPARAM_IP2
+ else
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,2,GSH_CPPARAM_IP1)
+ end if
+
+ dim activeInput
+ activeInput = GSH_CPPARAM_PV_IP1
+
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"), GSH_CPENTITY, activeInput),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'check offnormal
+ 'if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ ' if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ ' if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ ' oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ ' else
+ ' oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ ' end if
+ ' end if
+ 'end if
+ End If
+'gsh_log_e("GSH_SCADA_MOTORINDICATOR_P6A_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'MOTORINDICATORMULTIPLEALARMS Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_MOTORINDICATORWITHALARMS_ONUPDATE''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 06/12/07 use GSH_GEN_SETSHAPEFOCUS to display focus
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_SCADA_MOTORINDICATORWITHALARMS_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_SCADA_MOTORINDICATORWITHALARMS_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+
+ 'Alarming: Don't check alarm disabled for this alarm group (OK'd by Jamie)
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+ 'gsh_log ("sAlarmPriority = " & sAlarmPriority & "bUnack = " & bUnack )
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'check offnormal
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_SCADA_MOTORINDICATORWITHALARMS_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MINIMOTORINDICATORSHOWNORMAL'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MINIMOTORINDICATORSHOWNORMAL(oShape)
+'gsh_log_s("GSH_MINIMOTORINDICATORSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ call GSH_SHOWNOALARM(oShape)
+'gsh_log_e("GSH_MINIMOTORINDICATORShowNormal")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_MINIMOTORINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+' 06/13/07 use GSH_GEN_SETSHAPEFOCUS to display focus
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_SCADA_MINIMOTORINDICATOR_ONUPDATE(oShape, flag)
+ On Error Resume Next
+
+ if flag = 0 then
+ call GSH_MINIMOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ dim sTagName
+ sTagName = GSH_GETSHAPETAG(oShape)
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSSMINIMOTORINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'check offnormal
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' REGULATAORYCONTROLINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATOR_SCADA_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_REGULATORYCONTROLINDICATOR_SCADA_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+ call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Check the points alarming
+ if GSH_SCADA_ISALARMINGDISABLED(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+
+ If flag <= 1 then
+ 'Check Focus
+ 'call GSH_SETREGULATORYCONTROLINDICATORFOCUS(oShape)
+ call GSH_GEN_SETSHAPEFOCUS (oShape)
+
+ 'Check for Off Normal if not in focus
+
+ 'if (not(GSH_ISREGULATORYCONTROLINDICATOR_INFOCUS(oShape))) then
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_REGULATORYCONTROLINDICATORSHOWOFFNORMAL(oShape)
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'PV Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Set Mode
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+
+ End If
+'gsh_log_e("GSH_REGULATORYCONTROLINDICATOR_SCADA_ONUPDATE")
+End Sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'ANALOGOUTPUTINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGOUTPUTINDICATORSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/12/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGOUTPUTINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGOUTPUTINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGOUTPUTINDICATORNORMAL
+End If
+
+If flag <=1 then
+ 'call GSH_ANALOGOUTPUTINDICATORSETFOCUS(oShape) --> replaced by
+ call GSH_GEN_SETSHAPEFOCUS (oShape)
+End If
+
+If flag =0 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+
+End If
+'gsh_log_e("GSH_ANALOGOUTPUTINDICATOR_SCADA_ONUPDATE value = " &oShape.objects("txt_OPvalue").value)
+End sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGOUTPUTINDICATOR_ALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'Author: Didi Ekaette July 30, 2007
+'Jan10,2008: Remove Offnormal checking.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGOUTPUTINDICATORALARMS_ONUPDATE (oShape, flag)
+on error resume next
+
+If flag <= 1 then
+ call GSH_SHOWNOALARM(oShape)
+ call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")),oShape)
+ End If
+
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+
+End If
+
+If flag = 0 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+End If
+
+End sub
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_OPDEVMONITOR_SCADA_ONUPDATE
+'Update function for the shape SCADA_OPDEVIATION
+'10/03/2008 - Create this new shape & Add code to handle it (Cuong Ly)
+'
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_OPDEVMONITOR_SCADA_ONUPDATE(oShape, flag)
+' gsh_log_s("GSH_OPDEVMONITOR_SCADA_ONUPDATE oShapeId =" &oShape.id)
+
+ call GSH_C200_OPDEVMONITOR_SHOWNORMAL(oShape)
+ ' No alarm checking (OK by Jamie)
+
+ If flag <=1 then
+
+ 'Do focus and offnormal checking here. It is important that all shape generic functionalities are
+ 'done before shape specific ones
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+' oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("plg_LeftCover001").styleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.objects("plg_LeftCover002").styleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.objects("line007").styleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.objects("line009").styleClass = GSH_CSSFOCUSASSOCIATED
+ end if
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_POINT_MODE_ISOFFNORMAL(oShape.objects("OPDevMonitor_Script")) then
+
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End if
+
+ If flag = 0 then
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ 'Get OP value
+ dim opRefVal, deadBand, filterVal, lastRefTime, diff_old
+
+ 'Get the Deadband, filter, OPRefVal and the lastRefTime
+
+ opRefVal = Cdbl(oShape.GetCustomProperty("Value","OPRefVal"))
+ deadBand = Cdbl(oShape.GetCustomProperty("Value","DeadBand"))
+ filterVal = oShape.GetCustomProperty("Value","Filter")
+ lastRefTime = oShape.GetCustomProperty("Value","LastRefTime")
+ diff_old = oShape.GetCustomProperty("Value","Diff_Old")
+
+ dim diff_cur, deviation, opVal, diff_prev
+ opVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("OPDevMonitor_Script"),GSH_CPPARAM_OP)
+
+ if(StrComp(opVal,GSH_BADPV_TEXT, vbtextcompare)=0) then
+ exit sub
+ end if
+
+ 'Reference OP value is not set,
+ if(opRefVal < -99.0) then
+ opRefVal = opVal
+ oShape.SetCustomProperty "Value","OPRefVal",opVal
+ oShape.SetCustomProperty "Value","LastRefTime",now
+ oShape.objects("plg_OPRefValue").style.pixelleft = GSH_GET_OPREFPOSITION(oShape,opRefVal)
+ exit sub
+ end if
+
+ 'Get the RefTime from Registry.
+ dim opDevMonRegistryBase, refTime
+ opDevMonRegistryBase = GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR
+ refTime = GSH_READREGISTRY(opDevMonRegistryBase & GSH_REGKEY_OPDEVMON_RESETTIME, GSH_EMPTYSTRING)
+
+ 'If the RefTime > lastRefTime then update OPRefVal to current OPVal & update lastRefTime to RefTime
+ 'Need to give it a time buffer (i.e within 10s)?
+ if((StrComp(refTime,GSH_EMPTYSTRING)<>0) AND (CDate(refTime) > CDate(lastRefTime))) then
+ oShape.SetCustomProperty "Value","OPRefVal",opVal
+ opRefVal = opVal
+ oShape.SetCustomProperty "Value","LastRefTime",refTime
+ oShape.SetCustomProperty "Value","Diff_Old",0
+ diff_old = 0
+ oShape.objects("plg_OPRefValue").style.pixelleft = GSH_GET_OPREFPOSITION(oShape,opRefVal)
+ end if
+
+ 'Calculate OPDeviation
+ diff_prev = diff_old
+ diff_cur = opVal - opRefVal
+ diff_old = (diff_cur + diff_old)*filterVal
+ oShape.SetCustomProperty "Value","Diff_Old", diff_old
+
+' gsh_log("diff_cur = " &diff_cur &" diff_old = " &diff_old &" diff_prev = " &diff_prev)
+
+ 'Set ButterFlies
+ if diff_cur > 0 then
+ oShape.objects("ind_OPDevBarRight").value = diff_cur
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ elseif diff_cur < 0 then
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = diff_cur
+ else
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ end if
+
+ 'Set arrows - TODO: should this compare absolute value?
+ if ((diff_cur-diff_prev) > deadBand) then
+ 'set arrow to right
+ oShape.objects("grp_RightArrow").style.visibility = GSH_VISIBLE
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_HIDDEN
+ elseif ((diff_prev - diff_cur) > deadBand) then
+ 'set arrow to the left
+ oShape.objects("grp_RightArrow").style.visibility = GSH_HIDDEN
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_VISIBLE
+ else
+ 'hide arrows
+ oShape.objects("grp_RightArrow").style.visibility = GSH_HIDDEN
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_HIDDEN
+ end if
+
+ End If
+
+' gsh_log_e("GSH_OPDEVMONITOR_SCADA_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_OPDEVMONITOR_SCADA_ONUPDATE",oShape)
+ end if
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'Author: Didi Ekaette July 30, 2007
+'Jan10,2008: Rename to GSH_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE (oShape, flag)
+on error resume next
+
+If flag <= 1 then
+ call GSH_SHOWNOALARM(oShape)
+ call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")),oShape)
+ End If
+
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_OP)) then
+ call GSH_REGULATORYCONTROLINDICATORSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+End If
+
+If flag = 0 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+End If
+
+End sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'SENSOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSOR_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSOR_SCADA_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SENSOR_SCADA_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_SENSORSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_SENSORSHOWSUPPRESSEDALARM(oShape)
+ else
+ 'alarming is enabled, get highest priority and change shape accordingly
+ Select Case GSH_GETHIGHESTALARMPRIORITY(oShape.objects("rec_DataScript"))
+ Case GSH_UNACKEMERG
+ call GSH_SENSORSHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_SENSORSHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_SENSORSHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_SENSORSHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_SENSORSHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_SENSORSHOWLOWALARM(oShape,false)
+ Case Else
+ End Select
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_SETSHAPEFOCUS(oShape)
+ 'No Offnormal check as this shape could be a digital flag or analog point.
+ 'gsh_log_e("GSH_SENSOR_SCADA_ONUPDATE")
+ End If
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_SENSORSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ oDataBoundObject.objects("ovl_sensor").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORNORMAL
+'gsh_log_e("GSH_SENSORSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWHIGHALARM''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWHIGHALARM(oDataBoundObject,unAcknowledged)
+'gsh_log_s("GSH_SENSORSHOWHIGHALARM oDataBoundObject=" & oDataBoundObject.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowHighAlarm(oDataBoundObject,unAcknowledged)
+ oDataBoundObject.objects("ovl_sensor").style.visibility = GSH_VISIBLE
+ if unAcknowledged then
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORALARMHIGHUNACK
+
+ else
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORALARMHIGHACK
+ end if
+'gsh_log_e("GSH_SENSORSHOWHIGHALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWLOWALARM'''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWLOWALARM(oDataBoundObject,unAcknowledged)
+'gsh_log_s("GSH_SENSORSHOWLOWALARM oDataBoundObject=" & oDataBoundObject.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowLowAlarm(oDataBoundObject,unAcknowledged)
+ oDataBoundObject.objects("ovl_sensor").style.visibility = GSH_VISIBLE
+ if unAcknowledged then
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORALARMLOWUNACK
+ else
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORALARMLOWACK
+ end if
+'gsh_log_e("GSH_SENSORSHOWLOWALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWEMERGENCYALARM'''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWEMERGENCYALARM(oDataBoundObject,unAcknowledged)
+'gsh_log_s("GSH_SENSORSHOWEMERGENCYALARM oDataBoundObject=" & oDataBoundObject.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowEmergencyAlarm(oDataBoundObject,unAcknowledged)
+ oDataBoundObject.objects("ovl_sensor").style.visibility = GSH_VISIBLE
+ if unAcknowledged then
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORALARMEMERGENCYUNACK
+ else
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORALARMEMERGENCYACK
+ end if
+'gsh_log_e("GSH_SENSORSHOWEMERGENCYALARM")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWDISABLEDALARM'''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWDISABLEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_SENSORSHOWDISABLEDALARM oDataBoundObject=" & oDataBoundObject.id)
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORDISABLEDALARM
+'gsh_log_e("GSH_SENSORSHOWDISABLEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_SENSORSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("ovl_sensor").styleClass = GSH_CSSSENSORDISABLEDALARM
+'gsh_log_e("GSH_SENSORSHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSOR_ISPOINTOFFNORMAL removed Apr 13, 2007 (AL)''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SENSORSHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters: oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SENSORSHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_SENSORSHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+'gsh_log_e("GSH_SENSORSHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'MULTIPLESENSORS Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORS_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORS_SCADA_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_MULTIPLESENSORS_SCADA_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+ If flag = 0 then
+ call GSH_MULTIPLESENSORSSHOWNORMAL(oShape)
+
+ 'Alarming
+ 'Check Alarming disabled
+ if (GSH_SCADA_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"), GSH_CPENTITY) or GSH_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"), GSH_CPENTITYALARM)) Then
+ 'Alarm is Disabled
+ call GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM(oShape)
+ end if
+ 'Get Highest Alarm
+ iAlarmCode1 = GSH_GETHIGHESTALARMPRIORITYParameter(oShape.objects("rec_DataScript"), GSH_CPENTITY)
+ iAlarmCode2 = GSH_GETHIGHESTALARMPRIORITYParameter(oShape.objects("rec_DataScript"), GSH_CPENTITYALARM)
+ iAlarmCode = GSH_COMPAREHIGHESTALARMPRIORITY(iAlarmCode1, iAlarmCode2)
+
+ 'alert("iAlarmCode2 = " &iAlarmCode2)
+
+ Select Case iAlarmCode
+ Case GSH_UNACKEMERG
+ call GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_MULTIPLESENSORSSHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_MULTIPLESENSORSSHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_MULTIPLESENSORSSHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_MULTIPLESENSORSSHOWLOWALARM(oShape,false)
+ Case Else
+ 'No Alarms
+ End Select
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_MULTIPLESENSORSSETFOCUS(oShape)
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+ End If
+
+'gsh_log_e("GSH_MULTIPLESENSORS_SCADA_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_MULTIPLESENSORSSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ oDataBoundObject.objects("plg_MultipleSensors").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORNORMAL
+'gsh_log_e("GSH_MULTIPLESENSORSSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSHOWHIGHALARM''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSHOWHIGHALARM(oDataBoundObject,unAcknowledged)
+'gsh_log_s("GSH_MULTIPLESENSORSSHOWHIGHALARM oDataBoundObject=" & oDataBoundObject.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowHighAlarm(oDataBoundObject,unAcknowledged)
+ oDataBoundObject.objects("plg_MultipleSensors").style.visibility = GSH_VISIBLE
+ if unAcknowledged then
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORALARMHIGHUNACK
+
+ else
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORALARMHIGHACK
+ end if
+'gsh_log_e("GSH_MULTIPLESENSORSSHOWHIGHALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSHOWLOWALARM'''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSHOWLOWALARM(oDataBoundObject,unAcknowledged)
+'gsh_log_s("GSH_MULTIPLESENSORSSHOWLOWALARM oDataBoundObject=" & oDataBoundObject.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowLowAlarm(oDataBoundObject,unAcknowledged)
+ oDataBoundObject.objects("plg_MultipleSensors").style.visibility = GSH_VISIBLE
+ if unAcknowledged then
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORALARMLOWUNACK
+ else
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORALARMLOWACK
+ end if
+'gsh_log_e("GSH_MULTIPLESENSORSSHOWLOWALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSHOWEMERGENCYALARM'''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oDataBoundObject,unAcknowledged)
+'gsh_log_s("GSH_MULTIPLESENSORSSHOWEMERGENCYALARM oDataBoundObject=" & oDataBoundObject.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowEmergencyAlarm(oDataBoundObject,unAcknowledged)
+ oDataBoundObject.objects("plg_MultipleSensors").style.visibility = GSH_VISIBLE
+ if unAcknowledged then
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORALARMEMERGENCYUNACK
+ else
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORALARMEMERGENCYACK
+ end if
+'gsh_log_e("GSH_MULTIPLESENSORSSHOWEMERGENCYALARM")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSHOWDISABLEDALARM'''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSHOWDISABLEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_MULTIPLESENSORSSHOWDISABLEDALARM oDataBoundObject=" & oDataBoundObject.id)
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORDISABLEDALARM
+'gsh_log_e("GSH_MULTIPLESENSORSSHOWDISABLEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("plg_MultipleSensors").styleClass = GSH_CSSSENSORDISABLEDALARM
+'gsh_log_e("GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORSSETFOCUS'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIPLESENSORSSETFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_MULTIPLESENSORSSETFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oDataBoundObject)
+'gsh_log_e("GSH_MULTIPLESENSORSSETFOCUS")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Group Analog Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPANALOG_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPANALOG_SCADA_ONUPDATE(oShape, flag)
+on error resume next
+ If flag = 0 then
+ call GSH_GROUPANALOGSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ call GSH_GROUPANALOGSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS (oShape)
+ '06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+ End If
+
+ If flag = 0 then
+ 'PV Data Check
+ If NOT(GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false)) Then
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ Else
+ call GSH_GROUPANALOGSHOWBADPV(oShape)
+ End If
+ End If
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPANALOGSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPANALOGSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPANALOGSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, stagName
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show objects
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPANALOGNORMAL
+ oDataBoundObject.objects("txt_AnalogValue").style.visibility = GSH_VISIBLE
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ stagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values
+ 'gsh_log ("tagName = "&tagname)
+ oDataBoundObject.objects("txt_tagname").value = stagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+'gsh_log_e("GSH_GROUPANALOGSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPANALOGSHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPANALOGSHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPANALOGSHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ if (oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+'gsh_log_e("GSH_GROUPANALOGSHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPANALOGSHOWBADPV'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPANALOGSHOWBADPV(oDataBoundObject)
+'gsh_log_s("GSH_GROUPANALOGSHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_AnalogValue").value = GSH_BADPV_TEXT
+'gsh_log_e("GSH_GROUPANALOGSHOWBADPV")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPANALOGSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPANALOGSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_GROUPANALOGSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPANALOGDISABLEDALARM
+'gsh_log_e("GSH_GROUPANALOGSHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPANALOGSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/12/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITESHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters: ' oDataBoundObject = subshape name or me, if calling within subshape
+'Used for C200 and SCADA
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPDIGITALCOMPOSITENORMAL
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITESHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITESHOWBADPV'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESHOWBADPV(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_DigitalValue").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("txt_DigitalValue").value = GSH_BADPV_TEXT
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESHOWBADPV")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPDIGITALCOMPOSITEDISABLEDALARM
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITESETFOCUS'''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESETFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESETFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oDataBoundObject)
+ if (not(oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must change outline fill to transparent
+ oDataBoundObject.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESETFOCUS")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE(oShape,style)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE oShape=" & oShape.id&",style="&style)
+on error resume next
+ 'gsh_log("GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE CHECKPOINT")
+ oShape.objects("outline").styleClass = style
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE")
+end sub
+
+'GSH_GROUPDIGITALCOMPOSITESETVALVESTATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESETVALVESTATE(oShape,currentState)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESETVALVESTATE oShape=" & oShape.id & "currentState=" & currentState)
+on error resume next
+Dim sTagName
+
+ Dim sStateTxt0, sStateTxt1,sStateTxt2, sStateStyle0, sStateStyle1, sStateStyle2
+ sTagName = GSH_GETSHAPETAG(oShape)
+ sStateTxt0 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(0)","")
+ sStateTxt1 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(1)","")
+ sStateTxt2 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(2)","")
+ sStateStyle0 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(0)","")
+ sStateStyle1 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(1)","")
+ sStateStyle2 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(2)","")
+ 'gsh_log("GSH_GROUPDIGITALCOMPOSITESETVALVESTATE checkpoint1 sStateTxt0 = "&sStateTxt0&",sStateTxt1 = "&sStateTxt1&",sStateTxt2 = "&sStateTxt2&",currentState = "&currentState)
+
+ If currentState = sStateTxt0 Then
+ call GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE(oShape,sStateStyle0)
+ Else If currentState = sStateTxt1 Then
+ call GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE(oShape,sStateStyle1)
+ Else If currentState = sStateTxt2 Then
+ call GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE(oShape,sStateStyle2)
+ Else
+ call GSH_GROUPDIGITALCOMPOSITESETVALVECSSSTYLE(oShape,GSH_CSSGROUPDIGITALCOMPOSITEDEFAULT)
+ End If
+ End If
+ End If
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESETVALVESTATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPDIGITALCOMPOSITEHIDEMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITEHIDEMODEENTRY(oShape)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITEHIDEMODEENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("cmb_ModAttrValue").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_ModAttrValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITEHIDEMODEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPDIGITALCOMPOSITESHOWMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESHOWMODEENTRY(oShape)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESHOWMODEENTRY oShape=" & oShape.id)
+ oShape.objects("cmb_ModAttrValue").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_ModAttrValue").style.visibility = GSH_HIDDEN
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPDIGITALCOMPOSITEHIDEMODEENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESHOWMODEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPDIGITALCOMPOSITEHIDEOPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITEHIDEOPENTRY(oShape)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITEHIDEOPENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_OPValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITEHIDEOPENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPDIGITALCOMPOSITESHOWOPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITESHOWOPENTRY(oShape)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITESHOWOPENTRY oShape=" & oShape.id)
+ oShape.objects("cmb_OPValue").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_OPValue").style.visibility = GSH_HIDDEN
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPDIGITALCOMPOSITEHIDEOPENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITESHOWOPENTRY")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Group Digital Input Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_GROUPDIGITALINPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape - Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_GROUPDIGITALINPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SCADA_GROUPDIGITALINPUT_ONUPDATE oShape = " & oShape.id)
+on error resume next
+
+If flag = 0 then
+ GSH_GROUPDIGITALINPUTSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALINPUTSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+End If
+
+If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPDIGITALINPUTSETFOCUS(oShape)
+ call GSH_GEN_SETSHAPEFOCUS (oShape)
+
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+ call GSH_GROUPDIGITALINPUTSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+End If
+
+If flag = 0 then
+
+ 'PV Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false) Then
+ call GSH_GROUPDIGITALINPUTSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_DigitalValue").value = sPVStateTxt
+ End If
+ 'gsh_log_e("GSH_SCADA_GROUPDIGITALINPUT_ONUPDATE")
+End If
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALINPUTSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPDIGITALINPUTNORMAL
+ oDataBoundObject.objects("txt_DigitalValue").style.visibility = GSH_VISIBLE
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+'gsh_log_e("GSH_GROUPDIGITALINPUTSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALINPUTSHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ if (oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+'gsh_log_e("GSH_GROUPDIGITALINPUTSHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALINPUTSHOWBADPV'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSHOWBADPV(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'call GSH_HIDESUBSHAPE(oDataBoundObject.objects("alp_AnalogValue"))
+ 'oDataBoundObject.objects("txt_PVvalue").value = "---"
+ 'call GSH_SHOWSUBSHAPE(oDataBoundObject.objects("shp_BadPVText"))
+ oDataBoundObject.objects("txt_DigitalValue").value = GSH_BADPV_TEXT
+'gsh_log_e("GSH_GROUPDIGITALINPUTSHOWBADPV")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALINPUTSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPDIGITALINPUTDISABLEDALARM
+'gsh_log_e("GSH_GROUPDIGITALINPUTSHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALINPUTSETFOCUS'''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSETFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSETFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oDataBoundObject)
+ if (not(oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must change outline fill to transparent
+ oDataBoundObject.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_GROUPDIGITALINPUTSETFOCUS")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE(oShape,style)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE oShape=" & oShape.id&",style="&style)
+on error resume next
+ 'gsh_log("GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE CHECKPOINT")
+ oShape.objects("outline").styleClass = style
+'gsh_log_e("GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE")
+end sub
+
+'GSH_GROUPDIGITALINPUTSETVALVESTATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALINPUTSETVALVESTATE(oShape,currentState)
+'gsh_log_s("GSH_GROUPDIGITALINPUTSETVALVESTATE oShape=" & oShape.id & "currentState=" & currentState)
+on error resume next
+Dim sTagName
+
+ Dim sStateTxt0, sStateTxt1,sStateTxt2, sStateStyle0, sStateStyle1, sStateStyle2
+ sTagName = GSH_GETSHAPETAG(oShape)
+ sStateTxt0 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(0)","")
+ sStateTxt1 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(1)","")
+ sStateTxt2 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"StateTxt(2)","")
+ sStateStyle0 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(0)","")
+ sStateStyle1 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(1)","")
+ sStateStyle2 = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE(2)","")
+ 'gsh_log("GSH_GROUPDIGITALINPUTSETVALVESTATE checkpoint1 sStateTxt0 = "&sStateTxt0&",sStateTxt1 = "&sStateTxt1&",sStateTxt2 = "&sStateTxt2&",currentState = "&currentState)
+
+ If currentState = sStateTxt0 Then
+ call GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE(oShape,sStateStyle0)
+ Else If currentState = sStateTxt1 Then
+ call GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE(oShape,sStateStyle1)
+ Else If currentState = sStateTxt2 Then
+ call GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE(oShape,sStateStyle2)
+ Else
+ call GSH_GROUPDIGITALINPUTSETVALVECSSSTYLE(oShape,GSH_CSSGROUPDIGITALINPUTDEFAULT)
+ End If
+ End If
+ End If
+'gsh_log_e("GSH_GROUPDIGITALINPUTSETVALVESTATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Group Orsel Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSEL_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSEL_SCADA_ONUPDATE(oShape, flag)
+
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPORSELSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ call GSH_GROUPORSELSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GROUPORSELSETFOCUS(oShape)
+
+ End If
+
+ If flag = 0 then
+ '06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP))
+
+ 'Display Mode Data
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+
+ End If
+ 'Set Outline fill color White
+ oShape.objects("outline").styleClass = GSH_CSSWHITE
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPORSELNORMAL
+ oDataBoundObject.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_GROUPORSELSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSEL_ISPOINTOFFNORMAL removed Apr 13, 2007''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ if (oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+'gsh_log_e("GSH_GROUPORSELSHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPORSELDISABLEDALARM
+'gsh_log_e("GSH_GROUPORSELSHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSETFOCUS'''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSETFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSETFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oDataBoundObject)
+ if (not(oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must change outline fill to transparent
+ oDataBoundObject.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_GROUPORSELSETFOCUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSHOWINITIALIZATION'''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWINITIALIZATION(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSHOWINITIALIZATION oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPORSELSHOWINITIALIZATION")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSHOWWINDUP_LOW'''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWWINDUP_LOW(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSHOWWINDUP_LOW oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'show
+ 'call GSH_GROUPORSELSHOWNORMAL(oDataBoundObject)
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPORSELSHOWWINDUP_LOW")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSHOWWINDUP_HIGH''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWWINDUP_HIGH(oDataBoundObject)
+'gsh_log_s("GSH_GROUPORSELSHOWWINDUP_HIGH oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'show
+ 'call GSH_GROUPORSELSHOWNORMAL(oDataBoundObject)
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPORSELSHOWWINDUP_HIGH")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPORSELSETSTATUS''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSETSTATUS(oDataBoundObject, sValue)
+'gsh_log_s("GSH_GROUPORSELSETSTATUS oDataBoundObject=" & oDataBoundObject.id & " value=" & sValue)
+on error resume next
+ oDataBoundObject.objects("txt_status").value = sValue
+ oDataBoundObject.objects("txt_status").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPORSELSETSTATUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPORSELHIDEMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELHIDEMODEENTRY(oShape)
+'gsh_log_s("GSH_GROUPORSELHIDEMODEENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_ModeValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPORSELHIDEMODEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPORSELSHOWMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWMODEENTRY(oShape)
+'gsh_log_s("GSH_GROUPORSELSHOWMODEENTRY oShape=" & oShape.id)
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_ModeValue").style.visibility = GSH_HIDDEN
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPORSELHIDEMODEENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPORSELSHOWMODEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPORSELHIDEMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELHIDEOPENTRY(oShape)
+'gsh_log_s("GSH_GROUPORSELHIDEOPENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_GROUPORSELHIDEOPENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPORSELSHOWOPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPORSELSHOWOPENTRY(oShape)
+'gsh_log_s("GSH_GROUPORSELSHOWOPENTRY oShape=" & oShape.id)
+ oShape.objects("alp_OPValue").style.visibility = GSH_VISIBLE
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPORSELHIDEOPENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPORSELSHOWOPENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Group Regulatory Control Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROL_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem
+' that the combox or alp entry was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROL_SCADA_ONUPDATE(oShape, flag)
+
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in principle focus
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ 'gsh_log_e("GSH_GROUPREGULATORYCONTROL_SCADA_ONUPDATE SHAPE IS OFF NORMAL")
+ end if
+ end if
+ End If
+
+
+ If flag = 0 then
+ 'PV Bad Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+ 'oShape.objects("txt_OPValue").value = FormatNumber(oShape.objects("alp_OPValue").value,GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+ 'oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,oShape.objects("alp_SPValue").value)
+ 'oShape.objects("txt_ModeValue").value = oShape.objects("cmb_ModeValue").value
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Group Regulatory Control Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROL_SCADA_SM_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROL_SCADA_SM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROL_SCADA_SM_ONUPDATE oShape = " &oShape.id)
+on error resume next
+ call GSH_GROUPREGULATORYCONTROL_SCADA_ONUPDATE(oShape, flag)
+
+ dim val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+
+ if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+'gsh_log_e("GSH_GROUPREGULATORYCONTROL_SCADA_SM_ONUPDATE")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPAO_SCADA_SM_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPAO_SCADA_SM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GROUPAO_SCADA_SM_ONUPDATE oShape = " &oShape.id)
+on error resume next
+ call GSH_GROUPAO_SCADA_ONUPDATE(oShape, flag)
+ dim val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+ if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+'gsh_log_e("GSH_GROUPAO_SCADA_SM_ONUPDATE")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_ONUPDATE''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_ONUPDATE oShape = " &oShape.id)
+on error resume next
+ call GSH_GROUPDIGITALCOMPOSITE_SCADA_ONUPDATE(oShape, flag)
+ dim val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+ if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_ONUPDATE")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_P6A_ONUPDATE''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_P6A_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_P6A_ONUPDATE oShape = " &oShape.id)
+on error resume next
+ call GSH_GROUPDIGITALCOMPOSITE_SCADA_P6A_ONUPDATE(oShape, flag)
+ dim val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+ if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITE_SCADA_SM_P6A_ONUPDATE")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDO_SCADA_SM_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDO_SCADA_SM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GROUPDO_SCADA_SM_ONUPDATE oShape = " &oShape.id)
+on error resume next
+ call GSH_GROUPDO_SCADA_ONUPDATE(oShape, flag)
+ dim val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+ if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+'gsh_log_e("GSH_GROUPDO_SCADA_SM_ONUPDATE")
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters: ' oDataBoundObject = subshape name or me, if calling within subshape
+'Used in ALL MULITFP Reg Ctl based!
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPREGULATORYCONTROLNORMAL
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+' oDataBoundObject.objects("txt_ModeValue").style.visibility = GSH_VISIBLE
+' oDataBoundObject.objects("txt_OPValue").style.visibility = GSH_VISIBLE
+' oDataBoundObject.objects("txt_SPValue").style.visibility = GSH_VISIBLE
+' oDataBoundObject.objects("txt_AnalogValue").style.visibility = GSH_VISIBLE
+ 'Hide Bad Value
+' oDataBoundObject.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+' oDataBoundObject.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+' oDataBoundObject.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+' oDataBoundObject.objects("txt_Intialization").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_ramp").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ if (oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWBADPV'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWBADPV(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_AnalogValue").value = GSH_BADPV_TEXT
+ oDataBoundObject.objects("txt_AnalogValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWBADPV")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWBADSPHIGH'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWBADSPHIGH(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_SPHighValue").value = GSH_BADPV_TEXT
+ oDataBoundObject.objects("txt_SPHighValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWBADPV")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWBADSPLOW'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWBADSPLOW(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWBADPV oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_SPLowValue").value = GSH_BADPV_TEXT
+ oDataBoundObject.objects("txt_SPLowValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWBADPV")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPREGULATORYCONTROLDISABLEDALARM
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GEN_SETSHAPEFOCUS(oShape) replaces GSH_GROUPREGULATORYCONTROLSETFOCUS
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWINITIALIZATION'''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWINITIALIZATION(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWINITIALIZATION oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("txt_Intialization").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWINITIALIZATION")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWWINDUP_LOW'''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWWINDUP_LOW(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWWINDUP_LOW oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'show
+ 'call GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oDataBoundObject)
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWWINDUP_LOW")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOWWINDUP_HIGH''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWWINDUP_HIGH(oDataBoundObject)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWWINDUP_HIGH oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ 'show
+ 'call GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oDataBoundObject)
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWWINDUP_HIGH")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSETSTATUS''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSETSTATUS(oDataBoundObject, sValue)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSETSTATUS oDataBoundObject=" & oDataBoundObject.id & " value=" & sValue)
+on error resume next
+ oDataBoundObject.objects("txt_status").value = sValue
+ oDataBoundObject.objects("txt_status").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSETSTATUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPREGULATORYCONTROLSHOW_RAMP''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' txtValue = text to be shown in RAMP shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oDataBoundObject,txtValue)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOW_RAMP oDataBoundObject=" & oDataBoundObject.id & ",txtValue =" &txtValue )
+on error resume next
+ oDataBoundObject.objects("txt_ramp").value = txtValue
+ oDataBoundObject.objects("txt_ramp").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOW_RAMP")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPREGULATORYCONTROLHIDEMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLHIDEMODEENTRY(oShape)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLHIDEMODEENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_ModeValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLHIDEMODEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPREGULATORYCONTROLSHOWMODEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWMODEENTRY(oShape)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWMODEENTRY oShape=" & oShape.id)
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_ModeValue").style.visibility = GSH_HIDDEN
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPREGULATORYCONTROLHIDEMODEENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWMODEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPREGULATORYCONTROLHIDEOPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLHIDEOPENTRY(oShape)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLHIDEOPENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLHIDEOPENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPREGULATORYCONTROLSHOWOPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWOPENTRY(oShape)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWOPENTRY oShape=" & oShape.id)
+ oShape.objects("alp_OPValue").style.visibility = GSH_VISIBLE
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPREGULATORYCONTROLHIDEOPENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWOPENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPREGULATORYCONTROLHIDESPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLHIDESPENTRY(oShape)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLHIDESPENTRY oShape=" & oShape.id)
+ window.clearInterval(GSH_GroupTimerId)
+ oShape.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLHIDESPENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GROUPREGULATORYCONTROLSHOWSPENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPREGULATORYCONTROLSHOWSPENTRY(oShape)
+'gsh_log_s("GSH_GROUPREGULATORYCONTROLSHOWSPENTRY oShape=" & oShape.id)
+ oShape.objects("alp_SPValue").style.visibility = GSH_VISIBLE
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("GSH_GROUPREGULATORYCONTROLHIDESPENTRY(" & oShape.id & ")", GSH_GroupTimeout * 1000)
+'gsh_log_e("GSH_GROUPREGULATORYCONTROLSHOWSPENTRY")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Group SCADA AO Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPAO_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem
+' that the combox or alp entry was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPAO_SCADA_ONUPDATE(oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPAOSHOWNORMAL(oShape)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in principle focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if (GSH_SCADA_POINT_MODE_ISOFFNORMAL(oShape.objects("rec_DataScript"))) then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+ end if
+ End If
+
+
+ If flag = 0 then
+
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPAOSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPAOSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GGSH_GROUPAOSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+ 'Disable Alarms
+ 'call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("txt_ModeValue").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("txt_OPValue").style.visibility = GSH_VISIBLE
+ 'Hide Bad Value
+'gsh_log_e("GSH_GROUPAOSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'DIGITALOUTPUTINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALOUTPUTINDICATORSETFOCUS'''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALOUTPUTINDICATORSETFOCUS(oDataBoundObject)
+'gsh_log_s("GSH_DIGITALOUTPUTINDICATORSETFOCUS oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oDataBoundObject)
+ if (not(oDataBoundObject.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must change outline fill to transparent
+ oDataBoundObject.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_DIGITALOUTPUTINDICATORSETFOCUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALOUTPUTINDICATORSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALOUTPUTINDICATORSHOWNORMAL(oShape)
+'gsh_log_s("GSH_DIGITALOUTPUTINDICATORSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("shp_focus").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_DIGITALOUTPUTINDICATORSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALOUTPUTINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'06/09/07 Check for Off Normal is not needed per RM
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALOUTPUTINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+Dim sOPStateTxt
+If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+End If
+
+If flag <=1 then
+ 'Set the focus
+ 'call GSH_DIGITALOUTPUTINDICATORSETFOCUS(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal is not needed per RM 06/09/07
+ sOPStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPvalue").value = sOPStateTxt
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'NUMERICINDICATOR Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_NUMERICINDICATORSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/12/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_NUMERICINDICATOR_SCADA_ONUPDATE replaced by GSH_SCADA_NUMERICINDICATOR_ONUPDATE May 4,2007
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 06/12/07 GSH_GEN_SETSHAPEFOCUS replaced GSH_NUMERICINDICATORSETFOCUS
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_NUMERICINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSNUMERICINDICATORNORMAL
+ End If
+ If flag <=1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ End If
+ If flag = 0 then
+ 'Bad Data Check removed at request of Rich
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+ End If
+End sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FormatPVText: Round value to appropriate number of decimal places for point
+'Parameters:
+' oShape: calling shape
+' txtIn: value to be rounded
+'Returns:
+' Round value (text)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_FormatPVText(oShape,txtIn)
+ Dim tempReturn, numOfDecimals
+' july 8, 2008 - added extra bad value check - je
+' If StrComp(txtIn,"1.#QNAN")= 0 then
+ If (StrComp(txtIn,"1.#QNAN")= 0) or (StrComp(txtIn,"---")= 0) then
+ tempReturn = GSH_BADPV_TEXT
+ else
+ 'gsh_log_s("GSH_FormatPVText oShape=" & oShape.id & ", txtIn=" & txtIn)
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1))
+ tempReturn = FormatNumber(txtIn, numOfDecimals,-2, 0, 0)
+ 'gsh_log_e("GSH_FormatPVText returning: " & tempReturn)
+ End If
+ gsh_FormatPVText = tempReturn
+end function
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FormatPVTextTag: Round value to appropriate number of decimal places for point
+'Parameters:
+' oShape: calling shape
+' txtIn: value to be rounded
+'Returns:
+' Round value (text)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_FormatPVTextTag(tagName,txtIn)
+'gsh_log_s("GSH_FormatPVTextTag tagName=" & tagName & ", txtIn=" & txtIn)
+Dim tempReturn
+tempReturn = FormatNumber(txtIn,Right(GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1),-2, 0, 0)
+gsh_FormatPVTextTag = tempReturn
+'gsh_log_e("GSH_FormatPVTextTag returning: " & tempReturn)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ShapeMouseDown: Handler for all shape on mouse down (exception: group shapes & equipment label)
+'Parameters:
+' oShape: calling shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ShapeMouseDown(oShape)
+'gsh_log_s("GSH_ShapeMouseDown oShape=" & oShape.id)
+If window.event.button = 2 Then call GSH_RIGHTCLICK(oShape) else call GSH_SHAPECLICKED(oShape) end if
+'gsh_log_e("GSH_ShapeMouseDown")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_EquipLabelMouseDown: Handler for equipment label shape on mouse down
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_EquipmentLabelMouseDown(oShape)
+'gsh_log_s("GSH_EquipmentLabelMouseDown oShape=" & oShape.id)
+ call GSH_RIGHTCLICKEQUIPMENTNAME(oShape)
+'gsh_log_e("GSH_EquipmentLabelMouseDown")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' GSH_OFFPAGECONNECTOR_ONSHAPELOAD Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_OFFPAGECONNECTOR_ONSHAPELOAD''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_OFFPAGECONNECTOR_ONSHAPELOAD(oShape)
+'gsh_log_s("GSH_OFFPAGECONNECTOR_ONSHAPELOAD oShape=" & oShape.id)
+ if (oShape.GetCustomProperty("Value","AssocLevel2") <> "") or (oShape.GetCustomProperty("Value","AssocLevel3") <> "") or (oShape.GetCustomProperty("Value","AssocLevel4") <> "") then
+ oShape.objects("plgShadow").style.visibility = GSH_VISIBLE
+ end if
+'gsh_log_e("GSH_OFFPAGECONNECTOR_ONSHAPELOAD")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_OFFPAGECONNECTOR_ONCLICK'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_OFFPAGECONNECTOR_ONCLICK(oShape)
+'gsh_log_s("GSH_OFFPAGECONNECTOR_ONCLICK oShape=" & oShape.id)
+Dim sOnDispT2,sOnDispT3,sOnDispT4
+Dim sTemp,sDisplayName,sAssocT2Name, sAssocT3Name, sAssocT4Name, sDispLocation
+ sAssocT2Name = oShape.GetCustomProperty("Value","AssocLevel2")
+ sAssocT3Name = oShape.GetCustomProperty("Value","AssocLevel3")
+ sAssocT4Name = oShape.GetCustomProperty("Value","AssocLevel4")
+ sDispLocation = GSH_ReadDisplayNames("")
+if (sAssocT2Name <> "") or (sAssocT3Name <> "") or (sAssocT4Name <> "") then
+ call GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(GSH_FALSE) 'Reset all tagname labels to hidden
+end if
+if strcomp(sAssocT2Name,"",vbtextcompare)<>0 then
+ sOnDispT2 = Ucase(GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T2FN,""))
+ sDisplayName = Ucase(sAssocT2Name)
+ If strcomp(sAssocT2Name,sOnDispT2,vbtextcompare)<>0 Then
+ sTemp = GSH_sDispLocation & sDisplayName & ".htm"
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sDisplayName)
+ window.navigate(sTemp)
+ End If
+End if
+if strcomp(sAssocT3Name,"",vbtextcompare)<>0 then
+ sOnDispT3 = Ucase(GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T3FN,""))
+ sDisplayName = Ucase(sAssocT3Name)
+ If strcomp(sAssocT3Name,sOnDispT3,vbtextcompare)<>0 Then
+ sTemp = sDispLocation & sDisplayName & ".htm"
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sDisplayName)
+ window.navigate(sTemp)
+ End If
+End if
+if strcomp(sAssocT4Name,"",vbtextcompare)<>0 then
+ sOnDispT4 = Ucase(GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_T4FN,""))
+ sDisplayName = Ucase(sAssocT4Name)
+ If strcomp(sAssocT4Name,sOnDispT4,vbtextcompare)<>0 Then
+ sTemp = sDispLocation & sDisplayName & ".htm"
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sDisplayName)
+ window.navigate(sTemp)
+ End If
+End if
+'gsh_log_e("GSH_OFFPAGECONNECTOR_ONCLICK")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_OFFPAGECONNECTOR_L1AS_ONCLICK'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_OFFPAGECONNECTOR_L1AS_ONCLICK(oShape)
+'gsh_log_s("GSH_OFFPAGECONNECTOR_L1AS_ONCLICK oShape=" & oShape.id)
+Dim sOnDispT1
+Dim sTemp,sDisplayName,sAssocT1Name, sDispLocation
+ sAssocT1Name = oShape.GetCustomProperty("Value","AssocLevel1")
+ sDispLocation = GSH_ReadDisplayNames("")
+if strcomp(sAssocT1Name,"",vbtextcompare)<>0 then
+ sDisplayName = Ucase(sAssocT1Name)
+ sTemp = GSH_sDispLocation & sDisplayName & ".htm"
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE ("Type1ASFileName",sDisplayName)
+ window.navigate(sTemp)
+End If
+'gsh_log_e("GSH_OFFPAGECONNECTOR_L1AS_ONCLICK")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' TAGNAMELABEL Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TAGNAMELABEL_ONSHAPELOAD''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TAGNAMELABEL_ONSHAPELOAD(oShape)
+'gsh_log_s("GSH_TAGNAMELABEL_ONSHAPELOAD oShape=" & oShape.id)
+on error resume next
+ oShape.objects("txt_TagName").style.textAlign = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPJUSTIFYLABEL)
+
+ if (strcomp(GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS,GSH_TRUE, vbtextcompare) = 0) then
+ oShape.objects("txt_TagName").style.visibility = GSH_VISIBLE
+ else: oShape.objects("txt_TagName").style.visibility = GSH_HIDDEN
+ end if
+'gsh_log_e("GSH_TAGNAMELABEL_ONSHAPELOAD")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TAGNAMELABEL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TAGNAMELABEL_ONUPDATE(oShape)
+'gsh_log_s("GSH_TAGNAMELABEL_ONUPDATE oShape=" & oShape.id)
+On Error resume next
+ dim strTurnOnTagNameLabel
+ strTurnOnTagNameLabel = GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS
+
+ If ((strComp(strTurnOnTagNameLabel,GSH_TRUE,vbtextcompare))=0) Then
+ oShape.objects("txt_TagName").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txt_TagName").style.visibility = GSH_HIDDEN
+ End If
+'gsh_log_e("TAGNAMELABEL_ONUPDATE")
+
+End Sub
+
+
+'
+'GSH_TAGNAMELABEL_GETVISIBILITY()
+'look up the registry to get the current visibility
+'status of the TAGNAMELABEL shape
+'
+'04/29/2008: Update for version 1.1.2 to replace the use of StationDataRepository(CL)
+function GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS
+'gsh_log_s("GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS")
+on error resume next
+
+ dim labelIsVisible
+
+ labelIsVisible = GSH_READDISPLAYCOMMUNICATIONKEYVALUE(GSH_REGKEY_TAGNAMELABLESTATUS,GSH_FALSE)
+
+' gsh_log_e("GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS labelIsVisible = " &labelIsVisible)
+ GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS = labelIsVisible
+end function
+
+'
+'GSH_TAGNAMELABEL_SETVISIBILITY()
+'set the visibility status of the TAGNAMELABEL shape
+'
+'04/29/2008: Update for version 1.1.2 to replace the use of StationDataRepository(CL)
+sub GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(status)
+'gsh_log_s("GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS status=" &status)
+on error resume next
+
+ if(strComp(status,GSH_TRUE,vbtextcompare)<>0 AND strComp(status,GSH_FALSE,vbtextcompare)<>0) then
+ gsh_log("ERROR: status = " &status & " is invalid. Please use GSH_TRUE or GSH_FALSE")
+ else
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_TAGNAMELABLESTATUS,status
+ end if
+
+
+'gsh_log_e("GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS")
+End sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' TAGNAMEALIASLABEL Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TAGNAMEALIASLABEL_ONSHAPELOAD''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TAGNAMEALIASLABEL_ONSHAPELOAD(oShape)
+'gsh_log_s("GSH_TAGNAMEALIASLABEL_ONSHAPELOAD oShape=" & oShape.id)
+on error resume next
+ dim sTagLabel, shapePoint
+ oShape.objects("txt_TagName").style.textAlign = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPJUSTIFYLABEL)
+ shapePoint = oShape.GetCustomProperty(GSH_CPVALUE,"TagName")
+ sTagLabel = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ If (strcomp(sTagLabel,shapePoint,vbtextcompare)<>0) then
+ oShape.objects("txt_TagName").value = sTagLabel
+ End If
+ if (strcomp(GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS, GSH_TRUE, vbtextcompare) = 0) then
+ oShape.objects("txt_TagName").style.visibility = GSH_VISIBLE
+ else: oShape.objects("txt_TagName").style.visibility = GSH_HIDDEN
+ end if
+'gsh_log_e("GSH_TAGNAMEALIASLABEL_ONSHAPELOAD")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' TAGEUDESCLABEL Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TAGEUDESCLABEL_ONSHAPELOAD''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TAGEUDESCLABEL_ONSHAPELOAD(oShape)
+'gsh_log_s("GSH_TAGEUDESCLABEL_ONSHAPELOAD oShape=" & oShape.id)
+on error resume next
+ dim sTagEULabel, shapePoint
+ oShape.objects("txt_TagEUDescName").style.textAlign = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPJUSTIFYLABEL)
+ shapePoint = oShape.GetCustomProperty(GSH_CPVALUE,"TagName")
+ sTagEULabel = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGEUDESC, shapePoint)
+ If (strcomp(sTagEULabel,shapePoint,vbtextcompare)<>0) then
+ oShape.objects("txt_TagEUDESC").value = sTagLabel
+ End If
+'gsh_log_e("GSH_TAGEUDESC_ONSHAPELOAD")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LevelIndicator Shape Section: Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelIndicator_SCADA_OnUpdate'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicator_SCADA_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_LevelIndicator_SCADA_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+If flag <= 1 then
+ 'Initialize Shape
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ call GSH_LevelIndicatorSetFocus(oShape)
+ '06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+'End If
+'If flag = 0 then
+ 'Check for Bad PV
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End if
+End If
+'gsh_log_e("GSH_LevelIndicator_SCADA_OnUpdate")
+end sub
+
+'06/04/07 Added else case, if FocusNone
+'06/07/07 Removed else case as if was causing problems when status is FocusNone and Alarming
+sub GSH_LevelIndicatorSetFocus(oShape)
+'gsh_log_s("GSH_LevelIndicatorSetFocus oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+' else
+' oShape.objects("outline").style.visibility = GSH_HIDDEN
+' oShape.objects("outline").fillstyle = GSH_FILLSOLID
+' oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+ end if
+'gsh_log_e("GSH_LevelIndicatorSetFocus")
+end sub
+
+sub GSH_LevelIndicatorShowNormal(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowNormal oShape=" & oShape.id)
+ oShape.objects("rec_IndicatorFloat").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_IndicatorRange").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_BadPVIndicator").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_PVValue").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_PVvalue").styleClass = GSH_CSSLEVELINDICATORNORMALPVTEXT
+ call GSH_LevelIndicatorShowNoAlarm(oShape) 'call GSH_SHOWNOALARM(oShape)
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_IndicatorFloat").styleClass = GSH_CSSLEVELINDICATORFLOAT
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORNORMAL
+'gsh_log_e("GSH_LevelIndicatorShowNormal")
+end sub
+
+sub GSH_LevelIndicatorShowOffNormal(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowOffNormal oShape=" & oShape.id)
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorShowOffNormal")
+end sub
+
+sub GSH_LevelIndicatorShowHighAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorShowHighAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowHighAlarm(oShape,unAcknowledged)
+ if unAcknowledged then
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMHIGHUNACK
+ else
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMHIGHACK
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorShowHighAlarm")
+end sub
+
+sub GSH_LevelIndicatorShowNoAlarm(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowNoAlarm oShape=" & oShape.id)
+ call GSH_ShowNoAlarm(oShape)
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORNORMAL
+'gsh_log_e("GSH_LevelIndicatorShowNoAlarm")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelIndicatorShowLowAlarm: Show Low Alarm behavior for shape''''''
+'Parameters:
+' oShape = calling shape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicatorShowLowAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorShowLowAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowLowAlarm(oShape,unAcknowledged)
+ if unAcknowledged then
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMLOWUNACK
+ else
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMLOWACK
+ end if
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorShowLowAlarm")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelIndicatorShowEmergencyAlarm: Show Emerg behavior for Shape '''
+'Parameters:
+' oShape = Calling shape
+' unAcknowledged - true or false , true if you want to show UnAcknowledged Alarm Behavior
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicatorShowEmergencyAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorShowEmergencyAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ 'show
+ call GSH_ShowEmergencyAlarm(oShape,unAcknowledged)
+ if unAcknowledged then
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMEMERGENCYUNACK
+ else
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMEMERGENCYACK
+ end if
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorShowEmergencyAlarm")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelIndicatorShowDisbledAlarm: Show shape in disabled alarm state
+'Parameters:
+' oShape = calling shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicatorShowDisbledAlarm(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowDisbledAlarm oShape=" & oShape.id)
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+ oShape.objects("outline").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+'gsh_log_e("GSH_LevelIndicatorShowDisbledAlarm")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LevelIndicatorSmallSMALL Shape Section
+' Contains all functions specific to the Level Indicator Small shape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicatorSmall_SCADA_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_LevelIndicatorSmall_SCADA_OnUpdate, oshape=" & oShape.id)
+On Error Resume Next
+ If flag <= 1 then
+ 'Initialize Shape
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ else
+ 'alarming is enabled, get highest priority and change shape accordingly
+ Select Case GSH_GETHIGHESTALARMPRIORITY(oShape.objects("rec_DataScript"))
+ Case GSH_NOALARMCODE
+ call GSH_LevelIndicatorShowNoAlarm(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_LevelIndicatorSmallShowEmergencyAlarm(oShape,True)
+ Case GSH_UNACKHIGH
+ call GSH_LevelIndicatorSmallShowHighAlarm(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_LevelIndicatorSmallShowLowAlarm(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_LevelIndicatorSmallShowEmergencyAlarm(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_LevelIndicatorSmallShowHighAlarm(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_LevelIndicatorSmallShowLowAlarm(oShape,false)
+ Case Else
+ call GSH_LevelIndicatorShowNoAlarm(oShape)
+ End Select
+ End If
+ call GSH_LEVELINDICATORSETFOCUS(oShape)
+ '06/08/07 Removing offnormal check from all Scada analog shapes AL(284)
+'End If
+
+'If flag = 0 then
+ 'Check for Bad PV
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+End If
+'gsh_log_e("GSH_LevelIndicatorSmall_SCADA_OnUpdate")
+end sub
+
+sub GSH_LevelIndicatorSmallShowHighAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorSmallShowHighAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_LevelIndicatorShowHighAlarm(oShape,unAcknowledged)
+ 'Make Alarm outline width smaller
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+'gsh_log_e("GSH_LevelIndicatorSmallShowHighAlarm")
+end sub
+
+sub GSH_LevelIndicatorSmallShowLowAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorSmallShowLowAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_LevelIndicatorShowLowAlarm(oShape,unAcknowledged)
+ 'Make Alarm outline width smaller
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+'gsh_log_e("GSH_LevelIndicatorSmallShowLowAlarm")
+end sub
+
+sub GSH_LevelIndicatorSmallShowEmergencyAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorSmallShowEmergencyAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_LevelIndicatorShowEmergencyAlarm(oShape,unAcknowledged)
+ 'Make Alarm outline width smaller
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+'gsh_log_e("GSH_LevelIndicatorSmallShowEmergencyAlarm")
+end sub
+
+sub GSH_LevelIndicatorSmallShowDisbledAlarm(oShape)
+'gsh_log_s("GSH_LevelIndicatorSmallShowDisbledAlarm oShape=" & oShape.id )
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+ oShape.objects("outline").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+'gsh_log_e("GSH_LevelIndicatorSmallShowDisbledAlarm")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LEVEL INDICATOR REGULATORY CONTROL Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicatorRegulatoryControl_SCADA_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControl_SCADA_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ 'End If
+
+
+ 'If flag <= 1 then
+ 'Check Focus
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ 'End If
+
+
+ 'If flag = 0 then
+ 'Check for bad value
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ call GSH_LevelIndicatorShowSPFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+ End If
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControl_SCADA_OnUpdate")
+end sub
+
+' 06/04/07 Changed to sub and added else case for when focus is none.
+' 06/05/07 Changed back because it affected the alarm display without focus.
+sub GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlSetFocus oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ end if
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlSetFocus")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowNormal oShape=" & oShape.id)
+ call GSH_LevelIndicatorShowNoAlarm(oShape)
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_PVvalue").styleClass = GSH_CSSLEVELINDICATORNORMALPVTEXT
+ oShape.objects("txt_BadPVIndicator").style.visibility = GSH_HIDDEN
+ oShape.objects("outline").styleClass = GSH_CSSLEVELINDICATORNORMAL'GSH_CSSLEVELINDICATORREGULATORYCONTROLNORMAL
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORNORMAL'GSH_CSSLEVELINDICATORREGULATORYCONTROLNORMAL
+ oShape.objects("rec_IndicatorFloat").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_IndicatorFloat").styleClass = GSH_CSSLEVELINDICATORFLOAT'GSH_CSSLEVELINDICATORREGULATORYCONTROLNORMAL
+ oShape.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowNormal")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowNoAlarm(oShape)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowNoAlarm oShape=" & oShape.id)
+ call GSH_ShowNoAlarm(oShape)
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORNORMAL
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowNoAlarm")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowOffNormal oShape=" & oShape.id)
+on error resume next
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowOffNormal")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowHighAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowHighAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_ShowHighAlarm(oShape,unAcknowledged)
+ if unAcknowledged then
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMHIGHUNACK
+ else
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMHIGHACK
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowHighAlarm")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowLowAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowLowAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_ShowLowAlarm(oShape,unAcknowledged)
+ if unAcknowledged then
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMLOWUNACK
+ else
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMLOWACK
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowLowAlarm")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowEmergencyAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowEmergencyAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_ShowEmergencyAlarm(oShape,unAcknowledged)
+ if unAcknowledged then
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMEMERGENCYUNACK
+ else
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMEMERGENCYACK
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowEmergencyAlarm")
+end sub
+
+sub GSH_LevelIndicatorShowPVFloat(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowPVFloat oShape=" & oShape.id)
+ Dim iNumPixels, iBottom
+ Dim iRangeHi, iRangeLo, iPV
+ 'Calculate pv value
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ iPV = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ iNumPixels = 0
+ if (iPV > iRangeHi) then
+ iNumPixels = oShape.objects("rec_IndicatorRange").style.pixelheight
+' iNumPixels = oShape.objects("LinePVRange").style.pixelheight
+ ElseIf (iPV < iRangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = (oShape.objects("rec_IndicatorRange").style.pixelheight * ((iPV - iRangeLo) / (iRangeHi - iRangeLo)))
+' iNumPixels = (oShape.objects("LinePVRange").style.pixelheight * ((iPV - iRangeLo) / (iRangeHi - iRangeLo)))
+ end if
+ iBottom = (oShape.objects("rec_IndicatorRange").style.pixelheight + oShape.objects("rec_IndicatorRange").style.pixeltop)
+ oShape.objects("rec_IndicatorFloat").style.pixeltop = iBottom - iNumPixels - (oShape.objects("rec_IndicatorFloat").style.pixelheight / 2)
+' gsh_log(oShape.objects("rec_IndicatorFloat").id & " pixeltop=" & oShape.objects("rec_IndicatorFloat").style.pixeltop)
+'gsh_log_e("GSH_LevelIndicatorShowPVFloat")
+end sub
+
+sub GSH_LevelIndicatorShowSPFloat(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowSPFloat oShape=" & oShape.id)
+ oShape.objects("plg_SPIndicator").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION (oShape,GSH_CPPARAM_SP)-(oShape.objects("plg_SPIndicator").style.pixelheight / 2))
+'gsh_log_e("GSH_LevelIndicatorShowSPFloat")
+end sub
+
+function GSH_LEVELINDICATOR_SPFLOATPOSITION(oShape, SPParam)
+'gsh_log_s("GSH_LEVELINDICATOR_SPFLOATPOSITION oShape=" & oShape.id)
+ Dim iNumPixels, iBottom
+ Dim iRangeHi, iRangeLo, iSP
+ 'Calculate pv value
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ 'gsh_log("iRangeHi=" & iRangeHi & ", iRangeLo=" & iRangeLo)
+ iSP = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"), SPParam)
+ 'gsh_log("SP=" & iSP)
+ if (iSP > iRangeHi) then
+ iNumPixels = oShape.objects("rec_IndicatorRange").style.pixelheight
+ ElseIf (iSP < iRangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = (oShape.objects("rec_IndicatorRange").style.pixelheight * ((iSP - iRangeLo) / (iRangeHi - iRangeLo)))
+ end if
+ iBottom = (oShape.objects("rec_IndicatorRange").style.pixelheight + oShape.objects("rec_IndicatorRange").style.pixeltop)
+ Dim iPosition : iPosition = cint(iBottom - iNumPixels )
+ GSH_LEVELINDICATOR_SPFLOATPOSITION = iPosition
+'gsh_log_e("GSH_LEVELINDICATOR_SPFLOATPOSITION returns >>>>>>>>>>>>"&iPosition)
+end function
+
+sub GSH_LevelIndicatorShowBadPV(oShape)
+'gsh_log_s("GSH_LevelIndicatorShowBadPV oShape=" & oShape.id)
+ oShape.objects("txt_PVvalue").styleClass = GSH_CSSLEVELINDICATORBADPVTEXT
+ oShape.objects("txt_PVvalue").value = "---"
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORBADPV
+ oShape.objects("rec_IndicatorFloat").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_BadPVIndicator").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorShowBadPV")
+end sub
+
+sub GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm oShape=" & oShape.id)
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+ oShape.objects("outline").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LEVEL INDICATOR REGULATORY CONTROL_GAPVARIN Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelIndicatorRegulatoryControl_GAPVarIn_SCADA_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_LevelIndicatorRegulatoryControl_GAPVarIn_SCADA_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+ 'End If
+
+
+ 'If flag <= 1 then
+ 'Check Focus
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ 'End If
+
+
+ 'If flag = 0 then
+ 'Check for bad value
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+' call GSH_LevelIndicatorShowSPFloat(oShape)
+ dim vsphi, vsplo
+ vsphi = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY_SPHI &"." &GSH_CPPARAM_ENTITY_SPHI_PARA)
+ vsplo = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY_SPLO &"." &GSH_CPPARAM_ENTITY_SPLO_PARA)
+
+ oShape.objects("plg_SPIndicator1").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION_GAPVarIn(oShape,vsphi) - (oShape.objects("plg_SPIndicator2").style.pixelheight / 2))
+ oShape.objects("plg_SPIndicator2").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION_GAPVarIn(oShape,vsplo)- (oShape.objects("plg_SPIndicator1").style.pixelheight / 2))
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+
+ 'When SPHigh or SPLow value is Nan -> do not show the marker
+ if not(isNAN(vsphi)) then
+ oShape.objects("plg_SPIndicator1").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_SPIndicator1").style.visibility = GSH_HIDDEN
+ end if
+
+ if not(isNAN(vsplo)) then
+ oShape.objects("plg_SPIndicator2").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_SPIndicator2").style.visibility = GSH_HIDDEN
+ end if
+
+ End If
+'gsh_log_e("GSH_LevelIndicatorRegulatoryControl_GAPVarIn_SCADA_OnUpdate")
+end sub
+
+function GSH_LEVELINDICATOR_SPFLOATPOSITION_GAPVARIN(oShape,InputVal)
+'gsh_log_s("GSH_LEVELINDICATOR_SPFLOATPOSITION_GAPVarIn oShape=" & oShape.id)
+ Dim iNumPixels, iBottom
+ Dim iRangeHi, iRangeLo, iSP
+ 'Calculate pv value
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+' gsh_log("iRangeHi=" & iRangeHi & ", iRangeLo=" & iRangeLo)
+ iSP = InputVal
+ 'iSP = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"), SPParam)
+' gsh_log("SP=" & iSP)
+ if (iSP > iRangeHi) then
+ iNumPixels = oShape.objects("rec_IndicatorRange").style.pixelheight
+ ElseIf (iSP < iRangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = (oShape.objects("rec_IndicatorRange").style.pixelheight * ((iSP - iRangeLo) / (iRangeHi - iRangeLo)))
+' gsh_log("iNumPixels=" & iNumPixels)
+ end if
+ iBottom = (oShape.objects("rec_IndicatorRange").style.pixelheight + oShape.objects("rec_IndicatorRange").style.pixeltop)
+ Dim iPosition : iPosition = cint(iBottom - iNumPixels)
+ GSH_LEVELINDICATOR_SPFLOATPOSITION_GAPVARIN = iPosition
+'gsh_log_e("GSH_LEVELINDICATOR_SPFLOATPOSITION_GAPVARIN returns >>>>>>>>>>>>"&iPosition)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LevelIndicatorRegCtlSmall Shape Section
+' Contains all functions specific to the shape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+sub GSH_LevelIndicatorRegCtlSmall_SCADA_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_LevelIndicatorRegCtlSmall_SCADA_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ 'alarming is enabled, get highest priority and change shape accordingly
+ Select Case GSH_GETHIGHESTALARMPRIORITY(oShape.objects("rec_datascript"))
+ Case GSH_NOALARMCODE
+ call GSH_LevelIndicatorRegulatoryControlShowNoAlarm(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm(oShape,True)
+ Case GSH_UNACKHIGH
+ call GSH_LevelIndicatorRegCtlSmallShowHighAlarm(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_LevelIndicatorRegCtlSmallShowLowAlarm(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_LevelIndicatorRegCtlSmallShowHighAlarm(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_LevelIndicatorRegCtlSmallShowLowAlarm(oShape,false)
+ Case Else
+ call GSH_LevelIndicatorRegulatoryControlShowNoAlarm(oShape)
+ End Select
+ End If
+'End If
+
+'If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+'End If
+
+
+'If flag = 0 then
+ 'Check for bad value
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ call GSH_LevelIndicatorShowSPFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+End If
+
+'gsh_log_e("GSH_LevelIndicatorRegCtlSmall_SCADA_OnUpdate")
+end sub
+
+sub GSH_LevelIndicatorRegCtlSmallShowHighAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorRegCtlSmallShowHighAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_LevelIndicatorRegulatoryControlShowHighAlarm(oShape,unAcknowledged)
+ 'Make Alarm outline width smaller compared to regular size
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+'gsh_log_e("GSH_LevelIndicatorRegCtlSmallShowHighAlarm")
+end sub
+
+sub GSH_LevelIndicatorRegCtlSmallShowLowAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorRegCtlSmallShowLowAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_LevelIndicatorRegulatoryControlShowLowAlarm(oShape,unAcknowledged)
+ 'Make Alarm outline width smaller compared to regular size
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+'gsh_log_e("GSH_LevelIndicatorRegCtlSmallShowLowAlarm")
+end sub
+
+sub GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_LevelIndicatorRegulatoryControlShowEmergencyAlarm(oShape,unAcknowledged)
+ 'Make Alarm outline width smaller compared to regular size
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+'gsh_log_e("GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm")
+end sub
+
+sub GSH_LevelIndicatorRegCtlSmallShowDisbledAlarm(oShape)
+'gsh_log_s("GSH_LevelIndicatorRegCtlSmallShowDisbledAlarm oShape=" & oShape.id )
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+ oShape.objects("outline").styleClass = GSH_CSSLEVELINDICATORDISABLEDALARM
+ 'Make Alarm outline width smaller
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_LevelIndicatorRegCtlSmallShowDisbledAlarm")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' VALVE_DIGITAL Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_VALVEDIGITAL_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_VALVEDIGITAL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SCADA_ValveDigital_OnUpdate oShape=" & oShape.id)
+on error resume next
+
+ If flag <= 1 then
+ Dim nNumericState
+ nNumericState = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState)
+ if (GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript"))) Then 'Alarm is Disabled
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ else 'alarming is enabled, get highest priority and change shape accordingly
+ Select Case GSH_GETHIGHESTALARMPRIORITY(oShape.objects("rec_DataScript"))
+ Case GSH_NOALARMCODE
+ 'call GSH_ValveDigitalShowNormal(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_ValveDigitalShowEmergencyAlarm(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_ValveDigitalShowHighAlarm(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_ValveDigitalShowLowAlarm(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_ValveDigitalShowEmergencyAlarm(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_ValveDigitalShowHighAlarm(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_ValveDigitalShowLowAlarm(oShape,false)
+ End Select
+ End If
+ 'End If
+
+ 'If flag <= 1 then
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+ call GSH_ValveDigitalShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_ValveDigitalShowBadPV(oShape)
+ else
+ oShape.objects("txt_PVvalue").value = sPVStateTxt
+ End If
+
+ End If
+'gsh_log_e("GSH_SCADA_ValveDigital_OnUpdate")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' VALVE_DIGITAL Shape Section
+' Contains all functions specific to the shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_VALVEDIGITAL_P6A_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'01/11/2008: Added to handle P6A VALVE DIGITAL shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_VALVEDIGITAL_P6A_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SCADA_VALVEDIGITAL_P6A_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+
+ Dim nNumericState
+' nNumericState = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP1)
+ call GSH_ValveDigitalShowNormal(oShape)
+
+ 'Find value of GSH_CPPARAM_PV_IP1
+ dim input1_val, input2_val, expected_input1_val, expected_input2_val, sPVStateTxt
+
+ sPVStateTxt = GSH_NONE
+ input1_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP1))
+ input2_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP2))
+
+ expected_input1_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL1))
+ expected_input2_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL2))
+
+
+ if((input1_val=expected_input1_val) And (input2_val=expected_input2_val)) then
+ nNumericState = 3
+ sPVStateTxt = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),"BothOn","")
+ elseif ((input1_val=expected_input1_val) And (input2_val<>expected_input2_val)) then
+ nNumericState = 0
+ sPVStateTxt = GSH_GET_STATE_TEXT_P6A(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), oShape.GetCustomProperty(GSH_CPPARAMETER,GSH_CPPARAM_IP1)&"_"&input1_val)
+ alarmPara=GSH_CPPARAM_IP1
+ elseif ((input1_val<>expected_input1_val) And (input2_val=expected_input2_val)) then
+ nNumericState = 1
+ sPVStateTxt = GSH_GET_STATE_TEXT_P6A(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), oShape.GetCustomProperty(GSH_CPPARAMETER,GSH_CPPARAM_IP2)&"_"&input2_val)
+ alarmPara=GSH_CPPARAM_IP2
+ else
+ nNumericState = 3
+ sPVStateTxt = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),"BothOff","")
+ end if
+
+ call GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState)
+
+ oShape.objects("txt_PVvalue").value = sPVStateTxt
+
+ call GSH_ValveDigitalSetFocus(oShape)
+
+
+
+'gsh_log_e("GSH_SCADA_VALVEDIGITAL_P6A_ONUPDATE")
+
+end sub
+
+sub GSH_ValveDigitalSetValveCSSStyle(oShape,style)
+'gsh_log_s("GSH_ValveDigitalSetValveCSSStyle oShape=" & oShape.id&",style="&style)
+on error resume next
+ oShape.objects("plg_ValveDigitalPic").styleClass = style
+'gsh_log_e("GSH_ValveDigitalSetValveCSSStyle")
+end sub
+
+'sub GSH_ValveDigitalSetValveState(oShape,currentState) replaced by GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE May1
+
+sub GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericStateValue)
+'gsh_log_s("GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE oShape=" & oShape.id & "nNumericStateValue=" & nNumericStateValue)
+on error resume next
+ Dim sTagName, sStateStyle
+ sTagName = GSH_GETSHAPETAG(oShape)
+ sStateStyle = GSH_READTAGINFORMATIONKEYVALUE(sTagName,"STATESTYLE("&nNumericStateValue&")",GSH_CSSVALVEDIGITALTRAVEL)
+' gsh_log("GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE checkpoint1 sStateStyle = "&sStateStyle)
+
+ oShape.objects("txt_PVValue").style.visibility = GSH_HIDDEN
+ If strComp(sStateStyle,GSH_CSSVALVEDIGITALTRAVEL,vbTextCompare)=0 Then 'if the style is travel then make txt_PVValue visible
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+ end if
+ call GSH_ValveDigitalSetValveCSSStyle(oShape,sStateStyle)
+'gsh_log_e("GSH_SCADA_VALVEDIGITALSETVALVENUMERICSTATE")
+end sub
+
+sub GSH_ValveDigitalSetFocus(oShape)
+'gsh_log_s("GSH_ValveDigitalSetFocus oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT '-> show noalarm (at shownornmal) fill the outline -> reset the fill here
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ 'oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSFOCUSASSOCIATED_COLOUR
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+ end if
+
+'gsh_log_e("GSH_ValveDigitalSetFocus")
+end sub
+
+sub GSH_ValveDigitalBnBSetFocus(oShape)
+'gsh_log_s("GSH_ValveDigitalSetFocus oShape=" & oShape.id)
+on error resume next
+ call GSH_SETSHAPEFOCUS(oShape)
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT '-> show noalarm (at shownornmal) fill the outline -> reset the fill here
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ 'oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_LineCover1").styleClass = GSH_CSSFOCUSASSOCIATED_COLOUR
+ oShape.objects("txt_PVValue1").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_LineCover2").styleClass = GSH_CSSFOCUSASSOCIATED_COLOUR
+ oShape.objects("txt_PVValue2").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_LineCover3").styleClass = GSH_CSSFOCUSASSOCIATED_COLOUR
+ oShape.objects("txt_PVValue3").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_LineCover1").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("txt_PVValue1").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_LineCover2").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("txt_PVValue2").style.visibility = GSH_HIDDEN
+ oShape.objects("rec_LineCover3").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("txt_PVValue3").style.visibility = GSH_HIDDEN
+ end if
+
+'gsh_log_e("GSH_ValveDigitalSetFocus")
+end sub
+
+sub GSH_ValveDigitalShowNormal(oShape)
+'gsh_log_s("GSH_ValveDigitalShowNormal oShape=" & oShape.id)
+on error resume next
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("txt_PVValue").style.visibility = GSH_HIDDEN
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ call GSH_ShowNoAlarm(oShape)
+'gsh_log_e("GSH_ValveDigitalShowNormal")
+end sub
+
+sub GSH_ValveDigitalShowOffNormal(oShape)
+'gsh_log_s("GSH_ValveDigitalShowOffNormal oShape=" & oShape.id)
+on error resume next
+ oShape.objects("focus").style.visibility = GSH_VISIBLE
+ oShape.objects("focus").styleClass = GSH_VALVEDIGITALOFFNORMAL
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveDigitalShowOffNormal")
+end sub
+
+sub GSH_ValveDigitalShowDisabledAlarm(oShape)
+'gsh_log_s("GSH_ValveDigitalShowDisabledAlarm oShape=" & oShape.id)
+on error resume next
+ oShape.objects("outline").styleClass = GSH_CSSVALVEDIGITALDISABLEDALARM
+'gsh_log_e("GSH_ValveDigitalShowDisabledAlarm")
+end sub
+
+sub GSH_ValveDigitalShowBadPV(oShape)
+'gsh_log_s("GSH_ValveDigitalShowBadPV oShape=" & oShape.id)
+on error resume next
+ call GSH_ValveDigitalSetValveCSSStyle(oShape,GSH_CSSVALVEDIGITALTRAVEL)
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_PVvalue").value = gsh_badpv
+'gsh_log_e("GSH_ValveDigitalShowBadPV")
+end sub
+
+sub GSH_ValveDigitalShowEmergencyAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_ValveDigitalShowEMERGENCYAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_ShowEmergencyAlarm(oShape,unAcknowledged)
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveDigitalShowEmergencyAlarm")
+end sub
+
+sub GSH_ValveDigitalShowHighAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_ValveDigitalShowHighAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_ShowHighAlarm(oShape,unAcknowledged)
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveDigitalShowHighAlarm")
+end sub
+
+sub GSH_ValveDigitalShowLowAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_ValveDigitalShowLowAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+ call GSH_ShowLowAlarm(oShape,unAcknowledged)
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveDigitalShowLowAlarm")
+end sub
+
+
+
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' Regulatory Control Valve Shape Section: Contains all functions specific to the shape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ValveRegulatoryControl_SCADA_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_ValveRegulatoryControlOnUpdate oShape=" & oShape.id)
+
+ If flag <= 1 then
+ call GSH_ValveRegulatoryControlShowNormal(oShape)
+
+ Dim OPValue,stsmsg, redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+
+
+
+ 'Check the points alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_ValveRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ 'alarming is enabled, get highest priority and change shape accordingly
+
+ 'gsh_log_e("GSH_ValveRegulatoryControlOnUpdate <<" & GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")))
+ Select Case GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript"))
+ Case GSH_NOALARMCODE
+ Call GSH_ValveRegulatoryControlShowNoAlarm(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_ValveRegulatoryControlShowEmergencyAlarm(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_ValveRegulatoryControlShowHighAlarm(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_ValveRegulatoryControlShowLowAlarm(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_ValveRegulatoryControlShowEmergencyAlarm(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_ValveRegulatoryControlShowHighAlarm(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_ValveRegulatoryControlShowLowAlarm(oShape,false)
+ Case Else
+ call GSH_ValveRegulatoryControlShowNoAlarm(oShape)
+ End Select
+ End If
+ 'End If
+
+ 'If flag <= 1 then
+
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_ValveRegulatoryControlShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+
+ End If
+
+ If flag = 0 then
+ 'Update Value (added Jun 7th)
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground --> outline is always transparent
+ End If
+
+ 'gsh_log_e("GSH_ValveRegulatoryControlOnUpdate")
+end sub
+
+sub GSH_ValveRegulatoryControlSetFocus(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlSetFocus oShape=" & oShape.id)
+on error resume next
+
+ call GSH_SetShapeFocus(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,false)
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSFOCUSASSOCIATED_COLOUR
+ oShape.objects("txt_OPValue").style.visibility = GSH_VISIBLE 'changed AL
+ else
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSBACKGROUND_GRAY
+ end if
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT '-> set alarm filled the outline -> set it back to transparent here
+'gsh_log_e("GSH_ValveRegulatoryControlSetFocus")
+end sub
+
+sub GSH_ValveRegulatoryControlShowNormal(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowNormal oShape=" & oShape.id)
+on error resume next
+ 'oShape.objects("txt_OPValue").value = FormatNumber(oShape.objects("ind_OPBottom").value,GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("txt_OPValue").style.visibility = GSH_HIDDEN 'changed AL
+ oShape.objects("ind_OPBottom").style.visibility = GSH_VISIBLE
+ call GSH_ValveRegulatoryControlShowNoAlarm(oShape)
+ call GSH_ValveRegulatoryControlShowNoStatusMessage(oShape)
+ call GSH_ValveRegulatoryControlShowNoWindUp(oShape)
+'gsh_log_e("GSH_ValveRegulatoryControlShowNormal")
+end sub
+
+sub GSH_ValveRegulatoryControlShowOffNormal(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowOffNormal oShape=" & oShape.id)
+on error resume next
+ oShape.objects("focus").style.visibility = GSH_VISIBLE
+ oShape.objects("focus").styleClass = GSH_CSSREGULATORYCONTROLVALVEOFFNORMAL
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,true)
+'gsh_log_e("GSH_ValveRegulatoryControlShowOffNormal")
+end sub
+
+sub GSH_ValveRegulatoryControlShowEmergencyAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_ValveRegulatoryControlShowEmergencyAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+on error resume next
+ call GSH_ShowEmergencyAlarm(oShape,unAcknowledged)
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,false)
+'gsh_log_e("GSH_ValveRegulatoryControlShowEmergencyAlarm")
+end sub
+
+sub GSH_ValveRegulatoryControlShowDisabledAlarm(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowDisabledAlarm oShape=" & oShape.id)
+on error resume next
+ call GSH_ShowNoAlarm(oShape)
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,true)
+ oShape.objects("outline").styleClass = GSH_CSSREGULATORYCONTROLINDICATORDISABLEDALARM
+'gsh_log_e("GSH_ValveRegulatoryControlShowDisabledAlarm")
+end sub
+
+sub GSH_ValveRegulatoryControlShowHighAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_ValveRegulatoryControlShowHighAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+on error resume next
+ call GSH_ShowHighAlarm(oShape,unAcknowledged)
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,false)
+'gsh_log_e("GSH_ValveRegulatoryControlShowHighAlarm")
+end sub
+
+sub GSH_ValveRegulatoryControlShowLowAlarm(oShape,unAcknowledged)
+'gsh_log_s("GSH_ValveRegulatoryControlShowLowAlarm oShape=" & oShape.id & "unAcknowledged=" & cstr(unAcknowledged))
+on error resume next
+ call GSH_ShowLowAlarm(oShape,unAcknowledged)
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,false)
+'gsh_log_e("GSH_ValveRegulatoryControlShowLowAlarm")
+end sub
+
+sub GSH_ValveRegulatoryControlShowNoAlarm(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowNoAlarm oShape=" & oShape.id)
+on error resume next
+ call GSH_ShowNoAlarm(oShape)
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,true)
+'gsh_log_e("GSH_ValveRegulatoryControlShowNoAlarm")
+end sub
+
+sub GSH_ValveRegulatoryControlShowNoWindUp(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowNoWindUp oShape=" & oShape.id)
+on error resume next
+ oShape.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_ValveRegulatoryControlShowNoWindUp")
+end sub
+
+sub GSH_ValveRegulatoryControlShowNoStatusMessage(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowNoStatusMessage oShape=" & oShape.id)
+on error resume next
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_ValveRegulatoryControlShowNoStatusMessage")
+end sub
+
+sub GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+'gsh_log_s("GSH_ValveRegulatoryControlShowStatusMessage oShape=" & oShape.id & ",message="&message)
+on error resume next
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_statusmessage").value = message
+'gsh_log_e("GSH_ValveRegulatoryControlShowStatusMessage")
+end sub
+
+sub GSH_ValveRegulatoryControlShowInitialization(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowInitialization oShape=" & oShape.id)
+on error resume next
+ oShape.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveRegulatoryControlShowInitialization")
+end sub
+
+sub GSH_ValveRegulatoryControlShowWindLow(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowWindLow oShape=" & oShape.id)
+on error resume next
+ oShape.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpLow").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveRegulatoryControlShowWindLow")
+end sub
+
+sub GSH_ValveRegulatoryControlShowWindHigh(oShape)
+'gsh_log_s("GSH_ValveRegulatoryControlShowWindHigh oShape=" & oShape.id)
+on error resume next
+ oShape.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpHigh").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_ValveRegulatoryControlShowWindHigh")
+end sub
+
+sub GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,ShowBottomFlowdicator)
+'gsh_log_s("GSH_ValveRegulatoryControlShowBottomFlowIndicator oShape="&oShape.id&" "& CSTR(ShowBottomFlowdicator))
+on error resume next
+ if (ShowBottomFlowdicator) then
+ oShape.Objects("ind_OPBottom").style.visibility = GSH_VISIBLE
+ oShape.Objects("rec_MidLineBottom").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_OPValue").style.visibility = GSH_HIDDEN
+ else
+ oShape.Objects("ind_OPBottom").style.visibility = GSH_HIDDEN
+ oShape.Objects("rec_MidLineBottom").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_OPValue").style.visibility = GSH_VISIBLE
+ end if
+'gsh_log_e("GSH_ValveRegulatoryControlShowBottomFlowIndicator")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GETOPERATORTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified Demand\Trend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETOPERATORTREND(strApp, strSection,strKey,defaultString)
+'gsh_log_s("GSH_GETOPERATORTREND strApp=" & strApp & "strSection=" & strSection & ",strKey=" & strKey & ",defaultString=" & defaultString )
+on error resume next
+ dim strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_OPERATORTREND & strApp & "\"& strSection & "\"& strKey
+ tempReturn = GSH_READREGISTRY(strRegLocation,defaultString)
+ GSH_GETOPERATORTREND = tempReturn
+'gsh_log_e("GSH_GETOPERATORTREND returning " & tempReturn)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETOPERATORTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified DetailTrend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETOPERATORTREND(strApp,strSection,strKey,strValue)
+'gsh_log_s("GSH_SETOPERATORTREND strApp=" & strApp & "strSection=" & strSection & ",strKey=" & strKey & ",strValue=" & strValue )
+on error resume next
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_OPERATORTREND & strApp & "\"& strSection & "\"& strKey
+ 'gsh_log("GSH_SETOPERATORTREND checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_SETOPERATORTREND")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GETDETAILTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified DetailTrend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETDETAILTREND(strSection,strKey,defaultString)
+'gsh_log_s("GSH_GETDETAILTREND " & "strSection=" & strSection & ",strKey=" & strKey & ",defaultString=" & defaultString )
+on error resume next
+ dim strRegLocation, tempReturn
+ strRegLocation = GSH_REGISTRY_DETAILTREND & strSection & "\"& strKey
+ tempReturn = GSH_READREGISTRY(strRegLocation,defaultString)
+ GSH_GETDETAILTREND = tempReturn
+'gsh_log_e("GSH_GETDETAILTREND returning & " & tempReturn)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETDETAILTREND'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sSection - registry section
+' sKey - registry subkey
+' sDefaultString - Default string if error of nothing found
+'Returns:
+' String, value of specified DetailTrend subkey
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETDETAILTREND(strSection,strKey,strValue)
+'gsh_log_s("GSH_SETDETAILTREND " & "strSection=" & strSection & ",strKey=" & strKey & ",strValue=" & strValue )
+on error resume next
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_DETAILTREND & strSection & "\"& strKey
+ 'gsh_log("GSH_SETDETAILTREND checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_SETDETAILTREND")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_DetailTrendInitialize'''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' sTagName - Tag name to initialize the detail trend with
+' 06/01/07 Added HDA, OPC1 and OPC2 pathprefixes because the Historian
+' tagname is different from the tagname and there may be a funnel OPC interface
+'06/01/07 parse out the function block for storing the itemAlias
+'10/06/2008 (CL) Add writing value of tag euhigh and eulow to trend range high and trend range low to allow the trend use
+' the range from registry when the range is not available from the historian
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_FP_DetailTrendInitialize(sTagName)
+'Run on page load event for faceplate.
+'On Error GoTo errorhandler
+on error resume next
+
+'gsh_log_s("GSH_FP_DetailTrendInitialize sTagName = " &sTagName)
+
+Dim arYMax(4), arYMin(4), asAutoScale(4), asTrendParams(4), asActive(4), asTrendParamShort(4), asPVeuhigh(4), asPVeulow(4)
+Dim asTraceNames(4), asTraceActive(4), asTraceParams(4), asStepped(4), asPVFormat(4)
+Dim sPathPrefix, nTrendingParams, nCount, nNumTrends, nIndex, sPVFormat, sItemAlias, sPVeuhigh, sPVeulow
+Dim istrLen, iPosition
+
+ nIndex = 0
+ nNumTrends = 4
+ nTrendingParams = GSH_READTAGINFORMATIONKEYVALUE(sTagName, "NoOfTrendingParams", 0)
+ sPVFormat = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT)
+ sPathPrefix = GSH_GETDEMANDTREND (GSH_REGISTRY_SETTINGS,GSH_REGKEY_PATHPREFIX, "")
+ sItemAlias = sTagName
+
+ '10/06/2008 CL
+ sPVeuhigh = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_EUHIGH, 0)
+ sPVeulow = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_EULOW, 0)
+
+ If nTrendingParams > 0 Then
+ sItemAlias = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TAGNAME_ALIAS, sTagName)
+ For nCount = 1 To nTrendingParams
+ asTrendParams(nCount) = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TRENDPARAM & nCount, "")
+ istrLen = len(asTrendParams(nCount))
+ iPosition= Instr(1, asTrendParams(nCount) , ".",vbtextcompare)
+ asTrendParamShort(nCount) = right(asTrendParams(nCount), istrLen - iPosition)
+ asStepped(nCount) = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TRENDSTEPPED & nCount, "OFF")
+' Select Case asTrendParams(nCount)
+ Select Case asTrendParamShort(nCount)
+ Case "PV"
+ asAutoScale(nCount) = "ON"
+ asPVFormat(nCount) = sPVFormat
+
+ asPVeuhigh(nCount) = sPVeuhigh
+ asPVeulow(nCount) = sPVeulow
+
+ Case "SP"
+ asAutoScale(nCount) = "ON"
+ asPVFormat(nCount) = sPVFormat
+ asPVeuhigh(nCount) = sPVeuhigh
+ asPVeulow(nCount) = sPVeulow
+
+ Case "OP"
+ asAutoScale(nCount) = "OFF"
+ asPVFormat(nCount) = "D1"
+ arYMax(nCount) = 106.9
+ arYMin(nCount) = -6.9
+ asPVeuhigh(nCount) = 106.9
+ asPVeulow(nCount) = -6.9
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX,arYMax(nCount))
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN,arYMin(nCount))
+ Case "MODE"
+ asAutoScale(nCount) = "ON"
+ asPVeuhigh(nCount) = 100
+ asPVeulow(nCount) = 0
+ Case Else
+ asAutoScale(nCount) = "ON"
+ End Select
+ Next
+ End If
+
+ For nCount = 1 To nNumTrends
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, "OFF"
+ Next
+
+ For nCount = 1 To nTrendingParams
+ ' asTraceParams(nCount) = sTagName & "." & asTrendParams(nCount)
+ asTraceActive(nCount) = "ON"
+ Next
+
+ Dim sOPC1_PathPrefix,sOPC2_PathPrefix, sTagNameHDA
+ sOPC1_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY1PREFIX,"")
+ sOPC2_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY2PREFIX,"")
+ bUseShortNameForHDA = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_USESHORTNAME_FOR_HDAPATH,"")
+
+ For nCount = 1 To nTrendingParams
+ sTagNameHDA = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TAGNAMEHDA, sTagName)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, sItemAlias & "." & asTrendParamShort(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, sOPC1_PathPrefix & sTagName& "." & asTrendParams(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, sOPC2_PathPrefix & sTagName& "." & asTrendParams(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, asTraceActive(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, asAutoScale(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(nCount)
+
+ 'Added 10/06/2008 (CL) add to allows trend to use range from registry if they are not available from historian
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH, asPVeuhigh(nCount)
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW, asPVeulow(nCount)
+
+ 'Added 09/07/2008 (JE) to work with Sasol PHD historian interface
+ 'Issue#21: http://wss-edm-1/clients/hcs/services/ISE-HCS8227/ClientProjectAccess/Lists/Issue%20Tracker/DispForm.aspx?ID=21
+ If(UCASE(bUseShortNameForHDA) = "ON") then
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParamShort(nCount)
+ Else
+ GSH_SETDETAILTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParams(nCount)
+ End If
+ Next
+
+'gsh_log_e("GSH_FP_DetailTrendInitialize")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DETAILTRENDPERIODICUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Function: Reset the Trend Scales for outputs & setpoints
+'Returns:
+' sTagName - Tag name on which to update the detail trend info
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DETAILTRENDPERIODICUPDATE(sTagName)
+'gsh_log_s ("GSH_DETAILTRENDPERIODICUPDATE sTagName =" & sTagName )
+
+if (strcomp(sTagName,"",vbtextcompare)<> 0) then
+ Dim arYMax(4)
+ Dim arYMin(4)
+ Dim nTrendingParams
+
+ nTrendingParams = GSH_READTAGINFORMATIONKEYVALUE(sTagName, "NoOfTrendingParams", 0)
+ If nTrendingParams > 2 Then
+ arYMax(2) = GSH_GETDETAILTREND(GSH_REGKEY_TRENDTRACE & "2",GSH_REGKEY_TREND_YMAX,"100")
+ arYMin(2) = GSH_GETDETAILTREND(GSH_REGKEY_TRENDTRACE & "2",GSH_REGKEY_TREND_YMIN,"0")
+
+ arYMax(1) = arYMax(2)
+ arYMin(1) = arYMin(2)
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & "1",GSH_REGKEY_AUTOSCALE,"OFF")
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & "1",GSH_REGKEY_TREND_YMAX,arYMax(1))
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & "1",GSH_REGKEY_TREND_YMIN,arYMin(1))
+
+ arYMax(3) = 106.9
+ arYMin(3) = -6.9
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & "3",GSH_REGKEY_AUTOSCALE,"OFF")
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & "3",GSH_REGKEY_TREND_YMAX,arYMax(3))
+ call GSH_SETDETAILTREND(GSH_REGKEY_TRENDTRACE & "3",GSH_REGKEY_TREND_YMIN,arYMin(3))
+ End If
+end if
+'gsh_log_e ("GSH_DETAILTRENDPERIODICUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'DIGITALMULTIPLE SHAPE SPECIFIC CODE
+' 09/19/2007 - Add alarm checking (ref issue# 859) (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_DIGITALMULTIPLE_SETLABEL (oShape)
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_SETLABEL oShape="&oShape.id)
+
+ dim results(1)
+ dim bOffNormal, bInAlarm
+ dim alarmCode
+ bOffNormal = false
+ bInAlarm = false
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_RES),"",vbtextcompare)<>0 then
+
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_RES)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_RES, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "RES"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_MOS),"",vbtextcompare)<>0 then
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_MOS)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_MOS, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "MOS"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_SOR),"",vbtextcompare)<>0 then
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_SOR)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_SOR, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "SOR"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_HHFF),"",vbtextcompare)<>0 then
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_HHFF)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_HHFF, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "FFH"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_LLFF),"",vbtextcompare)<>0 then
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_LLFF)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_LLFF, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "FFL"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_HHTRIP),"",vbtextcompare)<>0 then
+ dim sCPLabel, sCPChar
+ sCPLabel = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sCPChar = left(sCPLabel,1)
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_HHTRIP)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_HHTRIP, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = sCPChar & "H"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_LLTRIP),"",vbtextcompare)<>0 then
+ dim sCPLabel2, sCPChar2
+ sCPLabel2 = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sCPChar2 = left(sCPLabel2,1)
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_LLTRIP)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_LLTRIP, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = sCPChar2 & "L"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_DEVIATION),"",vbtextcompare)<>0 then
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_DEVIATION)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_DEVIATION, GSH_PROCESSVALUE)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "DEV"
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ results(0) = 0
+ results(1) = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ GSH_SCADA_DIGITALMULTIPLE_SETLABEL = results
+
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_SETLABEL results(0) ="&results(0) &"bOffNormal = " &bOffNormal &"bInAlarm = " &bInAlarm)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_DIGITALMULTIPLE_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+' 06/01/07 Remove offnormal check for the Entity point because it can be Analog or Digital
+' 09/01/07 Add check so that when shape is in alarm, it does not show offnormal
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_DIGITALMULTIPLE_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ dim counter, inresults, alarmStatus
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ inresults = GSH_SCADA_DIGITALMULTIPLE_SETLABEL(oShape)
+ oShape.objects("txt_PVvalue").value = inresults(1) 'Determine label text
+ 'Alarming: Don't check alarm disabled for this alarm group (OK'd by Jamie)
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITY_ALARMGROUP)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITY_ALARMGROUP)
+
+' gsh_log ("sAlarmPriority = " & sAlarmPriority & "bUnack = " & bUnack )
+
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_DIGITALMULTIPLESETFOCUS(oShape)
+
+ 'check for offnormal
+ dim sCPLabel,sPVStateTxt
+ sCPLabel = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_PROCESSVALUE,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ 'Add check so that when shape is in alarm, it does not show offnormal
+ if (inresults(0) = 1 and sAlarmPriority=0) then 'strcomp(oShape.objects("txt_PVvalue").value, sCPLabel, vbtextcompare) <> 0 then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_SCADA_DIGITALMULTIPLE_ONUPDATE")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+' 12/18/2007: Add this function to handle P6A Digital Multiple shape (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ dim counter, alarmStatus
+ dim inresults
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ inresults = GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL(oShape)
+
+ oShape.objects("txt_PVvalue").value = inresults(1) 'Determine label text
+ 'Alarming: Don't check alarm disabled for this alarm group (OK'd by Jamie)
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITY_ALARMGROUP)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITY_ALARMGROUP)
+
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+
+ call GSH_DIGITALMULTIPLESETFOCUS(oShape)
+
+ 'check for offnormal
+ dim sCPLabel,sPVStateTxt
+ sCPLabel = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_PROCESSVALUE,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ 'Add check so that when shape is in alarm, it does not show offnormal
+ if (inresults(0) = 1 and sAlarmPriority=0) then 'strcomp(oShape.objects("txt_PVvalue").value, sCPLabel, vbtextcompare) <> 0 then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+' gsh_log "Focus None, Offnormal"
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+' gsh_log "Focus, Offnormal"
+ end if
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_ONUPDATE")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL
+' 12/18/2007: Add this function to handle P6A Digital Multiple shape (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL (oShape)
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL oShape="&oShape.id)
+
+ dim results(1)
+ dim bOffNormal, bInAlarm
+ dim alarmCode
+ bOffNormal = false
+ bInAlarm = false
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_RES),"",vbtextcompare)<>0 then
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_RES)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_RES,GSH_CPPARAM_RES_PARA)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_RES, GSH_CPPARAM_RES_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "RES"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_MOS),"",vbtextcompare)<>0 then
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_MOS)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_MOS,GSH_CPPARAM_MOS_PARA)
+
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_MOS, GSH_CPPARAM_MOS_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "MOS"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL MOS results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_SOR),"",vbtextcompare)<>0 then
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_SOR)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_SOR,GSH_CPPARAM_SOR_PARA)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_SOR, GSH_CPPARAM_SOR_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "SOR"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL SOR results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_HHHTRIP),"",vbtextcompare)<>0 then
+ dim sCPLabelHHH, sCPCharHHH
+ sCPLabelHHH = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sCPCharHHH = left(sCPLabelHHH,1)
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_HHFF)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_HHHTRIP,GSH_CPPARAM_HHHTRIP_PARA)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_HHFF, GSH_CPPARAM_HHFF_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = sCPCharHHH & "HH"
+' results(1) = "FHH"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL HHH_Trip results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_LLLTRIP),"",vbtextcompare)<>0 then
+ dim sCPLabelLLL, sCPCharLLL
+ sCPLabelLLL = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sCPCharLLL = left(sCPLabel,1)
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_LLFF)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_LLLTRIP,GSH_CPPARAM_LLLTRIP_PARA)
+
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_LLFF, GSH_CPPARAM_LLFF_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = sCPCharLLL & "LL"
+' results(1) = "FLL"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL LLL_Trip results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_HHTRIP),"",vbtextcompare)<>0 then
+ dim sCPLabel, sCPChar
+ sCPLabel = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sCPChar = left(sCPLabel,1)
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_HHTRIP)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_HHTRIP,GSH_CPPARAM_HHTRIP_PARA)
+
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_HHTRIP, GSH_CPPARAM_HHTRIP_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = sCPChar & "H"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL HHTrip results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_LLTRIP),"",vbtextcompare)<>0 then
+ dim sCPLabel2, sCPChar2
+ sCPLabel2 = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ sCPChar2 = left(sCPLabel2,1)
+
+' bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_LLTRIP)
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oShape.objects("rec_dataScript"),GSH_CPENTITY_LLTRIP,GSH_CPPARAM_LLTRIP_PARA)
+
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_LLTRIP, GSH_CPPARAM_LLTRIP_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = sCPChar2 & "L"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL LLTrip results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ if strcomp(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_DEVIATION),"",vbtextcompare)<>0 then
+
+ bOffNormal = GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oShape.objects("rec_datascript"),GSH_CPENTITY_DEVIATION)
+ alarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_datascript"),GSH_CPENTITY_DEVIATION, GSH_CPPARAM_DEVIATION_PARA)
+
+ if strcomp(alarmCode,GSH_NOALARMCODE,vbtextcompare)<>0 then
+ bInAlarm = true
+ end if
+
+ if (bOffNormal or bInAlarm) then
+ results(0) = 1
+ results(1) = "DEV"
+' gsh_log("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL DEV results(0) ="&results(0) &" results(1) = " &results(1) &" bOffNormal = " &bOffNormal &" bInAlarm = " &bInAlarm)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+ exit function
+ end if
+ end if
+
+ results(0) = 0
+ results(1) = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL = results
+
+'gsh_log_e("GSH_SCADA_DIGITALMULTIPLE_VARIABLEINPUT_SETLABEL results(0) ="&results(0) &"bOffNormal = " &bOffNormal &"bInAlarm = " &bInAlarm)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALMULTIPLESETFOCUS'''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = calling shape.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALMULTIPLESETFOCUS(oShape)
+'gsh_log_s("GSH_DIGITALMULTIPLESETFOCUS oShape=" & oShape.id)
+on error resume next
+ call GSH_SHOWSUBSHAPE(oShape.objects("focus"))
+ Dim shapeTag, shapeFocusStyle
+ shapeTag = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPENTITY, GSH_CPPOINT)
+ If GSH_DOESSHAPEREQUIRESPRINCIPLEFOCUS(shapeTag) then
+ shapeFocusStyle = GSH_CSSFOCUSPRINCIPAL
+ 'gsh_log "Pfocus"
+ else if GSH_DOESSHAPEREQUIRESASSOCIATEDFOCUS(shapeTag) then
+ shapeFocusStyle = GSH_CSSFOCUSASSOCIATED
+ 'gsh_log "Afocus"
+ else
+ shapeFocusStyle = GSH_CSSFOCUSNONE
+ 'GSH_LOG "Nofocus"
+ end if: end if
+ oShape.objects("focus").styleClass = shapeFocusStyle
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show DIGITAL value and outline
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ end if
+'gsh_log_e("GSH_DIGITALMULTIPLESETFOCUS")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL'''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL(oDataBoundObject, sPointName)
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL ODataBoundObject = "& ODataBoundObject.ID & ",sPointName = " & sPointName)
+on error resume next
+ Dim tempReturn,sTagname, sPVStateText, sPVNormalState
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(ODataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ tempReturn = false
+ nPVNumValue = ODataBoundObject.DataValue(sPointName &"."&GSH_PROCESSVALUE)
+ sPVStateText = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "StateTxt("&nPVNumValue&")", GSH_STATETXT_DOESNOTEXIST_LBL)
+' if strcomp(sTagname, GSH_NONE, vbtextcompare) <> 0 then 'if the shape point name is "NONE" (already checking this before calling this fnc)
+ sPVNormalState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_PV_NORMAL_STATE, GSH_NONE)
+ if (strComp(sPVNormalState,GSH_NONE,vbTextCompare) <> 0) then 'if Registry PVNormalState is NOT None
+ if (strComp(sPVStateText,sPVNormalState,vbTextCompare) <> 0) then
+ tempReturn = true
+ end if
+ end if
+' end if
+GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL = tempReturn
+'gsh_log_e("GSH_SCADA_DIGITALMULTIPLE_POINT_IS_OFFNORMAL returning >>>" & tempReturn & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL'''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL(oDataBoundObject, sPointName, sPointNamePara)
+'gsh_log_s("GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL ODataBoundObject = "& ODataBoundObject.ID & ",sPointName = " & sPointName)
+on error resume next
+ Dim tempReturn,sTagname, sPVStateText, sPVNormalState
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(ODataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ tempReturn = false
+ nPVNumValue = ODataBoundObject.DataValue(sPointName &"."&GSH_PROCESSVALUE)
+ nPVNumValue = ODataBoundObject.DataValue(sPointName &"."&sPointNamePara)
+ sPVStateText = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "StateTxt("&nPVNumValue&")", GSH_STATETXT_DOESNOTEXIST_LBL)
+ if strcomp(sTagname, GSH_NONE, vbtextcompare) <> 0 then 'if the shape point name is "NONE" (already checking this before calling this fnc)
+ sPVNormalState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_PV_NORMAL_STATE, GSH_NONE)
+ if (strComp(sPVNormalState,GSH_NONE,vbTextCompare) <> 0) then 'if Registry PVNormalState is NOT None
+ if (strComp(sPVStateText,sPVNormalState,vbTextCompare) <> 0) then
+ tempReturn = true
+ end if
+ end if
+ end if
+GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL = tempReturn
+'gsh_log_e("GSH_SCADA_DIGITALMULTIPLE_POINT_VARIN_IS_OFFNORMAL returning >>>" & tempReturn & "<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'SCADA_ANALOGTRIP SHAPE SPECIFIC CODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_ANALOGTRIP_INIT(oShape)
+ dim sTagName, sEntityName, sDataValue
+ sTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ oShape.objects("txtTagNameAlias").value = GSH_READTAGINFORMATIONKEYVALUE(sTagName, GSH_REGKEY_TAGNAME_ALIAS, sTagName)
+ oShape.objects("txtTagDescription").value = GSH_READTAGINFORMATIONKEYVALUE(sTagName, GSH_REGKEY_TAGDESCRIPTION, sTagName)
+ sEntityName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_LOWTRIP)
+ if strcomp (sEntityName, "", vbtextcompare) = 0 then
+ oShape.objects("txt_PVLowTripValue").value = " "
+ else
+ oShape.objects("txt_PVLowTripValue").value = GSH_FormatPVTextTag(sTagName,oShape.objects("rec_DataStatic").DataValue(GSH_CPENTITY_LOWTRIP & "." & GSH_CPPARAM_LOWTRIP))
+ end if
+ sEntityName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY_HIGHTRIP)
+ if strcomp (sEntityName, "", vbtextcompare) = 0 then
+ oShape.objects("txt_PVHighTripValue").value = " "
+ else
+ oShape.objects("txt_PVHighTripValue").value = GSH_FormatPVTextTag(sTagName,oShape.objects("rec_DataStatic").DataValue(GSH_CPENTITY_HIGHTRIP & "." & GSH_CPPARAM_HIGHTRIP))
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITE_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' Jun 13, 2007, Added by CL to handle Scada_MF_DigitalComposite shape
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem
+' that the combox or alp entry was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+sub GSH_GROUPDIGITALCOMPOSITE_SCADA_ONUPDATE(oShape, flag)
+on error resume next
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITE_SCADA_ONUPDATE shapeID = "& oShape.id)
+ If flag <= 1 then
+
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ if GSH_SCADA_ISALARMINGDISABLED(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"), GSH_CPENTITY),oShape)
+ End If
+
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ 'PV Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"), true, false, false) Then
+ call GSH_GROUPDIGITALCOMPOSITESHOWBADPV(oShape)
+ else
+ oShape.objects("txt_DigitalValue").value = sPVStateTxt
+ End If
+
+ 'Set the focus
+ 'call GSH_GROUPDIGITALCOMPOSITESETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+
+ If flag = 0 then
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'Display OP Value
+ dim sOPStateTxt
+
+ sOPStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPValue").value = sOPStateTxt
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ End If
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDIGITALCOMPOSITE_SCADA_P6A_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+'12/18/2007: Added to handle SCADA_DC_P6A shape. Works with SCADA_MF_DigitalComposit shape as well (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPDIGITALCOMPOSITE_SCADA_P6A_ONUPDATE(oShape, flag)
+on error resume next
+'gsh_log_s("GSH_GROUPDIGITALCOMPOSITE_SCADA_P6A_ONUPDATE shapeID = "& oShape.id)
+' If flag <= 1 then
+
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+
+ 'Find value of GSH_CPPARAM_PV_IP1
+ dim input1_val, input2_val, expected_input1_val, expected_input2_val, sPVStateTxt
+
+ sPVStateTxt = GSH_NONE
+ input1_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP1))
+ input2_val = Cint(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_IP2))
+
+ expected_input1_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL1))
+ expected_input2_val = Cint(oShape.GetCustomProperty(GSH_CPVALUE,GSH_EXPECTEDVAL2))
+
+ if((input1_val=expected_input1_val) And (input2_val=expected_input2_val)) then
+ sPVStateTxt = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),"BothOn","")
+ elseif ((input1_val=expected_input1_val) And (input2_val<>expected_input2_val)) then
+ sPVStateTxt = GSH_GET_STATE_TEXT_P6A(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), oShape.GetCustomProperty(GSH_CPPARAMETER,GSH_CPPARAM_IP1)&"_"&input1_val)
+ alarmPara=GSH_CPPARAM_IP1
+ elseif ((input1_val<>expected_input1_val) And (input2_val=expected_input2_val)) then
+ sPVStateTxt = GSH_GET_STATE_TEXT_P6A(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), oShape.GetCustomProperty(GSH_CPPARAMETER,GSH_CPPARAM_IP2)&"_"&input2_val)
+ alarmPara=GSH_CPPARAM_IP2
+ else
+ sPVStateTxt = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),"BothOff","")
+ end if
+
+ oShape.objects("txt_DigitalValue").value = sPVStateTxt
+
+ 'Alarming
+ if GSH_SCADA_ISALARMINGDISABLED(oShape.objects("rec_DataScript")) Then
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"), GSH_CPENTITY, alarmPara),oShape)
+ End If
+
+ 'Set the focus
+ 'call GSH_GROUPDIGITALCOMPOSITESETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus - To be checked with Rich if need offnormal checking
+' if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+'
+' oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+' oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+'
+' 'Added new to handle SCADA_DC_P6A shape with separate parameter checking for offnormal.
+'
+' if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+' if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+' oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+' else
+' oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+' end if
+' end if
+' end if
+
+' End If
+
+' If flag = 0 then
+
+ 'Display OP Value
+ dim sOPStateTxt
+
+ 'Do not look into the registry b/c states set in the registry works for Fx_x parameter, not OP states
+ sOPStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP)
+' sOPStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPValue").value = sOPStateTxt
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+' End If
+'gsh_log_e("GSH_GROUPDIGITALCOMPOSITE_SCADA_P6A_ONUPDATE")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GET_STATE_TEXT_P6A
+'
+'
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GET_STATE_TEXT_P6A(sTagname, sParaname)
+'gsh_log_s("GSH_GET_STATE_TEXT_P6A parameter_name = "&sParaname &"sTagname="&sTagname)
+
+ dim sStateTxt
+ sStateTxt = GSH_EMPTYSTRING
+ if strcomp (sParaname, GSH_F1_0, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(0)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F1_1, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(1)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F2_0, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(2)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F2_1, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(3)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F3_0, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(4)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F3_1, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(5)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F4_0, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(6)", GSH_EMPTYSTRING)
+ elseif strcomp (sParaname, GSH_F4_1, vbtextcompare) = 0 then
+ sStateTxt = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT(7)", GSH_EMPTYSTRING)
+ end if
+
+
+ GSH_GET_STATE_TEXT_P6A = sStateTxt
+'gsh_log_e("GSH_GET_STATE_TEXT_P6A sStateTxt="&sStateTxt)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPDO_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' Jun 13, 2007, Added by CL to handle Scada_MF_DigitalComposite shape
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem
+' that the combox or alp entry was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+sub GSH_GROUPDO_SCADA_ONUPDATE(oShape, flag)
+on error resume next
+'gsh_log_s("GSH_GROUPDO_SCADA_ONUPDATE shapeID = "& oShape.id)
+ If flag <= 1 then
+
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Set the focus
+ 'call GSH_GROUPDIGITALCOMPOSITESETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+
+ If flag = 0 then
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'Display OP Value
+ dim sOPStateTxt
+
+ sOPStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPValue").value = sOPStateTxt
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOGINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_ANALOGINDICATOR_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_C200_ANALOGINDICATOR_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+If flag = 0 then
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+
+If flag <=1 then
+ 'Set the focus
+ 'call GSH_ANALOGINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+
+If flag = 0 then
+ 'Bad Data Check
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+ End If
+End If
+'GSH_LOG_E ("GSH_C200_ANALOGINDICATOR_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_NUMERICINDICATOR_ALARMS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+' Author: Didi Ekaette August 2, 2007
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_NUMERICINDICATOR_ALARMS_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_C200_NUMERICINDICATOR_ALARMS_ONUPDATE oShape" & oShape.id)
+on error resume next
+If flag = 0 then
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+End If
+
+If flag <=1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Remove Check for Off Normal
+End If
+
+
+If flag = 0 then
+ 'Bad Data Check
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+ End If
+End If
+'GSH_LOG_E ("GSH_C200_NUMERICINDICATOR_ALARMS_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOGOUTPUTINDICATORALARMS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+'Author: Didi Ekaette July 30,2007
+'Jan102008: Remove offnormal checking (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_ANALOGOUTPUTINDICATORALARMS_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_C200_ANALOGOUTPUTINDICATORALARMS_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+If flag <= 1 then
+
+ call GSH_SHOWNOALARM(oShape)
+ 'call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+' gsh_log("C200_AO alarm code = " &GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")))
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+End If
+
+If flag = 0 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+End If
+
+'GSH_LOG_E ("GSH_C200_ANALOGOUTPUTINDICATORALARMS_ONUPDATE")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+'Author: Didi Ekaette July 30,2007
+'Jan102008: Renamed from GSH_C200_ANALOGOUTPUTINDICATORALARMS_ONUPDATE (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_C200_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+If flag <= 1 then
+
+ call GSH_SHOWNOALARM(oShape)
+ call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGINDICATORDISABLEDALARM
+ else
+' gsh_log("C200_AO alarm code = " &GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")))
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_ANALOG_MODE_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+If flag = 0 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+End If
+
+'GSH_LOG_E ("GSH_C200_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_REGCTLINDICATOR_ONUPDATE'''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_REGCTLINDICATOR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_REGCTLINDICATOR_ONUPDATE oShape=" & oShape.id)
+
+On Error Resume Next
+
+' gsh_log("Flag = " &flag &"Alarm Code = " &GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+
+' gsh_log("Alarm Code GEN function = " &GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_PROCESSVALUE))
+ If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+
+ call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Check the points alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+
+ 'This might give out highest alarm (including returning alarm)
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+
+ 'Check Focus
+ call GSH_SETREGULATORYCONTROLINDICATORFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+
+ 'PV Data Check
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Set Mode
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+
+ 'Check the point ramping
+ Select Case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end Select
+ 'Check the point Windup
+ dim sWindupStatus
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+
+ End If
+'gsh_log_e("GSH_C200_REGCTLINDICATOR_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_AUTOMAN_ONUPDATE'''''''''''''''''''''''''
+'Parameters: oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+' 06/12/07 Removed initman check because it is redundant to Windup = HILO
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_AUTOMAN_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_AUTOMAN_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+ 'Check the points alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+If flag <= 1 then
+ 'call GSH_SETREGULATORYCONTROLINDICATORFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS (oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+If flag = 0 then
+ oShape.objects("txt_OPValue").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+End If
+'gsh_log_e("GSH_C200_AUTOMAN_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'TODO: hardcoded to fix.
+'Function: Get Highest Alarm Priority Parameter'''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = data bound object within an HCS shape
+' paraName - Script Data parameter Name
+'Returns: Alarm Code = GSH_ACKLOW, GSH_ACKHIGH, GSH_ACKEMERG,
+' GSH_UNACKLOW, GSH_UNACKHIGH, GSH_UNACKEMERG, GSH_NOALARMCODE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_GETHIGHESTALARMPRIORITYPROPERTY(oAlarmWordBoundObject)
+''gsh_log_s("GSH_GETHIGHESTALARMPRIORITYPROPERTY oAlarmWordBoundObject=" & oAlarmWordBoundObject.id)
+on error resume next
+dim alarmword, alarmunack
+' gsh_log ("oAlarmWordBoundObject.alarm = " &oAlarmWordBoundObject.alarm)
+ alarmword = (oAlarmWordBoundObject.alarm) and 1023
+ alarmunack = (oAlarmWordBoundObject.alarm) and 2048
+' gsh_log "alarmword = " & hex(alarmword) & ", alarmunack = " & hex(alarmunack) '&h30, &h20, &h10
+
+ Dim iAlarmCode, iAlarmSeverity, iUnackAlarmExists
+ '0 = no, 1 = low, 2= high, 3= urgent
+ iAlarmSeverity = (alarmword/16)
+ if alarmunack = 2048 then
+ iUnackAlarmExists = 0
+ else
+ iUnackAlarmExists = 1
+ end if
+ iAlarmCode = GSH_NOALARMCODE
+
+ select case(2*iAlarmSeverity+iUnackAlarmExists)
+ case 0
+ iAlarmCode = GSH_NOALARMCODE
+ case 1
+ iAlarmCode = GSH_NOALARMCODE
+ case 2
+ iAlarmCode = GSH_ACKLOW
+ case 3
+ iAlarmCode = GSH_UNACKLOW
+ case 4
+ iAlarmCode = GSH_ACKHIGH
+ case 5
+ iAlarmCode = GSH_UNACKHIGH
+ case 6
+ iAlarmCode = GSH_ACKEMERG
+ case 7
+ iAlarmCode = GSH_UNACKEMERG
+ case else
+' gsh_log "GSH_GETHIGHESTALARMPRIORITYPROPERTY error Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & iUnackAlarmExists
+ end select
+ 'return alarm code
+ GSH_GETHIGHESTALARMPRIORITYPROPERTY = iAlarmCode
+'gsh_log "GSH_GETHIGHESTALARMPRIORITYPROPERTY info Alarm Severity = " & iAlarmSeverity & ", Unacknowledged Alarm = " & iUnackAlarmExists
+'gsh_log_e("GSH_GETHIGHESTALARMPRIORITYPROPERTY returing " & iAlarmCode)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 Add GSH_GETHIGHESTALARMPRIORITYPROPERTY to the onupdate and
+' added two new script data references: TOTALALARMS and unackalarmexists as well as
+' a ConAlpAlarmValue object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_DIGITALINDICATOR_ONUPDATE (oShape, flag) 'This version displays the StateTxt from the Registry
+on error resume next
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+ 'No Bad Data Check
+ oShape.objects("txt_PVvalue").value = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ 'gsh_log "GSH_C200_DIGITALINDICATOR_ONUPDATE alarmpriority"&GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY)
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_DIGITALINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, oShape.objects("txt_PVvalue").value) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALOUTPUTINDICATORALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 Add GSH_GETHIGHESTALARMPRIORITYPROPERTY to the onupdate and
+' added two new script data references: TOTALALARMS and unackalarmexists as well as
+' a ConAlpAlarmValue object
+'Author: Didi Ekaette July 31, 2007
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_DIGITALOUTPUTINDICATORALARMS_ONUPDATE (oShape, flag) 'This version displays the StateTxt from the Registry
+on error resume next
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ 'call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")),oShape)
+ End If
+ 'No Bad Data Check
+ 'oShape.objects("txt_PVvalue").value = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPvalue").value = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+
+ 'gsh_log "GSH_C200_DIGITALINDICATOR_ONUPDATE alarmpriority"&GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY)
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_DIGITALINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_OP_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, oShape.objects("txt_OPvalue").value) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+end sub
+
+'GSH_DIGITAL_GETSTATE is replaced by GSH_SCADA_DIGITAL_GETSTATE and GSH_C200_DIGITAL_GETSTATE on May 4, 2007 --- Why???? The two functions are the same
+
+
+'These 3 functions below will be replaced by GSH_DIGITAL_GETSTATE when refactoring
+function GSH_SCADA_DIGITAL_GETSTATE (sTagname, sPointName, sParameterName, oDataBoundSDObj)
+'gsh_log_s "GSH_SCADA_DIGITAL_GETSTATE <<<<<<<<< sTagname="&sTagname&", sPointName="&sPointName&", sParameterName="&sParameterName&",oDataBoundSDObj ="&oDataBoundSDObj.id
+dim nParameterNumericValue, sStateText
+ nParameterNumericValue = oDataBoundSDObj.DataValue(sPointName&"."&sParameterName)
+ sStateText = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT("&nParameterNumericValue&")", GSH_NONE)
+ GSH_SCADA_DIGITAL_GETSTATE = sStateText
+'gsh_log_e "GSH_SCADA_DIGITAL_GETSTATE returns >>>>>>>>" &sStateText
+end function
+
+function GSH_C200_DIGITAL_GETSTATE (sTagname, sPointName, sParameterName, oDataBoundSDObj)
+'gsh_log_s "GSH_C200_DIGITAL_GETSTATE <<<<<<<<< sTagname="&sTagname&", sPointName="&sPointName&", sParameterName="&sParameterName&",oDataBoundSDObj ="&oDataBoundSDObj.id
+dim nParameterNumericValue, sStateText
+ nParameterNumericValue = oDataBoundSDObj.DataValue(sPointName&"."&sParameterName)
+'gsh_log "GSH_C200_DIGITAL_GETSTATE nParameterNumericValue = " & nParameterNumericValue
+ sStateText = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT("&nParameterNumericValue&")", GSH_NONE)
+ GSH_C200_DIGITAL_GETSTATE = sStateText
+'gsh_log_e "GSH_C200_DIGITAL_GETSTATE returns >>>>>>>>" &sStateText
+end function
+
+function GSH_FP_C200_DIGITAL_GETSTATE (sTagname, sPointName, sParameterName, oDataBoundSDObj, sFuncBlock)
+'gsh_log_s "GSH_FP_C200_DIGITAL_GETSTATE <<<<<<<<< sTagname="&sTagname&", sPointName="&sPointName&", sParameterName="&sParameterName&",oDataBoundSDObj ="&oDataBoundSDObj.id
+dim nParameterNumericValue, sStateText
+ nParameterNumericValue = oDataBoundSDObj.DataValue(sPointName&"."&sParameterName)
+ sStateText = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT("&nParameterNumericValue&")", GSH_NONE)
+ GSH_FP_C200_DIGITAL_GETSTATE = sStateText
+'gsh_log_e "GSH_FP_C200_DIGITAL_GETSTATE returns >>>>>>>>" &sStateText
+end function
+
+function GSH_TPS_DIGITAL_GETSTATE (sTagname, sPointName, sParameterName, oDataBoundSDObj)
+'gsh_log_s "GSH_TPS_DIGITAL_GETSTATE <<<<<<<<< sTagname="&sTagname&", sPointName="&sPointName&", sParameterName="&sParameterName&",oDataBoundSDObj ="&oDataBoundSDObj.id
+dim sParameterTextValue
+ sParameterTextValue = oDataBoundSDObj.DataValue(sPointName&"."&sParameterName)
+' sStateText = GSH_READTAGINFORMATIONKEYVALUE(sTagname, "STATETXT("&nParameterNumericValue&")", "MOVING")
+ GSH_TPS_DIGITAL_GETSTATE = sParameterTextValue
+'gsh_log_e "GSH_TPS_DIGITAL_GETSTATE returns >>>>>>>>" &sStateText
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALINDICATOR_NOFORMAT_ONUPDATE''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_DIGITALINDICATOR_NOFORMAT_ONUPDATE (oShape)
+on error resume next
+call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+
+'Alarming
+if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+End If
+
+'Set the focus
+call GSH_DIGITALINDICATORSETFOCUS(oShape)
+
+'Check for Off Normal if not in focus
+if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+end if
+
+'No Bad Data Check
+ oShape.objects("txt_PVvalue").value = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPDIGITALCOMPOSITE_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/14/07 replaced GSH_GETHIGHESTALARMPRIORITYPARAMETER with GSH_GETHIGHESTALARMPRIORITYPROPERTY
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem that the combox was open,
+' but no entry made, then other tag is selected as focus tag.
+' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPDIGITALCOMPOSITE_ONUPDATE(oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ End If
+
+ 'PV Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_GROUPDIGITALCOMPOSITESHOWBADPV(oShape)
+ else
+ oShape.objects("txt_DigitalValue").value = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ End If
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPDIGITALCOMPOSITESETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ 'hide OP combobox if it was opened
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, oShape.objects("txt_DigitalValue").value) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+
+ If flag = 0 then
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'Display OP Value
+' sOPStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP)
+ End If
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPDIGITALCOMPOSITE_SM_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 02/19/08 Created to add in Status Message checking
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPDIGITALCOMPOSITE_SM_ONUPDATE(oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ End If
+
+ 'PV Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_GROUPDIGITALCOMPOSITESHOWBADPV(oShape)
+ else
+ oShape.objects("txt_DigitalValue").value = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ End If
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPDIGITALCOMPOSITESETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ 'hide OP combobox if it was opened
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, oShape.objects("txt_DigitalValue").value) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+
+ If flag = 0 then
+ 'Status message
+ dim val_redTag, val_stsMsg, tagName, stsMsgType
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+
+ if strcomp(val_redTag,GSH_ON,vbtextcompare) = 0 then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ else if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ if val_stsMsg >0 and stsMsgType <> "" then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+ end if
+
+ 'Display OP Value
+ sOPStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP)
+ oShape.objects("txt_OPValue").value = sOPStateTxt
+ 'oShape.objects("txt_OPValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP)
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_SELXDESC_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 04Mar2008 Created shape for Winz
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_SELXDESC_ONUPDATE (oShape, flag) 'This version displays the SELXDESC parameter
+on error resume next
+ If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY), oShape)
+ End If
+ 'No Bad Data Check
+ oShape.objects("txt_PVvalue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_SELXDESC")
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MULTIFPREGCTLSPLIT_ONUPDATE'''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'06/05/07 Added flag parameter to execute only focus status update or all
+'06/06/07 Optimize code, use ShowWindupStatus; modified RedTag code.
+' removed initman check code because it's a duplicate of Windup = HILO
+' 06/14/07 use GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL to check offnormal
+' no longer checking PVSOURCE because there is no PV.
+' 06/14/07 Changed shape design and function. Therefore removed RedTag,
+' Ramp, SP and PV values, use general alarm function
+' 06/15/07 remove reference to txt_statusmessage
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem that the combox was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_MULTIFPREGCTLSPLIT_ONUPDATE(oShape,flag)
+'gsh_log_s "GSH_C200_MULTIFPREGCTLSPLIT_ONUPDATE oShape="&oShape&", flag="&flag
+on error resume next
+if flag = 0 then
+ GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_Valve1").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_Valve2").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+if flag = 0 then
+ 'Display OP Value
+ oShape.objects("txt_Valve1").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_VLV1),GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("txt_Valve2").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_VLV2),GSH_OUTPUTINDICATORDECIMALS)
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+ 'Initman check was redundant to Windup = HILO, it was removed.
+End If
+'gsh_log_e "GSH_C200_MULTIFPREGCTLSPLIT_ONUPDATE"
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIFPREGCTLGAP_SHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters: ' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIFPREGCTLGAP_SHOWNORMAL(oShape)
+'gsh_log_s("GSH_MULTIFPREGCTLGAP_SHOWNORMAL oShape=" & oShape.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oShape)
+ 'Show values
+ oShape.objects("outline").styleClass = GSH_CSSGROUPREGULATORYCONTROLNORMAL
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oShape)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oShape.objects("txt_tagname").value = tagName
+ oShape.objects("txt_keyword").value = tagKeyword
+'gsh_log_e("GSH_MULTIFPREGCTLGAP_SHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MULTIFPREGCTLGAP_ONUPDATE'''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/05/07 Added flag parameter to execute only focus status update or all
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve
+' problem that the combox or alp entry was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_MULTIFPREGCTLGAP_ONUPDATE(oShape, flag)
+on error resume next
+ if flag = 0 then
+ GSH_MULTIFPREGCTLGAP_SHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_SPHighValue").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_SPLowValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+
+ End If
+ if flag = 0 then
+ 'PV Data Check
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPHIGH)) then
+ 'Display SP High or Low values (if any is configured for the point)
+ oShape.objects("txt_SPHighValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SPHIGH))
+ else
+ call GSH_GROUPREGULATORYCONTROLSHOWBADSPHIGH(oShape)
+ end if
+
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPLOW)) then
+ oShape.objects("txt_SPLowValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SPLOW))
+ else
+ call GSH_GROUPREGULATORYCONTROLSHOWBADSPLOW(oShape)
+ end if
+ End If
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MULTIFPREGCTLGAP_DACA_ONUPDATE'''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'08/31/07 Create function to handle the C200_MF_GAP_DACA shape.
+'09/04/07 Add check for SPLow and SPHigh for NAN value,
+' If it is NAN, show "---".
+' Take out the check for empty SPHI and SP low parameter
+' b/c these causes invalid reference on server (CL)
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem that the alp_text was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_MULTIFPREGCTLGAP_DACA_ONUPDATE(oShape, flag)
+on error resume next
+'gsh_log_s("GSH_C200_MULTIFPREGCTLGAP_DACA_ONUPDATE oShape="&oShape.id)
+ if flag = 0 then
+ GSH_MULTIFPREGCTLGAP_SHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_SPHighValue").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_SPLowValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+ if flag = 0 then
+ 'PV Data Check
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPHIGH)) then
+ 'Display SP High or Low values (if any is configured for the point)
+ oShape.objects("txt_SPHighValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SPHIGH))
+ else
+ call GSH_GROUPREGULATORYCONTROLSHOWBADSPHIGH(oShape)
+ end if
+
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPLOW)) then
+ oShape.objects("txt_SPLowValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SPLOW))
+ else
+ call GSH_GROUPREGULATORYCONTROLSHOWBADSPLOW(oShape)
+ end if
+
+ End If
+'gsh_log_e("GSH_C200_MULTIFPREGCTLGAP_DACA_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIFPHIDEENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIFPHIDEENTRY(ObjID)
+'gsh_log_s("GSH_MULTIFPHIDEENTRY ObjID=" & ObjID.id )
+ window.clearInterval(GSH_GroupTimerId)
+ ObjID.style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_MULTIFPHIDEENTRY")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPMULTIFPSHOWENTRY''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = Shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MULTIFPSHOWENTRY(ObjID)
+'gsh_log_s("GSH_MULTIFPSHOWENTRY ObjID=" & ObjID.id)
+ ObjID.style.visibility = GSH_VISIBLE
+ window.clearInterval(GSH_GroupTimerId)
+ GSH_GroupTimerId = window.setInterval("call GSH_MULTIFPHIDEENTRY(" & ObjID.id & ")", GSH_GroupTimeout * 1000)
+' page.all(ObjID.id).focus
+
+'gsh_log_e("GSH_MULTIFPSHOWENTRY >>>>>>>>>>>"&"call GSH_MULTIFPHIDEENTRY(" & ObjID.id & ")")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'06/05/07 Added flag parameter to execute only focus status update or all
+'04Jan08 Revised normal outline - JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(oShape, flag)
+on error resume next
+if flag = 0 then
+ GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+
+if flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal and hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+if flag = 0 then
+ 'PV Data Check
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Display OP Value
+ 'oShape.objects("txt_OPValue").value = formatNumber(alp_OPValue.value,GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+
+ 'Display SP Value
+ 'oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,alp_SPValue.value)
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if strcomp(val_redTag,GSH_ON,vbtextcompare) = 0 then
+ oShape.objects("txt_statusmessage") = GSH_REDTAG_TEXT
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ end if
+ 'Set Ramping
+ Select case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end select
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPREGULATORYCONTROL_SM_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 02/19/08 Created from GROUPREGULATORYCONTROL for StatusMessage addition
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPREGULATORYCONTROL_SM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_GROUPREGULATORYCONTROL_SM_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+on error resume next
+if flag = 0 then
+ GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+
+if flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal and hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+'if flag = 0 then
+ 'PV Data Check
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Display OP Value
+ 'oShape.objects("txt_OPValue").value = formatNumber(alp_OPValue.value,GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+
+ 'Display SP Value
+ 'oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,alp_SPValue.value)
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'RedTag and Status Message
+ dim val_redTag, val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+
+ if strcomp(val_redTag,GSH_ON,vbtextcompare) = 0 then
+ oShape.objects("txt_statusmessage") = GSH_REDTAG_TEXT
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+' gsh_log "val_redTag = " & val_redTag
+ else if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+' gsh_log "numOfMessage = " & numOfMessage
+
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+
+ 'Set Ramping
+ Select case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end select
+End If
+'gsh_log_e("GSH_C200_GROUPREGULATORYCONTROL_SM_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPRATIOTRACK_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'08 July 2008 Added for Sasol - JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPRATIOTRACK_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_GROUPRATIOTRACK_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+on error resume next
+
+if flag = 0 then
+ GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oShape)
+
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+end if
+
+if flag <=1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ oShape.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+ end if
+End If
+'
+'if flag = 0 then
+ dim txtFormat
+ txtFormat = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_RFormat")
+ numOfDecimals = CInt(Right(txtFormat,1))
+ 'PV Data Check
+ txtIn = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ If (StrComp(txtIn,"1.#QNAN")= 0) or (StrComp(txtIn,"---")= 0) then
+ tempReturn = GSH_BADPV_TEXT
+ else
+ tempReturn = FormatNumber(txtIn, numOfDecimals,-2, 0, 0)
+ end if
+ oShape.objects("txt_AnalogValue").value = tempReturn
+
+ 'Display SP Value
+ txtIn = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP)
+ If (StrComp(txtIn,"1.#QNAN")= 0) or (StrComp(txtIn,"---")= 0) then
+ tempReturn = GSH_BADPV_TEXT
+ else
+ tempReturn = FormatNumber(txtIn, numOfDecimals,-2, 0, 0)
+ end if
+ oShape.objects("txt_SPValue").value = tempReturn
+ 'Ratio Mode
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+'End If
+'gsh_log_e("GSH_C200_GROUPRATIOTRACK_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_REGCTLBOX_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'20Feb08 Created new shape for Sasol - JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_REGCTLBOX_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_REGCTLBOX_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+on error resume next
+if flag = 0 then
+
+ call GSH_REGCTLBOXSHOWNORMAL(oShape)
+
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+
+if flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal and hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+if flag = 0 then
+ 'PV Data Check
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+
+ 'Display SP Value
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'Set Ramping
+ Select case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end select
+End If
+'gsh_log_e("GSH_C200_REGCTLBOX_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_REGCTLBOX_ENH_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'21July08 Created new shape for Sasol - JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_REGCTLBOX_ENH_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_REGCTLBOX_ENH_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+on error resume next
+if flag = 0 then
+
+ call GSH_REGCTLBOXSHOWNORMAL(oShape)
+
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+
+if flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal and hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+if flag = 0 then
+ 'PV Data Check
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+
+ 'Display SP Value
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+End If
+'gsh_log_e("GSH_C200_REGCTLBOX_ENH_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGCTLBOXSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters: ' oDataBoundObject = subshape name or me, if calling within subshape
+'Used in ALL MULITFP Reg Ctl based!
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGCTLBOXSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_REGCTLBOXSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagName
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ 'Disable Alarms
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPREGULATORYCONTROLNORMAL
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_ramp").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_REGCTLBOXSHOWNORMAL")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LEVELREGCTLGAP_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LEVELREGCTLGAP_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_LEVELREGCTLGAP_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+On Error Resume Next
+If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape) 'Check Focus
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ 'Check for bad value
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("plg_SPIndicator1").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION (oShape,GSH_CPPARAM_SPHIGH)- (oShape.objects("plg_SPIndicator2").style.pixelheight / 2))
+ oShape.objects("plg_SPIndicator2").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION (oShape,GSH_CPPARAM_SPLOW)- (oShape.objects("plg_SPIndicator1").style.pixelheight / 2))
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+
+End If
+If flag = 0 then
+
+ 'When SPHigh or SPLow value is Nan -> do not show the marker
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPHIGH)) then
+ oShape.objects("plg_SPIndicator1").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_SPIndicator1").style.visibility = GSH_HIDDEN
+ end if
+
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPLOW)) then
+ oShape.objects("plg_SPIndicator2").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_SPIndicator2").style.visibility = GSH_HIDDEN
+ end if
+
+End If
+'gsh_log_e("GSH_C200_LEVELREGCTLGAP_ONUPDATE")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LEVELREGCTLGAP_DACA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 08/31/07 Function to handle LevelGap_data shape.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LEVELREGCTLGAP_DACA_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_LEVELREGCTLGAP_DACA_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+On Error Resume Next
+If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+'End If
+'If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape) 'Check Focus
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTLGAP_DACA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ 'Check for bad value
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("plg_SPIndicator1").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION (oShape,GSH_CPPARAM_SPHIGH)- (oShape.objects("plg_SPIndicator2").style.pixelheight / 2))
+ oShape.objects("plg_SPIndicator2").style.pixeltop = cint(GSH_LEVELINDICATOR_SPFLOATPOSITION (oShape,GSH_CPPARAM_SPLOW)- (oShape.objects("plg_SPIndicator1").style.pixelheight / 2))
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+
+End If
+If flag = 0 then
+
+ 'When SPHigh or SPLow value is Nan -> do not show the marker
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPHIGH)) then
+ oShape.objects("plg_SPIndicator1").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_SPIndicator1").style.visibility = GSH_HIDDEN
+ end if
+
+ if not((oShape.objects("rec_DataScript")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_SPLOW)) then
+ oShape.objects("plg_SPIndicator2").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_SPIndicator2").style.visibility = GSH_HIDDEN
+ end if
+
+End If
+'gsh_log_e("GSH_C200_LEVELREGCTLGAP_DACA_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LEVELREGCTL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+' 06/04/07 Remove Initman because already using ARWOP HILO.
+' 06/04/07 Replace Windup select statement with GSH_SHOWWINDUPSTATUS
+' 01/14/08 Add the check for alarms in both ctl and fun block when there is alarm (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LEVELREGCTL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_LEVELREGCTL_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+On Error Resume Next
+If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ 'call GSH_SHOWLEVELALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+'End If
+'If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ 'Check for bad value
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ call GSH_LevelIndicatorShowSPFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+End If
+
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+'gsh_log_e("GSH_C200_LEVELREGCTL_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALOUTPUTINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/09/07 Check for Off Normal not required; Removed.
+' GSH_DIGITALOUTPUTINDICATORSETFOCUS(oShape) replaced by GSH_GEN_SETSHAPEFOCUS(oShape)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_DIGITALOUTPUTINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+
+' gsh_log_s("GSH_C200_DIGITALOUTPUTINDICATOR_ONUPDATE")
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'oShape.objects("shp_focus").style.visibility = GSH_HIDDEN
+ End If
+ If flag <= 1 then
+ 'Alarming not needed
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'No Check for Off Normal required
+ 'End If
+ 'If flag = 0 then
+ 'Display OP Value
+ Dim sOPStateTxt
+
+ sOPStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+
+ oShape.objects("txt_OPvalue").value = sOPStateTxt
+ 'oShape.objects("txt_OPvalue").value = oShape.objects("rec_DataScript")
+
+ End If
+' gsh_log_e("GSH_C200_DIGITALOUTPUTINDICATOR_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOGOUTPUTINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+' 06/12/07 GSH_GEN_SETSHAPEFOCUS replaced GSH_NUMERICINDICATORSETFOCUS
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_ANALOGOUTPUTINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGOUTPUTINDICATORNORMAL
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+end if
+If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+end if
+End sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ValveRegulatoryControl_OnUpdate''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/12/07 Removed initman check because it is redundant to Windup = HILO
+' 06/12/07 Fixed incorrect display of txt_OPvalue
+' 06/12/07 Alarms must use GSH_GETHIGHESTALARMPRIORITY_OP
+' 08/08/07 Add: check & show status message flag on status message text. Reference issue #370 (Cuong Ly)
+' Fix potential problem of sticky redTag
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_VALVEREGCTL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_VALVEREGCTL_ONUPDATE oShape=" & oShape.id)
+
+ If flag <= 1 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ call GSH_ValveRegulatoryControlShowNormal(oShape)
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+ 'Check the points alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_ValveRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+
+ 'Assumption: Reg tag and status message are mutual exclusive
+ 'Status message
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+' else
+ 'Check status Message
+' dim val_stsMsg
+' val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+' call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+ end if
+
+ 'End If
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ 'if (GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ call GSH_ValveRegulatoryControlShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ dim sWindupStatus
+ sWindupStatus = GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript"))
+ call GSH_SHOWWINDUPSTATUS(sWindupStatus,oShape)
+
+ 'Make the focus transparent for valves
+ oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+ End If
+'gsh_log_e("GSH_C200_VALVEREGCTL_ONUPDATE")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_VALVEAUTOMAN_OnUpdate''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 02/22/08 Created shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_VALVEAUTOMAN_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_VALVEAUTOMAN_ONUPDATE oShape=" & oShape.id)
+
+ If flag <= 1 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ call GSH_ValveRegulatoryControlShowNormal(oShape)
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+ 'Check the points alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_ValveRegulatoryControlShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+
+ 'Red Tag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ call GSH_ValveRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ dim sWindupStatus
+ sWindupStatus = GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript"))
+ call GSH_SHOWWINDUPSTATUS(sWindupStatus,oShape)
+
+ 'Make the focus transparent for valves
+ oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+ End If
+'gsh_log_e("GSH_C200_VALVEAUTOMAN_ONUPDATE")
+end sub
+'
+' GSH_C200_STATUSMESSAGE_ONUPDATE
+'
+'10/12/07 - Status Message shape to put on shapes that require status message to be shown
+' however, because stsMessage parameter is not available on every points -> they need
+' to be manually put on when needed.
+' Only apply to Winz at the moment. (CL)
+''04/30/08 - Add isNAN checking condition to handle bad value
+sub GSH_C200_STATUSMESSAGE_ONUPDATE(oShape)
+'gsh_log_s("GSH_C200_STATUSMESSAGE_ONUPDATE oShape=" & oShape.id)
+ 'Get Status Message value
+ dim val_stsMsg, tagName, stsMsgType
+ if not(oShape.objects("txt_statusMessage")).isNAN(GSH_CPENTITY &"." &GSH_CPPARAM_STSMSG) then
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("txt_statusMessage"),GSH_CPPARAM_STSMSG))
+ else
+ val_stsMsg = 0
+ end if
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ call GSH_Show_StatusMessage(oShape, val_stsMsg, stsMsgType)
+'gsh_log_e("GSH_C200_STATUSMESSAGE_ONUPDATE oShape=" & oShape.id)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_Show_StatusMessage''''''''''''''''''''''''''''''''''''''''''
+' stsMsg_flag = 0 => Off (No Message shown) - Default
+' stsMsg_flag = 1 => Bypass (shown as Bypass)
+' stsMsg_flag = 2 => HandJack (shown as Hand)
+' stsMsg_flag = 3 => Isolated (shown as Isolate)
+'08/08/07 - Created the sub routine (Cuong Ly)
+'10/12/07 - Modified to work with C200_StatusMessage shape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_Show_StatusMessage(oShape, stsMsg_flag, stsMsgType)
+'gsh_log_s("GSH_Show_StatusMessage stsMsg_flag = "&stsMsg_flag & " stsMsgType= " &stsMsgType)
+ dim message, numOfMessage
+
+ numOfMessage = cInt(GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0"))
+
+ if stsMsg_flag >0 and stsMsg_flag <=numOfMessage and stsMsgType <> "" then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &stsMsg_flag, "")
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_statusmessage").value = message
+ else
+ oShape.objects("txt_statusMessage").style.visibility = GSH_HIDDEN
+ end if
+'gsh_log_e("GSH_Show_StatusMessage")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_VALVEDIGITAL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape handle
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/14/07 replaced GSH_GETHIGHESTALARMPRIORITYPARAMETER with GSH_GETHIGHESTALARMPRIORITYPROPERTY
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_VALVEDIGITAL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_ValveDigital_OnUpdate oShape=" & oShape.id)
+on error resume next
+
+ If flag <= 1 then
+ Dim nNumericState
+ nNumericState = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ End If
+
+ 'End If
+
+ 'If flag <= 1 then
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ dim sStateTxt: sStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, sStateTxt)) then
+ call GSH_ValveDigitalShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+
+ End If
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_ValveDigitalShowBadPV(oShape)
+ else
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+
+ End If
+'gsh_log_e("GSH_C200_VALVEDIGITAL_ONUPDATE oShape")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_VALVEDIGITAL_LM_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape handle
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 08/14/2007 - Create the function to handle ValveDigital_LM shapes with Localman and Interlock indicators
+' Reference issue #524 (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_VALVEDIGITAL_LM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_VALVEDIGITAL_LM_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ If flag <= 1 then
+ Dim nNumericState
+ nNumericState = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ End If
+
+ 'End If
+
+ 'If flag <= 1 then
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ dim sStateTxt: sStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_C200_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, sStateTxt)) then
+ call GSH_ValveDigitalShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+
+ End If
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_ValveDigitalShowBadPV(oShape)
+ else
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+
+ 'Check for Localman and Interlock status
+ dim bLocalMan, bInterlock
+ bInterlock = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_INTERLOCK)
+
+ if(bInterlock) then
+ oShape.objects("txt_Localman").value = GSH_INTERLOCK_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ bLocalMan = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_LOCALMAN)
+ if(bLocalMan) then
+ oShape.objects("txt_Localman").value = GSH_LOCALMAN_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txt_Localman").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ End If
+'gsh_log_e("GSH_C200_VALVEDIGITAL_LM_ONUPDATE oShape")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_VALVEDIGITALFLAG_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Functions the same as Valve Digital but the Offnormal check only exists for Normal State
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 Replace GSH_GETHIGHESTALARMPRIORITYPARAMETER by GSH_GETHIGHESTALARMPRIORITYPROPERTY
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_VALVEDIGITALFLAG_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_VALVEDIGITALFLAG_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ 'flag check here is not necessary, but can leave it for consistency
+ If flag <= 1 then
+ Dim nNumericState
+ nNumericState = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ dim sStateTxt: sStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sStateTxt) then
+ call GSH_ValveDigitalShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+ End If
+
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground -> should set to be transparent, now done in GSH_ValveDigitalSetFocus
+
+ If flag = 0 then
+ 'NO Bad Data Check on FLAGA
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+
+
+'gsh_log_e("GSH_C200_VALVEDIGITALFLAG_ONUPDATE oShape")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MOTORINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 use GSH_GEN_SETSHAPEFOCUS to display focus
+' 06/13/07 Use GSH_GETHIGHESTALARMPRIORITYPROPERTY instead of GSH_GETHIGHESTALARMPRIORITYPARAMETER
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_C200_MOTORINDICATOR_ONUPDATE(oShape, flag)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MOTORINDICATOR_LM_ONUPDATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 08/14/2007 - Create the function to handle MotoIndicator_lm shapes with Localman and Interlock indicators
+' Reference issue #524 (CL)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_C200_MOTORINDICATOR_LM_ONUPDATE(oShape, flag)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ 'This piece of code need to be testd on site
+ If flag = 0 then
+ 'Check for Localman and Interlock status
+ dim bLocalMan, bInterlock
+ bInterlock = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_INTERLOCK)
+
+ if(bInterlock) then
+ oShape.objects("txt_Localman").value = GSH_INTERLOCK_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ bLocalMan = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_LOCALMAN)
+ if(bLocalMan) then
+ oShape.objects("txt_Localman").value = GSH_LOCALMAN_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txt_Localman").style.visibility = GSH_HIDDEN
+ end if
+ end if
+ end if
+
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LevelIndicator_OnUpdate'''''''''''''''''''''''''''''''''''''''
+'Parameters:oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LevelIndicator_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_C200_LevelIndicator_OnUpdate oShape="&oShape.id & ", flag="&flag)
+On Error Resume Next
+If flag <= 1 then
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ else
+ 'alarming is enabled, get highest priority(if any) and change shape accordingly
+ call GSH_SHOWLEVELALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+'End If
+'If flag <= 1 then
+ call GSH_LevelIndicatorSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+'End If
+'If flag = 0 then
+ 'Check for Bad PV
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+End If
+'gsh_log_e("GSH_C200_LevelIndicator_OnUpdate")
+end sub
+
+sub GSH_SHOWLEVELALARMS(sAlarmPriority,oShape)
+ Select Case sAlarmPriority
+ Case GSH_NOALARMCODE
+ call GSH_LevelIndicatorShowNoAlarm(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_LevelIndicatorShowEmergencyAlarm(oShape,True)
+ Case GSH_UNACKHIGH
+ call GSH_LevelIndicatorShowHighAlarm(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_LevelIndicatorShowLowAlarm(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_LevelIndicatorShowEmergencyAlarm(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_LevelIndicatorShowHighAlarm(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_LevelIndicatorShowLowAlarm(oShape,false)
+ Case Else
+ call GSH_LevelIndicatorShowNoAlarm(oShape)
+ End Select
+end sub
+
+sub GSH_SHOWLEVELSMALLALARMS(sAlarmPriority,oShape)
+ call GSH_SHOWLEVELALARMS(sAlarmPriority,oShape)
+ 'Make Alarm outline width smaller
+ oShape.objects("outline").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSLVLINDICATORSMALLALARMWIDTH
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPANALOG_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'06/05/07 Added flag parameter to execute only focus status update or all
+' 06/12/07 GSH_GEN_SETSHAPEFOCUS replaced GSH_GROUPANALOGSETFOCUS
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPANALOG_ONUPDATE(oShape,flag)
+on error resume next
+if flag = 0 then
+ call GSH_GROUPANALOGSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_GROUPANALOGSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+End If
+If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'Set the focus
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_GROUPANALOGSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+End If
+If flag = 0 then
+ 'PV Data Check
+ If NOT(GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false)) Then
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ Else
+ call GSH_GROUPANALOGSHOWBADPV(oShape)
+ End If
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPAUTOMANSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' 06/13/07 Added GSH_SHOWNOALARM to initialize the state of the alarms
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPAUTOMANSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPAUTOMANSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+' oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPREGULATORYCONTROLNORMAL
+' oDataBoundObject.objects("outline").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_HIDDEN
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+'gsh_log_e("GSH_GROUPAUTOMANSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPAUTOMAN_ONUPDATE'''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/10/07 Optimized windup code with GSH_ShowWindupStatus.
+' 06/12/07 Add alarming code referencing CP_OP and fix focus display.
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem that the combox was open,
+' but no entry made, then other tag is selected as focus tag.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPAUTOMAN_ONUPDATE(oShape, flag)
+on error resume next
+ If flag = 0 then
+ GSH_GROUPAUTOMANSHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'RedTag message
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPAUTOMAN_SM_ONUPDATE''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus
+' 02/19/08 Created from C200_GROUPAUTOMAN for StatusMessage addition
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPAUTOMAN_SM_ONUPDATE(oShape, flag)
+'gsh_log_s("C200_GROUPAUTOMAN_SM oShape = " & oShape.id)
+on error resume next
+ If flag = 0 then
+ GSH_GROUPAUTOMANSHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+' 'RedTag and Status Message
+ dim val_redTag, val_stsMsg, tagName, stsMsgType, numOfMessage
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+'
+ if strcomp(val_redTag,GSH_ON,vbtextcompare) = 0 then
+ oShape.objects("txt_statusmessage") = GSH_REDTAG_TEXT
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ else if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+ if val_stsMsg >0 and val_stsMsg <=numOfMessage then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_C200_GROUPAUTOMAN_SM")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPDIGITALINPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape - Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 Replace GSH_GETHIGHESTALARMPRIORITYPARAMETER by GSH_GETHIGHESTALARMPRIORITYPROPERTY
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPDIGITALINPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_GROUPDIGITALINPUT_ONUPDATE oShape = " & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPDIGITALINPUTSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALINPUTSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+
+ oShape.objects("txt_DigitalValue").value = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPDIGITALINPUTSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ If GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, oShape.objects("txt_DigitalValue").value) then
+ call GSH_GROUPDIGITALINPUTSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+ End If
+
+'gsh_log_e("GSH_C200_GROUPDIGITALINPUT_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPORSEL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'06/05/07 Added flag parameter to execute only focus status update or all
+'06/05/07 Added Redtag and Windup
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPORSEL_ONUPDATE(oShape, flag)
+on error resume next
+if flag = 0 then
+ GSH_GROUPORSELSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPORSELSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_WINDUP),oShape)
+ End If
+End If
+If flag <= 1 then
+ call GSH_GROUPORSELSETFOCUS(oShape) 'Set the focus
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then 'Check for Off Normal if not in focus
+ if GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_GROUPORSELSHOWOFFNORMAL(oShape)
+ end if
+ end if
+End If
+
+If flag = 0 then
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP))
+ 'Display Mode Data
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+
+
+ 'oShape.objects("txt_OPValue").value = GSH_FormatPVText(oShape,alp_OPValue.value)
+ 'oShape.objects("txt_ModeValue").value = cmb_ModeValue.value
+
+ 'Set Outline fill color White
+ oShape.objects("outline").styleClass = GSH_CSSWHITE
+
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if strcomp(val_redTag,GSH_ON,vbtextcompare) = 0 then
+ oShape.objects("txt_statusmessage") = GSH_REDTAG_TEXT
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ end if
+
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MOTORINDICATORWITHALARMS_ONUPDATE''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 use GSH_GEN_SETSHAPEFOCUS to display focus
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_C200_MOTORINDICATORWITHALARMS_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_C200_MOTORINDICATORWITHALARMS_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+ 'Alarming: Don't check alarm disabled for this alarm group (OK'd by Jamie)
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+' gsh_log ("sAlarmPriority = " & sAlarmPriority & "bUnack = " & bUnack )
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_C200_MOTORINDICATORWITHALARMS_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MOTORINDICATORWITHALARMS_LM_ONUPDATE''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 08/14/2007 - Create the function to handle MotorWithAlarms_lm shapes with Localman and Interlock indicators
+' Reference issue #524 (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_C200_MOTORINDICATORWITHALARMS_LM_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_C200_MOTORINDICATORWITHALARMS_LM_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+ 'Alarming: Don't check alarm disabled for this alarm group (OK'd by Jamie)
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+ 'gsh_log ("sAlarmPriority = " & sAlarmPriority & "bUnack = " & bUnack )
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV,oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ 'This piece of code need to be testd on site
+ If flag = 0 then
+ 'Check for Localman and Interlock status
+ dim bLocalMan, bInterlock
+ bInterlock = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_INTERLOCK)
+
+ if(bInterlock) then
+ oShape.objects("txt_Localman").value = GSH_INTERLOCK_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ bLocalMan = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_LOCALMAN)
+ if(bLocalMan) then
+ oShape.objects("txt_Localman").value = GSH_LOCALMAN_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txt_Localman").style.visibility = GSH_HIDDEN
+ end if
+ end if
+ end if
+
+'gsh_log_e("GSH_C200_MOTORINDICATORWITHALARMS_LM_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MULTIPLESENSORS_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/12/07 Added else statement to alarm display to show alarms if alarms are not disabled
+' 06/14/07 replaced GSH_GETHIGHESTALARMPRIORITYPARAMETER with GSH_GETHIGHESTALARMPRIORITYPROPERTY
+' 06/20/07 Replace GSH_GETHIGHESTALARMPRIORITYPROPERTY by GSH_GETHIGHESTALARMPRIORITYWITHALARMPARAMETERS to have the C200_SensorMulitple works
+' as they need to work with both Tag.DACA.PV and Tag.A1.PV.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_MULTIPLESENSORS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_MULTIPLESENSORS_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+ If flag = 0 then
+ call GSH_MULTIPLESENSORSSHOWNORMAL(oShape)
+ 'Alarming
+ if (GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) or GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITYALARM)) Then
+ call GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM(oShape)
+ else
+ 'Get Highest Alarm
+' iAlarmCode1 = GSH_GETHIGHESTALARMPRIORITYWITHALARMPARAMETERS(oShape.objects("rec_DataScript"),GSH_CPENTITY)
+' iAlarmCode2 = GSH_GETHIGHESTALARMPRIORITYWITHALARMPARAMETERS(oShape.objects("rec_DataScript"),GSH_CPENTITYALARM)
+ iAlarmCode1 = GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITYALARM,GSH_EXPERION_PARAM_ALARMPRIORITY)
+ iAlarmCode2 = GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY)
+
+ iAlarmCode = GSH_COMPAREHIGHESTALARMPRIORITY(iAlarmCode1, iAlarmCode2)
+ Select Case iAlarmCode
+ Case GSH_UNACKEMERG
+ call GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_MULTIPLESENSORSSHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_MULTIPLESENSORSSHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_MULTIPLESENSORSSHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_MULTIPLESENSORSSHOWLOWALARM(oShape,false)
+ Case Else
+ 'No Alarms
+ End Select
+ end if
+ End If
+
+ If flag <= 1 then
+
+ 'Set the focus
+ call GSH_MULTIPLESENSORSSETFOCUS(oShape)
+ 'No Offnormal check as this shape could be a digital flag or analog point.
+ 'gsh_log_e("GSH_C200_MULTIPLESENSORS_ONUPDATE")
+ End If
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_NUMERICINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/12/07 GSH_GEN_SETSHAPEFOCUS replaced GSH_NUMERICINDICATORSETFOCUS
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_NUMERICINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+ If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSNUMERICINDICATORNORMAL
+ End If
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'GSH_NUMERICINDICATORSETFOCUS(oShape)
+ End If
+ If flag = 0 then
+ 'Bad Data Check removed by Request of Rich M May3,2007.
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+ End If
+End sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_RATIOTRACKINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 08/July/2008 New Shape - JE
+'
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_RATIOTRACKINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+ If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSNUMERICINDICATORNORMAL
+ End If
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'GSH_NUMERICINDICATORSETFOCUS(oShape)
+ End If
+ If flag = 0 then
+' do own PVFormatting as using RTFormat not PVFormat
+ txtIn = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)
+ If StrComp(txtIn,"1.#QNAN",vbTextcompare)= 0 then
+ oShape.objects("txt_PVvalue").value = "---"
+ else
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), "RTFORMAT", GSH_DEFAULTPVFORMAT),1))
+ tempReturn = FormatNumber(txtIn, numOfDecimals,-2, 0, 0)
+ oShape.objects("txt_PVvalue").value = tempReturn
+ end if
+ End If
+End sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LevelIndicatorSmall Shape Section
+' Contains all functions specific to the Level Indicator Small shape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Added flag parameter to execute only focus status update or all
+' 08/05/08 Remove flag checking because we have to do everything in all the cases(CL), otherwise badPV does not show correctly
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LevelIndicatorSmall_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_C200_LevelIndicatorSmall_OnUpdate, oshape=" & oShape.id & "w flag = "&flag)
+On Error Resume Next
+
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ else
+ call GSH_SHOWLEVELSMALLALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+'End If
+'If flag <=1 then
+ call GSH_LEVELINDICATORSETFOCUS(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ IF GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+
+
+ 'Check for Bad PV
+ If GSH_C200_ANALOG_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+
+'gsh_log_e("GSH_C200_LevelIndicatorSmall_OnUpdate")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LevelIndicatorRegCtlSmall_OnUpdate''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/04/07 Remove Initman because already using ARWOP HILO.
+' 06/04/07 Replace Windup select statement with GSH_SHOWWINDUPSTATUS
+' 06/05/07 Added flag parameter to execute only focus status update or all
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LevelIndicatorRegCtlSmall_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_C200_LevelIndicatorRegCtlSmall_OnUpdate oShape="&oShape.id& ", flag = "&flag)
+On Error Resume Next
+If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ else
+
+ 'alarming is enabled, get highest priority and change shape accordingly
+ Select Case GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY)
+ Case GSH_NOALARMCODE
+ call GSH_LevelIndicatorRegulatoryControlShowNoAlarm(oShape)
+ Case GSH_UNACKEMERG
+ call GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm(oShape,True)
+ Case GSH_UNACKHIGH
+ call GSH_LevelIndicatorRegCtlSmallShowHighAlarm(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_LevelIndicatorRegCtlSmallShowLowAlarm(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_LevelIndicatorRegCtlSmallShowEmergencyAlarm(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_LevelIndicatorRegCtlSmallShowHighAlarm(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_LevelIndicatorRegCtlSmallShowLowAlarm(oShape,false)
+ Case Else
+ call GSH_LevelIndicatorRegulatoryControlShowNoAlarm(oShape)
+ End Select
+ End If
+'End If
+'If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape) 'Check Focus
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ 'Check for bad value
+ IF GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) THEN
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ call GSH_LevelIndicatorShowSPFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), GSH_LEVELINDICATORDECIMALS)
+ End If
+
+End If
+
+If flag = 0 then
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+End If
+'gsh_log_e("GSH_C200_LevelIndicatorRegCtlSmall_OnUpdate")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MOTORINDICATORSMALL_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 use GSH_GEN_SETSHAPEFOCUS to display focus
+' 06/13/07 Replace GSH_GETHIGHESTALARMPRIORITYPARAMETER by GSH_GETHIGHESTALARMPRIORITYPROPERTY
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_C200_MOTORINDICATORSMALL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_MOTORINDICATORSMALL_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MINIMOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSSMINIMOTORINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_C200_MOTORINDICATORSMALL_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_MOTORINDICATORSMALL_LM_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 08/14/2007 - Create the function to handle MotoIndicatorSmall_lm shapes with Localman and Interlock indicators
+' Reference issue #524 (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_C200_MOTORINDICATORSMALL_LM_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_MOTORINDICATORSMALL_LM_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MINIMOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSSMINIMOTORINDICATORDISABLEDALARM
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ 'This piece of code need to be testd on site
+ If flag = 0 then
+ 'Check for Localman and Interlock status
+ dim bLocalMan, bInterlock
+ bInterlock = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_INTERLOCK)
+
+ if(bInterlock) then
+ oShape.objects("txt_Localman").value = GSH_INTERLOCK_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ bLocalMan = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_LOCALMAN)
+ if(bLocalMan) then
+ oShape.objects("txt_Localman").value = GSH_LOCALMAN_TXT
+ oShape.objects("txt_Localman").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txt_Localman").style.visibility = GSH_HIDDEN
+ end if
+ end if
+ end if
+'gsh_log_e("GSH_C200_MOTORINDICATORSMALL_LM_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_SENSOR_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/13/07 Replace GSH_GETHIGHESTALARMPRIORITY(oShape.objects("rec_DataScript")) by GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue"))
+' 06/20/07 Replace GSH_GETHIGHESTALARMPRIORITYPROPERTY by GSH_GETHIGHESTALARMPRIORITYWITHALARMPARAMETERS to have the C200_Sensor work
+' as they need to work with both Tag.DACA.PV and Tag.A1.PV.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_SENSOR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_SENSOR_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_SENSORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_SENSORSHOWSUPPRESSEDALARM(oShape)
+ else
+ 'alarming is enabled, get highest priority and change shape accordingly
+' Select Case GSH_GETHIGHESTALARMPRIORITYWITHALARMPARAMETERS(oShape.objects("rec_DataScript"),GSH_CPENTITY)
+ Select Case GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY)
+ Case GSH_UNACKEMERG
+ call GSH_SENSORSHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_SENSORSHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_SENSORSHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_SENSORSHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_SENSORSHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_SENSORSHOWLOWALARM(oShape,false)
+ Case Else
+ End Select
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_SETSHAPEFOCUS(oShape)
+ 'No Offnormal check as this shape could be a digital flag or analog point.
+ 'gsh_log_e("GSH_C200_SENSOR_ONUPDATE")
+ End If
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_SELECTOROUTPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/14/07 GSH_SELECTOROUTPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS
+' 06/14/07 Added alarm checking for GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_SELECTOROUTPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_SELECTOROUTPUT_ONUPDATE oShape=" & oShape.id)
+
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_SELECTOROUTPUTSHOWNORMAL(oShape)
+ call GSH_SELECTOROUTPUTSHOWSELECTOR(oShape, GSH_CPPARAM_SELINPUT)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+'gsh_log_e("GSH_C200_SELECTOROUTPUT_ONUPDATE")
+
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTOROUTPUTSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' 06/14/07 initialized the state of alarms
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTOROUTPUTSHOWNORMAL(oShape)
+'gsh_log_s("GSH_SELECTOROUTPUTSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("linLeft").style.visibility = GSH_HIDDEN
+ oShape.objects("linRight").style.visibility = GSH_HIDDEN
+ oShape.objects("linTop").style.visibility = GSH_HIDDEN
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_SELECTOROUTPUTSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTOROUTPUTSHOWSELECTOR''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' paramSelector = custom parameter
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTOROUTPUTSHOWSELECTOR(oShape, paramSelector)
+'gsh_log_s("GSH_SELECTOROUTPUTSHOWSELECTOR oShape=" & oShape.id & ", paramSelector=" & paramSelector)
+on error resume next
+ dim xinput, selOrientation
+ xinput = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),paramSelector)
+ ' Determine selector orientation (LEFT, RIGHT, CENTER)
+ selOrientation = GSH_NONE
+ select case xinput
+ case GSH_SELX1
+ ' Retrive custom parameter X1
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPX1, GSH_CPVALUE)
+ case GSH_SELX2
+ ' Retrive custom parameter X2
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPX2, GSH_CPVALUE)
+ case GSH_SELX3
+ ' Retrive custom parameter X3
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPX3, GSH_CPVALUE)
+ end select
+ 'Set Orientation
+ call GSH_SELECTOROUTPUTSETORIENTATION(oShape, selOrientation)
+'gsh_log_e("GSH_SELECTOROUTPUTSHOWSELECTOR")
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTOROUTPUTSETORIENTATION''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' selOrientation = orientation (LEFT, RIGHT, CENTER)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTOROUTPUTSETORIENTATION(oShape, selOrientation)
+'gsh_log_s("GSH_SELECTOROUTPUTSETORIENTATION oShape=" & oShape.id & ", selOrientation=" & selOrientation)
+on error resume next
+
+ if (strcomp(selOrientation,GSH_LEFT,vbtextcompare)=0) then
+ oShape.objects("linLeft").style.visibility = GSH_VISIBLE
+ ElseIf (strcomp(selOrientation,GSH_RIGHT,vbtextcompare)=0 ) then
+ oShape.objects("linRight").style.visibility = GSH_VISIBLE
+ ElseIf (strcomp(selOrientation,GSH_CENTER,vbtextcompare)=0 ) then
+ oShape.objects("linTop").style.visibility = GSH_VISIBLE
+ else
+ 'Do Nothing
+ end if
+'gsh_log_e("GSH_SELECTOROUTPUTSETORIENTATION")
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTOROUTPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/14/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPSELECTORINPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' 06/14/07 GSH_GROUPSELECTORINPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPSELECTORINPUT_ONUPDATE(oShape, flag)
+on error resume next
+ If flag = 0 then
+ call GSH_GROUPSELECTORINPUTSHOWNORMAL(oShape)
+ End If
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ End If
+ If flag = 0 then
+ 'Get SELOUT value
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SELOUT))
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPSELECTORINPUTSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPSELECTORINPUTSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPSELECTORINPUTSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, sTagName
+ 'Show objects
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPANALOGNORMAL
+ oDataBoundObject.objects("txt_AnalogValue").style.visibility = GSH_VISIBLE
+ 'Read Values from Registry
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ sTagname = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ oDataBoundObject.objects("txt_tagname").value = sTagname
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+'gsh_log_e("GSH_GROUPSELECTORINPUTSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPSELECTORINPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/14/07
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPSELECTOROUTPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/14/07 GSH_GROUPSELECTOROUTPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS
+' 06/14/07 removed check for initman because it is redundant with the check for Windup = HILO
+' 06/14/07 optimized select case code by replacing it with SHOWWINDUPSTATUS
+' 06/14/07 use GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER for alarming
+' 09/14/07 hide OP combobox when the shape is not in principle focus to solve problem
+' that the combox or alp entry was open,
+' but no entry made, then other tag is selected as focus tag. (CL)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPSELECTOROUTPUT_ONUPDATE(oShape, flag)
+on error resume next
+
+
+ If flag = 0 then
+ GSH_GROUPSELECTOROUTPUTSHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPSELECTOROUTPUTSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Display OP Value (no check for bad data needed)
+ oShape.objects("txt_OPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP))
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+ 'No Ramping needed
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_GROUPSELECTOROUTPUT_SM_ONUPDATE'''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 02/19/08 Created from C200_GROUPSELECTOROUTPUT for StatusMessage addition
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_GROUPSELECTOROUTPUT_SM_ONUPDATE(oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPSELECTOROUTPUTSHOWNORMAL(oShape)
+ 'Alarming
+ If GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ call GSH_GROUPSELECTOROUTPUTSHOWSUPPRESSEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Display OP Value (no check for bad data needed)
+ oShape.objects("txt_OPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP))
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+
+ 'RedTag and Status Message
+ dim val_redTag, val_stsMsg, tagName, stsMsgType
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ val_stsMsg = cInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG))
+
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ else if (val_stsMsg > 0) then
+ 'Get custom status messages from registry
+ tagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(tagName, GSH_REGKEY_STSMSGLIST, "")
+ if val_stsMsg >0 and stsMsgType <> "" then
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &val_stsMsg, "")
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,message)
+ end if
+ end if
+ end if
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPSELECTOROUTPUTSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPSELECTOROUTPUTSHOWNORMAL(oDataBoundObject)
+'gsh_log_s("GSH_GROUPSELECTOROUTPUTSHOWNORMAL oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+Dim shapePoint, tagKeyword, tagName
+ shapePoint = GSH_GETSHAPETAG(oDataBoundObject)
+ tagName = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_TAGNAME_ALIAS, shapePoint)
+ tagKeyword = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_KEYWORD, defaultString)
+ 'Assign values to textboxes
+ oDataBoundObject.objects("txt_tagname").value = tagName
+ oDataBoundObject.objects("txt_keyword").value = tagKeyword
+ call GSH_SHOWNOALARM(oDataBoundObject)
+ 'Show values
+ oDataBoundObject.objects("outline").style.visibility = GSH_VISIBLE
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPORSELNORMAL
+ oDataBoundObject.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_Initialization").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_status").style.visibility = GSH_HIDDEN
+ oDataBoundObject.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_GROUPSELECTOROUTPUTSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GROUPSELECTOROUTPUTSHOWSUPPRESSEDALARM'''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GROUPSELECTOROUTPUTSHOWSUPPRESSEDALARM(oDataBoundObject)
+'gsh_log_s("GSH_GROUPSELECTOROUTPUTSHOWSUPPRESSEDALARM oDataBoundObject=" & oDataBoundObject.id)
+on error resume next
+ oDataBoundObject.objects("outline").styleClass = GSH_CSSGROUPORSELDISABLEDALARM
+'gsh_log_e("GSH_GROUPSELECTOROUTPUTSHOWSUPPRESSEDALARM")
+end sub
+
+'GSH_GROUPSELECTOROUTPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/14/07
+'GSH_GROUPSELECTOROUTPUTSHOW_RAMP removed function May 11''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_SELECTORINPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/14/07 GSH_GSH_SELECTORINPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_SELECTORINPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_SELECTORINPUT_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+ If flag = 0 then
+ call GSH_SELECTORINPUTSHOWNORMAL(oShape)
+ call GSH_SELECTORINPUTSHOWSELECTOR(oShape, GSH_CPPARAM_SELINPUT)
+ End If
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ End If
+'gsh_log_e("GSH_C200_SELECTORINPUT_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTORINPUTSHOWNORMAL''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' 06/14/07 initialized the state of "outline"
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTORINPUTSHOWNORMAL(oShape)
+'gsh_log_s("GSH_SELECTORINPUTSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ oShape.objects("outline").styleClass = GSH_CSSALARMNONE
+ oShape.objects("linLeft").style.visibility = GSH_HIDDEN
+ oShape.objects("linRight").style.visibility = GSH_HIDDEN
+ oShape.objects("linTop").style.visibility = GSH_HIDDEN
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_SELECTORINPUTSHOWNORMAL")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTORINPUTSHOWSELECTOR''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' paramSelector = custom parameter
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTORINPUTSHOWSELECTOR(oShape, paramSelector)
+'gsh_log_s("GSH_SELECTORINPUTSHOWSELECTOR oShape=" & oShape.id & ", paramSelector=" & paramSelector)
+on error resume next
+ dim ininput, selOrientation
+ ininput = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),paramSelector)
+ ' Determine selector orientation (LEFT, RIGHT, CENTER)
+ selOrientation = GSH_LEFT
+ if strcomp(ininput,GSH_SELIN1, vbTextCompare) = 0 then
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPIN1, GSH_CPVALUE)
+ else if strcomp(ininput,GSH_SELIN2, vbTextCompare) = 0 then
+ ' Retrive custom parameter IN2
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPIN2, GSH_CPVALUE)
+ end if: end if
+ 'Set Orientation
+ call GSH_SELECTORINPUTSETORIENTATION(oShape, selOrientation)
+'gsh_log_e("GSH_SELECTORINPUTSHOWSELECTOR")
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTORINPUTSETORIENTATION''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' selOrientation = orientation (LEFT, RIGHT, CENTER)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTORINPUTSETORIENTATION(oShape, selOrientation)
+'gsh_log_s("GSH_SELECTORINPUTSETORIENTATION oShape=" & oShape.id & ", selOrientation=" & selOrientation)
+on error resume next
+
+ if (strcomp(selOrientation,GSH_LEFT,vbtextcompare)=0) then
+ oShape.objects("linLeft").style.visibility = GSH_VISIBLE
+ ElseIf (strcomp(selOrientation,GSH_RIGHT,vbtextcompare)=0 ) then
+ oShape.objects("linRight").style.visibility = GSH_VISIBLE
+ ElseIf (strcomp(selOrientation,GSH_CENTER,vbtextcompare)=0 ) then
+ oShape.objects("linTop").style.visibility = GSH_VISIBLE
+ else
+ 'Do Nothing
+ end if
+'gsh_log_e("GSH_SELECTORINPUTSETORIENTATION")
+
+end sub
+
+'GSH_SELECTORINPUTSETFOCUS replaced by GSH_GEN_SETSHAPEFOCUS 06/14/07
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_VALVEANALOG3WAY_SCADA_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_VALVEANALOG3WAY_SCADA_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_VALVEANALOG3WAY_SCADA_ONUPDATE oShape=" & oShape.id)
+
+ If flag <= 1 then
+ call GSH_VALVEANALOG3WAYSHOWNORMAL(oShape)
+
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+
+ call GSH_VALVEANALOG3WAYSHOWPORT(oShape)
+
+ 'Check the points alarming
+ if GSH_SCADA_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_VALVEANALOG3WAYSHOWDISABLEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITY_OP(oShape.objects("rec_DataScript")),oShape)
+ End If
+
+' End If
+
+' If flag <= 1 then
+ 'Focus
+ call GSH_VALVEANALOG3WAYSETFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)) then
+ call GSH_VALVEANALOG3WAYSHOWOFFNORMAL(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground --> outline is always transparent
+ End If
+ 'gsh_log_e("GSH_VALVEANALOG3WAY_SCADA_ONUPDATE")
+end sub
+
+
+'
+' 10/12/2007 - Modified so that ValveAnalog3Way can show input flow that come from
+' left (default) or right hand side. (CL)
+'
+sub GSH_VALVEANALOG3WAYSHOWPORT(oShape)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWPORT oShape=" & oShape.id)
+on error resume next
+ Dim OPValue, divertMinValue, divertMaxValue, throughMinValue, throughMaxValue, inputDirection
+ Dim styleLeftPort, styleRightPort, styleDivertPort
+
+ OPValue = CSng(oShape.objects("ind_OPStem").value)
+ 'gsh_log("OPValue=" & OPValue)
+ divertMinValue = CSng(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPDIVERTMIN, GSH_CPVALUE))
+ divertMaxValue = CSng(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPDIVERTMAX, GSH_CPVALUE))
+ throughMinValue = CSng(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPTHROUGHMIN, GSH_CPVALUE))
+ throughMaxValue = CSng(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPTHROUGHMAX, GSH_CPVALUE))
+
+ 'gsh_log("divertMinValue=" & divertMinValue & ", divertMaxValue=" & divertMaxValue & ", throughMinValue=" & throughMinValue & ", throughMaxValue=" & throughMaxValue)
+ styleLeftPort = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ styleRightPort = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ styleDivertPort = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+
+
+ if ((OPValue >= divertMinValue) or (OPValue >= throughMinValue)) then
+ styleLeftPort = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if
+ if (OPValue >= divertMinValue) and (OPValue <= divertMaxValue) then
+ styleDivertPort = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if
+ if ((OPValue >= throughMinValue) and (OPValue <= throughMaxValue)) then
+ styleRightPort = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if
+
+ inputDirection = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPINPUTDIRECTION, GSH_CPVALUE)
+
+ 'Input flow direction from the right hand side.
+ dim temp
+ If strComp(inputDirection,"right",vbTextCompare) = 0 Then
+ temp = styleLeftPort
+ styleLeftPort = styleRightPort
+ styleRightPort = temp
+ End If
+
+
+ 'Set style
+ oShape.objects("plg_LeftPort").styleClass = styleLeftPort
+ oShape.objects("plg_RightPort").styleClass = styleRightPort
+ oShape.objects("plg_DivertPort").styleClass = styleDivertPort
+
+ 'gsh_log("Left Port styleClass=" & oShape.objects("plg_LeftPort").styleClass)
+ 'gsh_log("Right Port styleClass=" & oShape.objects("plg_RightPort").styleClass)
+ 'gsh_log("Divert Port styleClass=" & oShape.objects("plg_DivertPort").styleClass)
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWPORT")
+end sub
+
+sub GSH_VALVEANALOG3WAYSETFOCUS(oShape)
+'gsh_log_s("GSH_VALVEANALOG3WAYSETFOCUS oShape=" & oShape.id)
+on error resume next
+ call GSH_SetShapeFocus(oShape)
+
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,false)
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSFOCUSASSOCIATED_COLOUR
+ oShape.objects("txt_OPValue").style.visibility = GSH_VISIBLE 'changed AL
+ else
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSBACKGROUND_GRAY
+ end if
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT '-> set alarm filled the outline -> set it back to transparent here
+'gsh_log_e("GSH_VALVEANALOG3WAYSETFOCUS")
+end sub
+
+sub GSH_VALVEANALOG3WAYSHOWNORMAL(oShape)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWNORMAL oShape=" & oShape.id)
+on error resume next
+ oShape.objects("txt_OPValue").value = FormatNumber(oShape.objects("ind_OPStem").value,GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("rec_LineCover").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("txt_OPValue").style.visibility = GSH_HIDDEN 'changed AL
+ oShape.objects("ind_OPBottom").style.visibility = GSH_VISIBLE
+ call GSH_ShowNoAlarm(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_HIDDEN
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWNORMAL")
+end sub
+
+sub GSH_VALVEANALOG3WAYSHOWOFFNORMAL(oShape)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWOFFNORMAL oShape=" & oShape.id)
+on error resume next
+ oShape.objects("focus").style.visibility = GSH_VISIBLE
+ oShape.objects("focus").styleClass = GSH_CSSREGULATORYCONTROLVALVEOFFNORMAL
+ call GSH_ValveRegulatoryControlShowBottomFlowIndicator(oShape,true)
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWOFFNORMAL")
+end sub
+
+sub GSH_VALVEANALOG3WAYSHOWDISABLEDALARM(oShape)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWDISABLEDALARM oShape=" & oShape.id)
+on error resume next
+ call GSH_ShowNoAlarm(oShape)
+ call GSH_VALVEANALOG3WAYSHOWBOTTOMFLOWINDICATOR(oShape,true)
+ oShape.objects("outline").styleClass = GSH_CSSREGULATORYCONTROLINDICATORDISABLEDALARM
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWDISABLEDALARM")
+end sub
+
+sub GSH_VALVEANALOG3WAYSHOWBOTTOMFLOWINDICATOR(oShape,ShowBottomFlowdicator)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWBOTTOMFLOWINDICATOR oShape="&oShape&" "& CSTR(ShowBottomFlowdicator))
+on error resume next
+ if (ShowBottomFlowdicator) then
+ oShape.objects("txt_OPValue").style.visibility = GSH_HIDDEN
+ else
+ oShape.objects("txt_OPValue").style.visibility = GSH_VISIBLE
+ end if
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWBOTTOMFLOWINDICATOR")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_VALVEANALOG3WAY_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/07/07 Added flag parameter to execute only focus & offnormal status update or all
+' 06/10/07 Removed initman check because it is redundant to Windup = HILO
+' 08/08/07 Add: check & show status message flag on status message text. Reference issue #370 (Cuong Ly)
+' 12/09/07 Removed status message CP for now until database is ready - JE
+' Fix potential problem of sticky red
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_VALVEANALOG3WAY_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_VALVEANALOG3WAY_ONUPDATE oShape=" & oShape.id)
+
+ If flag <= 1 then
+ call GSH_VALVEANALOG3WAYSHOWNORMAL(oShape)
+
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+
+ call GSH_VALVEANALOG3WAYSHOWPORT(oShape)
+
+ 'Check the points alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ 'Alarm is Disabled
+ call GSH_VALVEANALOG3WAYSHOWDISABLEDALARM(oShape)
+ else
+ call GSH_SHOWPOINTALARMS(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ End If
+
+ 'Assumption: Reg tag and status message are mutual exclusive
+ 'Status message
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+' else
+ 'Check status Message
+' dim val_stsMsg
+' val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+' call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+ end if
+
+ 'End If
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_VALVEANALOG3WAYSETFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+' if (GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ if (GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ call GSH_VALVEANALOG3WAYSHOWOFFNORMAL(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+ End If
+
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+
+'gsh_log_e("GSH_C200_VALVEANALOG3WAY_ONUPDATE")
+end sub
+
+sub GSH_VALVEANALOG3WAYSHOWSTATUSMESSAGE(oShape,message)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWSTATUSMESSAGE oShape=" & oShape.id & ",message="&message)
+on error resume next
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_statusmessage").value = message
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWSTATUSMESSAGE")
+end sub
+
+sub GSH_VALVEANALOG3WAYSHOWINITIALIZATION(oShape)
+'gsh_log_s("GSH_VALVEANALOG3WAYSHOWINITIALIZATION oShape=" & oShape.id)
+on error resume next
+ oShape.objects("plg_OpHigh").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_OpLow").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_initialization").style.visibility = GSH_VISIBLE
+'gsh_log_e("GSH_VALVEANALOG3WAYSHOWINITIALIZATION")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATORSHORT_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital value does not change often) only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_DIGITALINDICATORSHORT_ONUPDATE (oShape, flag)
+on error resume next
+
+If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY),oShape)
+ End If
+
+End If
+
+If flag <=1 then
+ 'Set the focus
+ 'call GSH_DIGITALINDICATORSETFOCUS(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+End If
+
+If flag = 0 then
+ 'Bad Data Check
+ If GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = oShape.GetCustomProperty(GSH_CPVALUE,GSH_CPLABEL)
+ End If
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALINDICATORSHORT_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/06/07 Added flag parameter to execute only focus & offnormal status update or all
+' 13/06/07 Use GSH_GETHIGHESTALARMPRIORITYPROPERTY of GSH_GETHIGHESTALARMPRIORITYPARAMETER
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_DIGITALINDICATORSHORT_ONUPDATE (oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ else
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")), oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_DIGITALINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ dim sPVStateTxt
+ sPVStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sPVStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+'Bad Data Check not needed
+'Shape's Label is automatically assign to the Shape Custom property "Label"
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_FLAGINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_FLAGINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ dim sPVStateTxt
+ sPVStateTxt = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)
+ oShape.objects("txt_PVvalue").value = sPVStateTxt
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_UpdateAlarmStatus
+'Check alarm status and updates the text value for ConTxtAlmEnabled object
+'Parameter: sAlarmStatusParamName = GSH_SCADA_PARAM_ALARMDISABLED or C200 param constant
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_UpdateAlarmStatus (sAlarmStatusParamName)
+'gsh_log_s "GSH_FP_UpdateAlarmStatus sAlarmStatusParamName ="& sAlarmStatusParamName
+dim sAlarmStatus
+ sAlarmStatus = "---"
+ if (ConTxtAlmEnabled.DataValue(GSH_SDR_CURRENTPOINT & "." & sAlarmStatusParamName)<> 0) then
+ 'if strcomp(ConTxtAlmEnabled.DataValue(GSH_SDR_CURRENTPOINT & "." & sAlarmStatusParamName),"DISABLED",vbTextCompare) = 0 then
+ sAlarmStatus = "Disabled"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_VISIBLE
+ else
+ sAlarmStatus = "Enabled"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_HIDDEN
+ end if
+ ConTxtAlmEnabled.value = sAlarmStatus
+'gsh_log_e "GSH_FP_UpdateAlarmStatus"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_SCADA_ShowAlarmLimits
+'function: Sets the style and position of the 4 alarm limits on the PV Bar graph
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_SCADA_ShowAlarmLimits
+dim alarmtype, alarmlim, alarmPri 'to do: handle null return from the limit and priority values
+alarmtype = 0: alarmlim = 0: alarmPri = 0
+ for i = 1 to 4
+ alarmtype = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".ALARMTYPE" & i)
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".ALARM" & i & "PRIORITY")
+ page.all("txt_alarmtype"&i).value = GSH_FP_SCADA_GETALARMTYPELABEL(alarmtype)
+ if (alarmtype <> 0 and alarmPri <> 0) then
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".ALARMLIMIT" & i)
+ page.all("txt_alarmlim"&i).value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ call GSH_FP_SCADA_ShowAlarmRec(page.all("RecAlarm"&i), alarmlim, alarmPri)
+ page.all("txt_alarmlim"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_alarmtype"&i).style.visibility = GSH_VISIBLE
+ page.all("RecAlarm"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_SCADA_GETALARMTYPELABEL
+'function: Returns the text for the Alarm Limit label
+'parameters: nAlarmType = numeric value for the Alarm Type
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_FP_SCADA_GETALARMTYPELABEL(nAlarmType)
+'gsh_log_s("GSH_FP_SCADA_GETALARMTYPELABEL nAlarmType=" & nAlarmType)
+Dim sLabel: sLabel = ""
+ select case nAlarmType
+ case GSH_FP_PVHH
+ sLabel = GSH_FP_PVHH_LABEL
+ case GSH_FP_PVH
+ sLabel = GSH_FP_PVH_LABEL
+ case GSH_FP_PVL
+ sLabel = GSH_FP_PVL_LABEL
+ case GSH_FP_PVLL
+ sLabel = GSH_FP_PVLL_LABEL
+ end select
+ GSH_FP_SCADA_GETALARMTYPELABEL = sLabel
+'gsh_log_e("GSH_FP_SCADA_GETALARMTYPELABEL returns >>>>>>>>"&sLabel)
+end function
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_SCADA_ShowAlarmRec
+'function: Sets the style and position of one alarm limit on the PV Bar graph
+'parameters: oRect = object ref to limit bar
+' alarmlim = value of the limit, alarmPri = value of the alarm priority determines the style
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_SCADA_ShowAlarmRec(oRect, alarmlim, alarmPri)
+'gsh_log_s("GSH_FP_ShowAlarmRec oRect=" & oRect.id & ", alarmlim=" & alarmlim & ", alarmPri=" & alarmPri)
+ dim iNumPixels, iBottom, iRange
+ 'Retrieve Type value & calculate rectangle position
+ iRange = cdbl(txt_euhi.value) - cdbl(txt_eulo.value)
+ if iRange = 0 then
+ oRect.style.visibility = GSH_HIDDEN
+ else
+ iNumPixels = (ConIndPV.style.pixelheight * ((cdbl(alarmlim) - cdbl(txt_eulo.value)) / iRange))
+ iBottom = (ConIndPV.style.pixelheight + ConIndPV.style.pixeltop)
+ oRect.style.pixeltop = iBottom - iNumPixels - oRect.style.pixelheight
+
+ 'Retrieve Priority value & set style sheet
+ select case alarmPri
+ case 1
+ oRect.styleClass = "AlarmLowColor"
+ oRect.style.visibility = GSH_VISIBLE
+ case 2
+ oRect.styleClass = "AlarmHighColor"
+ oRect.style.visibility = GSH_VISIBLE
+ case 3
+ oRect.styleClass = "AlarmEmergColor"
+ oRect.style.visibility = GSH_VISIBLE
+ case else
+ oRect.style.visibility = GSH_HIDDEN
+ end select
+ end if
+'gsh_log_e("GSH_FP_SCADA_ShowAlarmRec")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_ShowAlarmRec
+'function: Sets the style and position of one alarm limit on the PV Bar graph
+'parameters: oRect = object ref to limit bar
+' alarmlim = value of the limit, alarmPri = value of the alarm priority determines the style
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_ShowAlarmRec(oRect, alarmlim, alarmPri)
+'gsh_log_s("GSH_FP_C200_ShowAlarmRec oRect=" & oRect.id & ", alarmlim=" & alarmlim & ", alarmPri=" & alarmPri)
+ dim iNumPixels, iBottom, iRange
+ 'Retrieve Type value & calculate rectangle position
+ iRange = cdbl(txt_euhi.value) - cdbl(txt_eulo.value)
+ if iRange = 0 then
+ oRect.style.visibility = GSH_HIDDEN
+ else
+ iNumPixels = (ConIndPV.style.pixelheight * ((cdbl(alarmlim) - cdbl(txt_eulo.value)) / iRange))
+ iBottom = (ConIndPV.style.pixelheight + ConIndPV.style.pixeltop)
+ oRect.style.pixeltop = iBottom - iNumPixels - oRect.style.pixelheight
+'Retrieve Priority value & set style sheet
+ select case alarmPri
+ case 2
+ oRect.styleClass = "AlarmLowColor"
+ oRect.style.visibility = GSH_VISIBLE
+ case 3
+ oRect.styleClass = "AlarmHighColor"
+ oRect.style.visibility = GSH_VISIBLE
+ case 4
+ oRect.styleClass = "AlarmEmergColor"
+ oRect.style.visibility = GSH_VISIBLE
+ case else
+ oRect.style.visibility = GSH_HIDDEN
+ end select
+ end if
+'gsh_log_e("GSH_FP_C200_ShowAlarmRec")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TagNameEntryTimeout
+'function: Hides timed out Tagname combobox object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TagNameEntryTimeout
+ call GSH_HIDESUBSHAPE(cmb_tagnames)
+ call GSH_HIDESUBSHAPE(txt_newTagname)
+ btn_EnterTagName.disabled = false
+ window.clearInterval(GSH_FPTimerId)
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_clearTimerInterval
+'function: Hides timed out entry object and clears the specified timer if ID is not 0.
+'parameters: oTimedOutEntryObj = object ref to something like the SP entry box
+' sTimerID = unique id of the time to be cleared or 0 if no time needs to be cleared
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_ClearTimerInterval(oTimedOutEntryObj, sTimerID)
+'gsh_log_s("GSH_FP_ClearTimerInterval " & " oTimedOutEntryObj=" & oTimedOutEntryObj.id & " sTimerID=" & sTimerID)
+ call GSH_HIDESUBSHAPE(oTimedOutEntryObj)
+ call GSH_FP_TagNameEntryTimeout
+ if sTimerID <> 0 then
+ window.clearInterval(sTimerID)
+ end if
+'gsh_log_e("GSH_FP_ClearTimerInterval ")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_DEMANDTRENDBTN_CLICK '''''''''''''''''''''''''''''''''''''''''''
+'06/01/07 Remove sPathPrefix because its not being used.
+'06/01/07 Added sTagNameHDA from the TagInformation because the Historian names do not match the tagname
+'06/01/07 parse out the function block for storing the itemAlias
+'06/25/07 change asTraceParams to asTraceNames as asTraceParams does not exists causing registry not saved.
+'08/21/2008 (CL) Add a check to determine if we should use shortname for HDA Item path in order to work with Sasol PHD historian interface (Issue#21)
+'10/06/2008 (CL) Add writing value of tag euhigh and eulow to trend range high and trend range low to allow the trend use
+' the range from registry when the range is not available from the historian
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_DEMANDTRENDBTN_CLICK(sTagName)
+
+'gsh_log_s("GSH_FP_DEMANDTRENDBTN_CLICK " & " sTagName=" & sTagName)
+Dim DispStr(), asCommandStr(), asTrendParams()
+Dim nRetVal, nNumTrendParams, nNumCommands, nCount
+Dim nIndex, nAddIndex, nDeleteIndex, nCommandIndex, nCancelIndex
+Dim nNumTrends, vTrendAvail, sParseStr, istrLen, iPosition
+Dim asDeleteParams(9), asActive(8), asTraceNames(8), asAutoscale(8), arY_Max(8), arY_Min(8), asStepped(8), asPVFormat(8), asTrendParamShort(8), asEUHIGH(8), asEULOW(8)
+Dim sTemp, nActiveCount, nSaveIndex, nCounter, sStepped, sPathPrefix, sPVFormat, asItemAliasName, sTagNameAlias, sPVeuhigh, sPVeulow
+
+on error resume next
+ sTagNameAlias = GSH_READTAGINFORMATIONKEYVALUE(sTagName, GSH_REGKEY_TAGNAME_ALIAS, sTagName)
+ nIndex = 0
+ nNumTrends = 8
+ nNumTrendParams = GSH_READTAGINFORMATIONKEYVALUE(sTagName, "NoOfTrendingParams", 0)
+ nNumCommands = GSH_GETMENUCONFIG(GSH_REGKEY_NUMCMDS, 0)
+ sPVFormat = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT)
+ sPathPrefix = GSH_GETDEMANDTREND (GSH_REGISTRY_SETTINGS,GSH_REGKEY_PATHPREFIX, "")
+
+ '10/06/2008 CL
+ sPVeuhigh = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_EUHIGH, 0)
+ sPVeulow = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_EULOW, 0)
+
+ If nNumTrendParams >0 Then
+ ReDim asTrendParams(nNumTrendParams-1)
+ End If
+
+ If nNumCommands>0 Then
+ ReDim asCommandStr(nNumCommands-1)
+ End If
+
+ nActiveCount = 0
+ For nCount = 1 To nNumTrends Step 1
+ asTraceNames(nCount) = GSH_GETDEMANDTREND (GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, "")
+ asActive(nCount) = GSH_GETDEMANDTREND (GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, "OFF")
+ asAutoscale(nCount) = GSH_GETDEMANDTREND (GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "OFF")
+ asDeleteParams(nCount) = ""
+ If strComp(asActive(nCount),"ON",vbTextCompare) = 0 Then
+ nActiveCount = nActiveCount + 1
+ asDeleteParams(nCount) = asTraceNames(nCount)
+ End If
+ Next
+
+ If nActiveCount > 0 Then
+ nActiveCount = nActiveCount + 1
+ End If
+
+ If (nNumTrendParams > 0) Then
+ For nCount = 1 To nNumTrendParams Step 1
+ asTrendParams(nCount-1) = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TRENDPARAM & nCount, "")
+ istrLen = len(asTrendParams(nCount-1))
+ iPosition= Instr(1, asTrendParams(nCount-1) , ".",vbtextcompare)
+ asTrendParamShort(nCount-1) = right(asTrendParams(nCount-1), istrLen - iPosition)
+ asStepped(nCount) = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TRENDSTEPPED & nCount, "OFF")
+ Select Case asTrendParamShort(nCount-1)
+' Select Case asTrendParams(nCount-1)
+ Case "PV"
+ asPVFormat(nCount) = sPVFormat
+ '10/06/2008 CL
+ asEUHIGH(nCount) = sPVeuhigh
+ asEULOW(nCount) = sPVeulow
+ Case "SP"
+ asPVFormat(nCount) = sPVFormat
+ '10/06/2008 CL
+ asEUHIGH(nCount) = sPVeuhigh
+ asEULOW(nCount) = sPVeulow
+ Case "OP"
+ asPVFormat(nCount) = "D1"
+ '10/06/2008 CL
+ asEUHIGH(nCount) = 106.9
+ asEULOW(nCount) = -6.9
+ End Select
+ Next
+ End If
+
+ If (nNumCommands > 0) Then
+ For nCount = 1 To nNumCommands Step 1
+ asCommandStr(nCount-1) = GSH_GETMENUCONFIG(GSH_REGKEY_CMDSTR & nCount, "")
+ Next
+ End If
+
+ ReDim DispStr(nNumTrendParams + nNumCommands + 7 + nActiveCount)
+
+ DispStr(nIndex) = "Tag : " & sTagNameAlias
+ nIndex = nIndex + 1
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+
+ If (nNumTrendParams > 0) Then
+ nAddIndex = nIndex
+ For nCount = 0 To UBound(asTrendParams) Step 1
+ DispStr(nIndex) = "Add Trace " & sTagNameAlias & "." & asTrendParams(nCount)
+ nIndex = nIndex + 1
+ Next
+
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+ nDeleteIndex = nIndex
+ For nCount = 1 To nNumTrends
+ If asDeleteParams(nCount) <> "" Then
+ DispStr(nIndex) = "Delete Trace " & asDeleteParams(nCount)
+ nIndex = nIndex + 1
+ End If
+ Next
+
+ If nActiveCount > 0 Then
+ DispStr(nIndex) = "Delete ALL Demand Trend traces"
+ nIndex = nIndex + 1
+
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+ End If
+ End If
+
+ nSaveIndex = nIndex
+
+ DispStr(nIndex) = "Save Demand Trend Setup"
+ nIndex = nIndex + 1
+
+ DispStr(nIndex) = "Restore Previous Demand Trend"
+ nIndex = nIndex + 1
+
+ DispStr(nIndex) = ""
+ nIndex = nIndex + 1
+
+ If (nNumCommands > 0) Then
+ nCommandIndex = nIndex
+ For nCount = 0 To UBound(asCommandStr) Step 1
+ DispStr(nIndex) = asCommandStr(nCount)
+ nIndex = nIndex + 1
+ Next
+ End If
+
+ nCancelIndex = nIndex
+ 'Debugging
+ For nCount = 0 To nIndex Step 1
+ 'gsh_log("GSH_DEMANDTRENDBTN nCount=" &nCount&"DispStr(nCount)"& DispStr(nCount))
+ Next
+
+ If nNumCommands = 0 Then
+ nCommandIndex = nCancelIndex
+ End If
+
+'CallAgain:
+ do while nRetVal = 0
+
+ Dim ArrMenu ' As ArrPopupMenuX
+ Set ArrMenu = CreateObject("ArrPopupMenuXControl.ArrPopupMenuX")
+ ArrMenu.ShowMenuArr DispStr
+ nRetVal = ArrMenu.Item
+
+ If nActiveCount = 0 Then 'added this to handle case when all traces are inactive
+ nDeleteIndex = nAddIndex + 1
+ End If
+ loop
+
+ Set ArrMenu = Nothing
+
+ If ((nRetVal >= nAddIndex) And (nRetVal < nDeleteIndex)) Then
+ Dim sOPC1_PathPrefix,sOPC2_PathPrefix, sTagNameHDA, bUseShortNameForHDA
+ sOPC1_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY1PREFIX,"")
+ sOPC2_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY2PREFIX,"")
+ bUseShortNameForHDA = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_USESHORTNAME_FOR_HDAPATH,"")
+
+ For nCount = 1 To nNumTrends Step 1
+ If asActive(nCount) = GSH_OFF Then
+ sTagNameHDA = GSH_READTAGINFORMATIONKEYVALUE(sTagName,GSH_REGKEY_TAGNAMEHDA, sTagName)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, sTagNameAlias & "." & asTrendParamShort(nRetVal - nAddIndex)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, sOPC1_PathPrefix & sPathPrefix & sTagName & "." & asTrendParams(nRetVal - nAddIndex)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, sOPC2_PathPrefix& sPathPrefix & sTagName & "." & asTrendParams(nRetVal - nAddIndex)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_ON
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(nRetVal - nAddIndex + 1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(nRetVal - nAddIndex + 1)
+
+ 'Added 10/06/2008 (CL) add to allows trend to use range from registry if they are not available from historian
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH, asEUHIGH(nRetVal - nAddIndex + 1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW, asEULOW(nRetVal - nAddIndex + 1)
+
+
+ 'Added 08/21/2008 (CL) to work with Sasol PHD historian interface
+ 'Issue#21: http://wss-edm-1/clients/hcs/services/ISE-HCS8227/ClientProjectAccess/Lists/Issue%20Tracker/DispForm.aspx?ID=21
+ If(UCASE(bUseShortNameForHDA) = "ON") then
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParamShort(nRetVal - nAddIndex)
+
+ Else
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParams(nRetVal - nAddIndex)
+ End If
+
+ Exit Sub
+ End If
+ Next
+ Msgbox "Sorry ! No Traces available. Please delete a Trace before adding a new one." & Chr(13),,"HMI Operator Interface"
+ ElseIf ((nRetVal >= nDeleteIndex) And (nRetVal < nSaveIndex)) Then
+ nCount = nRetVal - nDeleteIndex + 1
+ If nCount = nActiveCount Then
+ For nCount = 1 To nNumTrends
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_OFF
+ Next
+ Else
+ nDelete = 1
+ For n = 1 To nNumTrends Step 1
+ If asActive(n) <> "OFF" Then
+ If nDelete = nCount Then
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & n,GSH_REGKEY_ACTIVE, GSH_OFF
+ Exit Sub
+ End If
+ nDelete = nDelete + 1
+ End If
+ Next
+ End If
+ ElseIf ((nRetVal >= nSaveIndex) And (nRetVal < nCommandIndex)) Then
+ nCnt = nRetVal - nSaveIndex + 1
+ 'Saving demand trends to previous demand trend on registry
+ If nCnt = 1 Then
+ For nCount = 1 To nNumTrends
+ asItemAliasName = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, "")
+ asTraceNames(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, "")
+ asTraceNames(2) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, "")
+ asTraceNames(3) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, "")
+ asActive(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, "")
+ asAutoscale(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "")
+ asStepped(1)= GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, "")
+ asPVFormat(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, "")
+ arY_Max(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX,"")
+ arY_Min(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN,"")
+
+ '10/06/2008 (CL)
+ asEUHIGH(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH,"")
+ asEULOW(1) = GSH_GETDEMANDTREND(GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW,"")
+
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, asItemAliasName
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, asTraceNames(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, asTraceNames(2)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, asTraceNames(3)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, asActive(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, asAutoscale(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX, arY_Max(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN, arY_Min(1)
+
+ '10/06/2008 (CL)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH, asEUHIGH(1)
+ GSH_SETOPERATORTREND GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW, asEULOW(1)
+
+
+ Next
+ 'Restore previous demand strends to demand trend on Registry
+ Else
+ For nCount = 1 To nNumTrends
+ asItemAliasName = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, "")
+ asTraceNames(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, "")
+ asTraceNames(2) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, "")
+ asTraceNames(3) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, "")
+ asActive(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, "")
+ asAutoscale(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "")
+ asStepped(1)= GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, "")
+ asPVFormat(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, "")
+
+ '10/06/2008 (CL)
+ asEUHIGH(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV, GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH,"")
+ asEULOW(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV, GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW,"")
+
+
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, asItemAliasName
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, asTraceNames(1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, asTraceNames(2)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, asTraceNames(3)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, asActive(1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, asAutoscale(1)
+
+ '10/06/2008 (CL)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_HIGH, asEUHIGH(1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_RANGE_LOW, asEULOW(1)
+
+
+ If (strComp(asAutoscale(1),"Off",vbTextCompare) = 0) Then
+ arY_Max(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX,"")
+ arY_Min(1) = GSH_GETOPERATORTREND(GSH_REGKEY_DEMANDTRENDPREV,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN,"")
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX,arY_Max(1)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN,arY_Min(1)
+ End If
+ Next
+ End If
+ ElseIf ((nRetVal >= nCommandIndex) And (nRetVal < nCancelIndex)) Then
+ Dim nLen, nTemp, sCommandLeft, sCommandRight, sCommand
+
+ sParseStr = GSH_GETMENUCONFIG(GSH_REGKEY_CMDSTRING & ((nRetVal-nCommandIndex)+1), "")
+ nLen = Len(sParseStr)
+ nTemp = Instr(1,sParseStr,"XXXXXX",1)
+
+ If nTemp = 0 Then ' do not need to add tag name to command
+ sCommand = sParseStr
+' gsh_log("GSH_RIGHTCLICKTAGNAME 1 sCommand=" & sCommand)
+ Else
+ sCommandLeft = left(sParseStr,(nTemp - 1))
+ nTemp = nLen - nTemp - 5
+ If nTemp < 1 Then
+ sCommandRight = ""
+ Else
+ sCommandRight = right(sParseStr,(nTemp))
+ End If
+' gsh_log("GSH_RIGHTCLICKTAGNAME 2 sCommand=" & sCommand)
+
+ sCommand = sCommandLeft & sTagName & sCommandRight
+' id = shell(sCommand,1)
+ End If
+ id = window.parent.external.shell(sCommand,1)
+ End If
+'errorhandler:
+'gsh_log_e("GSH_DEMANDTRENDBTN" )
+
+End Sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Procedure: WRITE FACEPLATE TAGNAME KEY VALUE'''''''''''''''''''''''''''''''
+'Parameters:
+' strKey - Part of path to Registry Item
+' strValue - Value of string key
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_WRITEFACEPLATETAGNAMEKEYVALUE(strKey, strValue)
+'gsh_log_s("GSH_WRITEFACEPLATETAGNAMEKEYVALUE " & "strKey=" & strKey & ",strValue=" & strValue )
+ dim strRegLocation
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_FACEPLATE_TAGS & strKey
+ 'gsh_log("GSH_WRITEFACEPLATETAGNAMEKEYVALUE checkPoint strRegLocation=" & strRegLocation)
+ GSH_WRITETOREGISTRY strRegLocation,strValue,"REG_SZ"
+'gsh_log_e("GSH_WRITEFACEPLATETAGNAMEKEYVALUE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: READ FACEPLATE TAGNAME KEY VALUE '''''''''''''''''''''''''
+'Parameters:
+' strKey - Part of path to Registry Item
+' defaultString - Default Value if error or nothing found
+'Returns:
+' value of registry item or parameter of defaultString
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_READFACEPLATETAGNAMEKEYVALUE(strKey, defaultString)
+'gsh_log_s("GSH_READFACEPLATETAGNAMEKEYVALUE" & " strKey=" & strKey & ",defaultString=" & defaultString )
+ dim tempString, strRegLocationm, tempReturn
+ strRegLocation = GSH_REGISTRY_BASE & GSH_REGISTRY_FACEPLATE_TAGS & strKey
+ 'gsh_log("GSH_READFACEPLATETAGNAMEKEYVALUE checkPoint strRegLocation=" & strRegLocation)
+ tempString = GSH_READREGISTRY(strRegLocation,defaultString)
+ if tempString = "" then
+ tempReturn = defaultString
+ else
+ tempReturn = tempString
+ End If
+ GSH_READFACEPLATETAGNAMEKEYVALUE = tempReturn
+'gsh_log_e("GSH_READFACEPLATETAGNAMEKEYVALUE returning >>>" & tempReturn&"<<<")
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'Function: GSH_FP_TAG_CHANGED ''''''''''''''''''''''''''''''''''''''
+' Sets registry settings for faceplates
+'Parameters:
+' tagname - tag name of new tag user wants displayed in faceplate
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TAG_CHANGED(tagname)
+on error resume next
+'gsh_log_s("GSH_FP_TAG_CHANGED tagname=" & tagname)
+
+ dim vTagFamily
+
+ 'Make tagname the focus tag
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_FOCUSTAG,tagname
+ 'Need to take care of associate tags as well
+ vTagFamily = GSH_READTAGINFORMATIONKEYVALUE(tagname, GSH_REGKEY_TAGFAM, "")
+ 'Store Tag Family in Display Communication Mailbox
+ GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE GSH_REGKEY_TAGFAM,vTagFamily
+
+ 'Update faceplate
+ call GSH_UpdateFaceplate
+
+ 'Comment out by Cuong Ly on Jun 12, 2007
+ 'call GSH_UpdateFaceplate(tagname) '-> GSH_UpdateFaceplate take no paramter.
+'put new tagname into current
+'move current to prior1, prior1 to prior2, etc
+ for cnt = 1 to 4
+ call GSH_WRITEFACEPLATETAGNAMEKEYVALUE(GSH_REGKEY_FACEPLATE_PRIOR&cstr(6-cnt),GSH_READFACEPLATETAGNAMEKEYVALUE(GSH_REGKEY_FACEPLATE_PRIOR&cstr(6-cnt-1),""))
+ Next
+ call GSH_WRITEFACEPLATETAGNAMEKEYVALUE(GSH_REGKEY_FACEPLATE_PRIOR&cstr(1),GSH_READFACEPLATETAGNAMEKEYVALUE(GSH_REGKEY_FACEPLATE_CURRENT,""))
+ call GSH_WRITEFACEPLATETAGNAMEKEYVALUE(GSH_REGKEY_FACEPLATE_CURRENT,tagname)
+'gsh_log_e("GSH_FP_TAG_CHANGED")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_SHOWNAMESBTN_ONCLICK
+'Function: Toggles the visible flag for tag name labels and changes the
+'button text label between Show and Hide Names, then updates all shapes
+'06/27/07 Removed call to GSH_UPDATESHAPESONDISPLAY on all 3 displays
+' this is now being handled by the onperiodicupdate event handler on each pg
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_FP_SHOWNAMESBTN_ONCLICK (oShape)
+'gsh_log_S("GSH_FP_SHOWNAMESBTN_ONCLICK oShape = "& oShape.id)
+
+Dim sIsTagNameVisible, sPushbuttonLabel
+ sIsTagNameVisible = GSH_FALSE
+ sPushbuttonLabel = "Show Names"
+ if (strcomp(oShape.value,"Show Names", vbtextcompare) = 0) then
+ sIsTagNameVisible = GSH_TRUE
+ sPushbuttonLabel = "Hide Names"
+ end if
+
+ GSH_TAGNAMELABEL_SET_VISIBILITYSTATUS(sIsTagNameVisible)
+
+ oShape.value = sPushbuttonLabel
+'gsh_log_e("GSH_FP_SHOWNAMESBTN_ONCLICK")
+End Sub
+
+sub GSH_FP_SHOWNAMESBTNPERIODICUPDATE
+ Dim sPushbuttonLabel
+ sPushbuttonLabel = "Show Names"
+ dim tagLabelVisibility
+ tagLabelVisibility = GSH_TAGNAMELABEL_GET_VISIBILITYSTATUS()
+ if (strcomp(tagLabelVisibility,GSH_TRUE, vbtextcompare) = 0) then
+ sPushbuttonLabel = "Hide Names"
+ end if
+ btn_ShowNames.value = sPushbuttonLabel
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_ACKALARMBUTTONCLICK
+'Function: Toggles the acknowlege alarm flag to trigger an acknowledge event
+' in the alarm summary page
+'TODO: update
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_ACKALARMBUTTONCLICK
+ on error resume next
+ ConAlpTagname.focus
+ window.external.Application.Document.ParentWindow.external.InvokeMenu2 "Acknowledge Alarm"
+end sub
+
+function GSH_FP_VALIDATETAG (sTagname)
+'gsh_log_s "GSH_FP_VALIDATETAG <<<<<<" & sTagname
+ dim sFaceplateName, tempReturn
+
+ 'Comment out by Cuong Ly, Jun 12, 2007. Not sure what this does
+ 'but it gave error
+ 'call DisplayDataRepository.PutValue (GSH_SDR_INTERIMPOINT, sTagname)
+
+'for i=1 to 1000
+'GSH_LOG i
+'next
+ 'if ConAlpTagname.DataExists(GSH_SDR_INTERIMPOINT & ".PointID") then
+ sFaceplateName = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_TagFacePlate, "Error")
+' gsh_log "Data Exists? " & ConAlpTagname.DataExists(GSH_SDR_INTERIMPOINT & ".PointID") & " sFaceplateName? " & sFaceplateName
+' if ConAlpTagname.DataExists(GSH_SDR_INTERIMPOINT & ".PointID") or strcomp(sFaceplateName, "Error",vbtextcompare) <> 0 then
+
+ if strcomp(sFaceplateName, "Error",vbtextcompare) <> 0 then
+ tempReturn = true
+ else
+ tempReturn = false
+ end if
+ GSH_FP_VALIDATETAG = tempReturn
+'gsh_log_e "GSH_FP_VALIDATETAG returns >>>>>>>>>>>" & tempReturn
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TXTNEWTAGNAME_ONCHANGE
+'Function: Hides Tagname entry objects and updates the Current Point
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TXTNEWTAGNAME_ONCHANGE
+'gsh_log_s "GSH_FP_TXTNEWTAGNAME_ONCHANGE"
+ txt_newTagname.style.visibility = "hidden"
+ cmb_tagnames.style.visibility = "hidden"
+ if (btn_EnterTagName.disabled) then 'added this check because this event was firing twice sequentially
+ if GSH_FP_VALIDATETAG (txt_newTagname.value) then
+ GSH_FP_TAG_CHANGED(txt_newTagname.value)
+ else
+ msgbox "This Tag does not exist."
+ end if
+ btn_EnterTagName.disabled = false
+ end if
+ window.clearInterval(GSH_FPTimerId)
+ txt_newTagname.CancelChange
+'gsh_log_e "GSH_FP_TXTNEWTAGNAME_ONCHANGE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_CMBTAGNAMES_ONACTIVATE
+'Function: Refreshs the dropdown list to the last 5 tags used
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_CMBTAGNAMES_ONACTIVATE
+'gsh_log_s "GSH_FP_CMBTAGNAMES_ONACTIVATE"
+cmb_tagnames.ResetContent
+ for cnt = 1 to 5
+ cmb_tagnames.AddString GSH_READFACEPLATETAGNAMEKEYVALUE(GSH_REGKEY_FACEPLATE_PRIOR&cstr(cnt),"")
+ Next
+'gsh_log_e "GSH_FP_CMBTAGNAMES_ONACTIVATE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_CMBTAGNAMES_ONCHANGE
+'Function: Hides Tagname entry objects and updates the Current Point
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_CMBTAGNAMES_ONCHANGE
+'gsh_log_s "GSH_FP_CMBTAGNAMES_ONCHANGE"
+ cmb_tagnames.style.visibility = "Hidden"
+ txt_newTagname.style.visibility = "hidden"
+ GSH_FP_TAG_CHANGED(cmb_tagnames.value)
+ btn_EnterTagName.disabled = false
+ window.clearInterval(GSH_FPTimerId)
+'gsh_log_e "GSH_FP_CMBTAGNAMES_ONCHANGE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_LAUNCHPOINTDETAILPAGE
+'Function: Calls system detail page
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_LAUNCHPOINTDETAILPAGE
+'gsh_log_s "GSH_FP_LAUNCHPOINTDETAILPAGE"
+ ConAlpTagname.focus
+ window.external.Application.Document.ParentWindow.external.InvokeMenu2 "Request Point Detail"
+'gsh_log_e "GSH_FP_LAUNCHPOINTDETAILPAGE"
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_LAUNCHHOMEDISPLAYS
+'Function: Launches T2, T3 and T4 for current point
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_LAUNCHHOMEDISPLAYS
+'sh_log_s "GSH_FP_LAUNCHHOMEDISPLAYS"
+ Dim sOnDispT2, sOnDispT3, sOnDispT4, sHomeDispT2, sHomeDispT3, sHomeDispT4
+ Dim sDispLocation
+
+ sOnDispT2 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE("Type2Filename","")
+ sOnDispT3 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE("Type3Filename","")
+ sOnDispT4 = GSH_READDISPLAYCOMMUNICATIONKEYVALUE("Type4Filename","")
+
+ sHomeDispT2 = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "Type2HomeDispFN", "")
+ sHomeDispT3 = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "Type3HomeDispFN", "")
+ sHomeDispT4 = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "Type4HomeDispFN", "")
+
+ sDispLocation = GSH_READDISPLAYNAMES("")
+ if strcomp(sHomeDispT3, "", vbtextcompare) <> 0 then
+ if strcomp(sOnDispT3, sHomeDispT3, vbtextcompare) <> 0 then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sHomeDispT3)
+ window.navigate( sDispLocation & sHomeDispT3 & GSH_DISPLAYFILEEXTENSION )
+ end if
+ end if
+ if strcomp(sHomeDispT4, "", vbtextcompare) <> 0 then
+ if strcomp(sOnDispT4, sHomeDispT4, vbtextcompare) <> 0 then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sHomeDispT4)
+ window.navigate( sDispLocation & sHomeDispT4 & GSH_DISPLAYFILEEXTENSION )
+ end if
+ end if
+ if strcomp(sHomeDispT2, "", vbtextcompare) <> 0 then
+ if strcomp(sOnDispT2, sHomeDispT2, vbtextcompare) <> 0 then
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sHomeDispT2)
+ window.navigate( sDispLocation & sHomeDispT2 & GSH_DISPLAYFILEEXTENSION )
+ end if
+ end if
+'sh_log_e "GSH_FP_LAUNCHHOMEDISPLAYS"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_ENTRYFIELD_ONCHANGE
+'Function: If there is a change, hide the entry field,
+' set the data value, and clear the Timer
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_ENTRYFIELD_ONCHANGE (oShapeObj, sParamName, nTimerID)
+if not(isNull(oShapeObj.value) or isEmpty(oShapeObj.value)) then
+ call GSH_HIDESUBSHAPE(oShapeObj)
+ ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sParamName) = oShapeObj.value
+ window.clearInterval(nTimerID)
+ oShapeObj.CancelChange
+end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_SHOWNOALARM
+'Function: Unlike other shapes, the alarm status display on the fp doesn't
+' show the outline when not in alarm.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_SHOWNOALARM(oShape)
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_GENERAL_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, ShowNames Button, Detail Trend
+' 06/08/07 Removed the line to write the current FP Filename to the
+' Registry mailbox because it is no longer needed in GSH_UpdateFaceplate.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_GENERAL_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_GENERAL_ONPAGECOMPLETE"
+on error resume next
+ document.title = CSTR("fp")
+
+ txt_Description.value = cStr(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_TAGDESCRIPTION, defaultString))
+ txt_Keyword.value = cStr(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_KEYWORD, defaultString))
+ txt_Units.value = cStr(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_UNITS, defaultString))
+
+ 'Initialize the ShowNames button label
+ call GSH_FP_SHOWNAMESBTNPERIODICUPDATE
+ window.clearInterval(GSH_FP_ShowNamesBtnTimerId)
+ GSH_FP_ShowNamesBtnTimerId = window.setInterval("GSH_FP_SHOWNAMESBTNPERIODICUPDATE", GSH_FP_SHOWNAMESBTNUPDATEPERIOD_SECS * 1000)
+ 'Start the detail trend timer and periodic update function
+ call GSH_FP_DetailTrendInitialize(ConAlpTagname.value)
+ window.clearInterval(GSH_DetailTrendUpdateTimerId)
+ GSH_DetailTrendUpdateTimerId = window.setInterval("GSH_DETAILTRENDPERIODICUPDATE(" & ConAlpTagname.id & ")", GSH_DETAILTRENDUPDATEPERIOD_SECS * 1000)
+'gsh_log_e "GSH_FP_GENERAL_ONPAGECOMPLETE"
+end sub
+
+
+sub GSH_FP_GENERAL_INIT_STSMSG(dataScriptObj, stsMsgComboObj, stsMsgOffNormalObj, point, parameter)
+'gsh_log_s("GSH_FP_GENERAL_INIT_STSMSG")
+on error resume next
+ dim i, message, stsMsgType, numOfMessage
+
+ 'Enter states for the StsMsg combo
+ stsMsgComboObj.AddString(GSH_NONE)
+ stsMsgType = GSH_READTAGINFORMATIONKEYVALUE(dataScriptObj.value, GSH_REGKEY_STSMSGLIST, defaultString)
+
+
+ numOfMessage = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & "NoOfMessages", "0")
+
+ dim stsMsg_flag
+ stsMsg_flag = dataScriptObj.DataValue(point &"." &parameter)
+
+ stsMsgComboObj.value = GSH_NONE
+ stsMsgOffNormalObj.style.visibility = GSH_HIDDEN
+
+ for i = 1 to numOfMessage
+ message = GSH_READSTSMSGLISTSKEYVALUE(stsMsgType & "\" & GSH_REGKEY_STATUSMESSAGE &i, "")
+ ConCboStsMsg.AddString(message)
+
+ if i = stsMsg_flag then
+ stsMsgComboObj.value = message
+ stsMsgOffNormalObj.style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e("GSH_FP_GENERAL_INIT_STSMSG")
+end sub
+
+
+sub GSH_FP_STSMSG_ONCHANGE(dataScriptObj, stsMsgComboObj, stsMsgOffNormalObj, point, parameter)
+
+ if stsMsgComboObj.selectedIndex <> -1 then
+ dataScriptObj.DataValue(point & "." &parameter) = stsMsgComboObj.selectedIndex
+
+ if stsMsgComboObj.selectedIndex <> 0 then
+ stsMsgOffNormalObj.style.visibility = GSH_VISIBLE
+ else
+ stsMsgOffNormalObj.style.visibility = GSH_HIDDEN
+ end if
+
+ end if
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_GENERAL_ONPAGEUNLOAD
+'Function: clears timers
+'08/14/2007 - add GSH_PageUnload function to clear WshShell object
+' when faceplates are unloaded.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_GENERAL_ONPAGEUNLOAD
+'gsh_log_s "GSH_FP_GENERAL_ONPAGEUNLOAD"
+ window.clearInterval(GSH_FP_ShowNamesBtnTimerId)
+ window.clearInterval(GSH_DetailTrendUpdateTimerId)
+ GSH_PageUnload
+'gsh_log_e "GSH_FP_GENERAL_ONPAGEUNLOAD"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_ANALOG_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_ANALOG_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_ANALOG_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ dim nPVFormat
+ nPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ txt_euhi.value = FORMATNUMBER(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_EUHI),nPVFormat,-2, 0, 0)
+ txt_eulo.value = FORMATNUMBER(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_EULO),nPVFormat,-2, 0, 0)
+ call GSH_FP_SCADA_ShowAlarmLimits 'Setup Alarm Limits
+'gsh_log_e "GSH_FP_ANALOG_ONPAGECOMPLETE"
+end sub
+
+
+sub GSH_FP_DIGITALOUTPUT_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_DIGITALOUTPUT_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to 3 '(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NumberOfInputStates")-1)
+ page.all("txt_OPState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State" & i & "Descriptor")
+
+ if strcomp(page.all("txt_OPState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtOP"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_OPState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+' call GSH_FP_DIGITAL_SHOWALARMSTATES 'Setup Alarm Limits
+'gsh_log_e "GSH_FP_DIGITALOUTPUT_ONPAGECOMPLETE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_DIGITAL_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+' 06/28/07 having the FP_Digital to handle 4 PV states
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_DIGITAL_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_DIGITAL_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to 3 '(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NumberOfInputStates")-1)
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State" & i & "Descriptor")
+
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+' call GSH_FP_DIGITAL_SHOWALARMSTATES 'Setup Alarm Limits
+'gsh_log_e "GSH_FP_DIGITAL_ONPAGECOMPLETE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Detail Trend
+' 09/23/09
+' n is number of states
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE(n)
+'gsh_log_s "GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (n-1) '(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NumberOfInputStates")-1)
+ 'page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".Statetxt(" &i & ")")
+ page.all("txt_PVState"&i).value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "STATETXT(" &i &")", GSH_NONE)
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE"
+end sub
+
+'GSH_FP_TPS_DIGITALOUTPUT_ONPAGECOMPLETE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Detail Trend
+' 09/23/09
+' n is number of states
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_DIGITALOUTPUT_ONPAGECOMPLETE(n)
+'gsh_log_s "GSH_FP_TPS_DIGITALOUTPUT_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (n-1) '(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NumberOfInputStates")-1)
+ page.all("txt_OPState"&i).value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "STATETXT(" &i &")", GSH_NONE)
+ if strcomp(page.all("txt_OPState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtOP"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_OPState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_TPS_DIGITALOUTPUT_ONPAGECOMPLETE"
+end sub
+
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_DIGITALCOMPOSITE_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Detail Trend
+' 09/23/09
+' n is number of states
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_DIGITALCOMPOSITE_ONPAGECOMPLETE(n)
+'gsh_log_s "GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+' for i = 0 to (ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NOSTATES")-1)
+ for i = 0 to (n-1)
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".Statetxt(" &i & ")")
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_TPS_DIGITALCOMPOSITE_ONPAGECOMPLETE"
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_DIGITALCOMPOSITE_HG_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Detail Trend
+' 09/23/09
+' n is number of states
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_DIGITALCOMPOSITE_HG_ONPAGECOMPLETE(n)
+'gsh_log_s "GSH_FP_TPS_DIGITAL_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+' for i = 0 to (ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NOSTATES")-1)
+ for i = 0 to (n-1)
+ page.all("txt_PVState"&i).value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "STATETXT("&i&")", "")
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_TPS_DIGITALCOMPOSITE_HG_ONPAGECOMPLETE"
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_DIGITAL_HG_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Detail Trend
+' 09/23/09
+' n is number of states
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_DIGITAL_HG_ONPAGECOMPLETE(n)
+'gsh_log_s "GSH_FP_TPS_DIGITAL_HG_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (n-1) '(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NumberOfInputStates")-1)
+' j = i+1
+'Option1 (prefer): Jamie to replace the parameters .StateiDescriptor by the correct TPS parameters
+' page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".Statetxt(" & j & ")")
+
+'Option2: use states from the registry. Comment this out if we use option1
+ page.all("txt_PVState"&i).value = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, "STATETXT("&i&")", "")
+
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_TPS_DIGITAL_HG_ONPAGECOMPLETE"
+end sub
+
+
+sub GSH_FP_SCADA_DIGITALCOMPOSITE_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_SCADA_DIGITALCOMPOSITE_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to 3 '(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".NumberOfInputStates")-1)
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State" & i & "Descriptor")
+
+
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_SCADA_DIGITALCOMPOSITE_ONPAGECOMPLETE"
+end sub
+
+sub GSH_FP_DIGITAL_SHOWALARMSTATES
+'gsh_log_s("GSH_FP_DIGITAL_SHOWALARMSTATES")
+dim alarmEnabled, alarmPri
+ for i = 0 to 1
+ alarmEnabled = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State"&i&"AlarmEnabled")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State"&i&"AlarmPriority")
+ call GSH_FP_DIGITAL_SHOWALARMLINE(page.all("TxtPV"&i), page.all("ShpState"&i),page.all("LinAlm"&i), alarmEnabled, alarmPri)
+ next
+'gsh_log_e("GSH_FP_DIGITAL_SHOWALARMSTATES")
+end sub
+
+sub GSH_FP_DIGITAL_SHOWALARMLINE(oLabel, oState, oLine, alarmEnabled, alarmPri)
+'gsh_log_s("GSH_FP_DIGITAL_SHOWALARMLINE oLine=" & oLine.id & ", alarmEnabled=" & alarmEnabled & ", alarmPri=" & alarmPri)
+On error resume next
+If alarmPri>0 then
+ if alarmEnabled>0 then
+ select case alarmPri
+ case 1 oLine.styleClass="AlarmLowColor"
+ case 2 oLine.styleClass="AlarmHighColor"
+ case 3 oLine.styleClass="AlarmEmergColor"
+ end select
+ oLine.style.visibility = GSH_VISIBLE
+ end if
+ oLabel.style.visibility = GSH_VISIBLE
+ oState.style.visibility = GSH_VISIBLE
+end if
+'gsh_log_e("GSH_FP_DIGITAL_SHOWALARMLINE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' GSH_FP_DIGITAL_SHOWALARMBAR
+' give the bar line correct color based on the given alarm code.
+'
+' 08/10/2007 - Add this function to show a bar beside
+' state that has alarm.
+' Do not check if a state has alarm enabled as it required additional
+' parameter.
+' Reference: issue #722 (Cuong Ly)
+'
+sub GSH_FP_DIGITAL_SHOWALARMBAR(numOfStates)
+
+'gsh_log_s("GSH_FP_DIGITAL_SHOWALARMBAR numOfStates = " &numOfStates)
+
+ dim n, alarmPri
+ n = numOfStates-1
+ for i = 0 to n
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State"&i&"AlarmPriority")
+ alarmEnabled = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".State"&i&"AlarmEnabled")
+
+ if alarmEnabled>0 then
+ if alarmPri > 0 then
+ select case alarmPri
+ case 1 page.all("ln_AlmBar"&i).styleClass=GSH_CSSALARMLOWACK
+ case 2 page.all("ln_AlmBar"&i).styleClass=GSH_CSSALARMHIGHACK
+ case 3 page.all("ln_AlmBar"&i).styleClass=GSH_CSSALARMEMERGENCYACK
+ end select
+ page.all("ln_AlmBar"&i).style.visibility = GSH_VISIBLE
+ else
+ page.all("ln_AlmBar"&i).style.visibility = GSH_HIDDEN
+ end if
+ else
+ page.all("ln_AlmBar"&i).style.visibility = GSH_HIDDEN
+ end if
+ next
+
+'gsh_log_e("GSH_FP_DIGITAL_SHOWALARMBAR ")
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_DIGITAL_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_DIGITAL_ONPAGECOMPLETE(sFunctionBlock)
+'gsh_log_s("GSH_FP_C200_DIGITAL_ONPAGECOMPLETE >>>> sFunctionBlock = " & sFunctionBlock)
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to 1
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "StateText(" & i+4 & ")")
+ next
+'gsh_log_e "GSH_FP_C200_DIGITAL_ONPAGECOMPLETE"
+end sub
+
+sub GSH_FP_C200_DIGITALCOMPOSITE_ONPAGECOMPLETE(sFunctionBlock)
+'gsh_log_s ("GSH_FP_C200_DIGITALCOMPOSITE_ONPAGECOMPLETE>>>> sFunctionBlock = " & sFunctionBlock)
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "NUMSTATES")-1)
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "StateText(" & i+4 & ")")
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_C200_DIGITALCOMPOSITE_ONPAGECOMPLETE"
+end sub
+
+sub GSH_FP_C200_DIGITALCOMPOSITE_NOOP_ONPAGECOMPLETE(sFunctionBlock)
+'
+'Added this subroutine for the No Output Faceplate - 04Jan2008 - JE
+'
+'gsh_log_s ("GSH_FP_C200_DIGITALCOMPOSITE_NOOP_ONPAGECOMPLETE>>>> sFunctionBlock = " & sFunctionBlock)
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "NUMSTATES")-1)
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "StateText(" & i+4 & ")")
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStatePV"&i).style.visibility = GSH_VISIBLE
+' page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_C200_DIGITALCOMPOSITE_NOOP_ONPAGECOMPLETE"
+end sub
+
+sub GSH_FP_C200_DIGITALCOMPOSITE_NOPV_ONPAGECOMPLETE(sFunctionBlock)
+'gsh_log_s ("GSH_FP_C200_DIGITALCOMPOSITE_NOPV_ONPAGECOMPLETE>>>> sFunctionBlock = " & sFunctionBlock)
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "NUMSTATES")-1)
+ if strcomp(page.all("txt_PVState"&i).value,"",vbtextcompare)<>0 then
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "StateText(" & i+4 & ")")
+ page.all("TxtPV"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_PVState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_C200_DIGITALCOMPOSITE_NOPV_ONPAGECOMPLETE"
+end sub
+
+sub GSH_FP_C200_DIGITALOUTPUT_ONPAGECOMPLETE(sFunctionBlock)
+'gsh_log_s ("GSH_FP_C200_DIGITALOUTPUT_ONPAGECOMPLETE>>>> sFunctionBlock = " & sFunctionBlock)
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to (ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "NUMSTATES")-1)
+ if strcomp(page.all("txt_OPState"&i).value,"",vbtextcompare)<>0 then
+ page.all("txt_OPState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "StateText(" & i+4 & ")")
+ page.all("TxtOP"&i).style.visibility = GSH_VISIBLE
+ page.all("ShpStateOP"&i).style.visibility = GSH_VISIBLE
+ page.all("txt_OPState"&i).style.visibility = GSH_VISIBLE
+ end if
+ next
+'gsh_log_e "GSH_FP_C200_DIGITALOUTPUT_ONPAGECOMPLETE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_DIGITAL_FLAGA_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_DIGITAL_FLAGA_ONPAGECOMPLETE(sFunctionBlock)
+'gsh_log_s("GSH_FP_C200_DIGITAL_FLAGA_ONPAGECOMPLETE >>>> sFunctionBlock = " & sFunctionBlock)
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ for i = 0 to 1
+ page.all("txt_PVState"&i).value = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sFunctionBlock & "." & "StateText(" & i & ")")
+ next
+'gsh_log_e "GSH_FP_C200_DIGITAL_FLAGA_ONPAGECOMPLETE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_SELO_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_SELO_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_C200_SELO_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ For i = 3 to 4
+ if not(ConAlpTagname.isNan(GSH_SDR_CURRENTPOINT &"."&CTLBLK&".X("&i&")")) then
+ page.all("TxtBypassX00"&i).style.visibility = GSH_VISIBLE
+ page.all("ConCboBypass"&i).style.visibility = GSH_VISIBLE
+ end if
+ Next
+'gsh_log_e "GSH_FP_C200_SELO_ONPAGECOMPLETE"
+end sub
+
+sub GSH_FP_C200_SHOWWINDUPSTATUS(sWindupCode)
+'gsh_log_s("GSH_FP_C200_SHOWWINDUPSTATUS " & "sWindupCode=" & sWindupCode)
+'dim tempReturn: tempReturn = true
+
+ page.all("plg_OpLow").style.visibility = GSH_HIDDEN
+ page.all("plg_OpHigh").style.visibility = GSH_HIDDEN
+ page.all("txt_Initialization").style.visibility = GSH_HIDDEN
+ page.all("TxtInitialization").style.visibility = GSH_HIDDEN
+
+ Select Case sWindupCode
+ Case GSH_WINDUP_LO
+ page.all("plg_OpLow").style.visibility = GSH_VISIBLE
+ Case GSH_WINDUP_HI
+ page.all("plg_OpHigh").style.visibility = GSH_VISIBLE
+ Case GSH_WINDUP_HILO
+ page.all("txt_Initialization").style.visibility = GSH_VISIBLE
+ page.all("TxtInitialization").style.visibility = GSH_VISIBLE
+ Case else
+
+ end Select
+'gsh_log_e("GSH_FP_C200_SHOWWINDUPSTATUS returns >>>>>>>>> "&tempReturn)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_ANALOG_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_ANALOG_ONPAGECOMPLETE(sInputFunctionBlock, sControlFunctionBlock)
+'gsh_log_s "GSH_FP_C200_ANALOG_ONPAGECOMPLETE sFunctionBlock "& sFunctionBlock
+ dim nPVFormat
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ nPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ txt_euhi.value = formatnumber(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sControlFunctionBlock & ".PVEUHI"), nPVFormat)
+ txt_eulo.value = Formatnumber(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sControlFunctionBlock & ".PVEULO"), nPVFormat)
+ call GSH_FP_C200_ShowAlarmLimits (sInputFunctionBlock) 'Setup Alarm Limits
+'gsh_log_e "GSH_FP_C200_ANALOG_ONPAGECOMPLETE"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_ShowAlarmLimits
+'function: Sets the style and position of the 4 alarm limits on the PV Bar graph
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_ShowAlarmLimits (sInputFunctionBlock)
+dim alarmlim, alarmPri 'to do: handle null return from the limit and priority values
+ 'Alarm 1
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvllalm.tp") then
+ txt_alarmlim1.value = "---"
+ RecAlarm1.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvllalm.tp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvllalm.pr")
+ If (alarmPri > 1) then
+ txt_alarmlim1.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim1.value = "---"
+ end if
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm1, alarmlim, alarmPri)
+ end if
+ 'Alarm 2
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvloalm.tp") then
+ txt_alarmlim2.value = "---"
+ RecAlarm2.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvloalm.tp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvloalm.pr")
+ If (alarmPri > 1) then
+ txt_alarmlim2.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim2.value = "---"
+ end if
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm2, alarmlim, alarmPri)
+ end if
+ 'Alarm 3
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvhialm.tp") then
+ txt_alarmlim3.value = "---"
+ RecAlarm3.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvhialm.tp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvhialm.pr")
+ If (alarmPri > 1) then
+ txt_alarmlim3.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim3.value = "---"
+ end if
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm3, alarmlim, alarmPri)
+ end if
+ 'Alarm 4
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvhhalm.tp") then
+ txt_alarmlim4.value = "---"
+ RecAlarm4.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvhhalm.tp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sInputFunctionBlock & ".pvhhalm.pr")
+ If (alarmPri > 1) then
+ txt_alarmlim4.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim4.value = "---"
+ end if
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm4, alarmlim, alarmPri)
+ end if
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_UpdateAlarmStatus
+'Check alarm status and updates the text value for ConTxtAlmEnabled object
+'Parameter: sAlarmStatusParamName = GSH_SCADA_PARAM_ALARMDISABLED or C200 param constant
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_UpdateAlarmStatus (sAlarmStatusParamName)
+'gsh_log_s "GSH_FP_C200_UpdateAlarmStatus"
+dim sAlarmStatus
+ sAlarmStatus = "---"
+ if (ConTxtAlmEnabled.DataValue(GSH_SDR_CURRENTPOINT & "." & sAlarmStatusParamName) = 0) then
+ sAlarmStatus = "Disabled"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_VISIBLE
+ else
+ sAlarmStatus = "Enabled"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_HIDDEN
+ end if
+ ConTxtAlmEnabled.value = sAlarmStatus
+'gsh_log_e "GSH_FP_C200_UpdateAlarmStatus"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_UpdateAlarmStatus
+'Check alarm status and updates the text value for ConTxtAlmEnabled object
+'Parameter: sAlarmStatusParamName = GSH_TPS_PARAM_ALARMDISABLED
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_UpdateAlarmStatus (sAlarmStatusParamName)
+'gsh_log_s "GSH_FP_TPS_UpdateAlarmStatus"
+dim sAlarmStatus
+ sAlarmStatus = "---"
+ iAlarmStatus = ConTxtAlmEnabled.DataValue(GSH_SDR_CURRENTPOINT & "." & sAlarmStatusParamName)
+ if (iAlarmStatus = 0) then
+ sAlarmStatus = "Enabled"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_HIDDEN
+ elseif(iAlarmStatus = 1) then
+ sAlarmStatus = "Disabled"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_VISIBLE
+ else
+ sAlarmStatus = "Inhibit"
+ Rec_AlmEnabledOffNorm.style.visibility = GSH_VISIBLE
+ end if
+ ConTxtAlmEnabled.value = sAlarmStatus
+'gsh_log_e "GSH_FP_TPS_UpdateAlarmStatus"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_C200_NUMERICA_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+' Added JE 14Jan08
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_C200_NUMERICA_ONPAGECOMPLETE(sInputFunctionBlock, sControlFunctionBlock)
+'gsh_log_s "GSH_FP_C200_NUMERICA_ONPAGECOMPLETE sFunctionBlock "& sFunctionBlock
+ dim nPVFormat
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ nPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ txt_euhi.value = formatnumber(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sControlFunctionBlock & ".PVHILM"), nPVFormat) '.PVEUHI?
+ txt_eulo.value = Formatnumber(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & sControlFunctionBlock & ".PVLOLM"), nPVFormat) '.PVEULO?
+'gsh_log_e "GSH_FP_C200_NUMERICA_ONPAGECOMPLETE"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_HORIZONTALPVBAR_ONUPDATE
+'Update function for the shape SCADA_HORIZONTALPVBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 06/15/07 Initialize alarm state with GSH_SHOWALARMS_WOOUTLINE
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_HORIZONTALPVBAR_ONUPDATE(oShape, flag)
+'gsh_log_s "GSH_SCADA_HORIZONTALPVBAR_ONUPDATE"
+ If flag = 0 then
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_NOALARMCODE,oShape) 'show normal
+ dim nPVValue, iPVValue, iRangeHi, iRangeLo
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_DISABLED
+ else
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY), oShape)
+ End If
+ if GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false) then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+ nPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ ' gsh_log "PV="& nPVValue
+ iRangeHi = CInt(oShape.GetCustomProperty("Value", "txtHighLimit"))
+ iRangeLo = CInt(oShape.GetCustomProperty("Value", "txtLowLimit"))
+ if (nPVValue >= iRangeHi) then
+ iPVValue = 100
+ ElseIf (nPVValue <= iRangeLo) then
+ iPVValue = 0
+ else
+ iPVValue = Cint(((nPVValue-iRangeLo)* 100 )/ (iRangeHi - iRangeLo))
+ end if
+ oShape.objects("ind_PVBar").value = iPVValue
+ ' gsh_log "PV - iRangeLo ="& nPVValue - iRangeLo & ", iRangeHi - iRangeLo="&iRangeHi - iRangeLo
+ end if
+ End If
+
+ If flag <= 1 then
+ call GSH_SETSHAPEFOCUS(oShape)
+ End If
+'gsh_log_e "GSH_SCADA_HORIZONTALPVBAR_ONUPDATE"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_HORIZONTALPVBAR_ONUPDATE
+'Update function for the shape C200_HORIZONTALPVBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 06/15/07 Initialize alarm state with GSH_SHOWALARMS_WOOUTLINE
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_HORIZONTALPVBAR_ONUPDATE(oShape, flag)
+'gsh_log_s "GSH_C200_HORIZONTALPVBAR_ONUPDATE"
+ If flag = 0 then
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_NOALARMCODE,oShape) 'show normal
+ dim nPVValue, iPVValue, iRangeHi, iRangeLo
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_DISABLED
+ else
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY), oShape)
+ End If
+
+ if GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false) then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+' gsh_log "bad data"
+ else
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+ nPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ iRangeHi = CInt(oShape.GetCustomProperty("Value", "txtHighLimit"))
+ iRangeLo = CInt(oShape.GetCustomProperty("Value", "txtLowLimit"))
+ if (nPVValue >= iRangeHi) then
+ iPVValue = 100
+ ElseIf (nPVValue <= iRangeLo) then
+ iPVValue = 0
+ else
+ iPVValue = Cint(((nPVValue-iRangeLo)* 100 )/ (iRangeHi - iRangeLo))
+ end if
+ oShape.objects("ind_PVBar").value = iPVValue
+' gsh_log "PV - iRangeLo ="& nPVValue - iRangeLo & ", iRangeHi - iRangeLo="&iRangeHi - iRangeLo
+ end if
+ End If
+
+ If flag <= 1 then
+' gsh_log "into focus"
+ call GSH_SETSHAPEFOCUS(oShape)
+ End If
+'gsh_log_e "GSH_C200_HORIZONTALPVBAR_ONUPDATE"
+end sub
+
+
+
+
+'-------------------------------------START COMMON FUNCTIONS ------------------------------------------'
+'.oPYo.
+'8 8
+'8 .oPYo. ooYoYo. ooYoYo. .oPYo. odYo.
+'8 8 8 8' 8 8 8' 8 8 8 8 8' `8
+'8 8 8 8 8 8 8 8 8 8 8 8 8 8
+'`YooP' `YooP' 8 8 8 8 8 8 `YooP' 8 8
+'-------------------------------------------------------------------------------------------------------
+
+'
+'
+'
+sub GSH_SETSHAPEOFFNROMAL(oShape,isOffNormal)
+'gsh_log_s("GSH_SETSHAPEOFFNROMAL oShape="&oShape.id &"isOffNormal=" &isOffNormal)
+
+ if CBool(isOffNormal) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ elseif (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+
+'gsh_log_e("GSH_SETSHAPEOFFNROMAL")
+end sub
+
+
+sub GSH_LevelIndicatorShowSALimits(oShape, iSAHigh, iSALow)
+'gsh_log_s("GSH_LevelIndicatorShowSALimits oShape=" & oShape.id &"iSAHi = " &iSAHigh &"iSALo = " &iSALow)
+ Dim iNumPixels, iBottom
+ Dim iRangeHi, iRangeLo, iSAHi, iSALo
+
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ iSAHi = CDbl(iSAHigh)
+ iSALo = CDbl(iSALow)
+
+ iNumPixels = 0
+ if (iSAHi >= iRangeHi) then
+ iNumPixels = 0
+ oShape.objects("rec_SAHigh").style.visibility = GSH_HIDDEN
+ ElseIf (iSAHi < iRangeLo) then
+ iNumPixels = oShape.objects("linePVRange").style.pixelheight
+ else
+ iNumPixels = (oShape.objects("linePVRange").style.pixelheight * ((iRangeHi - iSAHi) / (iRangeHi - iRangeLo)))
+ end if
+
+ oShape.objects("rec_SAHigh").style.pixeltop = oShape.objects("linePVRange").style.pixeltop
+ oShape.objects("rec_SAHigh").style.pixelheight = iNumPixels
+
+ iNumPixels = 0
+ if (iSALo > iRangeHi) then
+ iNumPixels = oShape.objects("linePVRange").style.pixelheight
+ ElseIf (iSALo <= iRangeLo) then
+ oShape.objects("rec_SALow").style.visibility = GSH_HIDDEN
+ else
+ iNumPixels = (oShape.objects("linePVRange").style.pixelheight * ((iSALo - iRangeLo) / (iRangeHi - iRangeLo)))
+ end if
+
+ iBottom = (oShape.objects("linePVRange").style.pixelheight + oShape.objects("linePVRange").style.pixeltop)
+
+ oShape.objects("rec_SALow").style.pixeltop = iBottom - iNumPixels
+ oShape.objects("rec_SALow").style.pixelheight = iNumPixels
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelIndicatorShowSALimits",oShape)
+ end if
+
+'gsh_log_e("GSH_LevelIndicatorShowSALimits")
+end sub
+
+
+sub GSH_LevelRegCtl_SAGauge_SetFocus(oShape, isOffNormal)
+'gsh_log_s("GSH_LevelRegCtl_SAGauge_SetFocus oShape="&oShape.id &"isOffNormal=" &isOffNormal)
+
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ end if
+
+ call GSH_SETSHAPEOFFNROMAL(oShape, isOffNormal)
+
+
+'gsh_log_e("GSH_LevelRegCtl_SAGauge_SetFocus")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_SAGauge_SetFocus",oShape)
+ end if
+
+end sub
+
+sub GSH_LevelRegCtl_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+
+ dim sHidePV
+ sHidePV = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPHIDEPV, GSH_CPVALUE)
+ if ((StrComp(sHidePV, GSH_ON,vbtextcompare) = 0) AND (StrComp(sAlarmCode, GSH_NONE,vbtextcompare) = 0) AND not(bInSA) AND (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_Mode").style.visibility = GSH_HIDDEN
+ oShape.objects("outline_static").style.visibility = GSH_HIDDEN
+ else
+ 'Setting these two shapes as transparent get the outlines to show correctly, but does not work when in SA
+ if (not(bInSA) OR isOffNormal) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline_static").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_Mode").style.visibility = GSH_VISIBLE
+ end if
+
+
+end sub
+
+sub GSH_LevelAnalog_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+'gsh_log_s("GSH_LevelAnalog_SAGauge_ShowHideComponents oShape = " &oShape.id &" sAlarmCode=" &sAlarmCode &" bInSA=" &bInSA &" isOffNormal=" &isOffNormal)
+ dim sHidePV
+ sHidePV = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPHIDEPV, GSH_CPVALUE)
+
+
+ if ((StrComp(sHidePV, GSH_ON,vbtextcompare) = 0) AND (StrComp(sAlarmCode, GSH_NONE,vbtextcompare) = 0) AND not(bInSA) AND (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("outline_static").style.visibility = GSH_HIDDEN
+ else
+ 'Setting these two shapes as transparent get the outlines to show correctly, but does not work when in SA
+ if (not(bInSA) OR isOffNormal) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline_static").style.visibility = GSH_VISIBLE
+ end if
+
+'gsh_log_e("GSH_LevelAnalog_SAGauge_ShowHideComponents")
+end sub
+
+sub GSH_QualityAnalog_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+
+ dim sHidePV
+ sHidePV = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPHIDEPV, GSH_CPVALUE)
+ if ((StrComp(sHidePV, GSH_ON,vbtextcompare) = 0) AND (StrComp(sAlarmCode, GSH_NONE,vbtextcompare) = 0) AND not(bInSA) AND (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+
+ oShape.objects("txt_PVvalue").style.visibility = GSH_HIDDEN
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("outline_static").style.visibility = GSH_HIDDEN
+ else
+ 'Setting these two shapes as transparent get the outlines to show correctly, but does not work when in SA
+ if (not(bInSA) OR isOffNormal) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ end if
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline_static").style.visibility = GSH_VISIBLE
+ end if
+
+
+end sub
+
+sub GSH_OPDeviation_L1_ShowHideComponents(oShape, bInSA, isOffNormal)
+'gsh_log_s("GSH_OPDeviation_L1_ShowHideComponents oShape = " &oShape.id & " bInSA = " &bInSA &" isOffNormal = " &isOffNormal)
+ dim sHidePV
+ sHidePV = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPHIDEPV, GSH_CPVALUE)
+ if ((StrComp(sHidePV, GSH_ON,vbtextcompare) = 0) AND not(bInSA) AND (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+
+ oShape.objects("txt_OPvalue").style.visibility = GSH_HIDDEN
+ oShape.objects("outline").style.visibility = GSH_HIDDEN
+ oShape.objects("txt_mode").style.visibility = GSH_HIDDEN
+ else
+ 'Setting these two shapes as transparent get the outlines to show correctly, but does not work when in SA
+ if (not(bInSA) OR isOffNormal) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ end if
+ oShape.objects("txt_OPvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_mode").style.visibility = GSH_VISIBLE
+ end if
+
+'gsh_log_e("GSH_OPDeviation_L1_ShowHideComponents")
+end sub
+
+
+'
+'GSH_SetObjectLocation_Vertical
+'Calculate and set the location of the moving object in within the range object, in the vertical direction
+'
+'rangeObject: the range indicator object
+'movingObject: is the shape whom location need to be set.
+'value (double): the value need to determine where the moving object needed to be located
+'rangeHi (double): max value of the range
+'rangeLo (double): min value of the range
+sub GSH_SetObjectLocation_Vertical(rangeObject, movingObject, value, rangeHi, rangeLo)
+'gsh_log_s("GSH_SetObjectLocation_Vertical rangeObject = " &rangeObject.id &" movingObject = " &movingObject.id &" value = " &value &"rangeHi = " &rangeHi &"rangeLo = " &rangeLo)
+On Error Resume Next
+
+ Dim iNumPixels, iBottom
+
+ iNumPixels = 0
+ if (value > rangeHi) then
+ iNumPixels = rangeObject.style.pixelheight
+ ElseIf (value < rangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = (rangeObject.style.pixelheight * ((value - rangeLo) / (rangeHi - rangeLo)))
+ end if
+ iBottom = rangeObject.style.pixelheight + rangeObject.style.pixeltop
+ movingObject.style.pixeltop = iBottom - iNumPixels - (movingObject.style.pixelheight / 2)
+
+
+' gsh_log_e("GSH_SetObjectLocation_Vertical movingObject.style.pixeltop = " &movingObject.style.pixeltop)
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SetObjectLocation_Vertical", movingObject)
+ end if
+end sub
+
+
+'
+'GSH_SetObjectLocation_Horizontal
+'Calculate and set the location of the moving object in within the range object, in the horizontal direction
+'
+'rangeObject: the range indicator object
+'movingObject: is the shape which location need to be set.
+'value (double): the value need to determine where the moving object needed to be located
+'rangeHi (double): max value of the range
+'rangeLo (double): min value of the range
+sub GSH_SetObjectLocation_Horizontal(rangeObject, movingObject, value, rangeHi, rangeLo)
+'gsh_log_s("GSH_SetObjectLocation_Horizontal rangeObject = " &rangeObject.id &" movingObject = " &movingObject.id &" value = " &value &"rangeHi = " &rangeHi &"rangeLo = " &rangeLo)
+On Error Resume Next
+
+ Dim iNumPixels
+
+ iNumPixels = 0
+ if (value > rangeHi) then
+ iNumPixels = rangeObject.style.pixelwidth
+ ElseIf (value < rangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = (rangeObject.style.pixelwidth * ((value - rangeLo) / (rangeHi - rangeLo)))
+ end if
+
+ movingObject.style.pixelleft = rangeObject.style.pixelleft + iNumPixels - (movingObject.style.pixelwidth / 2)
+
+
+' gsh_log_e("GSH_SetObjectLocation_Horizontal movingObject.style.pixelleft = " &movingObject.style.pixelleft)
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SetObjectLocation_Horizontal", movingObject)
+ end if
+end sub
+
+
+
+'
+'calculate and set location and width of the moving object within the range object (both location and width can variate).
+'rMaxValue, rMinValue, rRangeHi, rRangeLo are doubles.
+'
+sub GSH_SetObjectLocationAndWidth_Horizontal(rangeObject, movingObject, rMaxValue, rMinValue, rRangeHi, rRangeLo)
+On Error Resume Next
+'gsh_log_s("GSH_SetObjectLocationAndWidth_Horizontal rangeObject = " &rangeObject.id &" movingObject = " &movingObject.id &" rMinValue = " &rMinValue &" rMaxValue = " &rMaxValue &"rRangeLo = " &rRangeLo &"rRangeHi = " &rRangeHi)
+
+ Dim iWidth, iLeft, rRange
+
+ if (rMaxValue > rRangeHi) then
+ rMaxValue = rRangeHi
+ end if
+
+ if (rMinValue < rRangeLo) then
+ rMinValue = rRangeLo
+ end if
+
+ rRange = rRangeHi - rRangeLo
+
+ iWidth = rangeObject.style.pixelwidth * ((rMaxValue - rMinValue) / rRange)
+
+ iLeft = rangeObject.style.pixelleft + rangeObject.style.pixelwidth * ((rMinValue - rRangeLo) / rRange)
+
+
+ movingObject.style.pixelwidth = iWidth
+ movingObject.style.pixelleft = iLeft
+
+'gsh_log_e("GSH_SetObjectLocationAndWidth_Horizontal")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SetObjectLocationAndWidth_Horizontal", movingObject)
+ end if
+
+end sub
+
+
+function GSH_IsShapeInSA(iPV, iSAHi, iSALo)
+' gsh_log_s("GSH_IsShapeInSA iPV = " &iPV &" iSAHi = " &iSAHi &" iSALo = " &iSALo)
+
+ dim rPV, rSALo, rSAHi, bRetVal
+ rPV = CDbl(iPV)
+ rSALo = CDbl(iSALo)
+ rSAHi = CDbl(iSAHi)
+ bRetVal = false
+
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ bRetVal = true
+ End If
+
+
+' gsh_log_e("GSH_IsShapeInSA bRetVal = " &bRetVal)
+ GSH_IsShapeInSA = bRetVal
+
+end function
+
+sub GSH_LevelRegCtl_SAGauge_InSA(oShape, iPV, iSAHi, iSALo)
+' gsh_log_s("GSH_LevelRegCtl_SAGauge_InSA oShape="&oShape.id & " iPV = " &iPV &" iSAHi = " &iSAHi &" iSALo = " &iSALo)
+
+ dim rPV, rSALo, rSAHi
+ rPV = CDbl(iPV)
+ rSALo = CDbl(iSALo)
+ rSAHi = CDbl(iSAHi)
+
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_Mode").style.visibility = GSH_VISIBLE
+ End If
+
+
+' gsh_log_e("GSH_LevelRegCtl_SAGauge_InSA")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_SAGauge_SetFocus",oShape)
+ end if
+
+end sub
+
+sub GSH_OPDeviation_SAGauge_InSA(oShape, iOP, iSAHi, iSALo)
+' gsh_log_s("GSH_OPDeviation_SAGauge_InSA oShape="&oShape.id & " iOP = " &iOP &" iSAHi = " &iSAHi &" iSALo = " &iSALo)
+
+ dim rOP, rSALo, rSAHi
+ rOP = CDbl(iOP)
+ rSALo = CDbl(iSALo)
+ rSAHi = CDbl(iSAHi)
+
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("plg_RightCover").styleClass = GSH_CSSSAFILL
+ oShape.objects("plg_LeftCover").styleClass = GSH_CSSSAFILL
+ oShape.objects("line007").styleClass = GSH_CSSSAFILL
+ oShape.objects("line009").styleClass = GSH_CSSSAFILL
+ End If
+
+
+
+' gsh_log_e("GSH_OPDeviation_SAGauge_InSA")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_OPDeviation_SAGauge_InSA",oShape)
+ end if
+
+end sub
+
+
+sub GSH_LevelRegCtl_SAGauge_RedrawPVRangeBar(oShape, recentPVMax, recentPVMin)
+'gsh_log_s("GSH_LevelRegCtl_SAGauge_RedrawPVRangeBar oShape=" & oShape.id &" recentPVMax = " &recentPVMax &" recentPVMin = " &recentPVMin)
+ Dim iNumPixels, iBottom, iPVRangeBarHeight
+ Dim iRangeHi, iRangeLo, recentPVHi, recentPVLo
+
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ recentPVHi = CDbl(recentPVMax)
+ recentPVLo = CDbl(recentPVMin)
+
+ If(recentPVHi > iRangeHi) Then
+ recentPVHi = iRangeHi
+ End If
+
+ If(recentPVLo < iRangeLo) Then
+ recentPVLo = iRangeLo
+ End If
+
+ iPVRangeBarHeight = (oShape.objects("linePVRange").style.pixelheight * ((recentPVHi - recentPVLo) / (iRangeHi - iRangeLo)))
+
+ If(iPVRangeBarHeight < 0.5) Then
+ oShape.objects("rec_RecentPVRangeBar").style.visibility = GSH_HIDDEN
+ Else
+ oShape.objects("rec_RecentPVRangeBar").style.visibility = GSH_VISIBLE
+ End If
+
+ oShape.objects("rec_RecentPVRangeBar").style.pixelheight = iPVRangeBarHeight
+
+ iNumPixels = (oShape.objects("linePVRange").style.pixelheight * ((iRangeHi - recentPVHi) / (iRangeHi - iRangeLo)))
+
+
+ oShape.objects("rec_RecentPVRangeBar").style.pixeltop = oShape.objects("linePVRange").style.pixeltop + iNumPixels
+
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_SAGauge_RedrawPVRangeBar",oShape)
+ end if
+
+'gsh_log_e("GSH_LevelRegCtl_SAGauge_RedrawPVRangeBar")
+end sub
+
+
+sub GSH_OPDeviation_SAGauge_RedrawOPRangeBar(oShape, recentOPMax, recentOPMin)
+'gsh_log_s("GSH_OPDeviation_SAGauge_RedrawOPRangeBar oShape=" & oShape.id &" recentOPMax = " &recentOPMax &" recentOPMin = " &recentOPMin)
+ Dim iNumPixels, iBottom, iPVRangeBarHeight
+ Dim iRangeHi, iRangeLo, recentPVHi, recentPVLo
+
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ recentOPHi = CDbl(recentOPMax)
+ recentOPLo = CDbl(recentOPMin)
+
+ If(recentOPHi > iRangeHi) Then
+ recentOPHi = iRangeHi
+ End If
+
+ If(recentOPLo < iRangeLo) Then
+ recentOPLo = iRangeLo
+ End If
+
+ iRangeBarWidth = (oShape.objects("lineOPRange").style.pixelwidth * ((recentOPHi - recentOPLo) / (iRangeHi - iRangeLo)))
+
+ If(iRangeBarWidth < 0.5) Then
+ oShape.objects("rec_RecentOPRangeBar").style.visibility = GSH_HIDDEN
+ Else
+ oShape.objects("rec_RecentOPRangeBar").style.visibility = GSH_VISIBLE
+ End If
+
+ oShape.objects("rec_RecentOPRangeBar").style.pixelwidth = iRangeBarWidth
+
+ iNumPixels = (oShape.objects("lineOPRange").style.pixelwidth * ((recentOPLo - iRangeLo) / (iRangeHi - iRangeLo)))
+
+
+ oShape.objects("rec_RecentOPRangeBar").style.pixelleft = oShape.objects("lineOPRange").style.pixelleft + iNumPixels
+
+ 'oShape.objects("lineOPRange").style.pixelleft +
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_OPDeviation_SAGauge_RedrawOPRangeBar",oShape)
+ end if
+
+'gsh_log_e("GSH_OPDeviation_SAGauge_RedrawOPRangeBar")
+end sub
+
+
+
+sub GSH_LevelRegCtl_SAGauge_SetPVRangeBar(oShape, iPV)
+'gsh_log_s("GSH_LevelRegCtl_SAGauge_RedrawPVRangeBar oShape=" & oShape.id &" iPV = " &iPV)
+
+ 'Update recent PV values and reference time on the shape
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+ Dim lastRefTime, refTime
+ lastRefTime = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"LastRefTime", GSH_CPVALUE)
+ refTime = GSH_READREGISTRY(GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR & GSH_REGKEY_OPDEVMON_RESETTIME, GSH_EMPTYSTRING)
+
+ If(IsDate(lastRefTime) AND IsDate(refTime)) Then
+ 'reference time is reset
+ If(CDate(refTime) > CDate(lastRefTime)) Then
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentPVMax", GSH_CPVALUE, iPV)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentPVMin", GSH_CPVALUE, iPV)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "LastRefTime", GSH_CPVALUE, refTime)
+ oShape.objects("rec_RecentPVRangeBar").style.visibility = GSH_HIDDEN
+ Else
+ Dim recentPVMax, recentPVMin
+ recentPVMax = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"RecentPVMax", GSH_CPVALUE))
+ recentPVMin = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"RecentPVMin", GSH_CPVALUE))
+
+ If(CDbl(recentPVMax) < CDbl(iPV)) Then
+ recentPVMax = iPV
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentPVMax", GSH_CPVALUE, iPV)
+ ElseIf(CDbl(recentPVMin) > CDbl(iPV)) Then
+
+ recentPVMin = iPV
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentPVMin", GSH_CPVALUE, iPV)
+ End If
+
+ 'redraw Recent PV Range bar
+ call GSH_LevelRegCtl_SAGauge_RedrawPVRangeBar(oShape, recentPVMax, recentPVMin)
+ End If
+
+ Else
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentPVMax", GSH_CPVALUE, iPV)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentPVMin", GSH_CPVALUE, iPV)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "LastRefTime", GSH_CPVALUE, now)
+ oShape.objects("rec_RecentPVRangeBar").style.visibility = GSH_HIDDEN
+ End If
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_SAGauge_SetPVRangeBar",oShape)
+ end if
+
+'gsh_log_e("GSH_LevelRegCtl_SAGauge_SetPVRangeBar")
+end sub
+
+
+sub GSH_OPDeviation_SAGauge_SetPVRangeBar(oShape, iOP)
+'gsh_log_s("GSH_OPDeviation_SAGauge_SetPVRangeBar oShape=" & oShape.id &" iOP = " &iOP)
+on Error resume next
+ 'Update recent PV values and reference time on the shape
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+ Dim lastRefTime, refTime
+ lastRefTime = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"LastRefTime", GSH_CPVALUE)
+ refTime = GSH_READREGISTRY(GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR & GSH_REGKEY_OPDEVMON_RESETTIME, GSH_EMPTYSTRING)
+
+ If(IsDate(lastRefTime) AND IsDate(refTime)) Then
+ 'reference time is reset
+ If(CDate(refTime) > CDate(lastRefTime)) Then
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentOPMax", GSH_CPVALUE, iOP)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentOPMin", GSH_CPVALUE, iOP)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "LastRefTime", GSH_CPVALUE, refTime)
+ oShape.objects("rec_RecentPVRangeBar").style.visibility = GSH_HIDDEN
+ Else
+ Dim recentMax, recentMin
+ recentMax = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"RecentOPMax", GSH_CPVALUE))
+ recentMin = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"RecentOPMin", GSH_CPVALUE))
+
+ If(CDbl(recentMax) < CDbl(iOP)) Then
+ recentMax = iOP
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentOPMax", GSH_CPVALUE, iOP)
+ ElseIf(CDbl(recentMin) > CDbl(iOP)) Then
+
+ recentMin = iOP
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentOPMin", GSH_CPVALUE, iOP)
+ End If
+
+ 'redraw Recent PV Range bar
+ call GSH_OPDeviation_SAGauge_RedrawOPRangeBar(oShape, recentMax, recentMin)
+ End If
+
+ Else
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentOPMax", GSH_CPVALUE, iOP)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "RecentOPMin", GSH_CPVALUE, iOP)
+ call GSH_SETSHAPE_CUSTOM_PROPERTY(oShape, "LastRefTime", GSH_CPVALUE, now)
+ oShape.objects("rec_RecentOPRangeBar").style.visibility = GSH_HIDDEN
+ End If
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_OPDeviation_SAGauge_SetPVRangeBar",oShape)
+ end if
+
+'gsh_log_e("GSH_OPDeviation_SAGauge_SetPVRangeBar")
+end sub
+
+
+sub GSH_LevelRegCtl_QualitySAGauge_SetFocus(oShape)
+'gsh_log_s("GSH_LevelRegCtl_QualitySAGauge_SetFocus oShape="&oShape.id)
+
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+' oShape.objects("rec_IndicatorRange").style.visibility = GSH_VISIBLE
+ end if
+' oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+' oShape.objects("outline").style.visibility = GSH_VISIBLE
+
+'gsh_log_e("GSH_LevelRegCtl_QualitySAGauge_SetFocus")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_SAGauge_SetFocus",oShape)
+ end if
+
+end sub
+
+
+
+
+
+sub GSH_QualitySAGauge_ShowSALimits(oShape, iSAHigh, iSALow)
+'gsh_log_s("GSH_QualitySAGauge_ShowSALimits oShape=" & oShape.id &"iSAHi = " &iSAHigh &"iSALo = " &iSALow)
+ Dim iNumPixels, iLeft
+ Dim iRangeHi, iRangeLo, iSAHi, iSALo
+
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ iSAHi = CDbl(iSAHigh)
+ iSALo = CDbl(iSALow)
+
+ iNumPixels = 0
+ if (iSAHi >= iRangeHi) then
+ iNumPixels = 0
+ oShape.objects("rec_SAHigh").style.visibility = GSH_HIDDEN
+ ElseIf (iSAHi < iRangeLo) then
+ iNumPixels = oShape.objects("linePVRange").style.pixelwidth
+ else
+ iNumPixels = (oShape.objects("linePVRange").style.pixelwidth * ((iRangeHi - iSAHi) / (iRangeHi - iRangeLo)))
+ end if
+
+ oShape.objects("rec_SAHigh").style.pixelleft = oShape.objects("linePVRange").style.pixelleft
+ oShape.objects("rec_SAHigh").style.pixelwidth = iNumPixels
+ iLeft = (oShape.objects("linePVRange").style.pixelwidth + oShape.objects("linePVRange").style.pixelleft)
+ oShape.objects("rec_SAHigh").style.pixelleft = iLeft - iNumPixels
+
+ iNumPixels = 0
+ if (iSALo > iRangeHi) then
+ iNumPixels = oShape.objects("linePVRange").style.pixelwidth
+ ElseIf (iSALo <= iRangeLo) then
+ oShape.objects("rec_SALow").style.visibility = GSH_HIDDEN
+ else
+ iNumPixels = (oShape.objects("linePVRange").style.pixelwidth * ((iSALo - iRangeLo) / (iRangeHi - iRangeLo)))
+ end if
+
+ oShape.objects("rec_SALow").style.pixelwidth = iNumPixels
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelIndicatorShowSALimits",oShape)
+ end if
+
+'gsh_log_e("GSH_QualitySAGauge_ShowSALimits")
+end sub
+
+
+'
+'oShape: the HCS shape
+'n: total number of alarm limit lines to show
+sub GSH_SetAlarmLinesHorizontal(oShape, iRangeHi, iRangeLo, n)
+
+
+ dim alarmlim, alarmPri
+ alarmlim = 0: alarmPri = 0
+
+ for i = 1 to n
+ alarmPri = CDbl(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "ALARM" & i & "PRIORITY"))
+
+ if (alarmPri > 0) and (alarmPri <=3) then
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_VISIBLE
+ alarmlim = CDbl(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "AlarmLimit"&i))
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("linePVRange"), oShape.objects("LineAlarm"&i), alarmlim, iRangeHi, iRangeLo)
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+
+ next
+
+end sub
+
+'
+'oShape: the HCS shape
+'n: total number of alarm limit lines to show
+sub GSH_SetAlarmLinesVertical(oShape, iRangeHi, iRangeLo, n)
+
+ dim alarmlim, alarmPri
+ alarmlim = 0: alarmPri = 0
+
+ for i = 1 to n
+ alarmPri = CDbl(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "ALARM" & i & "PRIORITY"))
+
+ if (alarmPri > 0) and (alarmPri <=3) then
+
+ if not(oShape.objects("rec_DataScript").IsNan(GSH_CPENTITY & ".AlarmLimit" & i)) then
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_VISIBLE
+ alarmlim = CDbl(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "AlarmLimit"&i))
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("LineAlarm"&i), alarmlim, iRangeHi, iRangeLo)
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+
+ next
+
+end sub
+
+
+sub GSH_QualitySAGauge_ShowPVFloat(oShape)
+'gsh_log_s("GSH_QualitySAGauge_ShowPVFloat oShape=" & oShape.id)
+ Dim iNumPixels, iLeft
+ Dim iRangeHi, iRangeLo, iPV
+ 'Calculate pv value
+ iRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ iRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+ iPV = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ iNumPixels = 0
+ if (iPV > iRangeHi) then
+ iNumPixels = oShape.objects("linePVRange").style.pixelwidth
+ ElseIf (iPV < iRangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = (oShape.objects("linePVRange").style.pixelwidth * ((iPV - iRangeLo) / (iRangeHi - iRangeLo)))
+ end if
+
+ oShape.objects("rec_IndicatorFloat").style.pixelleft = oShape.objects("linePVRange").style.pixelleft + iNumPixels - (oShape.objects("rec_IndicatorFloat").style.pixelwidth / 2)
+
+'gsh_log_e("GSH_QualitySAGauge_ShowPVFloat")
+end sub
+
+
+
+'-------------------------------------START SCADA SPECIFIC ----------------------------------------------'
+' .oooooo..o .oooooo. .o. oooooooooo. .o.
+'d8P' `Y8 d8P' `Y8b .888. `888' `Y8b .888.
+'Y88bo. 888 .8"888. 888 888 .8"888.
+' `"Y8888o. 888 .8' `888. 888 888 .8' `888.
+' `"Y88b 888 .88ooo8888. 888 888 .88ooo8888.
+'oo .d8P `88b ooo .8' `888. 888 d88' .8' `888.
+'8""88888P' `Y8bood8P' o88o o8888o o888bood8P' o88o o8888o
+'-------------------------------------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+'------------------------------------------------------------------
+'SCADA L1 Shapes
+'------------------------------------------------------------------
+sub GSH_SCADA_QualTrend_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_SCADA_QualTrend_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isDataBad
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ call GSH_QualTrend_OnUpdate(oShape, flag, isDataBad)
+
+'gsh_log_e("GSH_SCADA_QualTrend_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_QualTrend_OnUpdate",oShape)
+ end if
+
+end sub
+
+sub GSH_SCADA_Quality_L1Deviation_FR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SCADA_Quality_L1Deviation_FR_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = not(GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")))
+ isOffNormal = false
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ pvRefVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"PVRefVal")
+
+ call GSH_Quality_L1Deviation_FR_ONUPDATE(oShape, flag, isAlmEnabled, GSH_CPPARAM_PV, isOffNormal, isDataBad, pvRefVal)
+
+
+'gsh_log_e("GSH_SCADA_Quality_L1Deviation_FR_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_Quality_L1Deviation_FR_ONUPDATE",oShape)
+ end if
+
+end sub
+
+sub GSH_SCADA_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag)
+'sh_log_s("GSH_SCADA_Quality_L1Deviation_Lo_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = not(GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")))
+ isOffNormal = false
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ pvRefVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"PVRefVal")
+
+ call GSH_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag, isAlmEnabled, GSH_CPPARAM_PV, isOffNormal, isDataBad, pvRefVal)
+
+'gsh_log_e("GSH_SCADA_Quality_L1Deviation_Lo_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_Quality_L1Deviation_Lo_ONUPDATE",oShape)
+ end if
+end sub
+
+sub GSH_SCADA_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_SCADA_Quality_L1Deviation_Hi_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = not(GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")))
+ isOffNormal = false
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ pvRefVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"PVRefVal")
+
+ call GSH_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag, isAlmEnabled, GSH_CPPARAM_PV, isOffNormal, isDataBad, pvRefVal)
+
+
+'gsh_log_e("GSH_SCADA_Quality_L1Deviation_Hi_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_Quality_L1Deviation_Hi_ONUPDATE",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_QualityAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_QualityAnalog_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_SCADA_QualityAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")))
+ isOffNormal = false
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+
+ call GSH_QualityAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_CPPARAM_PV, isOffNormal, isDataBad)
+
+'gsh_log_e("GSH_SCADA_QualityAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_QualityAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelAnalog_SAGauge_FR_SCADA Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_SCADA_LevelAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")))
+ isOffNormal = false
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+
+ call GSH_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_CPPARAM_PV, isOffNormal, isDataBad)
+
+'gsh_log_e("GSH_SCADA_LevelAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_LevelAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'LEVEL RegCtl GAUGE FULL RANGE Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_LevelRegCtl_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_SCADA_LevelRegCtl_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_datascript")))
+ isOffNormal = GSH_REGCTL_SCADA_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_CPPARAM_PV)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+
+ call GSH_LevelRegCtl_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_CPPARAM_PV, isOffNormal, isDataBad)
+
+'gsh_log_e("GSH_SCADA_LevelRegCtl_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_LevelRegCtl_L1Gauge_FR_OnUpdate",oShape)
+ end if
+
+
+end sub
+
+sub GSH_SALevelIndicatorRegulatoryControlShowNormal(oShape)
+'gsh_log_s("GSH_SALevelIndicatorRegulatoryControlShowNormal")
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_PVvalue").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("txt_mode").style.visibility = GSH_VISIBLE
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+' call GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+'gsh_log_e("GSH_SALevelIndicatorRegulatoryControlShowNormal")
+end sub
+
+sub GSH_SALevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ oShape.objects("txt_mode").style.visibility = GSH_VISIBLE
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_ANALOGINDICATOR_SA_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_ANALOGINDICATOR_SA_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_ANALOGINDICATOR_SCADA_ONUPDATE (oShape, flag)
+
+ dim sAlarmCode, bInSA
+ bInSA = false
+ sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_CPPARAM_PV)
+
+ 'Check SA Bars Limit
+ rSAHi = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE)))
+ rSALo = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE)))
+ rPV = CDbl(FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)))
+
+
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ bInSA = true
+ Else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ End If
+
+ if(not(bInSA) AND StrComp(sAlarmCode,GSH_NONE,vbtextcompare) <> 0) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ else
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ end if
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_REGULATORYCONTROLINDICATOR_SA_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_REGULATORYCONTROLINDICATOR_SA_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_REGULATORYCONTROLINDICATOR_SCADA_ONUPDATE (oShape, flag)
+
+ dim sAlarmCode, bInSA
+ bInSA = false
+ sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_CPPARAM_PV)
+
+ 'Check SA Bars Limit
+ Dim rSAHi, rSALo, rPV
+ rSAHi = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE)))
+ rSALo = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE)))
+ rPV = CDbl(FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)))
+
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ bInSA = true
+ Else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ End If
+
+ if(not(bInSA) AND StrComp(sAlarmCode,GSH_NONE,vbtextcompare) <> 0) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ else
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ end if
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DIGITALINDICATOR_L1_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DIGITALINDICATOR_L1_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+'gsh_log_s("GSH_DIGITALINDICATOR_L1_SCADA_ONUPDATE oShape = " &oShape.id)
+
+ call GSH_DIGITALINDICATOR_SCADA_ONUPDATE (oShape, flag)
+
+ dim sPVState, sSAState
+ 'Check SA Condition
+
+ sPVState = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ Dim sTagname
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPENTITY, GSH_CPPOINT)
+
+ 'gsh_log("sTagname = " &sTagname)
+
+ sSAState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_SA_STATE, GSH_NONE)
+
+ 'gsh_log("sPVState " & sPVState & " sSAState = " &sSAState)
+
+ If (StrComp(sPVState, sSAState, vbTextCompare) <> 0) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ Else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ End If
+
+' gsh_log_e("GSH_C200_DIGITALINDICATOR_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_DIGITALINDICATOR_L1_SCADA_ONUPDATE",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_OPDEVIATION_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_OPDEVIATION_L1_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_SCADA_OPDEVIATION_L1_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ dim isOffNormal
+ isOffNormal = GSH_SCADA_POINT_MODE_ISOFFNORMAL(oShape.objects("OPDevMonitor_Script"))
+ call GSH_OPDEVIATION_L1_ONUPDATE(oShape, flag, isOffNormal)
+
+'gsh_log_e("GSH_SCADA_OPDEVIATION_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_SCADA_OPDEVIATION_L1_ONUPDATE",oShape)
+ end if
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_FIRSTOUT_ONUPDATE
+'Update function for the shape SCADA_FIRSTOUT
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_FIRSTOUT_ONUPDATE(oShape, flag)
+ If flag = 0 then
+ if GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV) = 0 then
+ oShape.objects("lin_FirstOut").StyleClass = GSH_CSSFIRSTOUT_OFF
+ else
+ oShape.objects("lin_FirstOut").StyleClass = GSH_CSSFIRSTOUT_ON
+ end if
+ End If
+ If flag <= 1 then
+ call GSH_SETSHAPEFOCUS(oShape)
+ End If
+end sub
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'SCADA_SPPVOPBAR Shape Specific Code
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SETSPINDICATOR_HORIZONTAL
+'Determine the location of the SP float on a horizontal bar graph
+'Parameter: Shape object, low limit, high limit.
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SETSPINDICATOR_HORIZONTAL(oShape, iRangeLo, iRangeHi)
+'gsh_log_s("GSH_SETSPINDICATOR_HORIZONTAL oShape=" & oShape.id)
+ Dim iNumPixels, iXvalue, iSP
+ 'Calculate pv value
+' gsh_log("iRangeHi=" & iRangeHi & ", iRangeLo=" & iRangeLo)
+ iSP = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP)
+ if (iSP >= iRangeHi) then
+ iNumPixels = oShape.objects("ind_PVBar").style.pixelwidth
+ ElseIf (iSP <= iRangeLo) then
+ iNumPixels = 0
+ else
+ iNumPixels = cint(oShape.objects("ind_PVBar").style.pixelwidth * ((iSP - iRangeLo) / (iRangeHi - iRangeLo)))
+ end if
+' gsh_log("iNumPixels=" & iNumPixels)
+ iXvalue = oShape.objects("ind_PVBar").style.pixelLeft
+ oShape.objects("plg_SPIndicator").style.pixelLeft = iXvalue + iNumPixels - (oShape.objects("plg_SPIndicator").style.pixelwidth / 2)
+' gsh_log(oShape.objects("plg_SPIndicator").id & " pixelLeft=" & oShape.objects("plg_SPIndicator").style.pixelLeft)
+'gsh_log_e("GSH_SETSPINDICATOR_HORIZONTAL")
+end sub
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''' Test if the SCADA_SPPVOPBAR is offnormal
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_SCADA_SPPVOPBAR_ISOFFNORMAL(oScriptDataObject)
+
+ dim offNormalTest
+ offNormalTest = false
+ offNormalTest = GSH_SCADA_POINT_MODE_ISOFFNORMAL(oScriptDataObject)
+
+ GSH_SCADA_SPPVOPBAR_ISOFFNORMAL = offNormalTest
+
+end function
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SCADA_SPPVOPBAR_ONUPDATE
+'Update function for the shape SCADA_SPPVOPBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 06/15/07 Initialize alarm state with GSH_SHOWALARMS_WOOUTLINE
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SCADA_SPPVOPBAR_ONUPDATE(oShape, flag)
+
+ If flag = 0 then
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_NOALARMCODE,oShape) 'show normal
+ 'check if PV is bad then
+ if GSH_SCADA_ISDATABAD(oShape.objects("rec_DataScript"),true, false, false) or oShape.objects("rec_DataScript").IsNan(GSH_CPENTITY&"."&GSH_CPPARAM_PV) then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+ else
+ Dim iRangeHi, iRangeLo
+ iRangeHi = cint(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & ".EUHI"))
+ iRangeLo = cint(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & ".EULO"))
+ oShape.objects("ind_PVBar").value = Cint((GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)/(iRangeHi-iRangeLo))*100)
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+ end if
+ call GSH_SETSPINDICATOR_HORIZONTAL(oShape,iRangeLo,iRangeHi)
+ 'Alarming
+ if GSH_SCADA_IsAlarmingDisabled(oShape.objects("rec_DataScript")) Then
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_DISABLED
+ else
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY), oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_SCADA_SPPVOPBAR_ISOFFNORMAL(oShape.objects("rec_DataScript")) then
+
+ 'alert("off normal")
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+end sub
+'-------------------------------------START C200 SHAPE SPECIFIC----------------------------------------------'
+' a88888b. d8888b. a8888a a8888a
+'d8' `88 `88 d8' ..8b d8' ..8b
+'88 .aaadP' 88 .P 88 88 .P 88
+'88 88' 88 d' 88 88 d' 88
+'Y8. .88 88. Y8'' .8P Y8'' .8P
+' Y88888P' Y88888P Y8888P Y8888P
+'-------------------------------------------------------------------------------------------------------
+
+
+
+'---------------------------------------------------------------------------
+'C200 L1 Shapes
+'---------------------------------------------------------------------------
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LevelRegCtl_SAGauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LevelRegCtl_SAGauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_C200_LevelRegCtl_SAGauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+ isOffNormal = GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+
+ call GSH_LevelRegCtl_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_EXPERION_PARAM_ALARMPRIORITY, isOffNormal, isDataBad)
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+
+'gsh_log_e("GSH_C200_LevelRegCtl_SAGauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_LevelRegCtl_SAGauge_FR_OnUpdate",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_LevelAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_C200_LevelAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+
+ call GSH_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_EXPERION_PARAM_ALARMPRIORITY, isOffNormal, isDataBad)
+
+' gsh_log_e("GSH_C200_LevelAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_LevelAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_QualityAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_QualityAnalog_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_C200_QualityAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+
+
+ call GSH_QualityAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_EXPERION_PARAM_ALARMPRIORITY, isOffNormal, isDataBad)
+
+'gsh_log_e("GSH_C200_QualityAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_QualityAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+
+end sub
+
+
+
+sub GSH_C200_Quality_L1Deviation_FR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_Quality_L1Deviation_FR_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = not(GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ pvRefVal = oShape.objects("rec_DataScript").DataValue("TargetEntity.PVRefVal")
+
+ call GSH_Quality_L1Deviation_FR_ONUPDATE(oShape, flag, isAlmEnabled, GSH_EXPERION_PARAM_ALARMPRIORITY, isOffNormal, isDataBad, pvRefVal)
+
+
+'gsh_log_e("GSH_C200_Quality_L1Deviation_FR_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_Quality_L1Deviation_FR_ONUPDATE",oShape)
+ end if
+
+end sub
+
+
+sub GSH_C200_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_C200_Quality_L1Deviation_Hi_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = not(GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ pvRefVal = oShape.objects("rec_DataScript").DataValue("TargetEntity.PVRefVal")
+
+ call GSH_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag, isAlmEnabled, GSH_EXPERION_PARAM_ALARMPRIORITY, isOffNormal, isDataBad, pvRefVal)
+
+'gsh_log_e("GSH_C200_Quality_L1Deviation_Hi_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_Quality_L1Deviation_Hi_ONUPDATE",oShape)
+ end if
+end sub
+
+
+
+sub GSH_C200_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag)
+'sh_log_s("GSH_C200_Quality_L1Deviation_Lo_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = not(GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY))
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_SCADA_ISDATABAD(oShape.objects("rec_datascript"),true,false,false)
+ pvRefVal = oShape.objects("rec_DataScript").DataValue("TargetEntity.PVRefVal")
+
+ call GSH_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag, isAlmEnabled, GSH_EXPERION_PARAM_ALARMPRIORITY, isOffNormal, isDataBad, pvRefVal)
+
+'gsh_log_e("GSH_C200_Quality_L1Deviation_Lo_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_Quality_L1Deviation_Lo_ONUPDATE",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_ANALOGINDICATOR_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+' TODO: Need to refactor the code to make it efficient
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_ANALOGINDICATOR_L1_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_C200_ANALOGINDICATOR_ONUPDATE (oShape, flag)
+
+ dim sAlarmCode, bInSA, bInOffnormal
+ bInSA = false
+ sAlarmCode = GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY)
+ bInOffnormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+
+ 'Check SA Bars Limit
+ rSAHi = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE)))
+ rSALo = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE)))
+ rPV = CDbl(FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)))
+
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ bInSA = true
+ End If
+
+
+ if(StrComp(sAlarmCode,GSH_NONE,vbtextcompare) <> 0 AND (bInOffnormal OR not(bInSA))) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ else
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ end if
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_DIGITALINDICATOR_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_DIGITALINDICATOR_L1_ONUPDATE (oShape, flag)
+on error resume next
+'gsh_log_s("GSH_C200_DIGITALINDICATOR_L1_ONUPDATE oShape = " &oShape.id)
+
+ call GSH_C200_DIGITALINDICATOR_ONUPDATE (oShape, flag)
+
+ dim sAlarmCode, bInSA, bInOffnormal
+ bInSA = false
+ sAlarmCode = GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue"))
+ bInOffnormal = GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, oShape.objects("txt_PVvalue").value)
+
+ dim sPVState, sSAState
+ 'Check SA Condition
+ sPVState = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ Dim sTagname
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPENTITY, GSH_CPPOINT)
+
+' gsh_log("sTagname = " &sTagname)
+
+ sSAState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_SA_STATE, GSH_NONE)
+
+' gsh_log("sPVState " & sPVState & " sSAState = " &sSAState)
+
+ If (StrComp(sPVState, sSAState, vbTextCompare) <> 0) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ Else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ bInSA = true
+ End If
+
+ if(StrComp(sAlarmCode,GSH_NONE,vbtextcompare) <> 0 AND (bInOffnormal OR not(bInSA))) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ else
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ end if
+
+' gsh_log_e("GSH_C200_DIGITALINDICATOR_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_DIGITALINDICATOR_L1_ONUPDATE",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_OPDEVIATION_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_OPDEVIATION_L1_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_C200_OPDEVIATION_L1_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ dim isOffNormal
+ isOffNormal = GSH_C200_ANALOG_MODE_ISOFFNORMAL(oShape.objects("OPDevMonitor_Script"), GSH_CPENTITY)
+
+ call GSH_OPDEVIATION_L1_ONUPDATE (oShape, flag, isOffNormal)
+
+'gsh_log_e("GSH_C200_OPDEVIATION_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_OPDEVIATION_L1_ONUPDATE",oShape)
+ end if
+end sub
+'
+'oShape: the HCS shape
+'n: total number of alarm limit lines to show
+sub GSH_C200_SetAlarmLinesHorizontal(oShape, iRangeHi, iRangeLo, n)
+ dim alarmlim, alarmPri
+ alarmlim = 0: alarmPri = 0
+ for i = 1 to n
+ alarmPri = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmPriority" & i))
+ if (alarmPri > 0) and (alarmPri <=4) then
+ if not(oShape.objects("rec_DataScript").IsNan(GSH_CPENTITY & ".CP_AlarmLimit" & i)) then
+ alarmlim = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmLimit" & i))
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_VISIBLE
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("linePVRange"), oShape.objects("LineAlarm"&i), alarmlim, iRangeHi, iRangeLo)
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ next
+end sub
+
+sub GSH_C200_SetAlarmLinesVertical(oShape, rRangeHi, rRangeLo, n)
+On Error Resume Next
+'gsh_log_s("GSH_C200_SetAlarmLinesVertical oShape="&oShape.id)
+ dim alarmlim, alarmPri
+ alarmlim = 0: alarmPri = 0
+ for i = 1 to n
+ alarmPri = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmPriority" & i))
+ if (alarmPri > 0) and (alarmPri <=4) then
+ if not(oShape.objects("rec_DataScript").IsNan(GSH_CPENTITY & ".CP_AlarmLimit" & i)) then
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_VISIBLE
+ alarmlim = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmLimit" & i))
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("LineAlarm"&i), alarmlim, rRangeHi, rRangeLo)
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ next
+'gsh_log_e("GSH_C200_SetAlarmLinesVertical")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_SetAlarmLinesVertical",oShape)
+ end if
+end sub
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_SPPVOPBAR_ONUPDATE
+'Update function for the shape SCADA_SPPVOPBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 07/31/2007 - Create this new shape & Add code to handle it (Cuong Ly)
+' 09/03/2007 - Changed cint function to use int function as cint function
+' can not handle large number (example 150000) (CL)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_SPPVOPBAR_ONUPDATE(oShape, flag)
+
+'gsh_log_s("GSH_C200_SPPVOPBAR_ONUPDATE ")
+
+ If flag = 0 then
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_NOALARMCODE,oShape) 'show normal
+ 'check if PV is bad then
+ If GSH_C200_REGCTL_ISDATABAD(oShape.objects("rec_DataScript"),true,false,false) Then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+ else
+ Dim iRangeHi, iRangeLo
+
+ iRangeHi = int(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & ".DACA.PVEUHI"))
+ iRangeLo = int(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & ".DACA.PVEULO"))
+ oShape.objects("ind_PVBar").value = int((GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)/(iRangeHi-iRangeLo))*100)
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+' gsh_log "iRangeHi="&iRangeHi-iRangeLo&", iRangeLo="&iRangeLo& ", PV="& GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV) &", PVBar="& Cint((GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)/(iRangeHi-iRangeLo))*100)
+ End if
+
+ call GSH_SETSPINDICATOR_HORIZONTAL(oShape,iRangeLo,iRangeHi)
+ End If
+
+ If flag <= 1 then
+
+ 'Alarming
+ if GSH_C200_ISALARMINGDISABLEDPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY) Then
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_DISABLED
+ else
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_C200_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY), oShape)
+ End If
+
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ 'TODO: Need to be tested
+ 'Check the point ramping
+ Select Case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ oShape.objects("txt_ramp").style.visibility = GSH_HIDDEN
+ end Select
+
+ End If
+'gsh_log_e("GSH_C200_SPPVOPBAR_ONUPDATE ")
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_OPDEVMONITOR_ONUPDATE
+'Update function for the shape GSH_C200_OPDEVIATION
+'05/16/2008 - Create this new shape & Add code to handle it (Cuong Ly)
+'
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_OPDEVMONITOR_ONUPDATE(oShape, flag)
+' gsh_log_s("GSH_C200_OPDEVMONITOR_ONUPDATE oShapeId =" &oShape.id)
+
+ call GSH_C200_OPDEVMONITOR_SHOWNORMAL(oShape)
+ ' No alarm checking (OK by Jamie)
+
+ If flag <=1 then
+
+ 'Do focus and offnormal checking here. It is important that all shape generic functionalities are
+ 'done before shape specific ones
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+' oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("plg_LeftCover001").styleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.objects("plg_LeftCover002").styleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.objects("line007").styleClass = GSH_CSSFOCUSASSOCIATED
+ oShape.objects("line009").styleClass = GSH_CSSFOCUSASSOCIATED
+ end if
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_ANALOG_MODE_ISOFFNORMAL(oShape.objects("OPDevMonitor_Script"), GSH_CPENTITY) then
+
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End if
+
+ If flag = 0 then
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ 'Get OP value
+ dim opRefVal, deadBand, filterVal, lastRefTime, diff_old
+
+ 'Get the Deadband, filter, OPRefVal and the lastRefTime
+
+ opRefVal = Cdbl(oShape.GetCustomProperty("Value","OPRefVal"))
+ deadBand = Cdbl(oShape.GetCustomProperty("Value","DeadBand"))
+ filterVal = oShape.GetCustomProperty("Value","Filter")
+ lastRefTime = oShape.GetCustomProperty("Value","LastRefTime")
+ diff_old = oShape.GetCustomProperty("Value","Diff_Old")
+
+ dim diff_cur, deviation, opVal, diff_prev
+ opVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("OPDevMonitor_Script"),GSH_CPPARAM_OP)
+
+ if(StrComp(opVal,GSH_BADPV_TEXT, vbtextcompare)=0) then
+ exit sub
+ end if
+
+ 'Reference OP value is not set,
+ if(opRefVal < -99.0) then
+ opRefVal = opVal
+ oShape.SetCustomProperty "Value","OPRefVal",opVal
+ oShape.SetCustomProperty "Value","LastRefTime",now
+ oShape.objects("plg_OPRefValue").style.pixelleft = GSH_GET_OPREFPOSITION(oShape,opRefVal)
+ exit sub
+ end if
+
+ 'Get the RefTime from Registry.
+ dim opDevMonRegistryBase, refTime
+ opDevMonRegistryBase = GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR
+ refTime = GSH_READREGISTRY(opDevMonRegistryBase & GSH_REGKEY_OPDEVMON_RESETTIME, GSH_EMPTYSTRING)
+
+ 'If the RefTime > lastRefTime then update OPRefVal to current OPVal & update lastRefTime to RefTime
+ 'Need to give it a time buffer (i.e within 10s)?
+ if((StrComp(refTime,GSH_EMPTYSTRING)<>0) AND (CDate(refTime) > CDate(lastRefTime))) then
+ oShape.SetCustomProperty "Value","OPRefVal",opVal
+ opRefVal = opVal
+ oShape.SetCustomProperty "Value","LastRefTime",refTime
+ oShape.SetCustomProperty "Value","Diff_Old",0
+ diff_old = 0
+ oShape.objects("plg_OPRefValue").style.pixelleft = GSH_GET_OPREFPOSITION(oShape,opRefVal)
+ end if
+
+ 'Calculate OPDeviation
+ diff_prev = diff_old
+ diff_cur = opVal - opRefVal
+ diff_old = (diff_cur + diff_old)*filterVal
+ oShape.SetCustomProperty "Value","Diff_Old", diff_old
+
+' gsh_log("diff_cur = " &diff_cur &" diff_old = " &diff_old &" diff_prev = " &diff_prev)
+
+ 'Set ButterFlies
+ if diff_cur > 0 then
+ oShape.objects("ind_OPDevBarRight").value = diff_cur
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ elseif diff_cur < 0 then
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = diff_cur
+ else
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ end if
+
+ 'Set arrows - TODO: should this compare absolute value?
+ if ((diff_cur-diff_prev) > deadBand) then
+ 'set arrow to right
+ oShape.objects("grp_RightArrow").style.visibility = GSH_VISIBLE
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_HIDDEN
+ elseif ((diff_prev - diff_cur) > deadBand) then
+ 'set arrow to the left
+ oShape.objects("grp_RightArrow").style.visibility = GSH_HIDDEN
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_VISIBLE
+ else
+ 'hide arrows
+ oShape.objects("grp_RightArrow").style.visibility = GSH_HIDDEN
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_HIDDEN
+ end if
+
+ End If
+
+' gsh_log_e("GSH_C200_OPDEVMONITOR_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_C200_OPDEVMONITOR_ONUPDATE",oShape)
+ end if
+
+end sub
+
+
+function GSH_GET_OPREFPOSITION(oShape, opRefVal)
+
+ dim newPosition
+ dim opBarLeftPixel, opBarWidthPixel
+ opBarLeftPixel = oShape.objects("ind_OPBar").style.pixelleft
+ opBarWidthPixel = oShape.objects("ind_OPBar").style.pixelwidth
+
+ if opRefVal <= 0 then
+ newPosition = opBarLeftPixel - 2 'There is a little offset
+ elseif opRefVal >= 100 then
+ newPosition = opBarWidthPixel + 2 'There is a little offset
+ else
+ newPosition = cint(opBarLeftPixel + (opBarWidthPixel - opBarLeftPixel)*(CInt(opRefVal))/100)
+ end if
+
+ GSH_GET_OPREFPOSITION = newPosition
+
+end function
+
+
+sub GSH_C200_OPDEVMONITOR_SHOWNORMAL(oShape)
+'gsh_log_s("GSH_C200_OPDEVMONITOR_SHOWNORMAL oShapeID = " &oShape.id)
+
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ oShape.objects("grp_RightArrow").style.visibility = GSH_HIDDEN
+ oShape.objects("grp_LeftArrow").style.visibility = GSH_HIDDEN
+ oShape.objects("plg_LeftCover001").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("plg_LeftCover002").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("line007").styleClass = GSH_CSSBACKGROUND_GRAY
+ oShape.objects("line009").styleClass = GSH_CSSBACKGROUND_GRAY
+' oShape.objects("ind_OPDevBarRight").value = 10
+' oShape.objects("ind_OPDevBarLeft").value = -10
+' call GSH_SHOWNOALARM(oShape)
+'gsh_log_s("GSH_C200_OPDEVMONITOR_SHOWNORMAL")
+
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_OPDEVIATIONRESET
+'Update function for the shape GSH_C200_OPDEVIATIONRESET
+'05/14/2008 - Create this new shape & Add code to handle it (Cuong Ly)
+'
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_OPDEVIATIONRESET_ONLOAD(oShape)
+' gsh_log_s("GSH_C200_OPDEVIATIONRESET_ONLOAD oShapeId =" &oShape.id)
+
+ dim opDevMonRegistryBase
+ opDevMonRegistryBase = GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR
+
+ 'Set ResetTime and ResetDate to current time
+ GSH_WRITETOREGISTRY opDevMonRegistryBase & GSH_REGKEY_OPDEVMON_RESETTIME, Now,"REG_SZ"
+ oShape.objects("RefTime").value = FormatDateTime(now,vbShortDate) & " " &FormatDateTime(now,vbShortTime)
+
+' gsh_log_e("GSH_C200_OPDEVIATIONRESET_ONLOAD RefDate = " &Date &" RefTime = " &Time)
+
+end sub
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_C200_OPDEVIATIONRESET_ONCLICK
+'Update function for the shape GSH_C200_OPDEVIATIONRESET
+'05/14/2008 - Create this new shape & Add code to handle it (Cuong Ly)
+'
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_C200_OPDEVIATIONRESET_ONCLICK(oShape)
+' gsh_log_s("GSH_C200_OPDEVIATIONRESET_ONCLICK oShapeId =" &oShape.id)
+
+ dim opDevMonRegistryBase
+ opDevMonRegistryBase = GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR
+
+ 'Set ResetTime and ResetDate to current time
+ GSH_WRITETOREGISTRY opDevMonRegistryBase & GSH_REGKEY_OPDEVMON_RESETTIME, Now,"REG_SZ"
+ oShape.objects("RefTime").value = FormatDateTime(now,vbShortDate) & " " &FormatDateTime(now,vbShortTime)
+
+ 'Ask all the OPDevMonitor shapes to update themselves
+ GSH_UPDATE_OPDEVMON_ONDISPLAY("")
+ 'and other shapes as well
+ GSH_UPDATESHAPESONDISPLAY("")
+' gsh_log_e("GSH_C200_OPDEVIATIONRESET_ONCLICK RefDate = " &Date &" RefTime = " &Time)
+
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TRENDTARGET_CLICK
+'06/01/07 Remove sPathPrefix because its not being used.
+'06/01/07 Added sTagNameHDA from the TagInformation because the Historian names do not match the tagname
+'06/01/07 parse out the function block for storing the itemAlias
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TRENDTARGET_CLICK(oShape)
+ Dim nCount, i, istrLen, iPosition, nNoOfTrends
+ Dim asTraceNames(9), asTrendParams(9), arAutoscale(9), anLower(9), anUpper(9)
+ Dim asStepped(9), asTrace(9), asTraceParams(9), asTraceNameAlias(9), asPVFormat(9), asTrendParamShort(9)
+
+ Dim sOPC1_PathPrefix,sOPC2_PathPrefix, sTagNameHDA
+ sOPC1_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY1PREFIX,"")
+ sOPC2_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY2PREFIX,"")
+ bUseShortNameForHDA = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_USESHORTNAME_FOR_HDAPATH,"")
+
+ nNoOfTrends = 8
+ for i = 1 to nNoOfTrends
+ asTraceNames(i) = ucase(oShape.GetCustomProperty("Value","TrendTag"&i))
+ asTrendParams(i) = oShape.GetCustomProperty("Value","TrendTag"&i&"Param")
+ arAutoscale(i) = oShape.GetCustomProperty("Value","Autoscale"& i)
+ anLower(i) = oShape.GetCustomProperty("Value","Lower"&i)
+ anUpper(i) = oShape.GetCustomProperty("Value","Upper"&i)
+ Next
+
+ For nCount=1 To nNoOfTrends
+ If Left(asTraceNames(nCount),1) <> "" Then
+ asTraceParams(nCount) = ucase(GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_REGKEY_TRENDPARAM & asTrendParams(nCount), "1"))
+ 'msgbox ("asTraceParams(nCount) = " & nCount & ", " & asTraceParams(nCount) )
+ istrLen = len(cstr(asTraceParams(nCount)))
+ iPosition= Instr(1, asTraceParams(nCount) , ".",vbtextcompare)
+ asTrendParamShort(nCount) = right(asTraceParams(nCount), istrLen - iPosition)
+
+ 'msgbox ("asTrendParamShort(nCount) = " & nCount & ", " & asTrendParamShort(nCount) )
+
+ asStepped(nCount) = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_REGKEY_TRENDSTEPPED & asTrendParams(nCount), "OFF")
+ asPVFormat(nCount) = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT)
+ asTraceNameAlias(nCount) = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount), GSH_REGKEY_TAGNAME_ALIAS, asTraceNames(nCount))
+ sTagNameHDA = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_REGKEY_TAGNAMEHDA, asTraceNames(nCount))
+
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, asTraceNameAlias(nCount) & "." & asTrendParamShort(nCount)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, sOPC1_PathPrefix& asTraceNames(nCount) & "." & asTraceParams(nCount)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, sOPC2_PathPrefix &asTraceNames(nCount) & "." & asTraceParams(nCount)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_ON
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(nCount)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(nCount)
+
+ 'Added 09/09/2008 (JE) to work with Sasol PHD historian interface
+ 'Issue#21: http://wss-edm-1/clients/hcs/services/ISE-HCS8227/ClientProjectAccess/Lists/Issue%20Tracker/DispForm.aspx?ID=21
+ If(UCASE(bUseShortNameForHDA) = "ON") then
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParamShort(nCount)
+ Else
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTraceParams(nCount)
+ End If
+
+ If arAutoscale(nCount) <> 1 Then
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "OFF"
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX, anUpper(nCount)
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN, anLower(nCount)
+ Else
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "ON"
+ End If
+ Else
+ GSH_SETDEMANDTREND GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_OFF
+ End If
+ Next
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TRENDTARGET_VARIN_CLICK
+' Feb. 27, 2008 Created to handle OVTrends as wells DemandTrend configuration - JE
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TRENDTARGET_VARIN_CLICK(oShape)
+ Dim nCount, i, istrLen, iPosition, nNoOfTrends
+ Dim asTraceNames(9), asTrendParams(9), arAutoscale(9), anLower(9), anUpper(9)
+ Dim asStepped(9), asTrace(9), asTraceParams(9), asTraceNameAlias(9), asPVFormat(9), asTrendParamShort(9)
+ Dim aTrendApp
+
+ Dim sOPC1_PathPrefix,sOPC2_PathPrefix, sTagNameHDA, bUseShortNameForHDA
+ sOPC1_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY1PREFIX,"")
+ sOPC2_PathPrefix = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_OPCKEY2PREFIX,"")
+ bUseShortNameForHDA = GSH_READREGISTRY(GSH_REGISTRY_TRENDCONFIG&GSH_REGKEY_USESHORTNAME_FOR_HDAPATH,"")
+ aTrendApp = ucase(oShape.GetCustomProperty("Value","TrendApp"))
+
+ nNoOfTrends = 8
+ for i = 1 to nNoOfTrends
+ asTraceNames(i) = ucase(oShape.GetCustomProperty("Value","TrendTag"&i))
+ asTrendParams(i) = oShape.GetCustomProperty("Value","TrendTag"&i&"Param")
+ arAutoscale(i) = oShape.GetCustomProperty("Value","Autoscale"&i)
+ anLower(i) = oShape.GetCustomProperty("Value","Lower"&i)
+ anUpper(i) = oShape.GetCustomProperty("Value","Upper"&i)
+ Next
+
+ For nCount=1 To nNoOfTrends
+ If Left(asTraceNames(nCount),1) <> "" Then
+ asTraceParams(nCount) = ucase(GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_REGKEY_TRENDPARAM & asTrendParams(nCount), "1"))
+ istrLen = len(cstr(asTraceParams(nCount)))
+ iPosition= Instr(1, asTraceParams(nCount) , ".",vbtextcompare)
+ asTrendParamShort(nCount) = right(asTraceParams(nCount), istrLen - iPosition)
+ asStepped(nCount) = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_REGKEY_TRENDSTEPPED & asTrendParams(nCount), "OFF")
+ asPVFormat(nCount) = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT)
+ asTraceNameAlias(nCount) = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount), GSH_REGKEY_TAGNAME_ALIAS, asTraceNames(nCount))
+ sTagNameHDA = GSH_READTAGINFORMATIONKEYVALUE(asTraceNames(nCount),GSH_REGKEY_TAGNAMEHDA, asTraceNames(nCount))
+
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ITEMALIAS, asTraceNameAlias(nCount) & "." & asTrendParamShort(nCount)
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPCITEMPATH, sOPC1_PathPrefix& asTraceNames(nCount) & "." & asTraceParams(nCount)
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_OPC2ITEMPATH, sOPC2_PathPrefix &asTraceNames(nCount) & "." & asTraceParams(nCount)
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_ON
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TRENDSTEPPED, asStepped(nCount)
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_PVFORMATKEY, asPVFormat(nCount)
+
+ 'Added 09/09/2008 (JE) to work with Sasol PHD historian interface
+ 'Issue#21: http://wss-edm-1/clients/hcs/services/ISE-HCS8227/ClientProjectAccess/Lists/Issue%20Tracker/DispForm.aspx?ID=21
+ If(UCASE(bUseShortNameForHDA) = "ON") then
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTrendParamShort(nCount)
+ Else
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_HDAPATH, sTagNameHDA & "." & asTraceParams(nCount)
+ End If
+
+ If arAutoscale(nCount) <> 1 Then
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "OFF"
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMAX, anUpper(nCount)
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_TREND_YMIN, anLower(nCount)
+ Else
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_AUTOSCALE, "ON"
+ End If
+ Else
+ GSH_SETANYTREND aTrendApp,GSH_REGKEY_TRENDTRACE & nCount,GSH_REGKEY_ACTIVE, GSH_OFF
+ End If
+ Next
+end sub
+
+
+
+Sub GSH_SV_RESET_LCLICK (oShape)
+'gsh_log_s("GSH_SV_RESET_LCLICK oShape = "& oShape.id)
+
+ Dim sT2DisplayName, sT3DisplayName, sT4DisplayName, sDispLocation, sDisplayName
+ sDispLocation = GSH_READDISPLAYNAMES("")
+ sT2DisplayName = oShape.GetCustomProperty("Value","L2_DisplayName")
+ sT3DisplayName = oShape.GetCustomProperty("Value","L3_DisplayName")
+ sT4DisplayName = oShape.GetCustomProperty("Value","L4_DisplayName")
+
+
+ sTemp = sDispLocation & sT2DisplayName & ".htm"
+ If sT2DisplayName <> "" Then
+ window.navigate(sTemp)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T2FN,sT2DisplayName)
+ End if
+ sTemp = sDispLocation & sT3DisplayName & ".htm"
+ If sT3DisplayName <> "" Then
+ window.navigate(sTemp)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T3FN,sT3DisplayName)
+ End if
+ sTemp = sDispLocation & sT4DisplayName & ".htm"
+ if sT4DisplayName <> "" Then
+ window.navigate(sTemp)
+ call GSH_WRITEDISPLAYCOMMUNICATIONKEYVALUE (GSH_REGKEY_T4FN,sT4DisplayName)
+ End if
+'gsh_log_e("GSH_GSH_SV_RESET_LCLICK")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_CVINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'11July2008 Created shape for SASOL RMPCT
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_CVINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'cv Status
+ Dim Status
+ Status = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "Status")
+
+ HighLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "HighLimit"))
+ LowLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "LowLimit"))
+ ReadValue = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "READVALUE"))
+
+ dim sEntityPoint
+ sEntityPoint = UCASE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY))
+ if strcomp(sEntityPoint, "", vbtextcompare) <> 0 then
+ EUHigh = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EUHigh", 100.0))
+ EULow = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EULow", 0.0))
+ end if
+
+ 'ReadValue Data Check
+ If GSH_C200_ANALOG_ISDATABAD(ReadValue,true,false,false) Then
+ oShape.objects("txt_ReadValue").value = GSH_FormatPVText(oShape,ReadValue)
+ else
+ oShape.objects("txt_ReadValue").value = "---"
+ End If
+
+ If HighLimit > EUHigh then ' not active - no constraint
+ HighLimit = EUHigh
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ReadValue > HighLimit then
+ oShape.objects("plg_opHigh").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ If LowLimit < EULow then ' not active
+ LowLimit = EULow
+ oShape.objects("plg_opLow").style.visibility = GSH_HIDDEN
+ else
+ if ReadValue < LowLimit then
+ oShape.objects("plg_opLow").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opLow").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) and strComp(Status,"GOOD",vbtextCompare)<> 0 then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_CVLABEL_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'18July2008 Created shape for SASOL RMPCT
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_CVLABEL_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'cv Status
+ Dim Status
+ Status = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "Status")
+
+ HighLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "HighLimit"))
+ LowLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "LowLimit"))
+ ReadValue = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "READVALUE"))
+
+ dim sEntityPoint
+ sEntityPoint = UCASE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY))
+ if strcomp(sEntityPoint, "", vbtextcompare) <> 0 then
+ EUHigh = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EUHigh", 100.0))
+ EULow = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EULow", 0.0))
+ end if
+
+ If HighLimit > EUHigh then ' not active - no constraint
+ HighLimit = EUHigh
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ReadValue > HighLimit then
+ oShape.objects("plg_opHigh").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ If LowLimit < EULow then ' not active
+ LowLimit = EULow
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ReadtValue < LowLimit then
+ oShape.objects("plg_opLow").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opLow").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) and strComp(Status,"GOOD",vbtextCompare)<> 0 then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MVINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'11July2008 Created shape for SASOL RMPCT
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MVINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ Dim Status
+ Status = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "Status")
+
+ HighLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "HighLimit"))
+ LowLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "LowLimit"))
+ SentValue = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "SentValue"))
+
+ 'SentValue Data Check
+ If GSH_C200_ANALOG_ISDATABAD(SentValue,true,false,false) Then
+ oShape.objects("txt_SentValue").value = GSH_FormatPVText(oShape,SentValue)
+ else
+ oShape.objects("txt_SentValue").value = "---"
+ End If
+
+ dim sEntityPoint
+ sEntityPoint = UCASE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY))
+ if strcomp(sEntityPoint, "", vbtextcompare) <> 0 then
+ EUHigh = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EUHigh", 100.0))
+ EULow = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EULow", 0.0))
+ end if
+
+ Range = EUHigh - EULow
+
+ If HighLimit > EUHigh then ' not active - no constraint
+ HighLimit = EUHigh
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ((abs(HighLimit - SentValue)/Range) < 0.03) or (tempSentValue > tempHighLimit) then
+ oShape.objects("plg_opHigh").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ If LowLimit < EULow then ' not active
+ LowLimit = EULow
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ((abs(LowLimit - SentValue)/Range) < 0.03) or (tempSentValue < tempLowLimit) then
+ oShape.objects("plg_opLow").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opLow").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL)then
+ If strComp(Status, "ON",vbtextCompare)<> 0 then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_MVLABEL_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'18July2008 Created shape for SASOL RMPCT
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_MVLABEL_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ Dim Status
+ Status = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "Status")
+
+ HighLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "HighLimit"))
+ LowLimit = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "LowLimit"))
+ SentValue = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "SentValue"))
+
+ dim sEntityPoint
+ sEntityPoint = UCASE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY))
+ if strcomp(sEntityPoint, "", vbtextcompare) <> 0 then
+ EUHigh = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EUHigh", 100.0))
+ EULow = csng(GSH_READTAGINFORMATIONKEYVALUE(sEntityPoint, "EULow", 0.0))
+ end if
+
+ Range = EUHigh - EULow
+
+ If HighLimit > EUHigh then ' not active - no constraint
+ HighLimit = EUHigh
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ((abs(HighLimit - SentValue)/Range) < 0.03) or (tempSentValue > tempHighLimit) then
+ oShape.objects("plg_opHigh").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ If LowLimit < EULow then ' not active
+ LowLimit = EULow
+ oShape.objects("plg_opHigh").style.visibility = GSH_HIDDEN
+ else
+ if ((abs(LowLimit - SentValue)/Range) < 0.03) or (tempSentValue < tempLowLimit) then
+ oShape.objects("plg_opLow").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("plg_opLow").style.visibility = GSH_HIDDEN
+ end if
+ end if
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) and strComp(Status, "GOOD",vbtextCompare)<> 0 then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DVINDICATOR_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'11July2008 Created shape for SASOL RMPCT
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DVINDICATOR_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'cv Status
+ Dim Status
+ Status = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "Status")
+
+ 'ReadValue Data Check
+ ReadValue = csng(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "READVALUE"))
+ If GSH_C200_ANALOG_ISDATABAD(ReadValue,true,false,false) Then
+ oShape.objects("txt_ReadValue").value = GSH_FormatPVText(oShape,ReadValue)
+ else
+ oShape.objects("txt_ReadValue").value = "---"
+ End If
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) and strComp(tempStatus, "GOOD",vbtextCompare)<> 0 then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_DVLABEL_SCADA_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+'18July2008 Created shape for SASOL RMPCT
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_DVLABEL_SCADA_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'cv Status
+ Dim Status
+ Status = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & "Status")
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) and strComp(tempStatus, "GOOD",vbtextCompare)<> 0 then
+ call GSH_GROUPREGULATORYCONTROLSHOWOFFNORMAL(oShape)
+ end if
+end sub
+
+'--------------------------------------------START SHAPE COMMON------------------------------
+
+'----------------------------------------------------------------------------------------------
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ALARM_SHOWSTATUS''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+'TODO: REMOVE GSH_TPS_ALARM_SHOWSTATUS when all TPS are switched to AlarmNum
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ALARM_SHOWSTATUS (oShape, alarmPriorityParameter, alarmEnabledParameter, cssDisabledAlarmStyle)
+on error resume next
+ 'Alarming
+
+ 'if GSH_ISALARMINGENABLED(oShape.objects("rec_DataScript") ,GSH_CPENTITY, alarmEnabledParameter) Then
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript") ,GSH_CPENTITY, alarmEnabledParameter) Then
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,alarmPriorityParameter),oShape)
+ else
+ oShape.objects("outline").styleClass = cssDisabledAlarmStyle
+ End If
+End sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM '''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+'TODO: REMOVE GSH_TPS_ALARM_SHOWSTATUS when all TPS are switched to AlarmNum
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM (oShape, alarmEnabledParameter, cssDisabledAlarmStyle)
+on error resume next
+ 'Alarming
+
+ 'if GSH_ISALARMINGENABLED(oShape.objects("rec_DataScript") ,GSH_CPENTITY, alarmEnabledParameter) Then
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript") ,GSH_CPENTITY, alarmEnabledParameter) Then
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ oShape.objects("outline").styleClass = cssDisabledAlarmStyle
+ End If
+End sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''jan.25'''
+
+sub GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, parameterToCheck)
+on error resume next
+
+ dim sStateTxt
+ sStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),parameterToCheck)
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_DIGITALOUTPUT_OFFNORMAL_SHOWSTATUS (oShape, parameterToCheck)
+on error resume next
+
+ dim sStateTxt
+ sStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),parameterToCheck)
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_DIGITAL_POINT_OP_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, sStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End sub
+
+
+'
+'
+'
+sub GSH_COMMON_LOCALMAN_INTERLOCK_SHOWSTATUS(scriptObj, txt_LocalMan_Interlock)
+ 'Check for Localman and Interlock status
+ dim bLocalMan, bInterlock
+ bInterlock = GSH_GETENTITYPARAMETERVALUE(scriptObj,GSH_CPPARAM_INTERLOCK)
+
+ if(bInterlock) then
+ txt_LocalMan_Interlock.value = GSH_INTERLOCK_TXT
+ txt_LocalMan_Interlock.style.visibility = GSH_VISIBLE
+ else
+ bLocalMan = GSH_GETENTITYPARAMETERVALUE(scriptObj,GSH_CPPARAM_LOCALMAN)
+ if(bLocalMan) then
+ txt_LocalMan_Interlock.value = GSH_LOCALMAN_TXT
+ txt_LocalMan_Interlock.style.visibility = GSH_VISIBLE
+ else
+ txt_LocalMan_Interlock.style.visibility = GSH_HIDDEN
+ end if
+ end if
+end sub
+
+'------------------------------------------------------------
+'GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT
+' This function required for TPS digital shapes b/c:
+' TPS digital points allow force states
+' which are unpreditable so we have to make PV references as State Description in stead of numeric
+' In that case, we need this function to find the numeric state based on the statetext in order
+' to find out which statestyle to use
+'
+' Sept 24,2009 - CL
+'----------------------------------------------------------------
+function GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sStateTxt)
+on error resume next
+'gsh_log_s("GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT oShape=" & oShape.id & " sStateTxt = " &sStateTxt)
+ dim i, nNumericState, sTemp
+
+ nNumericState = -1
+
+ 'Not sure if we need up to 5, but this is to get it work with demo points
+ for i=0 to 5
+ sTemp = GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), "STATETXT("&i&")", GSH_NONE)
+ if strcomp(sStateTxt,sTemp,vbtextcompare)=0 then
+ nNumericState = i
+ end if
+ Next
+ GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT = nNumericState
+'gsh_log_e("GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT nNumericState = " &nNumericState)
+end function
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_COMMON_ANALOGOUTPUTINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_COMMON_ANALOGOUTPUTINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+ If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGOUTPUTINDICATORNORMAL
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ end if
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ end if
+End sub
+
+
+'''''''''''''''''''''''''''''''''''''''''''''
+'Show Safe Operating Limit status
+''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_COMMON_SHOW_SOL_STATUS(oShape)
+on error resume next
+'gsh_log_s("GSH_COMMON_SHOW_SOL_STATUS oShape=" & oShape.id)
+
+ 'Compare solHi and solLo with pvVal and change plg_SOL color accordingly
+ oShape.objects("plg_SOL").styleClass = GSH_CSSSSOLINLIMIT
+ oShape.objects("txt_SOL").style.visibility = GSH_HIDDEN
+
+ If (not GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)) Then
+
+ Dim pvVal, solHi, solLo, sTagname
+ 'Check if PV is in SOL limit
+ pvVal = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)
+
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPENTITY, GSH_CPPOINT)
+ solHi = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_SOL_HI, GSH_NONE)
+ solLo = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_SOL_LO, GSH_NONE)
+
+ 'Note: this nested condition ((solHi <> GSH_NONE) and (CDbl(solHi) < CDbl(pvVal)))
+ 'somehow does not work when solHi (or solLo) = GSH_NONE
+ 'So have to break them down
+ If (solHi <> GSH_NONE) Then
+ If (CDbl(solHi) < CDbl(pvVal)) Then
+ oShape.objects("plg_SOL").styleClass = GSH_CSSSSOLOUTOFLIMIT
+ oShape.objects("txt_SOL").style.visibility = GSH_VISIBLE
+ End If
+ End If
+
+ If (solLo <> GSH_NONE) Then
+ If (CDbl(solLo) > CDbl(pvVal)) Then
+ oShape.objects("plg_SOL").styleClass = GSH_CSSSSOLOUTOFLIMIT
+ oShape.objects("txt_SOL").style.visibility = GSH_VISIBLE
+ End If
+ End If
+
+ End If
+
+'gsh_log_e("GSH_COMMON_SHOW_SOL_STATUS oShape")
+
+End sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'*****Added by Jamie - Sept. 22 ****
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ANALOG_POINT_IS_OFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam)
+'gsh_log_s("GSH_TPS_ANALOG_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn
+ tempReturn = false
+ if strComp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_MAN,vbTextCompare) = 0 then
+ tempReturn = true
+ end if
+GSH_TPS_ANALOG_POINT_IS_OFFNORMAL = tempReturn
+'gsh_log_e("GSH_TPS_ANALOG_POINT_IS_OFFNORMAL returning >>>" & tempReturn & "<<<")
+end function
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_REGCTL_POINT_ISOFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+' In addition to Analog point off normal check, checks other RegCtl offnormal conditions
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' sTagName = TagName, eg. Entity or other literal tagname
+' sParamName = Name of the param to check isNAN
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam)
+'gsh_log_s("GSH_TPS_REGCTL_POINT_ISOFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam )
+on error resume next
+Dim tempReturn,shapePoint, bOffNormalTest1,bOffNormalTest2, bOffNormalTest3
+Dim sNModAttr, sNMode
+ shapePoint = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ bOffNormalTest1 = false
+ bOffNormalTest2 = false
+ bOffNormalTest3 = false
+ tempReturn = false 'default
+
+' gsh_log("offNormalParam = "&GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam))
+
+ if (strcomp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_MAN,vbtextcompare) = 0) then
+ bOffNormalTest1 = true
+ end if
+ sNModAttr = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODATTR, GSH_NONE)
+ dim modAttr
+ modAttr = GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR)
+
+' gsh_log("modAttr = "&modAttr &"sNModAttr = " &sNModAttr)
+
+ if (strComp(sNModAttr,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NModAttr is None
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR),sNModAttr,vbTextCompare) <> 0) then
+ bOffNormalTest2 = true
+ end if
+ end if
+ sNMode = GSH_READTAGINFORMATIONKEYVALUE(shapePoint, GSH_REGKEY_NMODE, GSH_NONE)
+' gsh_log("sNMode = "&sNMode)
+' gsh_log("GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE) = " &GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE))
+ if (strComp(sNMode,GSH_NONE,vbTextCompare) <> 0) then 'if Registry NMode key is "None"
+ if (strComp(GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE),sNMode,vbTextCompare) <> 0) then
+ bOffNormalTest3 = true
+ end if
+ end if
+ tempReturn = ( ( bOffNormalTest1 ) or ( bOffNormalTest2) or (bOffNormalTest3) )
+ GSH_TPS_REGCTL_POINT_ISOFFNORMAL = tempReturn
+'gsh_log_e("GSH_TPS_REGCTL_POINT_ISOFFNORMAL returning >>>"&bOffNormalTest1& " " & bOffNormalTest2 & " " & bOffNormalTest3 & cstr(tempReturn) & "<<<")
+end function
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL''''''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Returns true or false
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+function GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oDataBoundObject,sPointName,sOffNormalParam, sDigitalStateText)
+'gsh_log_s("GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL oDataBoundObject=" & oDataBoundObject.id & ",sPointName = " & sPointName & ",sOffNormalParam=" & sOffNormalParam & ",sDigitalStateText=" & sDigitalStateText)
+on error resume next
+ Dim tempReturn,sTagname, bOffNormalTest1,bOffNormalTest2, bOffNormalTest4, bOffNormalTest3, sPVNormalState,sNModAttr
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oDataBoundObject.parentelement.parentelement,sPointName, GSH_CPPOINT)
+ tempReturn = false: bOffNormalTest1 = false: bOffNormalTest2 = false: bOffNormalTest3 = false: bOffNormalTest4 = false
+
+''''jan. 25 ''''
+ temp = GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam)
+ if strComp(temp,GSH_NODATA,vbTextCompare)<> 0 then
+ if strComp(temp,GSH_AUTO,vbTextCompare) <> 0 then
+ bOffNormalTest1 = true
+ end if
+ end if
+' if (strcomp(GSH_GETPARAMETERVALUE(oDataBoundObject, sPointName, sOffNormalParam),GSH_MAN,vbTextCompare) = 0) then
+' bOffNormalTest1 = true
+' end if
+ bOffNormalTest2 = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_PVNORMAL_STATE, sDigitalStateText)
+ bOffNormalTest3 = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_NMODATTR, GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODATTR))
+ bOffNormalTest4 = GSH_DIGITAL_GETOFFNORMALSTATUS(sTagname, GSH_REGKEY_NMODE, GSH_GETENTITYPARAMETERVALUE(oDataBoundObject,GSH_CPPARAM_MODE))
+ 'gsh_log("bOffNormalTest1="& bOffNormalTest1 &",bOffNormalTest2="&bOffNormalTest2& ",bOffNormalTest3="&bOffNormalTest3)
+ tempReturn = (bOffNormalTest1 or bOffNormalTest2 or bOffNormalTest3 or bOffNormalTest4)
+GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL = tempReturn
+'gsh_log_e("GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL returning >>>" & tempReturn & "<<<")
+end function
+
+'---------------------------------------------END SHAPE COMMON -------------------------------
+
+'--------------------------------------------START TPS SPECIFIC------------------------------
+'ooooooooooooo ooooooooo. .oooooo..o
+'8' 888 `8 `888 `Y88. d8P' `Y8
+' 888 888 .d88' Y88bo.
+' 888 888ooo88P' `"Y8888o.
+' 888 888 `"Y88b
+' 888 888 oo .d8P
+' o888o o888o 8""88888P'
+' sub routines
+'----------------------------------------------------------------------------------------------
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ANALOGINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 01/29/2010: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ANALOGINDICATOR_ALARMNUM_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_TPS_ANALOGINDICATOR_ALARMNUM_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ End If
+
+ If flag <=1 then
+ 'Set the focus
+ 'call GSH_ANALOGINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+'*****Changed by Jamie - Sept. 22 ****
+ if GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+
+ End If
+ End If
+' GSH_LOG_E ("GSH_TPS_ANALOGINDICATOR_ALARMNUM_ONUPDATE")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ANALOGINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/26/2008: Created by CL
+' 01/29/2010: Updated alarm handling
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ANALOGINDICATOR_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_TPS_ANALOGINDICATOR_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ call GSH_ANALOGINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ End If
+
+ If flag <=1 then
+ 'Set the focus
+ 'call GSH_ANALOGINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+'*****Changed by Jamie - Sept. 22 ****
+ if GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ oShape.objects("txt_PVvalue").value = "---"
+ Else
+ oShape.objects("txt_PVvalue").value = GSH_FormatPVText(oShape,oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+
+ End If
+ End If
+' GSH_LOG_E ("GSH_TPS_ANALOGINDICATOR_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ANALOGINDICATOR_SOL_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/26/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ANALOGINDICATOR_SOL_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_TPS_ANALOGINDICATOR_SOL_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+ call GSH_TPS_ANALOGINDICATOR_ONUPDATE(oShape, flag)
+
+ if flag = 0 then
+ call GSH_COMMON_SHOW_SOL_STATUS(oShape)
+ end if
+
+'GSH_LOG_E ("GSH_TPS_ANALOGINDICATOR_SOL_ONUPDATE oShape" & oShape.id)
+
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SOL_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/26/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_SOL_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_TPS_SOL_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ 'if the tag is in alarm - then SOL is outside of limits
+ oShape.objects("plg_SOL").styleClass = GSH_CSSSSOLINLIMIT
+ oShape.objects("txt_SOL").style.visibility = GSH_HIDDEN
+ If (strcomp(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")), GSH_NOALARMCODE, vbtextcompare) <> 0)then
+ oShape.objects("plg_SOL").styleClass = GSH_CSSSSOLOUTOFLIMIT
+ oShape.objects("txt_SOL").style.visibility = GSH_VISIBLE
+ End If
+ End If
+
+ If flag <=1 then
+' 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ End If
+
+'GSH_LOG_E ("GSH_TPS_SOL_ONUPDATE oShape" & oShape.id)
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ANALOGOUTPUTINDICATORALARMS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ANALOGOUTPUTINDICATORALARMS_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_COMMON_ANALOGOUTPUTINDICATORALARMS_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGOUTPUTINDICATORNORMAL
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ end if
+
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ end if
+
+'GSH_LOG_E ("GSH_TPS_ANALOGOUTPUTINDICATORALARMS_ONUPDATE")
+end sub
+
+sub GSH_TPS_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE (oShape, flag)
+'GSH_LOG_S ("GSH_TPS_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE oShape" & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ oShape.objects("outline").styleClass = GSH_CSSANALOGOUTPUTINDICATORNORMAL
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ end if
+
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_ANALOG_MODE_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ end if
+
+
+
+
+'GSH_LOG_E ("GSH_TPS_ANALOGOUTPUTINDICATORALARMS_W_OFFNORMAL_ONUPDATE")
+
+end sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITALINDICATOR_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+'09/26/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_DIGITALINDICATOR_ONUPDATE (oShape, flag)
+on error resume next
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ 'No Bad Data Check
+ oShape.objects("txt_PVvalue").value = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITALINDICATOR_NOALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+'09/21/2009: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_DIGITALINDICATOR_NOALARMS_ONUPDATE (oShape, flag) 'This version displays the StateTxt from the Registry
+on error resume next
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+
+ 'No Bad Data Check
+ oShape.objects("txt_PVvalue").value = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITALINDICATORSHORT_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_DIGITALINDICATORSHORT_ONUPDATE (oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_DIGITALINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+
+ End If
+'Bad Data Check not needed
+'Shape's Label is automatically assign to the Shape Custom property "Label"
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITALOUTPUTINDICATORALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_DIGITALOUTPUTINDICATORALARMS_ONUPDATE (oShape, flag) 'This version displays the StateTxt from the Registry
+on error resume next
+ If flag = 0 then
+ call GSH_DIGITALINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ oShape.objects("txt_OPvalue").value = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+
+ 'gsh_log "GSH_C200_DIGITALINDICATOR_ONUPDATE alarmpriority"&GSH_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY)
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_DIGITALINDICATORSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITALOUTPUT_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_OP)
+ End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_REGCTLINDICATOR_ONUPDATE'''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_REGCTLINDICATOR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_REGCTLINDICATOR_ONUPDATE oShape=" & oShape.id)
+
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+ call GSH_SETREGULATORYCONTROLINDICATORMODE(oShape.objects("rec_DataScript"))
+
+ 'Check the points alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'This call is for testing alarm in edmonton using simulation point
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ ''call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ else
+ 'Alarm is Disabled
+ call GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM(oShape)
+
+ End If
+ End If
+
+ 'TODO: need to test on site
+ If flag <= 1 then
+
+ 'Check Focus
+ call GSH_SETREGULATORYCONTROLINDICATORFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+
+ 'PV Data Check
+ 'TODO: need to test on site
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Set Mode
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+
+ 'Check the point ramping
+ Select Case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end Select
+ 'Check the point Windup
+ dim sWindupStatus
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+
+ End If
+'gsh_log_e("GSH_TPS_REGCTLINDICATOR_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_REGCTLINDICATOR_SOL_ONUPDATE'''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_REGCTLINDICATOR_SOL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_REGCTLINDICATOR_SOL_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ call GSH_TPS_REGCTLINDICATOR_ONUPDATE(oShape, flag)
+
+ if flag = 0 then
+ call GSH_COMMON_SHOW_SOL_STATUS(oShape)
+ end if
+
+'gsh_log_e("GSH_TPS_REGCTLINDICATOR_SOL_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_GROUPANALOG_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/03/2009: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_GROUPANALOG_ONUPDATE(oShape,flag)
+on error resume next
+if flag = 0 then
+ call GSH_GROUPANALOGSHOWNORMAL(oShape)
+
+ 'call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+End If
+If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'Set the focus
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_GROUPANALOGSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+End If
+If flag = 0 then
+ 'PV Data Check
+ If not(GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)) Then
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ Else
+ call GSH_GROUPANALOGSHOWBADPV(oShape)
+ End If
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_GROUPNUMERIC_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 03/18/2010: Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_GROUPNUMERIC_ONUPDATE(oShape,flag)
+on error resume next
+if flag = 0 then
+ call GSH_GROUPANALOGSHOWNORMAL(oShape)
+End If
+If flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'Set the focus
+End If
+If flag = 0 then
+ 'Numeric - no PV Data Check
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+End If
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_GROUPDIGITALCOMPOSITE_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 09/26/2008: Created by CL
+' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_GROUPDIGITALCOMPOSITE_ONUPDATE(oShape, flag)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_GROUPDIGITALCOMPOSITESHOWSUPPRESSEDALARM(oShape)
+ End If
+
+ 'PV Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_GROUPDIGITALCOMPOSITESHOWBADPV(oShape)
+ else
+ oShape.objects("txt_DigitalValue").value = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ End If
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPDIGITALCOMPOSITESETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ 'hide OP combobox if it was opened
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_MODEValue").style.visibility = GSH_HIDDEN
+
+ if GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, oShape.objects("txt_DigitalValue").value) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ End If
+
+ If flag = 0 then
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ else
+ 'Check status Message
+ dim val_stsMsg
+ val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+ call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+ end if
+
+ 'Display OP Value
+' sOPStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_OPValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP)
+ oShape.objects("txt_MODEValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ End If
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_GROUPDIGITALINPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape - Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/03/09 - Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_GROUPDIGITALINPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_GROUPDIGITALINPUT_ONUPDATE oShape = " & oShape.id)
+on error resume next
+
+ If flag = 0 then
+ GSH_GROUPDIGITALINPUTSHOWNORMAL(oShape)
+
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ oShape.objects("txt_DigitalValue").value = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ 'call GSH_GROUPDIGITALINPUTSETFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+
+ End If
+
+'gsh_log_e("GSH_TPS_GROUPDIGITALINPUT_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MF_DIGITALOUTPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus (b/c digital values are not changed often)
+' Aug 27, 2009 - Added new
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_MF_DIGITALOUTPUT_ONUPDATE(oShape, flag)
+on error resume next
+'gsh_log_s("GSH_TPS_MF_DIGITALOUTPUT_ONUPDATE shapeID = "& oShape.id)
+
+ GSH_GROUPDIGITALCOMPOSITESHOWNORMAL(oShape)
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ 'Display OP Value
+ dim sOPStateTxt
+ sOPStateTxt = GSH_SCADA_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_OP, oShape.objects("rec_DataScript"))
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("cmb_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_SCADA_DIGITAL_POINT_OP_ISOFFNORMAL(oShape.objects("rec_DataScript"),GSH_CPENTITY, sOPStateTxt) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+
+ oShape.objects("txt_OPValue").value = sOPStateTxt
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SELECTOROUTPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+'09/29/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_SELECTOROUTPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_SELECTOROUTPUT_ONUPDATE oShape=" & oShape.id)
+
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_SELECTOROUTPUTSHOWNORMAL(oShape)
+ call GSH_SELECTOROUTPUTSHOWSELECTOR(oShape, GSH_CPPARAM_SELINPUT)
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_SELECTOROUTPUT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+'gsh_log_e("GSH_TPS_SELECTOROUTPUT_ONUPDATE")
+
+End Sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SELECTOROUTPUTFLAG_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+'11/18/2009: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_SELECTOROUTPUTFLAG_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_SELECTOROUTPUTFLAG_ONUPDATE oShape=" & oShape.id)
+
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_SELECTOROUTPUTSHOWNORMAL(oShape)
+ call GSH_SELECTOROUTPUTFLAGSHOWSELECTOR(oShape, GSH_CPPARAM_PV)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ End If
+
+'gsh_log_e("GSH_TPS_SELECTOROUTPUTFLAG_ONUPDATE")
+
+End Sub
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_SELECTOROUTPUTSHOWSELECTOR''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape = shape
+' paramSelector = custom parameter
+'11/18/2009: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_SELECTOROUTPUTFLAGSHOWSELECTOR(oShape, paramSelector)
+'gsh_log_s("GSH_SELECTOROUTPUTFLAGSHOWSELECTOR oShape=" & oShape.id & ", paramSelector=" & paramSelector)
+on error resume next
+ dim xinput, selOrientation
+ 'xinput = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),paramSelector)
+ xinput = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & paramSelector)
+ 'xinput is expected to be 0 ,1 or 2
+ xinput = xinput + 1
+
+
+ ' Determine selector orientation (LEFT, RIGHT, CENTER)
+ selOrientation = GSH_NONE
+ select case xinput
+ case GSH_SELX1
+ ' Retrive custom parameter X1
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPX1, GSH_CPVALUE)
+ case GSH_SELX2
+ ' Retrive custom parameter X2
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPX2, GSH_CPVALUE)
+ case GSH_SELX3
+ ' Retrive custom parameter X3
+ selOrientation = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape, GSH_CPX3, GSH_CPVALUE)
+ end select
+ 'Set Orientation
+ call GSH_SELECTOROUTPUTSETORIENTATION(oShape, selOrientation)
+'gsh_log_e("GSH_SELECTOROUTPUTFLAGSHOWSELECTOR orientation set = " &selOrientation)
+
+end sub
+
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SELXDESC_ONUPDATE''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/04/2009 Created shape by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_SELXDESC_ONUPDATE (oShape, flag) 'This version displays the SELXDESC parameter
+on error resume next
+ If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ 'No Bad Data Check
+ oShape.objects("txt_PVvalue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_SELXDESC")
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_AUTOMAN_ONUPDATE'''''''''''''''''''''''''
+'Parameters: oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/29/2008: Created by CL.
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_AUTOMAN_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_AUTOMAN_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+If flag = 0 then
+ call GSH_REGULATORYCONTROLINDICATORSHOWNORMAL(oShape)
+ 'Check the points alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'This call is for testing alarm in edmonton using simulation point
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_EXPERION_PARAM_ALARMPRIORITY),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_REGULATORYCONTROLINDICATORSHOWDISABLEDALARM(oShape)
+ End If
+End If
+If flag <= 1 then
+ 'call GSH_SETREGULATORYCONTROLINDICATORFOCUS(oShape) replaced by
+ call GSH_GEN_SETSHAPEFOCUS (oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+If flag = 0 then
+ oShape.objects("txt_OPValue").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+End If
+'gsh_log_e("GSH_TPS_AUTOMAN_ONUPDATE")
+End Sub
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_HORIZONTALPVBAR_ONUPDATE
+'Update function for the shape C200_HORIZONTALPVBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 09/29/2008: Created by CL
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_HORIZONTALPVBAR_ONUPDATE(oShape, flag)
+'gsh_log_s "GSH_TPS_HORIZONTALPVBAR_ONUPDATE"
+ If flag = 0 then
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_NOALARMCODE,oShape) 'show normal
+ dim nPVValue, iPVValue, iRangeHi, iRangeLo
+
+ 'Alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWALARMS_WOOUTLINE(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_DISABLED
+ End If
+
+ if GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+ nPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ iRangeHi = CInt(oShape.GetCustomProperty("Value", "txtHighLimit"))
+ iRangeLo = CInt(oShape.GetCustomProperty("Value", "txtLowLimit"))
+ if (nPVValue >= iRangeHi) then
+ iPVValue = 100
+ ElseIf (nPVValue <= iRangeLo) then
+ iPVValue = 0
+ else
+ iPVValue = Cint(((nPVValue-iRangeLo)* 100 )/ (iRangeHi - iRangeLo))
+ end if
+ oShape.objects("ind_PVBar").value = iPVValue
+ end if
+ End If
+
+ If flag <= 1 then
+ call GSH_SETSHAPEFOCUS(oShape)
+ End If
+'gsh_log_e "GSH_TPS_HORIZONTALPVBAR_ONUPDATE"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_HORIZONTALPVBAR_NUMERIC_ONUPDATE
+'Update function for the shape C200_HORIZONTALPVBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 09/29/2008: Created by CL
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_HORIZONTALPVBAR_NUMERIC_ONUPDATE(oShape, flag)
+'gsh_log_s "GSH_TPS_HORIZONTALPVBAR_NUMERIC_ONUPDATE"
+ If flag = 0 then
+ dim nPVValue, iPVValue, iRangeHi, iRangeLo
+
+ 'No Alarming
+ if GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+ nPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ iRangeHi = CInt(oShape.GetCustomProperty("Value", "txtHighLimit"))
+ iRangeLo = CInt(oShape.GetCustomProperty("Value", "txtLowLimit"))
+ if (nPVValue >= iRangeHi) then
+ iPVValue = 100
+ ElseIf (nPVValue <= iRangeLo) then
+ iPVValue = 0
+ else
+ iPVValue = Cint(((nPVValue-iRangeLo)* 100 )/ (iRangeHi - iRangeLo))
+ end if
+ oShape.objects("ind_PVBar").value = iPVValue
+ end if
+ End If
+
+ If flag <= 1 then
+ call GSH_SETSHAPEFOCUS(oShape)
+ End If
+'gsh_log_e "GSH_TPS_HORIZONTALPVBAR_NUMERIC_ONUPDATE"
+end sub
+
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SPPVOPBAR_ONUPDATE
+'Update function for the shape TPS_SPPVOPBAR
+'Parameter: Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+' 07/04/2009 - Created (Cuong Ly)
+' Note - use int function as cint function
+' can not handle large number (example 150000) (CL)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_SPPVOPBAR_ONUPDATE(oShape, flag)
+On Error Resume Next
+'gsh_log_s("GSH_TPS_SPPVOPBAR_ONUPDATE ")
+
+ If flag = 0 then
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_NOALARMCODE,oShape) 'show normal
+ 'check if PV is bad then
+ if GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ oShape.objects("ind_PVBar").value = 0
+ oShape.objects("txtBadPV").style.visibility = GSH_VISIBLE
+ else
+ Dim iRangeHi, iRangeLo
+
+ iRangeHi = int(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & ".PVEUHI"))
+ iRangeLo = int(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & ".PVEULO"))
+
+ oShape.objects("ind_PVBar").value = int((GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)/(iRangeHi-iRangeLo))*100)
+ oShape.objects("txtBadPV").style.visibility = GSH_HIDDEN
+' gsh_log "iRangeHi="&iRangeHi-iRangeLo&", iRangeLo="&iRangeLo& ", PV="& GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV) &", PVBar="& Cint((GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)/(iRangeHi-iRangeLo))*100)
+ End if
+
+ call GSH_SETSPINDICATOR_HORIZONTAL(oShape,iRangeLo,iRangeHi)
+ End If
+
+ If flag <= 1 then
+
+ 'Alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWALARMS_WOOUTLINE(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY), oShape)
+ call GSH_SHOWALARMS_WOOUTLINE(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")), oShape)
+ else
+ oShape.objects("ind_PVBar").styleClass = GSH_CSSBGALARM_DISABLED
+ End If
+
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+ 'Check the point ramping
+ Select Case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_REGULATORYCONTROLINDICATORSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ oShape.objects("txt_ramp").style.visibility = GSH_HIDDEN
+ end Select
+
+ End If
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_SPPVOPBAR_ONUPDATE",oShape)
+ end if
+'gsh_log_e("GSH_TPS_SPPVOPBAR_ONUPDATE ")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LevelIndicator_OnUpdate'''''''''''''''''''''''''''''''''''''''
+'Parameters:oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/29/2008 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LevelIndicator_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_LevelIndicator_OnUpdate oShape="&oShape.id & ", flag="&flag)
+On Error Resume Next
+ If flag <= 1 then
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'alarming is enabled, get highest priority(if any) and change shape accordingly
+ 'call GSH_SHOWLEVELALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWLEVELALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ End If
+
+ call GSH_LevelIndicatorSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+ end if
+ end if
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1))
+ 'Check for Bad PV
+ if GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), numOfDecimals)
+ End If
+ End If
+'gsh_log_e("GSH_TPS_LevelIndicator_OnUpdate")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LevelIndicator_Wide_ShowPV_OnUpdate'''''''''''''''''''''''''''''''''''''''
+'Parameters:oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/29/2008 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LevelIndicator_Wide_ShowPV_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_LevelIndicator_Wide_ShowPV_OnUpdate oShape="&oShape.id & ", flag="&flag)
+On Error Resume Next
+ If flag <= 1 then
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'alarming is enabled, get highest priority(if any) and change shape accordingly
+ 'call GSH_SHOWLEVELALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWLEVELALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ End If
+
+ call GSH_LevelIndicatorSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+ end if
+ end if
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1))
+ 'Check for Bad PV
+ if GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), numOfDecimals)
+ End If
+
+ oShape.objects("txt_PVValue").style.visibility = GSH_VISIBLE
+ 'oShape.objects("txt_PVvalue").styleClass = GSH_CSSLEVELINDICATORNORMALPVTEXT
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+
+
+ End If
+'gsh_log_e("GSH_TPS_LevelIndicator_Wide_ShowPV_OnUpdate")
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LevelIndicator_Small_OnUpdate'''''''''''''''''''''''''''''''''''''''
+'Parameters:oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/02/2008 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LevelIndicator_Small_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_LevelIndicator_OnUpdate oShape="&oShape.id & ", flag="&flag)
+On Error Resume Next
+ If flag <= 1 then
+ call GSH_LevelIndicatorShowNormal(oShape)
+ 'Check Alarms
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'alarming is enabled, get highest priority(if any) and change shape accordingly
+ 'call GSH_SHOWLEVELSMALLALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWLEVELSMALLALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_LevelIndicatorShowDisbledAlarm(oShape)
+ End If
+
+ call GSH_LevelIndicatorSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ if GSH_TPS_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+ end if
+ end if
+
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1))
+
+ 'Check for Bad PV
+ if GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), numOfDecimals)
+ End If
+ End If
+'gsh_log_e("GSH_TPS_LevelIndicator_OnUpdate")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LEVELREGCTL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 09/29/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LEVELREGCTL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_LEVELREGCTL_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+On Error Resume Next
+ If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWLEVELALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWLEVELALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+
+ End If
+ 'End If
+ 'If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1))
+
+ 'Check for bad value
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ call GSH_LevelIndicatorShowSPFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), numOfDecimals)
+ End If
+ End If
+ If flag = 0 then
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ End If
+'gsh_log_e("GSH_TPS_LEVELREGCTL_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LEVELREGCTL_Small_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+' 06/02/2009: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LEVELREGCTL_SMALL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_LEVELREGCTL_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+On Error Resume Next
+ If flag <= 1 then
+ GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWLEVELSMALLALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWLEVELSMALLALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+
+ End If
+ 'End If
+ 'If flag <= 1 then
+ call GSH_LevelIndicatorRegulatoryControlSetFocus(oShape)
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ call GSH_LevelIndicatorRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+
+ numOfDecimals = CInt(Right(GSH_READTAGINFORMATIONKEYVALUE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY), GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1))
+
+ 'Check for bad value
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ call GSH_LevelIndicatorShowPVFloat(oShape)
+ call GSH_LevelIndicatorShowSPFloat(oShape)
+ oShape.objects("txt_PVvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV), numOfDecimals)
+ End If
+ End If
+ If flag = 0 then
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ End If
+'gsh_log_e("GSH_TPS_LEVELREGCTL_ONUPDATE")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_GROUPAUTOMAN_ONUPDATE'''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus
+' 09/29/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_GROUPAUTOMAN_ONUPDATE(oShape, flag)
+on error resume next
+ If flag = 0 then
+ GSH_GROUPAUTOMANSHOWNORMAL(oShape)
+ 'Alarming
+ call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_C200_AUTOMAN_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = formatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'RedTag message
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ else
+ 'Check status Message
+ dim val_stsMsg
+ val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+ call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+ end if
+ End If
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_GROUPREGULATORYCONTROL_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'09/29/2008 - Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_GROUPREGULATORYCONTROL_ONUPDATE(oShape, flag)
+on error resume next
+if flag = 0 then
+ GSH_GROUPREGULATORYCONTROLSHOWNORMAL(oShape)
+ oShape.objects("txt_statusmessage").style.visibility = GSH_HIDDEN 'Hide RedTag
+
+ 'Alarming
+ If GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ End If
+End If
+
+if flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal and hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ oShape.objects("alp_SPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("alp_OPValue").style.visibility = GSH_HIDDEN
+ oShape.objects("cmb_ModeValue").style.visibility = GSH_HIDDEN
+
+ if GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+if flag = 0 then
+ 'PV Data Check
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Display OP Value
+ 'oShape.objects("txt_OPValue").value = formatNumber(alp_OPValue.value,GSH_OUTPUTINDICATORDECIMALS)
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+
+ 'Display SP Value
+ 'oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,alp_SPValue.value)
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'Assumption: Reg tag and status message are mutual exclusive
+ 'Status message
+ dim val_redTag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if strcomp(val_redTag,GSH_ON,vbtextcompare) = 0 then
+ oShape.objects("txt_statusmessage") = GSH_REDTAG_TEXT
+ oShape.objects("txt_statusmessage").style.visibility = GSH_VISIBLE
+ else
+ 'Check status Message
+ dim val_stsMsg
+ val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+ call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+ end if
+
+ 'Set Ramping
+ Select case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end select
+End If
+end sub
+
+'''Jan. 25 '''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATOR_ONUPDATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 09/29/2008 - Created by CL
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATOR_ONUPDATE(oShape, flag)
+On Error Resume Next
+'gsh_log_s("GSH_TPS_MOTORINDICATOR_ONUPDATE >>>>> Shape ="& oShape.id)
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ Dim nNumericState, sPVvalue
+ sPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sPVValue)
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ 'Alarming
+ 'call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+'gsh_log_e("GSH_TPS_MOTORINDICATOR_ONUPDATE ")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATOR_LM_ONUPDATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/2009 - Create the function to handle TPS MotoIndicator_lm shapes with Localman and Interlock indicators
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATOR_LM_ONUPDATE(oShape, flag)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ Dim nNumericState, sPVvalue
+ sPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sPVValue)
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ 'Alarming
+ 'call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+
+
+ If flag = 0 then
+ 'Check for Localman and Interlock status
+ call GSH_COMMON_LOCALMAN_INTERLOCK_SHOWSTATUS(oShape.objects("rec_DataScript"), oShape.objects("txt_Localman"))
+
+ end if
+
+End Sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORSMALL_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORSMALL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORSMALL_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MINIMOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ Dim nNumericState, sPVvalue
+ sPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sPVValue)
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+ 'Alarming
+ 'call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSSMINIMOTORINDICATORDISABLEDALARM)
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+'gsh_log_e("GSH_TPS_MOTORINDICATORSMALL_ONUPDATE")
+End Sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORSMALL_NOALARMS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 09/23/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORSMALL_NOALARMS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORSMALL_NOALARMS_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MINIMOTORINDICATORSHOWNORMAL(oShape)
+ 'set motor to running or not based on registry
+ Dim nNumericState, sPVvalue
+ sPVvalue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sPVvalue)
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+'gsh_log_e("GSH_TPS_MOTORINDICATORSMALL_NOALARMS_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_MOTORINDICATORSMALL_NOALARMS_ONUPDATE",oShape)
+ end if
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORSMALL_NOALARMS_NOFOCUS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' 12/9/09 Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORSMALL_NOALARMS_NOFOCUS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORSMALL_NOALARMS_NOFOCUS_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ 'set motor to running or not based on shape custom property
+ Dim sPVvalue, sStateTxt_On
+ sPVvalue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+ sStateTxt_On = oShape.GetCustomProperty(GSH_CPVALUE,"STATETXT_ON")
+
+ if (StrComp(sPVvalue,sStateTxt_On,vbtextcompare) <> 0) then
+ oShape.objects("rec_Motor").styleClass = "MOTORINDICATORMOTORNOTRUNNING"
+ else
+ oShape.objects("rec_Motor").styleClass = "MOTORINDICATORMOTORRUNNING"
+ end if
+
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE
+
+'gsh_log_e("GSH_TPS_MOTORINDICATORSMALL_NOALARMS_NOFOCUS_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_MOTORINDICATORSMALL_NOALARMS_NOFOCUS_ONUPDATE",oShape)
+ end if
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORSMALL_FLAG_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' 18/3/2010 Created by JE
+' 24/3/2010 Modified by JE to add check for either On or True
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORSMALL_FLAG_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORSMALL_FLAG_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ 'set motor to running or not based on flag
+ Dim sPVvalue
+ sPVvalue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+ if (StrComp(sPVvalue,"ON",vbtextcompare) = 0) OR (StrComp(sPVvalue,"TRUE",vbtextcompare) = 0) then
+ oShape.objects("rec_Motor").styleClass = "MOTORINDICATORMOTORRUNNING"
+ else
+ oShape.objects("rec_Motor").styleClass = "MOTORINDICATORMOTORNOTRUNNING"
+ end if
+
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE
+
+'gsh_log_e("GSH_TPS_MOTORINDICATORSMALL_FLAG_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_MOTORINDICATORSMALL_FLAG_ONUPDATE",oShape)
+ end if
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORSMALL_NUMERIC_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' 19/3/2010 Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORSMALL_NUMERIC_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORSMALL_NUMERIC_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ 'set motor to running or not based on numeric state (1=ON, everything else is OFF)
+ Dim sPVvalue
+ nPVvalue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+ if nPVvalue <> 1 then
+ oShape.objects("rec_Motor").styleClass = "MOTORINDICATORMOTORNOTRUNNING"
+ else
+ oShape.objects("rec_Motor").styleClass = "MOTORINDICATORMOTORRUNNING"
+ end if
+
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE
+
+'gsh_log_e("GSH_TPS_MOTORINDICATORSMALL_NUMERIC_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_MOTORINDICATORSMALL_NUMERIC_ONUPDATE",oShape)
+ end if
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORSMALL_LM_ONUPDATE'''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/2009 - Create the function to handle TPS MotoIndicator_lm shapes with Localman and Interlock indicators
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORSMALL_LM_ONUPDATE(oShape, flag)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+
+ 'Alarming
+ 'call GSH_TPS_ALARM_SHOWSTATUS(oShape, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSSMINIMOTORINDICATORDISABLEDALARM)
+ call GSH_TPS_ALARM_SHOWSTATUS_ALARMNUM(oShape, GSH_TPS_PARAM_ALARM_ENABLED, GSH_CSS_ALARMDISABLED)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+
+ If flag = 0 then
+ 'Check for Localman and Interlock status
+ call GSH_COMMON_LOCALMAN_INTERLOCK_SHOWSTATUS(oShape.objects("rec_DataScript"), oShape.objects("txt_Localman"))
+ end if
+
+End Sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORWITHALARMS_ONUPDATE''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/09 - Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORWITHALARMS_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORWITHALARMS_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ Dim sPVvalue, nNumericState
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ sPVValue = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sPVValue)
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ 'Alarming
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITYALARM,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+
+
+'gsh_log_e("GSH_TPS_MOTORINDICATORWITHALARMS_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MOTORINDICATORWITHALARMS_LM_ONUPDATE''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/09 - Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_MOTORINDICATORWITHALARMS_LM_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_TPS_MOTORINDICATORWITHALARMS_LM_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+
+ If flag = 0 then
+ call GSH_MOTORINDICATORSHOWNORMAL(oShape)
+
+ 'set motor to running or not based on registry
+ call GSH_MOTORINDICATORSETNUMERICSTATE(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV),GSH_CPPARAM_PV)
+
+ 'Alarming
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITYALARM,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+ End If
+
+ If flag = 0 then
+ 'Check for Localman and Interlock status
+ call GSH_COMMON_LOCALMAN_INTERLOCK_SHOWSTATUS(oShape.objects("rec_DataScript"), oShape.objects("txt_Localman"))
+ end if
+
+'gsh_log_e("GSH_TPS_MOTORINDICATORWITHALARMS_LM_ONUPDATE")
+End Sub
+
+'
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_REGCTLBOX_ONUPDATE''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only
+'09/30/2008 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_REGCTLBOX_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_REGCTLBOX_ONUPDATE oShape="&oShape.id& ", flag = "&flag)
+on error resume next
+if flag = 0 then
+
+ call GSH_REGCTLBOXSHOWNORMAL(oShape)
+
+ 'Alarming
+ If GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ call GSH_GROUPREGULATORYCONTROLSHOWSUPPRESSEDALARM(oShape)
+ End If
+End If
+
+if flag <= 1 then
+ call GSH_GEN_SETSHAPEFOCUS(oShape) 'replaces GSH_GROUPREGULATORYCONTROLSETFOCUS(oShape)
+
+ 'Check for Off Normal and hide text entry and combobox if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ if GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+End If
+
+if flag = 0 then
+ 'PV Data Check
+ If GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false) Then
+ call GSH_GROUPREGULATORYCONTROLSHOWBADPV(oShape)
+ else
+ oShape.objects("txt_AnalogValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ End If
+
+ 'Display OP Value
+ oShape.objects("txt_OPValue").value = FormatNumber(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS,-2,0,0)
+
+ 'Display SP Value
+ oShape.objects("txt_SPValue").value = GSH_FormatPVText(oShape,GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_SP))
+
+ 'Check status Message
+ dim val_stsMsg
+ val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+ call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+
+
+ 'ModAttr Data Check
+ If (GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODATTR) = GSH_MODE_PROGRAM) Then
+ oShape.objects("txt_ModeValue").value = GSH_MODE_PROGRAM_TEXT & GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ Else
+ oShape.objects("txt_ModeValue").value = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE)
+ end if
+
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+ 'Set Ramping
+ Select case GSH_GET_POINT_RAMPING_VALUE(oShape.objects("rec_DataScript"))
+ Case GSH_RAMPING_RUN
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_RUN,1))
+ Case GSH_RAMPING_PRESET
+ call GSH_GROUPREGULATORYCONTROLSHOW_RAMP(oShape,Left(GSH_RAMPING_PRESET,1))
+ Case else
+ 'do nothing because visibility is hidden by default and in Show Normal
+ end select
+End If
+'gsh_log_e("GSH_TPS_REGCTLBOX_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SENSOR_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 09/30/2008 - Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_SENSOR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_SENSOR_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+
+ If flag = 0 then
+ call GSH_SENSORSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) then
+ 'alarming is enabled, get highest priority and change shape accordingly
+ 'Select Case GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY)
+ Select Case GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum"))
+ Case GSH_UNACKEMERG
+ call GSH_SENSORSHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_SENSORSHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_SENSORSHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_SENSORSHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_SENSORSHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_SENSORSHOWLOWALARM(oShape,false)
+ Case Else
+ End Select
+ else
+ 'Alarm is Disabled
+ call GSH_SENSORSHOWSUPPRESSEDALARM(oShape)
+ End If
+ End If
+
+ If flag <= 1 then
+ call GSH_SETSHAPEFOCUS(oShape)
+ End If
+' gsh_log_e("GSH_TPS_SENSOR_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_MULTIPLESENSORS_ONUPDATE'''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/04/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_MULTIPLESENSORS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_MULTIPLESENSORS_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+ If flag = 0 then
+ call GSH_MULTIPLESENSORSSHOWNORMAL(oShape)
+ 'Alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) then
+ 'Get Highest Alarm
+ iAlarmCode1 = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITYALARM,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY)
+ iAlarmCode2 = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY)
+
+ iAlarmCode = GSH_COMPAREHIGHESTALARMPRIORITY(iAlarmCode1, iAlarmCode2)
+ Select Case iAlarmCode
+ Case GSH_UNACKEMERG
+ call GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oShape,true)
+ Case GSH_UNACKHIGH
+ call GSH_MULTIPLESENSORSSHOWHIGHALARM(oShape,true)
+ Case GSH_UNACKLOW
+ call GSH_MULTIPLESENSORSSHOWLOWALARM(oShape,true)
+ Case GSH_ACKEMERG
+ call GSH_MULTIPLESENSORSSHOWEMERGENCYALARM(oShape,false)
+ Case GSH_ACKHIGH
+ call GSH_MULTIPLESENSORSSHOWHIGHALARM(oShape,false)
+ Case GSH_ACKLOW
+ call GSH_MULTIPLESENSORSSHOWLOWALARM(oShape,false)
+ Case Else
+ 'No Alarms
+ End Select
+
+ else
+ call GSH_MULTIPLESENSORSSHOWSUPPRESSEDALARM(oShape)
+
+ end if
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_MULTIPLESENSORSSETFOCUS(oShape)
+ 'No Offnormal check as this shape could be a digital flag or analog point.
+ End If
+ 'gsh_log_e("GSH_TPS_MULTIPLESENSORS_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GEN_MULTIPLESENSORS_ALARMGROUP_ONUPDATE'''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oShape: Shape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/04/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_GEN_MULTIPLESENSORS_ALARMGROUP_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GEN_MULTIPLESENSORS_ALARMGROUP_ONUPDATE oShape=" & oShape.id)
+On Error Resume Next
+ If flag = 0 then
+ call GSH_MULTIPLESENSORSSHOWNORMAL(oShape)
+ 'Alarming
+
+ dim sAlarmPriority, bUnack
+ sAlarmPriority = GSH_GETALARMGROUPPRIORITYPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+ bUnack = GSH_GETALARMGROUPUNACKPARAMETER(oShape.objects("rec_dataScript"),GSH_CPENTITYALARM)
+' gsh_log ("sAlarmPriority = " & sAlarmPriority & " bUnack = " & bUnack )
+ oShape.Objects("focus").linewidth = 0
+
+ if(sAlarmPriority > 0) then
+ call GSH_SHOWALARMS (sAlarmPriority, bUnack, oShape)
+ else
+ call GSH_SHOWNOALARM(oShape)
+ oShape.Objects("outline").styleClass = GSH_CSSTABOUTLINENORMAL
+ end if
+ End If
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_MULTIPLESENSORSSETFOCUS(oShape)
+ 'No Offnormal check as this shape uses an alarm group.
+ End If
+' gsh_log_e("GSH_GEN_MULTIPLESENSORS_ALARMGROUP_ONUPDATE")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEAUTOMAN_OnUpdate''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 09/30/08 Created shape by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEAUTOMAN_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEAUTOMAN_OnUpdate oShape=" & oShape.id)
+
+ If flag <= 1 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ call GSH_ValveRegulatoryControlShowNormal(oShape)
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+
+ 'Check the points alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_ValveRegulatoryControlShowDisabledAlarm(oShape)
+ End If
+
+ 'Red Tag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ call GSH_ValveRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ dim sWindupStatus
+ sWindupStatus = GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript"))
+ call GSH_SHOWWINDUPSTATUS(sWindupStatus,oShape)
+
+ 'Make the focus transparent for valves
+ oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+ End If
+'gsh_log_e("GSH_TPS_VALVEAUTOMAN_OnUpdate")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEANALOG_OnUpdate''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 14/Feb/2010 Created shape by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEANALOG_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEANALOG_OnUpdate oShape=" & oShape.id)
+
+ If flag <= 1 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ call GSH_ValveRegulatoryControlShowNormal(oShape)
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+
+ 'Red Tag
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if GSH_C200_REGCTLSPLIT_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY) then
+ call GSH_ValveRegulatoryControlShowOffNormal(oShape)
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ 'Make the focus transparent for valves
+ oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+ End If
+'gsh_log_e("GSH_TPS_VALVEANALOG_OnUpdate")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEDIGITAL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape handle
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/04/2009 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEDIGITAL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEDIGITAL_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+Dim nNumericState, sStateTxt
+
+ If flag <= 1 then
+
+ sStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sStateTxt)
+
+' nNumericState = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) then
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ End If
+
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ 'dim sStateTxt: sStateTxt = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if (GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, sStateTxt)) then
+ call GSH_ValveDigitalShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+
+ End If
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_ValveDigitalShowBadPV(oShape)
+ else
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+
+
+ End If
+'gsh_log_e("GSH_TPS_VALVEDIGITAL_ONUPDATE oShape")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEDIGITALOUTPUT_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = shape handle
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 15/02/2010 Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEDIGITALOUTPUT_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEDIGITALOUTPUT_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+Dim nNumericState, sStateTxt
+
+ If flag <= 1 then
+
+ sStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sStateTxt)
+
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) then
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("ConAlpAlarmValue")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ End If
+
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ 'dim sStateTxt: sStateTxt = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+' if (GSH_TPS_DIGITALCOMPOSITE_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL, sStateTxt)) then
+' call GSH_ValveDigitalShowOffNormal(oShape)
+' 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+' end if
+ end if
+
+ End If
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+
+ If flag = 0 then
+ 'Bad Data Check
+ If GSH_C200_DIGITALCOMPOSITE_ISDATABAD(oShape.objects("rec_DataScript")) Then
+ call GSH_ValveDigitalShowBadPV(oShape)
+ else
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+ End If
+'gsh_log_e("GSH_TPS_VALVEDIGITALOUTPUT_ONUPDATE oShape")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEDIGITALFLAG_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Functions the same as Valve Digital but the Offnormal check only exists for Normal State
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 06/04/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEDIGITALFLAG_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEDIGITALFLAG_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+
+ dim sStateTxt, nNumericState
+
+ sStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sStateTxt)
+
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ call GSH_ValveDigitalShowDisabledAlarm(oShape)
+ End If
+
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+
+
+ 'Make the focus transparent for valves
+ 'oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground -> should set to be transparent, now done in GSH_ValveDigitalSetFocus
+
+ If flag = 0 then
+ 'dim sStateTxt
+ 'sStateTxt = GSH_C200_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+
+
+'gsh_log_e("GSH_TPS_VALVEDIGITALFLAG_ONUPDATE oShape")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEDIGITAL_NOALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Functions the same as Valve Digital but the Offnormal check only exists for Normal State
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 07/14/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEDIGITAL_NOALARMS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEDIGITAL_NOALARMS_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+
+ dim sStateTxt, nNumericState
+
+ sStateTxt = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sStateTxt)
+
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+
+ 'Check for Off Normal if not in focus
+ call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+
+ If flag = 0 then
+ oShape.objects("txt_PVvalue").value = sStateTxt
+ End If
+
+'gsh_log_e("GSH_TPS_VALVEDIGITAL_NOALARMS_ONUPDATE oShape")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_VALVEDIGITAL_NOALARMS_ONUPDATE",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEDIGITAL_SO_NOALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Functions the same as Valve Digital but the SO flag is a binary not a state
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+' 14/Feb/2010 Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEDIGITAL_SO_NOALARMS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEDIGITAL_SO_NOALARMS_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ dim sStateTxt, nNumericState, bState
+
+ bOPNumeric = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+ if bOPNumeric then
+ sStateTxt = "ON"
+ else
+ sStateTxt = "OFF"
+ end if
+ nNumericState = GSH_GET_DIGITAL_NUMERIC_FROM_STATETEXT(oShape, sStateTxt)
+
+ call GSH_ValveDigitalShowNormal(oShape)
+ call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ 'focus
+ call GSH_ValveDigitalSetFocus(oShape)
+
+ 'No check for Off Normal on this tag type
+' call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+
+ oShape.objects("txt_PVvalue").value = sStateTxt
+
+'gsh_log_e("GSH_TPS_VALVEDIGITAL_SO_NOALARMS_ONUPDATE oShape")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_VALVEDIGITAL_SO_NOALARMS_ONUPDATE",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEREGCTL_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 09/30/2008: Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEREGCTL_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEREGCTL_ONUPDATE oShape=" & oShape.id)
+
+ If flag <= 1 then
+ oShape.objects("txt_OPvalue").value = FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_OP),GSH_OUTPUTINDICATORDECIMALS)
+ call GSH_ValveRegulatoryControlShowNormal(oShape)
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("plg_valveBody").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+ 'Check the points alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+' call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ 'Alarm is Disabled
+ call GSH_ValveRegulatoryControlShowDisabledAlarm(oShape)
+ End If
+
+ 'Assumption: Reg tag and status message are mutual exclusive
+ 'Status message
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ else
+ 'Check status Message
+ dim val_stsMsg
+ val_stsMsg = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_STSMSG)
+ call GSH_Show_StatusMessageFlag(oShape, val_stsMsg)
+ end if
+ 'End If
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_ValveRegulatoryControlSetFocus(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ 'if (GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ if (GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ call GSH_ValveRegulatoryControlShowOffNormal(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ dim sWindupStatus
+ sWindupStatus = GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript"))
+ call GSH_SHOWWINDUPSTATUS(sWindupStatus,oShape)
+
+ 'Make the focus transparent for valves
+ oShape.objects("outline").styleClass = GSH_CSSValveOutlineBackground
+ End If
+'gsh_log_e("GSH_TPS_VALVEREGCTL_ONUPDATE")
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEANALOG3WAY_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/04/2009 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEANALOG3WAY_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEANALOG3WAY_ONUPDATE oShape=" & oShape.id)
+
+ If flag <= 1 then
+ call GSH_VALVEANALOG3WAYSHOWNORMAL(oShape)
+
+ Dim OPValue,stsmsg, val_redTag, initMan
+ OPValue = oShape.objects("ind_OPStem").value
+ If (OPValue <= 5) then
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else if ( (OPValue > 5) and (OPValue < 95) ) then
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLNORMAL
+ else
+ oShape.objects("wgp_valveTop").styleClass = GSH_CSSVALVEREGULATORYCONTROLSATURATED
+ end if: end if
+
+ call GSH_VALVEANALOG3WAYSHOWPORT(oShape)
+
+ 'Check the points alarming
+ if GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED) Then
+ call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY),oShape)
+ else
+ call GSH_VALVEANALOG3WAYSHOWDISABLEDALARM(oShape)
+ End If
+
+ 'Assumption: Reg tag and status message are mutual exclusive
+ val_redTag = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_REDTAG)
+ if (val_redTag = GSH_ON) then
+ 'red tag
+ call GSH_ValveRegulatoryControlShowStatusMessage(oShape,GSH_REDTAG_TEXT)
+ end if
+
+ 'End If
+
+ 'If flag <= 1 then
+ 'Focus
+ call GSH_VALVEANALOG3WAYSETFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+' if (GSH_C200_ValveREGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ if (GSH_TPS_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)) then
+ call GSH_VALVEANALOG3WAYSHOWOFFNORMAL(oShape)
+ 'oShape.objects("focus").styleClass = GSH_CSSValveOutlineBackground
+ end if
+ end if
+ End If
+
+ If flag = 0 then
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_DataScript")),oShape)
+ End If
+
+
+'gsh_log_e("GSH_TPS_VALVEANALOG3WAY_ONUPDATE")
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LOGICSTATUS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 12/01/09 Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_LOGICSTATUS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_LOGICSTATUS_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ 'Shape normal
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ oShape.objects("outline").styleClass = GSH_CSSALARMNONE
+
+ Dim nNormalState, nPVvalue
+ nNormalState = CInt(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"CP_Normal", GSH_CPVALUE))
+ nPVvalue = CInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+
+ If flag = 0 then
+
+ if nNormalState = nPVValue then
+ oShape.objects("linLogic").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("linLogic").style.visibility = GSH_HIDDEN
+ end if
+ End If
+
+ If flag <= 1 then
+ 'Set the focus
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+
+ if nNormalState <> nPVValue then
+ oShape.objects("focus").style.visibility = GSH_VISIBLE
+ oShape.objects("focus").styleClass = GSH_CSSREGULATORYCONTROLVALVEOFFNORMAL
+ end if
+ end if
+ End If
+'gsh_log_e("GSH_TPS_LOGICSTATUS_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_LOGICSTATUS_ONUPDATE",oShape)
+ end if
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GEN_BYPASSSTATUS_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 12/06/09 Created by JE
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_GEN_BYPASSSTATUS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_GEN_BYPASSSTATUS_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ Dim nPVvalue
+ nPVvalue = CInt(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+
+'These shapes use alarm group tags - which are not real tags in the registry - so do not give them focus.
+'if we want selectability - we need to add the alarm groups to the registry in future
+
+ 'Set the focus, shape does not have outline show cannot use GSH_GEN_SETSHAPEFOCUS
+' call GSH_SETSHAPEFOCUS(oShape)
+
+ shapeFocusStyle = GSH_CSSFOCUSNONE
+ oShape.objects("focus").styleClass = shapeFocusStyle
+
+ 'Set the colour of the oval
+ if nPVvalue > 0 then
+ oShape.objects("ovalBypass").styleClass = GSH_CSSOFFNORMALLINEFILL
+ oShape.objects("textLabel").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("ovalBypass").styleClass = GSH_CSSNORMALLINEFILL
+ oShape.objects("textLabel").style.visibility = GSH_HIDDEN
+ End If
+
+'gsh_log_e("GSH_GEN_BYPASSSTATUS_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_GEN_BYBPASSSTATUS_ONUPDATE",oShape)
+ end if
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_GSH_GEN_SETVALUE_ONCLICK'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 03/03/10 Created by JE to replace the ONACTIVATE (which was firing multiple shapes)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_GEN_SETVALUE_ONCLICK(oShape)
+'gsh_log_s("GSH_GEN_SETVALUE_ONCLICK >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ Dim tagName, parameterName, parameterValue, resultParameterValue
+ Dim userResponse, check
+
+ tagName = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"Entity", GSH_CPPOINT)
+ parameterName = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"CP_Parameter", GSH_CPPARAMETER)
+ parameterValue = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"CP_Value",GSH_CPVALUE)
+
+ userResponse = Msgbox("Confirm setting " &tagName &"." &parameterName &" to " &parameterValue &" ? ",vbYesNo)
+
+ If userResponse = vbYes Then
+ check = oShape.objects("rec_DataScript").SetDataValueSynchronous(GSH_CPENTITY & "." & parameterName, parameterValue)
+ End If
+
+' If check = False Then
+' Msgbox("Error: Failed to write " &parameterValue &" to " &tagName &"." &parameterName)
+' End If
+
+'gsh_log_e("GSH_GEN_SETVALUE_ONCLICK")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SERVICETANK_ONCLICK'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/10 Created by JE to replace the ONACTIVATE (which was firing multiple shapes)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_SERVICETANK_ONCLICK(oShape,iButton)
+'gsh_log_s("GSH_TPS_SERVICETANK_ONCLICK >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+
+ Dim tagName, parameterName, parameterValue, resultParameterValue
+ Dim userResponse, check
+
+ parameterName = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,"CP_PV", GSH_CPPARAMETER)
+ txtPBValue = "CP_PB" & iButton & "_Value"
+ nparameterValue = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,txtPBValue,GSH_CPVALUE)
+
+ check = oShape.objects("rec_DataScript").SetDataValueSynchronous(GSH_CPENTITY & "." & parameterName, nparameterValue)
+
+'gsh_log_e("GSH_TPS_SERVICETANK_ONCLICK")
+End Sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_SERVICETANK_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal
+' 06/03/10 Created by JE to replace the ONACTIVATE (which was firing multiple shapes)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+Sub GSH_TPS_SERVICETANK_ONUPDATE(oShape)
+'gsh_log_s("GSH_TPS_SERVICETANK_ONUPDATE >>>>> Shape ="& oShape.id)
+ On Error Resume Next
+'
+'Update dynamic elements
+'
+ nPVValue = cInt(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV))
+
+ oShape.objects("textBoxTankNum").textcolor = GSH_DARKGRAYCOLOR
+ oShape.objects("polygonUp").fillcolor = GSH_LIGHTLIGHTGRAYCOLOR
+ oShape.objects("polygonDown").fillcolor = GSH_LIGHTLIGHTGRAYCOLOR
+ oShape.objects("oval001").fillcolor = GSH_LIGHTLIGHTGRAYCOLOR
+ oShape.objects("oval002").fillcolor = GSH_LIGHTLIGHTGRAYCOLOR
+ oShape.objects("oval003").fillcolor = GSH_LIGHTLIGHTGRAYCOLOR
+ oShape.objects("oval004").fillcolor = GSH_LIGHTLIGHTGRAYCOLOR
+
+ Select Case nPVValue
+ Case 1
+ oShape.objects("textBoxTankNum").textColor = GSH_OFFNORMALCOLOR
+ oShape.objects("oval001").fillcolor = GSH_DARKGRAYCOLOR
+ Case 2
+ oShape.objects("textBoxTankNum").textColor = GSH_OFFNORMALCOLOR
+ oShape.objects("oval002").fillcolor = GSH_DARKGRAYCOLOR
+ oShape.objects("polygonUp").fillcolor = GSH_DARKGRAYCOLOR
+ Case 3
+ oShape.objects("textBoxTankNum").textColor = GSH_OFFNORMALCOLOR
+ oShape.objects("oval003").fillcolor = GSH_DARKGRAYCOLOR
+ oShape.objects("polygonDown").fillcolor = GSH_DARKGRAYCOLOR
+ Case 4
+ oShape.objects("textBoxTankNum").textColor = GSH_OFFNORMALCOLOR
+ oShape.objects("oval004").fillcolor = GSH_DARKGRAYCOLOR
+ End Select
+
+'gsh_log_e("GSH_TPS_SERVICETANK_ONUPDATE")
+End Sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' TPS L1 Shapes
+'
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_ANALOGINDICATOR_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_ANALOGINDICATOR_L1_ONUPDATE (oShape, flag)
+on error resume next
+
+ call GSH_TPS_ANALOGINDICATOR_ONUPDATE (oShape, flag)
+
+ dim sAlarmCode, bInSA
+ bInSA = false
+' sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY)
+ sAlarmCode = GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum"))
+
+ 'Check SA Bars Limit
+ rSAHi = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE)))
+ rSALo = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE)))
+ rPV = CDbl(FormatNumber(oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)))
+
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ If ((rPV > rSAHi) Or (rPV < rSALo)) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ bInSA = true
+ End If
+
+ if(not(bInSA) AND StrComp(sAlarmCode,GSH_NONE,vbtextcompare) <> 0) then
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ else
+ oShape.objects("outline").style.visibility = GSH_VISIBLE
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_DIGITALINDICATOR_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_DIGITALINDICATOR_L1_ONUPDATE (oShape, flag)
+on error resume next
+'gsh_log_s("GSH_TPS_DIGITALINDICATOR_L1_ONUPDATE oShape = " &oShape.id)
+
+ call GSH_TPS_DIGITALINDICATOR_ONUPDATE (oShape, flag)
+
+ dim sPVState, sSAState
+ 'Check SA Condition
+ sPVState = GSH_TPS_DIGITAL_GETSTATE(oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY),GSH_CPENTITY, GSH_CPPARAM_PV, oShape.objects("rec_DataScript"))
+
+ Dim sTagname
+ sTagname = GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPENTITY, GSH_CPPOINT)
+
+' gsh_log("sTagname = " &sTagname)
+
+ sSAState = GSH_READTAGINFORMATIONKEYVALUE(sTagname, GSH_REGKEY_SA_STATE, GSH_NONE)
+
+' msgbox("sPVState " & sPVState & " sSAState = " &sSAState)
+
+ If (StrComp(sPVState, sSAState, vbTextCompare) <> 0) Then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ Else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ End If
+
+' gsh_log_e("GSH_TPS_DIGITALINDICATOR_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_DIGITALINDICATOR_L1_ONUPDATE",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LevelRegCtl_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LevelRegCtl_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_LevelRegCtl_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED)
+ isOffNormal = GSH_C200_REGCTL_POINT_ISOFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+
+ call GSH_LevelRegCtl_L1Gauge_FR_OnUpdate_new(oShape, flag, isAlmEnabled, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, isOffNormal, isDataBad)
+
+ 'Check the point Windup
+ call GSH_SHOWWINDUPSTATUS(GSH_GET_POINT_WINDUP_VALUE(oShape.objects("rec_datascript")),oShape)
+
+'gsh_log_e("GSH_LevelAnalog_SAGauge_FR_SCADA_OnUpdate")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_LevelRegCtl_L1Gauge_FR_OnUpdate",oShape)
+ end if
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_LevelAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_LevelAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+'''Jan. 25 '''
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED)
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+
+ call GSH_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, isOffNormal, isDataBad)
+
+'gsh_log_e("GSH_TPS_LevelAnalog_L1Gauge_FR_OnUpdate")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_LevelAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad
+ isAlmEnabled = GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED)
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+
+ call GSH_QualityAnalog_L1Gauge_FR_OnUpdate_new(oShape, flag, isAlmEnabled, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, isOffNormal, isDataBad)
+
+'gsh_log_e("GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+
+end sub
+
+
+sub GSH_TPS_Quality_L1Deviation_FR_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_Quality_L1Deviation_FR_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED)
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+ pvRefVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"PVRefVal")
+
+ call GSH_Quality_L1Deviation_FR_ONUPDATE(oShape, flag, isAlmEnabled, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, isOffNormal, isDataBad, pvRefVal)
+
+
+'gsh_log_e("GSH_TPS_Quality_L1Deviation_FR_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_Quality_L1Deviation_FR_ONUPDATE",oShape)
+ end if
+
+end sub
+
+
+
+sub GSH_TPS_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_Quality_L1Deviation_Hi_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED)
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+ pvRefVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"PVRefVal")
+
+ call GSH_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag, isAlmEnabled, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, isOffNormal, isDataBad, pvRefVal)
+
+'gsh_log_e("GSH_TPS_Quality_L1Deviation_Hi_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_Quality_L1Deviation_Hi_ONUPDATE",oShape)
+ end if
+end sub
+
+
+
+sub GSH_TPS_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_Quality_L1Deviation_Lo_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ dim isAlmEnabled, isOffNormal, isDataBad, pvRefVal
+ isAlmEnabled = GSH_TPS_ISALARMINGENABLED(oShape.objects("rec_DataScript"),GSH_CPENTITY, GSH_TPS_PARAM_ALARM_ENABLED)
+ isOffNormal = GSH_C200_ANALOG_POINT_IS_OFFNORMAL(oShape.objects("rec_DataScript"), GSH_CPENTITY, GSH_CPPARAM_OFFNORMAL)
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+ pvRefVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"PVRefVal")
+
+ call GSH_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag, isAlmEnabled, GSH_TPS_PARAM_ALARM_HIGHEST_PRORITY, isOffNormal, isDataBad, pvRefVal)
+
+'gsh_log_e("GSH_TPS_Quality_L1Deviation_Lo_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_Quality_L1Deviation_Lo_ONUPDATE",oShape)
+ end if
+end sub
+
+sub GSH_TPS_QualTrend_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_QualTrend_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ 'Check for bad value
+ dim isDataBad
+ isDataBad = GSH_ISDATABAD(oShape.objects("rec_DataScript"), GSH_CPPARAM_PV, true, false)
+
+ call GSH_QualTrend_OnUpdate(oShape, flag, isDataBad)
+
+'gsh_log_e("GSH_TPS_QualTrend_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_QualTrend_OnUpdate",oShape)
+ end if
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_OPDEVIATION_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_OPDEVIATION_L1_ONUPDATE (oShape, flag)
+'gsh_log_s("GSH_TPS_OPDEVIATION_L1_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ dim isOffNormal
+ isOffNormal = GSH_C200_ANALOG_MODE_ISOFFNORMAL(oShape.objects("OPDevMonitor_Script"), GSH_CPENTITY)
+
+ call GSH_OPDEVIATION_L1_ONUPDATE(oShape, flag, isOffNormal)
+
+
+' End If
+
+'gsh_log_e("GSH_TPS_OPDEVIATION_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_OPDEVIATION_L1_ONUPDATE",oShape)
+ end if
+end sub
+
+'nNumericStateValue = 0 -> not running
+' = 1 -> running
+'Styles are configurable from registry
+sub GSH_SetRunStatus(oShape,nNumericStateValue)
+'gsh_log_s("GSH_SetRunStatus oShape=" & oShape.id & "nNumericStateValue=" & nNumericStateValue)
+on error resume next
+ Dim sTagName, sStateStyle, nValue
+ if (nNumericStateValue < 1) then
+ sStateStyle = GSH_CSSMOTOROFF
+ else
+ sStateStyle = GSH_CSSMOTORON
+ end if
+ oShape.objects("pol_RunSatus").styleClass = sStateStyle
+'gsh_log_e("GSH_SetRunStatus set to "& sStateStyle)
+end sub
+
+'
+'Logic (Marcus & Jamie)
+' Only one function code would work... so you create just one FunctionCode Parameter which can be set to 1 or 2 where:
+' 1 = One of the three "CompareValue" must match
+' 2 = CompareValue1 must match or the Input PV must be betwen CompareValue2 and CompareValue3
+'
+'
+sub GSH_TPS_RunStatus_OnUpdate(oShape, flag)
+'gsh_log_s("GSH_TPS_RunStatus_OnUpdate oShape=" &oShape.id)
+on error resume next
+ dim pvValue, cpValue1, cpValue2, cpValue3, functionCode
+ 'set shape status as not running
+ call GSH_SetRunStatus(oShape,0)
+ 'Get CompareValue1, 2 & 3.
+ cpValue1 = CDbl(oShape.GetCustomProperty(GSH_CPVALUE,"CompareValue1"))
+ cpValue2 = CDbl(oShape.GetCustomProperty(GSH_CPVALUE,"CompareValue2"))
+ cpValue3 = CDbl(oShape.GetCustomProperty(GSH_CPValue,"CompareValue3"))
+ functionCode = CInt(oShape.GetCustomProperty(GSH_CPVALUE,"FunctionCode"))
+ pvValue = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ if functionCode = 1 then
+ if pvValue = cpValue1 Or pvValue = cpValue2 Or pvValue = cpValue3 then
+ call GSH_SetRunStatus(oShape,1)
+ end if
+ elseif functionCode = 2 then
+ if pvValue = cpValue1 Or (pvValue <cpValue3 And pvValue > cpValue2) then
+ call GSH_SetRunStatus(oShape,1)
+ end if
+ end if
+'gsh_log_e("GSH_TPS_RunStatus_OnUpdate")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_RunStatus_OnUpdate",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_TPS_VALVEDIGITAL_BnB_NOALARMS_ONUPDATE''''''''''''''''''''''''''''''''''''''''''
+'Functions the same as Valve Digital but the Offnormal check only exists for Normal State
+'Parameters:
+' oDataBoundObject = subshape name or me, if calling within subshape
+' flag = 0 -> do everything
+' flag = 1 -> do focus & offnormal (b/c digital values are not changed often)
+'
+' Logic (Jamie):
+' This will gets its indication from a single digital indicator (0 or 1) tag.
+' When the value is 0 then the Bleed (upper) valve is open and the two process (horizontal) valves are closed.
+' When the value is 1 then the Bleed valve is closed and the two proces valves are open.
+' If the value is anything else - then all three valves are shown in Travel
+'
+' 11/25/09 Created by CL
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_TPS_VALVEDIGITAL_BnB_NOALARMS_ONUPDATE(oShape, flag)
+'gsh_log_s("GSH_TPS_VALVEDIGITAL_BnB_NOALARMS_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+
+ call GSH_ValveDigitalBnBSetFocus(oShape)
+
+ 'Get pv value
+ dim nPV
+ nPV = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+ 'if pv = 0, then
+ 'Set Bleed (upper) valve style as open, set its text as "OPEN"
+ 'Set the other valve styles as opened, set their texts as "CLOSED"
+ if nPV = 0 then
+ oShape.objects("plg_ValveDigitalPic1").styleClass = GSH_CSSVALVEDIGITALOPEN
+ oShape.objects("plg_ValveDigitalPic2").styleClass = GSH_CSSVALVEDIGITALCLOSED
+ oShape.objects("plg_ValveDigitalPic3").styleClass = GSH_CSSVALVEDIGITALCLOSED
+ oShape.objects("txt_PVvalue1").value = "OPEN"
+ oShape.objects("txt_PVvalue2").value = "CLOSED"
+ oShape.objects("txt_PVvalue3").value = "CLOSED"
+ 'if pv = 1 then
+ 'Set Bleed valve style as closed, set its text as "CLOSED"
+ 'Set the other valve styles as open, set theirs texts as "OPEN"
+ elseif nPV = 1 then
+ oShape.objects("plg_ValveDigitalPic1").styleClass = GSH_CSSVALVEDIGITALCLOSED
+ oShape.objects("plg_ValveDigitalPic2").styleClass = GSH_CSSVALVEDIGITALOPEN
+ oShape.objects("plg_ValveDigitalPic3").styleClass = GSH_CSSVALVEDIGITALOPEN
+ oShape.objects("txt_PVvalue1").value = "CLOSED"
+ oShape.objects("txt_PVvalue2").value = "OPEN"
+ oShape.objects("txt_PVvalue3").value = "OPEN"
+ else
+ 'Set all three valves as travel
+ oShape.objects("plg_ValveDigitalPic1").styleClass = GSH_CSSVALVEDIGITALTRAVEL
+ oShape.objects("plg_ValveDigitalPic2").styleClass = GSH_CSSVALVEDIGITALTRAVEL
+ oShape.objects("plg_ValveDigitalPic3").styleClass = GSH_CSSVALVEDIGITALTRAVEL
+ oShape.objects("txt_PVvalue1").value = "TRAVEL"
+ oShape.objects("txt_PVvalue2").value = "TRAVEL"
+ oShape.objects("txt_PVvalue3").value = "TRAVEL"
+ end if
+
+ 'call GSH_ValveDigitalShowNormal(oShape)
+ 'call GSH_C200_VALVEDIGITALSETVALVENUMERICSTATE(oShape,nNumericState,GSH_CPPARAM_PV)
+
+ 'focus
+ 'call GSH_ValveDigitalSetFocus(oShape)
+
+ 'Check for Off Normal if not in focus
+ 'call GSH_TPS_DIGITAL_OFFNORMAL_SHOWSTATUS (oShape, GSH_CPPARAM_PV)
+
+ 'If flag = 0 then
+ ' oShape.objects("txt_PVvalue").value = sStateTxt
+ 'End If
+
+
+'gsh_log_e("GSH_TPS_VALVEDIGITAL_BnB_NOALARMS_ONUPDATE oShape")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_TPS_VALVEDIGITAL_BnB_NOALARMS_ONUPDATE",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''' End TPS L1 Shapes ''''''''''''''''''''''
+
+
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' _____ ____ ____ _____ _ _
+'|_ _| _ \/ ___| | ___|_ _ ___ ___ _ __ | | __ _| |_ ___ ___
+' | | | |_) \___ \ | |_ / _` |/ __/ _ \ '_ \| |/ _` | __/ _ \/ __|
+' | | | __/ ___) | | _| (_| | (_| __/ |_) | | (_| | || __/\__ \
+' |_| |_| |____/ |_| \__,_|\___\___| .__/|_|\__,_|\__\___||___/
+'
+''''''''''''''''''''''''''TPS Faceplates General '''''''''''''''''''''''''''''''''''
+
+
+ ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_ANALOG_SOL_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_ANALOG_SOL_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_TPS_ANALOG_SOL_ONPAGECOMPLETE"
+ call GSH_FP_TPS_ANALOG_ONPAGECOMPLETE
+
+' gsh_log("ConAlpTagname.value = " &ConAlpTagname.value)
+ 'Show SOL condition if there is any
+' Dim solHi, solLo
+' solHi = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_SOL_HI, GSH_NONE)
+' solLo = GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_REGKEY_SOL_LO, GSH_NONE)
+
+ dim nPVFormat
+ nPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+
+' gsh_log("solHi = " &solHi & "solLo = " &solLo)
+
+ If (txt_alarmtype2.style.visibility = GSH_VISIBLE) Then
+ txt_SOLHI.style.visibility = GSH_VISIBLE
+ Else
+ txt_SOLHI.style.visibility = GSH_HIDDEN
+ End If
+
+ If (strcomp(txt_alarmtype3.style.visibility,GSH_HIDDEN,vbtextcompare) <> 0) Then
+ txt_SOLLO.style.visibility = GSH_VISIBLE
+ Else
+ txt_SOLLO.style.visibility = GSH_HIDDEN
+ End If
+
+'gsh_log_e "GSH_FP_TPS_ANALOG_SOL_ONPAGECOMPLETE"
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_ANALOG_ONPAGECOMPLETE
+'Function: Initializes objects on the faceplate based on the current point
+' Description, Keyword, Eng Units, Alarm Limits, Detail Trend
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_ANALOG_ONPAGECOMPLETE
+'gsh_log_s "GSH_FP_TPS_ANALOG_ONPAGECOMPLETE"
+ call GSH_FP_GENERAL_ONPAGECOMPLETE
+ dim nPVFormat
+ nPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(ConAlpTagname.value, GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ txt_euhi.value = FORMATNUMBER(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_PVEUHI),nPVFormat,-2, 0, 0)
+ txt_eulo.value = FORMATNUMBER(ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & "." & GSH_PVEULO),nPVFormat,-2, 0, 0)
+ call GSH_FP_TPS_ShowAlarmLimits 'Setup Alarm Limits
+'gsh_log_e "GSH_FP_TPS_ANALOG_ONPAGECOMPLETE"
+end sub
+
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_FP_TPS_ShowAlarmLimits
+'function: Sets the style and position of the 4 alarm limits on the PV Bar graph
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_FP_TPS_ShowAlarmLimits
+on error resume next
+dim alarmlim, alarmPri 'to do: handle null return from the limit and priority values
+ 'Alarm 1
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & ".pvhhtp") then
+ txt_alarmlim1.value = "---"
+ RecAlarm1.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvhhtp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvhhpr")
+ If (alarmPri > 1) then
+ txt_alarmlim1.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim1.value = "---"
+ end if
+ txt_alarmlim1.style.visibility = GSH_VISIBLE ''why do we need these two lines for TPS and not C200?
+ txt_alarmtype1.style.visibility = GSH_VISIBLE
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm1, alarmlim, alarmPri)
+ end if
+ 'Alarm 2
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & ".pvhitp") then
+ txt_alarmlim2.value = "---"
+ RecAlarm2.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvhitp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvhipr")
+ If (alarmPri > 1) then
+ txt_alarmlim2.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim2.value = "---"
+ end if
+ txt_alarmlim2.style.visibility = GSH_VISIBLE ''why do we need these two lines for TPS and not C200?
+ txt_alarmtype2.style.visibility = GSH_VISIBLE
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm2, alarmlim, alarmPri)
+ end if
+ 'Alarm 3
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & ".pvlotp") then
+ txt_alarmlim3.value = "---"
+ RecAlarm3.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvlotp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvlopr")
+ If (alarmPri > 1) then
+ txt_alarmlim3.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim3.value = "---"
+ end if
+ txt_alarmlim3.style.visibility = GSH_VISIBLE ''why do we need these two lines for TPS and not C200?
+ txt_alarmtype3.style.visibility = GSH_VISIBLE
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm3, alarmlim, alarmPri)
+ end if
+ 'Alarm 4
+ if ConAlpTagname.IsNan(GSH_SDR_CURRENTPOINT & ".pvlltp") then
+ txt_alarmlim4.value = "---"
+ RecAlarm4.style.visibility = GSH_HIDDEN
+ else
+ alarmlim = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvlltp")
+ alarmPri = ConAlpTagname.DataValue(GSH_SDR_CURRENTPOINT & ".pvllpr")
+ If (alarmPri > 1) then
+ txt_alarmlim4.value = GSH_FormatPVTextTag(ConAlpTagname.value,alarmlim)
+ else
+ txt_alarmlim4.value = "---"
+ end if
+ txt_alarmlim4.style.visibility = GSH_VISIBLE ''why do we need these for TPS and not C200?
+ txt_alarmtype4.style.visibility = GSH_VISIBLE
+ call GSH_FP_C200_ShowAlarmRec(RecAlarm4, alarmlim, alarmPri)
+ end if
+
+ if Err then
+ call GSH_ERROR_HANDLING("GSH_FP_TPS_ShowAlarmLimits")
+ end if
+
+end sub
+
+'--------------------------------------------END TPS SPECIFIC------------------------------
+
+
+'------------------------------------------------------------------------------------------
+' Common L1 Shape
+'
+'------------------------------------------------------------------------------------------
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelRegCtl_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelRegCtl_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad)
+'gsh_log_s("GSH_LevelRegCtl_L1Gauge_FR_OnUpdate oShape="&oShape.id &" isOffNormal = " &isOffNormal)
+On Error Resume Next
+
+ Dim sAlarmCode, bInSA
+
+ call GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+
+' sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam)
+ sAlarmCode = GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum"))
+
+ If flag <= 1 then
+' call GSH_SALevelIndicatorRegulatoryControlShowNormal(oShape)
+
+ 'Check the points alarming
+ if CBool(isAlmEnabled) Then
+ call GSH_SHOWLEVELALARMS(sAlarmCode,oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ end if
+
+ 'Check Focus
+ call GSH_LevelRegCtl_SAGauge_SetFocus(oShape, isOffNormal)
+
+
+
+ 'Set Alarm Lines
+ Dim rRangeHi, rRangeLo
+
+ rRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ rRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+
+''' Jan2010
+
+ If flag = 0 Then
+ call GSH_C200_SetAlarmLinesVertical_new(oShape, rRangeHi, rRangeLo, 4)
+ End If
+
+ 'Set SA Bars Limit
+ Dim iSAHi, iSALo
+ iSAHi = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE))
+ iSALo = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE))
+ call GSH_LevelIndicatorShowSALimits(oShape, iSAHi, iSALo)
+
+ 'Check for bad value
+ If CBool(isDataBad) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ Dim iPV, iSP, iPVFormat, iPVFormated
+
+ iPV = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ iSP = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"), GSH_CPPARAM_SP))
+ 'Locate PV Float
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("rec_IndicatorFloat"), iPV, rRangeHi, rRangeLo)
+
+ 'Locate SP Float
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("plg_SPIndicator"), iSP, rRangeHi, rRangeLo)
+
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ iPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ iPVFormated = FormatNumber(iPV, iPVFormat)
+ oShape.objects("txt_PVvalue").value = iPVFormated
+
+ bInSA = GSH_IsShapeInSA(iPV, iSAHi, iSALo)
+ if (bInSA) then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ end if
+
+ 'Set Recent PV range bar
+ call GSH_LevelRegCtl_SAGauge_SetPVRangeBar(oShape, iPV)
+ End If
+
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+
+
+ call GSH_LevelRegCtl_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+
+
+ End If
+
+
+'gsh_log_e("GSH_LevelRegCtl_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_L1Gauge_FR_OnUpdate",oShape)
+ end if
+end sub
+
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad)
+'gsh_log_s("GSH_LevelAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ Dim sAlarmCode, bInSA
+ bInSA = false
+' sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam)
+ sAlarmCode = GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum"))
+
+ call GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+
+ 'Check the points alarming
+ if CBool(isAlmEnabled) Then
+ 'call GSH_SHOWLEVELALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam),oShape)
+ call GSH_SHOWLEVELALARMS(sAlarmCode,oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+
+ End If
+
+ 'Check Focus & offnormal
+ call GSH_LevelRegCtl_SAGauge_SetFocus(oShape, isOffNormal)
+
+ 'Set Alarm Lines
+ Dim rRangeHi, rRangeLo
+
+ rRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ rRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ If flag = 0 Then
+ call GSH_C200_SetAlarmLinesVertical_new(oShape, rRangeHi, rRangeLo, 4, shapeTagName)
+ End If
+
+ 'Set SA Bars Limit
+ Dim iSAHi, iSALo
+ iSAHi = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE))
+ iSALo = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE))
+ call GSH_LevelIndicatorShowSALimits(oShape, iSAHi, iSALo)
+
+ 'Check for bad value
+ If CBool(isDataBad) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ Dim iPV, iSP, iPVFormat, iPVFormated
+
+ iPV = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ iSP = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"), GSH_CPPARAM_SP))
+ 'Locate PV Float
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("rec_IndicatorFloat"), iPV, rRangeHi, rRangeLo)
+
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ iPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ iPVFormated = FormatNumber(iPV, iPVFormat)
+ oShape.objects("txt_PVvalue").value = iPVFormated
+
+ bInSA = GSH_IsShapeInSA(iPV, iSAHi, iSALo)
+ if (bInSA) then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ end if
+
+ 'Set Recent PV range bar
+ call GSH_LevelRegCtl_SAGauge_SetPVRangeBar(oShape, iPV)
+
+ End If
+
+ call GSH_LevelAnalog_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+
+' gsh_log_e("GSH_LevelAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+' call GSH_SHAPE_ERROR_HANDLING("GSH_LevelAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_QualityAnalog_L1Gauge_FR_OnUpdate Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_QualityAnalog_L1Gauge_FR_OnUpdate(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad)
+'gsh_log_s("GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim sAlarmCode, bInSA
+ bInSA = false
+ sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam)
+
+ call GSH_LevelIndicatorShowNormal(oShape)
+
+ 'Check the points alarming
+ if CBool(isAlmEnabled) Then
+ call GSH_SHOWLEVELALARMS(sAlarmCode,oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ End If
+
+
+ 'Check Focus
+ 'call GSH_LevelRegCtl_QualitySAGauge_SetFocus(oShape)
+
+ call GSH_LevelRegCtl_SAGauge_SetFocus(oShape, isOffNormal)
+
+' if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+' if CBool(isOffNormal) then
+' call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+' end if
+' end if
+
+ Dim rRangeHi, rRangeLo
+ rRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ rRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+
+
+ If flag = 0 Then
+ 'Set Alarm Lines
+ call GSH_C200_SetAlarmLinesHorizontal(oShape, rRangeHi, rRangeLo, 4)
+ End If
+
+ 'Set SA Bars Limit
+ Dim rSAHi, rSALo
+ rSAHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE))
+ rSALo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE))
+
+ 'gsh_log("rSAHi = " &rSAHi & " rSALo = " &rSALo)
+ 'call GSH_QualitySAGauge_ShowSALimits(oShape, rSAHi, rSALo)
+ call GSH_SetObjectLocationAndWidth_Horizontal(oShape.objects("linePVRange"), oShape.objects("rec_SALow"), rSALo, rRangeLo, rRangeHi, rRangeLo)
+ call GSH_SetObjectLocationAndWidth_Horizontal(oShape.objects("linePVRange"), oShape.objects("rec_SAHigh"), rRangeHi, rSAHi, rRangeHi, rRangeLo)
+
+ 'Check for bad value
+ If CBool(isDataBad) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+
+ Dim rPV, rPVFormat, rPVFormated
+
+ rPV = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ rPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ rPVFormated = FormatNumber(rPV, rPVFormat)
+ oShape.objects("txt_PVvalue").value = rPVFormated
+
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("linePVRange"), oShape.objects("rec_IndicatorFloat"), rPV, rRangeHi, rRangeLo)
+ 'call GSH_LevelRegCtl_SAGauge_InSA(oShape, rPV, rSAHi, rSALo)
+
+ bInSA = GSH_IsShapeInSA(iPV, iSAHi, iSALo)
+ if (bInSA) then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ end if
+
+ End If
+
+ call GSH_QualityAnalog_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+
+
+
+'gsh_log_e("GSH_QualityAnalog_L1Gauge_FR_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_QualityAnalog_L1Gauge_FR_OnUpdate",oShape)
+ end if
+
+end sub
+
+
+
+'
+'isDataBad: bool - identify if the PV data point is bad
+'
+'
+sub GSH_QualTrend_OnUpdate(oShape, flag, isDataBad)
+'gsh_log_s("GSH_QualTrend_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ call GSH_SETSHAPEFOCUS(oShape)
+
+
+
+ 'Check for bad value
+ If not(CBool(isDataBad)) Then
+
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ ' get the deadband, filter, PVRefVal and the last RefTime
+ pvRefVal = Cdbl(oShape.GetCustomProperty("Value","PVRefVal"))
+ tcFilterVal = Cdbl(oShape.GetCustomProperty("Value","TCFilter"))
+ 'TCFilter
+ lastRefTime = oShape.GetCustomProperty("Value","LastRefTime")
+ diff_old = oShape.GetCustomProperty("Value","Diff_Old")
+ modChange = Cdbl(oShape.GetCustomProperty("Value","ModerateChange"))
+ sigChange = Cdbl(oShape.GetCustomProperty("Value","SignificantChange"))
+ RangeMax = Cdbl(oShape.GetCustomProperty("Value","RangeMax"))
+ RangeMin = Cdbl(oShape.GetCustomProperty("Value","RangeMin"))
+
+
+ dim diff_cur, deviation, pvVal, diff_prev
+ pvVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+
+ 'Reference PV value is not set,
+ 'Initialized on load
+ if(pvRefVal < -990.0) then
+ pvRefVal = PVVal
+ oShape.SetCustomProperty "Value","PVRefVal",pvVal
+ oShape.SetCustomProperty "Value","LastRefTime",now
+ oShape.objects("grp_nochange").rotation = 0
+ oShape.objects("arrowHead").LineWidth = 1
+ oShape.objects("arrowLine").LineWidth = 1
+ oShape.objects("arrowHead").LineColor = GSH_DARKGRAYCOLOR
+ oShape.objects("arrowLine").LineColor = GSH_DARKGRAYCOLOR
+ oShape.objects("txtHours").value = 0
+ exit sub
+ end if
+
+ 'Get the RefTime from Registry.
+ dim opDevMonRegistryBase, refTime
+ opDevMonRegistryBase = GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR
+ refTime = GSH_READREGISTRY(opDevMonRegistryBase & GSH_REGKEY_OPDEVMON_RESETTIME, GSH_EMPTYSTRING)
+
+ 'If the RefTime > lastRefTime then update OPRefVal to current OPVal & update lastRefTime to RefTime
+' 'Need to give it a time buffer (i.e within 10s)?
+' 'Reset is applied
+ if((StrComp(refTime,GSH_EMPTYSTRING)<>0) AND (CDate(refTime) > CDate(lastRefTime))) then
+ oShape.SetCustomProperty "Value","PVRefVal",pvVal
+ pvRefVal = pvVal
+ oShape.SetCustomProperty "Value","LastRefTime",refTime
+ oShape.SetCustomProperty "Value","Diff_Old",0
+ diff_old = 0
+ oShape.objects("grp_nochange").rotation = 0
+ oShape.objects("arrowHead").LineWidth = 1 'originally = 2, why?
+ oShape.objects("arrowLine").LineWidth = 1
+ oShape.objects("arrowHead").LineColor = GSH_DARKGRAYCOLOR
+ oShape.objects("arrowLine").LineColor = GSH_DARKGRAYCOLOR
+ oShape.objects("txtHours").value = 0
+ exit sub
+ end if
+
+ 'Calculate the elapsed time to display
+ elapsedTime = DateDiff("h",CDate(refTime),now)
+
+ oShape.objects("txtHours").value = CInt(elapsedTime)
+
+
+ dim dt
+ 'Sampling interval = PV update rate = 30s = 0.5 minutes
+ dt = 0.5
+
+ 'Calculate PVDeviation
+ diff_cur = ((pvVal - pvRefVal)/(RangeMax - RangeMin)) * 100.0
+
+ 'Use low-pass first order filter equation (http://en.wikipedia.org/wiki/Low-pass_filter)
+ diff_filtered = diff_cur + (diff_old-diff_cur)*(dt/(tcFilterVal+dt))
+
+ diff_old = diff_filtered
+ oShape.SetCustomProperty "Value","Diff_Old", diff_old
+
+ 'Set Arrow
+ if diff_Filtered > sigChange then
+ oShape.objects("grp_nochange").rotation = -75
+ oShape.objects("arrowHead").LineWidth = 3
+ oShape.objects("arrowLine").LineWidth = 4
+ oShape.objects("arrowHead").LineColor = GSH_CSSBLACK
+ oShape.objects("arrowLine").LineColor = GSH_CSSBLACK
+ elseif diff_Filtered > modChange then
+ oShape.objects("grp_nochange").rotation = -30
+ oShape.objects("arrowHead").LineWidth = 2
+ oShape.objects("arrowLine").LineWidth = 3
+ oShape.objects("arrowHead").LineColor = GSH_CSSBLACK
+ oShape.objects("arrowLine").LineColor = GSH_CSSBLACK
+ elseif diff_Filtered < (-1.0*sigChange) then
+ oShape.objects("grp_nochange").rotation = 75
+ oShape.objects("arrowHead").LineWidth = 3
+ oShape.objects("arrowLine").LineWidth = 4
+ oShape.objects("arrowHead").LineColor = GSH_CSSBLACK
+ oShape.objects("arrowLine").LineColor = GSH_CSSBLACK
+ elseif diff_Filtered < (-1.0*modChange) then
+ oShape.objects("grp_nochange").rotation = 30
+ oShape.objects("arrowHead").LineWidth = 2
+ oShape.objects("arrowLine").LineWidth = 3
+ oShape.objects("arrowHead").LineColor = GSH_CSSBLACK
+ oShape.objects("arrowLine").LineColor = GSH_CSSBLACK
+ else
+ oShape.objects("grp_nochange").rotation = 0
+ oShape.objects("arrowHead").LineWidth = 1
+ oShape.objects("arrowLine").LineWidth = 1
+ oShape.objects("arrowHead").LineColor = GSH_DARKGRAYCOLOR
+ oShape.objects("arrowLine").LineColor = GSH_DARKGRAYCOLOR
+ end if
+ else
+ oShape.objects("txtHours").value = GSH_BADPV_TEXT
+ end if
+
+
+'gsh_log_e("GSH_QualTrend_OnUpdate")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_QualTrend_OnUpdate",oShape)
+ end if
+
+end sub
+
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_OPDEVIATION_L1_ONUPDATE'''''''''''''''''''''''''''''''''''''''''''
+'Parameters: oShape = Shape object
+'Parameters: flag = 0 -> do everything
+' flag = 1 -> do focus only
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_OPDEVIATION_L1_ONUPDATE (oShape, flag, isOffNormal)
+'gsh_log_s("GSH_OPDEVIATION_L1_ONUPDATE oShape=" & oShape.id)
+on error resume next
+
+ call GSH_C200_OPDEVMONITOR_SHOWNORMAL(oShape)
+ ' No alarm checking
+
+
+ 'Do focus and offnormal checking here. It is important that all shape generic functionalities are
+ 'done before shape specific ones
+ oShape.objects("outline").styleClass = GSH_CSSALARMNONE
+ oShape.objects("rec_IndicatorRange").styleClass = GSH_CSSALARMNONE
+ call GSH_GEN_SETSHAPEFOCUS(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ oShape.objects("rec_IndicatorRange").fillstyle = GSH_FILLTRANSPARENT
+ end if
+ 'Check for Off Normal if not in focus
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if CBool(isOffNormal) then
+ if (oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ else
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSOFFNORMAL
+ end if
+ end if
+ end if
+
+
+' If flag = 0 then
+
+ Dim iNumPixels, iLeft
+ Dim rRangeHi, rRangeLo, iOP
+ 'Calculate pv value
+ rRangeHi = Cdbl(oShape.GetCustomProperty("Value","RangeMax"))
+ rRangeLo = Cdbl(oShape.GetCustomProperty("Value","RangeMin"))
+ iOP = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("OPDevMonitor_Script"),GSH_CPPARAM_OP))
+ oShape.objects("txt_OPValue").value = FormatNumber(iOP, 0)
+ modeVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("OPDevMonitor_Script"),GSH_CPPARAM_MODE)
+ oShape.objects("txt_mode").value = Left(modeVal,1)
+
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("lineOPRange"), oShape.objects("rec_IndicatorFloat"), iOP, rRangeHi, rRangeLo)
+
+
+ 'Set SA Bars Limit
+ Dim rSAHi, rSALo
+ rSAHi = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE)))
+ rSALo = CDbl(FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE)))
+
+ call GSH_SetObjectLocationAndWidth_Horizontal(oShape.objects("lineOPRange"), oShape.objects("rec_SALow"), rSALo, rRangeLo, rRangeHi, rRangeLo)
+ call GSH_SetObjectLocationAndWidth_Horizontal(oShape.objects("lineOPRange"), oShape.objects("rec_SAHigh"), rRangeHi, rSAHi, rRangeHi, rRangeLo)
+
+ dim bInSA
+ bInSA = GSH_IsShapeInSA(iOP, rSAHi, rSALo)
+ if (bInSA) then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ end if
+
+ call GSH_OPDeviation_L1_ShowHideComponents(oShape, bInSA, isOffnormal)
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ dim opRefVal, lastRefTime
+
+ 'Get the OPRefVal and the lastRefTime
+
+ opRefVal = Cdbl(oShape.GetCustomProperty("Value","OPRefVal"))
+ lastRefTime = oShape.GetCustomProperty("Value","LastRefTime")
+
+
+ dim diff_cur, deviation, opVal, diff_prev
+ opVal = iOP
+
+ 'Get the RefTime from Registry.
+ dim opDevMonRegistryBase, refTime
+ opDevMonRegistryBase = GSH_REGISTRY_BASE & GSH_REGISTRY_OPDEVMONITOR
+ refTime = GSH_READREGISTRY(opDevMonRegistryBase & GSH_REGKEY_OPDEVMON_RESETTIME, GSH_EMPTYSTRING)
+
+
+ call GSH_OPDeviation_SAGauge_SetPVRangeBar(oShape, iOP)
+
+
+ 'Reference OP value is not set
+ If(IsDate(lastRefTime) AND IsDate(refTime)) Then
+ If(CDate(refTime) > CDate(lastRefTime)) Then
+ oShape.SetCustomProperty "Value","OPRefVal",opVal
+ opRefVal = opVal
+ oShape.SetCustomProperty "Value","LastRefTime",refTime
+ oShape.SetCustomProperty "Value","Diff_Old",0
+ diff_old = 0
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("lineOPRange"), oShape.objects("plg_OPRefValue"), opRefVal, rRangeHi, rRangeLo)
+ End If
+ Else
+ opRefVal = opVal
+ oShape.SetCustomProperty "Value","OPRefVal",opVal
+ oShape.SetCustomProperty "Value","LastRefTime",now
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("lineOPRange"), oShape.objects("plg_OPRefValue"), opRefVal, rRangeHi, rRangeLo)
+
+ exit sub
+ End If
+
+'gsh_log_e("GSH_OPDEVIATION_L1_ONUPDATE")
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_OPDEVIATION_L1_ONUPDATE",oShape)
+ end if
+end sub
+
+
+
+sub GSH_Quality_L1Deviation_FR_ONUPDATE(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad, pvRefVal)
+'gsh_log_s("GSH_Quality_L1Deviation_FR_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ call GSH_SETSHAPEFOCUS(oShape)
+
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring
+ oShape.objects("plg_RightCover").fillcolor = rgb(255,232,180)'GSH_CSSFOCUSASSOCIATED
+ oShape.objects("plg_LeftCover").fillcolor = rgb(255,232,180)'GSH_CSSFOCUSASSOCIATED
+ else
+ oShape.objects("plg_RightCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ oShape.objects("plg_LeftCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ end if
+
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if CBool(isOffNormal) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ oShape.objects("plg_RightCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ end if
+ end if
+
+ 'Alarming
+ if CBool(isAlmEnabled) Then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ End If
+
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+
+
+ If flag = 0 then
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ 'Check for bad value
+ If not(CBool(isDataBad)) Then
+
+ ' get the deadband, filter, PVRefVal and the last RefTime
+ filterVal = Cdbl(oShape.GetCustomProperty("Value","Filter"))
+ diff_old = oShape.GetCustomProperty("Value","Diff_Old")
+ modChange = Cdbl(oShape.GetCustomProperty("Value","ModerateChange"))
+ sigChange = Cdbl(oShape.GetCustomProperty("Value","SignificantChange"))
+ RangeMax = Cdbl(oShape.GetCustomProperty("Value","RangeMax"))
+ RangeMin = Cdbl(oShape.GetCustomProperty("Value","RangeMin"))
+
+ dim diff_cur, deviation, pvVal, diff_prev
+ pvVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+
+ 'Calculate PVDeviation
+ diff_cur = ((pvVal - pvRefVal)/(RangeMax - RangeMin)) * 100.0
+ diff_Filtered = diff_cur + (diff_old-diff_cur)*filterVal
+ diff_old = diff_filtered
+ oShape.SetCustomProperty "Value","Diff_Old", diff_old
+
+ 'Set ButterFlies
+ if diff_Filtered > sigChange then
+ oShape.objects("ind_OPDevBarRight").value = 100
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ elseif diff_Filtered > modChange then
+ oShape.objects("ind_OPDevBarRight").value = 50
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ elseif diff_Filtered < (-1.0*sigChange) then
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = -100
+ elseif diff_Filtered < (-1.0*modChange) then
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = -50
+ else
+ oShape.objects("ind_OPDevBarRight").value = 0
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ end if
+ end if
+ end if
+
+'gsh_log_e("GSH_Quality_L1Deviation_FR_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_Quality_L1Deviation_FR_ONUPDATE",oShape)
+ end if
+
+end sub
+
+
+sub GSH_Quality_L1Deviation_Hi_ONUPDATE(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad, pvRefVal)
+'gsh_log_s("GSH_Quality_L1Deviation_Hi_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+
+ If flag <=1 then
+
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ call GSH_SETSHAPEFOCUS(oShape)
+
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ oShape.objects("plg_RightCover").fillcolor = rgb(255,232,180)'GSH_CSSFOCUSASSOCIATED
+ else
+ oShape.objects("plg_RightCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ end if
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if CBool(isOffNormal) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ oShape.objects("plg_RightCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ end if
+ end if
+
+ 'Alarming
+ if CBool(isAlmEnabled) Then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ End If
+
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ End if
+
+ If flag = 0 then
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ 'Check for bad value
+ If not(CBool(isDataBad)) Then
+
+
+ ' get the deadband, filter, PVRefVal and the last RefTime
+ filterVal = Cdbl(oShape.GetCustomProperty("Value","Filter"))
+ diff_old = oShape.GetCustomProperty("Value","Diff_Old")
+ modChange = Cdbl(oShape.GetCustomProperty("Value","ModerateChange"))
+ sigChange = Cdbl(oShape.GetCustomProperty("Value","SignificantChange"))
+ RangeMax = Cdbl(oShape.GetCustomProperty("Value","RangeMax"))
+ RangeMin = Cdbl(oShape.GetCustomProperty("Value","RangeMin"))
+
+ dim diff_cur, deviation, pvVal, diff_prev
+ pvVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+
+ 'Calculate PVDeviation
+ diff_cur = ((pvVal - pvRefVal)/(RangeMax - RangeMin)) * 100.0
+ diff_Filtered = diff_cur + (diff_old-diff_cur)*filterVal
+ diff_old = diff_filtered
+ oShape.SetCustomProperty "Value","Diff_Old", diff_old
+
+ 'Set ButterFlies
+ if diff_Filtered > sigChange then
+ oShape.objects("ind_OPDevBarRight").value = 100
+ elseif diff_Filtered > modChange then
+ oShape.objects("ind_OPDevBarRight").value = 50
+ else
+ oShape.objects("ind_OPDevBarRight").value = 0
+ end if
+ end if
+ end if
+
+'gsh_log_e("GSH_Quality_L1Deviation_Hi_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_Quality_L1Deviation_Hi_ONUPDATE",oShape)
+ end if
+end sub
+
+
+sub GSH_Quality_L1Deviation_Lo_ONUPDATE(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad, pvRefVal)
+'gsh_log_s("GSH_Quality_L1Deviation_Lo_ONUPDATE oShape="&oShape.id)
+On Error Resume Next
+
+ If flag <=1 then
+ call GSH_SHOWNOALARM(oShape)
+ oShape.objects("focus").style.visibility = GSH_HIDDEN
+ call GSH_SETSHAPEFOCUS(oShape)
+
+ if (not(oShape.objects("focus").styleClass = GSH_CSSFOCUSNONE)) then
+ 'some type of focus is occuring, must show analog value and outline
+ oShape.objects("plg_LeftCover").fillcolor = rgb(255,232,180)'GSH_CSSFOCUSASSOCIATED
+ else
+ oShape.objects("plg_LeftCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ end if
+
+ if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+ if CBool(isOffNormal) then
+ oShape.objects("focus").styleClass = GSH_CSSFOCUSNONEOFFNORMAL
+ oShape.objects("plg_LeftCover").fillcolor = rgb(235,235,235)'GSH_CSSBACKGROUND_GRAY
+ end if
+ end if
+
+
+ 'Alarming
+ if CBool(isAlmEnabled) Then
+ 'call GSH_SHOWPOINTALARMS(GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam),oShape)
+ call GSH_SHOWPOINTALARMS(GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum")),oShape)
+ else
+ oShape.objects("outline").styleClass = GSH_CSS_ALARMDISABLED
+ End If
+ oShape.objects("outline").fillstyle = GSH_FILLTRANSPARENT
+ End if
+
+ If flag = 0 then
+
+ 'We do not want shape to reload it self when Value changes, the changes will affect in next update
+ oShape.autoReloadContent=false
+
+ 'Check for bad value
+ If not(CBool(isDataBad)) Then
+
+ Dim iPV
+ iPV = oShape.objects("rec_DataScript").DataValue(GSH_CPENTITY & "." & GSH_CPPARAM_PV)
+
+ ' get the deadband, filter, PVRefVal and the last RefTime
+ filterVal = Cdbl(oShape.GetCustomProperty("Value","Filter"))
+ diff_old = oShape.GetCustomProperty("Value","Diff_Old")
+ modChange = Cdbl(oShape.GetCustomProperty("Value","ModerateChange"))
+ sigChange = Cdbl(oShape.GetCustomProperty("Value","SignificantChange"))
+ RangeMax = Cdbl(oShape.GetCustomProperty("Value","RangeMax"))
+ RangeMin = Cdbl(oShape.GetCustomProperty("Value","RangeMin"))
+
+ dim diff_cur, deviation, pvVal, diff_prev
+ pvVal = GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV)
+
+
+ if(StrComp(pvVal,GSH_BADPV_TEXT, vbtextcompare)=0) then
+ exit sub
+ end if
+
+ 'Calculate PVDeviation
+ diff_cur = ((pvVal - pvRefVal)/(RangeMax - RangeMin)) * 100.0
+ diff_Filtered = diff_cur + (diff_old-diff_cur)*filterVal
+ diff_old = diff_filtered
+ oShape.SetCustomProperty "Value","Diff_Old", diff_old
+
+ 'Set ButterFlies
+ if diff_Filtered < (-1.0*sigChange) then
+ oShape.objects("ind_OPDevBarLeft").value = -100
+ elseif diff_Filtered < (-1.0*modChange) then
+ oShape.objects("ind_OPDevBarLeft").value = -50
+ else
+ oShape.objects("ind_OPDevBarLeft").value = 0
+ end if
+ end if
+ end if
+
+'gsh_log_e("GSH_Quality_L1Deviation_Lo_ONUPDATE")
+
+ if Err then
+ call GSH_SHAPE_ERROR_HANDLING("GSH_Quality_L1Deviation_Lo_ONUPDATE",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_LevelRegCtl_L1Gauge_FR_OnUpdate_new Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_LevelRegCtl_L1Gauge_FR_OnUpdate_new(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad)
+'gsh_log_s("GSH_LevelRegCtl_L1Gauge_FR_OnUpdate_new oShape="&oShape.id &" isOffNormal = " &isOffNormal)
+On Error Resume Next
+
+ Dim sAlarmCode, bInSA
+
+ call GSH_LevelIndicatorRegulatoryControlShowNormal(oShape)
+
+ 'sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam)
+ sAlarmCode = GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum"))
+
+ If flag <= 1 then
+' call GSH_SALevelIndicatorRegulatoryControlShowNormal(oShape)
+
+ 'Check the points alarming
+ if CBool(isAlmEnabled) Then
+ call GSH_SHOWLEVELALARMS(sAlarmCode,oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ end if
+
+ 'Check Focus
+ call GSH_LevelRegCtl_SAGauge_SetFocus(oShape, isOffNormal)
+
+ 'Set Alarm Lines
+ Dim rRangeHi, rRangeLo
+
+ rRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ rRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ If flag = 0 Then
+ call GSH_C200_SetAlarmLinesVertical_new(oShape, rRangeHi, rRangeLo, 4, shapeTagName)
+ End If
+
+ 'Set SA Bars Limit
+ Dim iSAHi, iSALo
+ iSAHi = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE))
+ iSALo = FormatNumber(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE))
+ call GSH_LevelIndicatorShowSALimits(oShape, iSAHi, iSALo)
+
+ 'Check for bad value
+ If CBool(isDataBad) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ Dim iPV, iSP, iPVFormat, iPVFormated
+
+ iPV = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ iSP = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"), GSH_CPPARAM_SP))
+ 'Locate PV Float
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("rec_IndicatorFloat"), iPV, rRangeHi, rRangeLo)
+
+ 'Locate SP Float
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("plg_SPIndicator"), iSP, rRangeHi, rRangeLo)
+
+' shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ iPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ iPVFormated = FormatNumber(iPV, iPVFormat)
+ oShape.objects("txt_PVvalue").value = iPVFormated
+
+ bInSA = GSH_IsShapeInSA(iPV, iSAHi, iSALo)
+ if (bInSA) then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ end if
+
+ 'Set Recent PV range bar
+ call GSH_LevelRegCtl_SAGauge_SetPVRangeBar(oShape, iPV)
+ End If
+ oShape.objects("txt_mode").value = Left(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_MODE), 1)
+ call GSH_LevelRegCtl_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+ End If
+'gsh_log_e("GSH_LevelRegCtl_L1Gauge_FR_OnUpdate_new")
+ if Err then
+' call GSH_SHAPE_ERROR_HANDLING("GSH_LevelRegCtl_L1Gauge_FR_OnUpdate_new",oShape)
+ end if
+end sub
+
+sub GSH_C200_SetAlarmLinesVertical_new(oShape, rRangeHi, rRangeLo, n, shapeTagName)
+On Error Resume Next
+'gsh_log_s("GSH_C200_SetAlarmLinesVertical_new oShape="&oShape.id)
+ dim alarmlim, alarmPri
+ alarmlim = 0: alarmPri = 0
+ for i = 1 to n
+ temp = "AlarmPriority" & i
+ temp1 = "AlarmLimit" & i
+' alarmPri = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmPriority" & i))
+ alarmPri = CDbl(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,temp, 0))
+ if (alarmPri > 0) and (alarmPri <=4) then
+ if not(oShape.objects("rec_DataScript").IsNan(GSH_CPENTITY & ".CP_AlarmLimit" & i)) then
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_VISIBLE
+ alarmlim = CDbl(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,temp1, 0))
+' alarmlim = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmLimit" & i))
+ call GSH_SetObjectLocation_Vertical(oShape.objects("linePVRange"), oShape.objects("LineAlarm"&i), alarmlim, rRangeHi, rRangeLo)
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ next
+'gsh_log_e("GSH_C200_SetAlarmLinesVertical_new")
+ if Err then
+' call GSH_SHAPE_ERROR_HANDLING("GSH_C200_SetAlarmLinesVertical_new",oShape)
+ end if
+end sub
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+'GSH_QualityAnalog_L1Gauge_FR_OnUpdate_new Shape Section
+'Parameters: oShape = Shape object
+' flag = 0 -> do everything
+' flag = 1 -> do focus only to increase performance
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+sub GSH_QualityAnalog_L1Gauge_FR_OnUpdate_new(oShape, flag, isAlmEnabled, almPriorityParam, isOffNormal, isDataBad)
+'gsh_log_s("GSH_TPS_QualityAnalog_L1Gauge_FR_OnUpdate oShape="&oShape.id)
+On Error Resume Next
+
+ dim sAlarmCode, bInSA
+ bInSA = false
+ 'sAlarmCode = GSH_GEN_GETHIGHESTALARMPRIORITYPARAMETER(oShape.objects("rec_DataScript"),GSH_CPENTITY,almPriorityParam)
+ sAlarmCode = GSH_GETHIGHESTALARMPRIORITYPROPERTY(oShape.objects("alarmNum"))
+ call GSH_LevelIndicatorShowNormal(oShape)
+
+ 'Check the points alarming
+ if CBool(isAlmEnabled) Then
+ call GSH_SHOWLEVELALARMS(sAlarmCode,oShape)
+ else
+ call GSH_LevelIndicatorRegulatoryControlShowDisabledAlarm(oShape)
+ End If
+
+
+ 'Check Focus
+ 'call GSH_LevelRegCtl_QualitySAGauge_SetFocus(oShape)
+
+ call GSH_LevelRegCtl_SAGauge_SetFocus(oShape, isOffNormal)
+
+' if (oShape.objects("focus").styleClass <> GSH_CSSFOCUSPRINCIPAL) then
+' if CBool(isOffNormal) then
+' call GSH_LevelIndicatorSHOWOFFNORMAL(oShape)
+' end if
+' end if
+
+ Dim rRangeHi, rRangeLo
+ rRangeHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMAX, GSH_CPVALUE))
+ rRangeLo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPRANGEMIN, GSH_CPVALUE))
+
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ If flag = 0 Then
+ 'Set Alarm Lines
+ call GSH_C200_SetAlarmLinesHorizontal_new(oShape, rRangeHi, rRangeLo, 4, shapeTagName)
+ End If
+
+ 'Set SA Bars Limit
+ Dim rSAHi, rSALo
+ rSAHi = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSAUPPERLIMIT, GSH_CPVALUE))
+ rSALo = CDbl(GSH_GETSHAPE_CUSTOM_PROPERTY(oShape,GSH_CPSALOWERLIMIT, GSH_CPVALUE))
+
+ 'gsh_log("rSAHi = " &rSAHi & " rSALo = " &rSALo)
+ 'call GSH_QualitySAGauge_ShowSALimits(oShape, rSAHi, rSALo)
+ call GSH_SetObjectLocationAndWidth_Horizontal(oShape.objects("linePVRange"), oShape.objects("rec_SALow"), rSALo, rRangeLo, rRangeHi, rRangeLo)
+ call GSH_SetObjectLocationAndWidth_Horizontal(oShape.objects("linePVRange"), oShape.objects("rec_SAHigh"), rRangeHi, rSAHi, rRangeHi, rRangeLo)
+
+ 'Check for bad value
+ If CBool(isDataBad) Then
+ call GSH_LevelIndicatorShowBadPV(oShape)
+ Else
+ Dim rPV, rPVFormat, rPVFormated
+ rPV = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),GSH_CPPARAM_PV))
+ shapeTagName = oShape.GetCustomProperty(GSH_CPPOINT,GSH_CPENTITY)
+ rPVFormat = right(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,GSH_PVFORMATKEY, GSH_DEFAULTPVFORMAT),1)
+ rPVFormated = FormatNumber(rPV, rPVFormat)
+ oShape.objects("txt_PVvalue").value = rPVFormated
+
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("linePVRange"), oShape.objects("rec_IndicatorFloat"), rPV, rRangeHi, rRangeLo)
+ 'call GSH_LevelRegCtl_SAGauge_InSA(oShape, rPV, rSAHi, rSALo)
+
+ bInSA = GSH_IsShapeInSA(iPV, iSAHi, iSALo)
+ if (bInSA) then
+ oShape.objects("rec_SAFrame").style.visibility = GSH_VISIBLE
+ else
+ oShape.objects("rec_SAFrame").style.visibility = GSH_HIDDEN
+ end if
+ End If
+ call GSH_QualityAnalog_SAGauge_ShowHideComponents(oShape, sAlarmCode, bInSA, isOffNormal)
+'gsh_log_e("GSH_QualityAnalog_L1Gauge_FR_OnUpdate_new")
+
+ if Err then
+' call GSH_SHAPE_ERROR_HANDLING("GSH_QualityAnalog_L1Gauge_FR_OnUpdate_new",oShape)
+ end if
+end sub
+
+'
+'oShape: the HCS shape
+'n: total number of alarm limit lines to show
+sub GSH_C200_SetAlarmLinesHorizontal_new(oShape, iRangeHi, iRangeLo, n, shapeTagName)
+'gsh_log_s("GSH_C200_SetAlarmLinesHorizontal_new ="&oShape.id)
+ dim alarmlim, alarmPri
+ alarmlim = 0: alarmPri = 0
+
+ for i = 1 to n
+ temp = "AlarmPriority" & i
+ temp1 = "AlarmLimit" & i
+ alarmPri = CDbl(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,temp, 0))
+' alarmPri = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmPriority" & i))
+' gsh_log_e("GSH_C200_SetAlarmLinesHorizontal_new temp alarmPri = ", alarmPri)
+
+ if (alarmPri > 0) and (alarmPri <=4) then
+
+ if not(oShape.objects("rec_DataScript").IsNan(GSH_CPENTITY & ".CP_AlarmLimit" & i)) then
+' alarmlim = CDbl(GSH_GETENTITYPARAMETERVALUE(oShape.objects("rec_DataScript"),"CP_AlarmLimit" & i))
+ alarmlim = CDbl(GSH_READTAGINFORMATIONKEYVALUE(shapeTagName,temp1, 0))
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_VISIBLE
+ call GSH_SetObjectLocation_Horizontal(oShape.objects("linePVRange"), oShape.objects("LineAlarm"&i), alarmlim, iRangeHi, iRangeLo)
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ else
+ oShape.objects("LineAlarm"&i).style.visibility = GSH_HIDDEN
+ end if
+ next
+'gsh_log_e("GSH_C200_SetAlarmLinesHorizontal_new")
+end sub
+
+
+
+'------------------------------- End L1 Common subroutines---------------------------------</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=shape070_rec_DataScript defer>If (me.parentElement.parentElement.GetCustomProperty(GSH_CPVALUE,GSH_CPDISPLAYLEVEL) = 2) then
+ If window.event.button = 2 Then call GSH_TYPE2TABRBUTTONCLICK(me.parentElement.parentElement) else call GSH_NAVTAB_LCLICK (me.parentElement.parentElement) end if
+Else
+ call GSH_NAVTAB_LCLICK (me.parentElement.parentElement)
+End if</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p7_4900PC0176_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p7_4900PC0176_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p7_4900PC0176_txt_ModeValue defer> p7_4900PC0176_rec_DataScript.click
+ p7_4900PC0176_alp_SPValue.style.visibility = GSH_HIDDEN
+ p7_4900PC0176_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p7_4900PC0176_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p7_4900PC0176_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p7_4900PC0176_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p7_4900PC0176_txt_OPValue defer> p7_4900PC0176_rec_DataScript.click
+ if strcomp(p7_4900PC0176_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p7_4900PC0176_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p7_4900PC0176_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p7_4900PC0176_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p7_4900PC0176_txt_SPValue defer> p7_4900PC0176_rec_DataScript.click
+ if strcomp(p7_4900PC0176_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p7_4900PC0176_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p7_4900PC0176_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p7_4900PC0176_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p7_4900PC0176_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p7_4900PC0176_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p7_4900PC0176_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p7_4900PC0176_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p7_4900PC0176 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p8_4900FI3006_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p8_4900FI3006_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p8_4900FI3006 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p9e_4900TC3301_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9e_4900TC3301_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9e_4900TC3301_txt_ModeValue defer> p9e_4900TC3301_rec_DataScript.click
+ p9e_4900TC3301_alp_SPValue.style.visibility = GSH_HIDDEN
+ p9e_4900TC3301_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9e_4900TC3301_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9e_4900TC3301_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9e_4900TC3301_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9e_4900TC3301_txt_OPValue defer> p9e_4900TC3301_rec_DataScript.click
+ if strcomp(p9e_4900TC3301_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p9e_4900TC3301_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p9e_4900TC3301_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9e_4900TC3301_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9e_4900TC3301_txt_SPValue defer> p9e_4900TC3301_rec_DataScript.click
+ if strcomp(p9e_4900TC3301_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p9e_4900TC3301_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p9e_4900TC3301_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9e_4900TC3301_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9e_4900TC3301_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9e_4900TC3301_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9e_4900TC3301_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9e_4900TC3301_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p9e_4900TC3301 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p5_4900FY0212_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p5_4900FY0212_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p5_4900FY0212_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p5_4900FY0212_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p5_4900FY0212_txt_OPValue defer> p5_4900FY0212_rec_DataScript.click
+ 'Check Mode = MAN to allow OP modifiable
+ if strcomp(p5_4900FY0212_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ me.parentElement.parentElement.objects("p5_4900FY0212_cmb_ModeValue").style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY (p5_4900FY0212_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p5_4900FY0212_txt_ModeValue defer> p5_4900FY0212_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p5_4900FY0212_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p5_4900FY0212_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p5_4900FY0212_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p5_4900FY0212 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p1_4900TC0145_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p1_4900TC0145_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p1_4900TC0145_txt_ModeValue defer> p1_4900TC0145_rec_DataScript.click
+ p1_4900TC0145_alp_SPValue.style.visibility = GSH_HIDDEN
+ p1_4900TC0145_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p1_4900TC0145_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p1_4900TC0145_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p1_4900TC0145_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p1_4900TC0145_txt_OPValue defer> p1_4900TC0145_rec_DataScript.click
+ if strcomp(p1_4900TC0145_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p1_4900TC0145_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p1_4900TC0145_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p1_4900TC0145_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p1_4900TC0145_txt_SPValue defer> p1_4900TC0145_rec_DataScript.click
+ if strcomp(p1_4900TC0145_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p1_4900TC0145_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p1_4900TC0145_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p1_4900TC0145_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p1_4900TC0145_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p1_4900TC0145_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p1_4900TC0145_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p1_4900TC0145_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p1_4900TC0145 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p2_4900TC0074_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p2_4900TC0074_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p2_4900TC0074_txt_ModeValue defer> p2_4900TC0074_rec_DataScript.click
+ p2_4900TC0074_alp_SPValue.style.visibility = GSH_HIDDEN
+ p2_4900TC0074_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p2_4900TC0074_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p2_4900TC0074_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p2_4900TC0074_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p2_4900TC0074_txt_OPValue defer> p2_4900TC0074_rec_DataScript.click
+ if strcomp(p2_4900TC0074_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p2_4900TC0074_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p2_4900TC0074_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p2_4900TC0074_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p2_4900TC0074_txt_SPValue defer> p2_4900TC0074_rec_DataScript.click
+ if strcomp(p2_4900TC0074_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p2_4900TC0074_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p2_4900TC0074_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p2_4900TC0074_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p2_4900TC0074_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p2_4900TC0074_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p2_4900TC0074_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p2_4900TC0074_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p2_4900TC0074 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p3_4900FC0212_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p3_4900FC0212_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p3_4900FC0212_txt_ModeValue defer> p3_4900FC0212_rec_DataScript.click
+ p3_4900FC0212_alp_SPValue.style.visibility = GSH_HIDDEN
+ p3_4900FC0212_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p3_4900FC0212_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p3_4900FC0212_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p3_4900FC0212_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p3_4900FC0212_txt_OPValue defer> p3_4900FC0212_rec_DataScript.click
+ if strcomp(p3_4900FC0212_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p3_4900FC0212_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p3_4900FC0212_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p3_4900FC0212_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p3_4900FC0212_txt_SPValue defer> p3_4900FC0212_rec_DataScript.click
+ if strcomp(p3_4900FC0212_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p3_4900FC0212_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p3_4900FC0212_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p3_4900FC0212_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p3_4900FC0212_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p3_4900FC0212_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p3_4900FC0212_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p3_4900FC0212_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p3_4900FC0212 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p4_4900PC0216_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p4_4900PC0216_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p4_4900PC0216_txt_ModeValue defer> p4_4900PC0216_rec_DataScript.click
+ p4_4900PC0216_alp_SPValue.style.visibility = GSH_HIDDEN
+ p4_4900PC0216_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p4_4900PC0216_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p4_4900PC0216_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p4_4900PC0216_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p4_4900PC0216_txt_OPValue defer> p4_4900PC0216_rec_DataScript.click
+ if strcomp(p4_4900PC0216_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p4_4900PC0216_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p4_4900PC0216_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p4_4900PC0216_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p4_4900PC0216_txt_SPValue defer> p4_4900PC0216_rec_DataScript.click
+ if strcomp(p4_4900PC0216_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p4_4900PC0216_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p4_4900PC0216_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p4_4900PC0216_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p4_4900PC0216_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p4_4900PC0216_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p4_4900PC0216_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p4_4900PC0216_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p4_4900PC0216 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p9_4900FFI3104_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9_4900FFI3104_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9_4900FFI3104_txt_ModeValue defer> p9_4900FFI3104_rec_DataScript.click
+ p9_4900FFI3104_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9_4900FFI3104_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9_4900FFI3104_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9_4900FFI3104_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9_4900FFI3104_txt_SPValue defer> p9_4900FFI3104_rec_DataScript.click
+ if strcomp(p9_4900FFI3104_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p9_4900FFI3104_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9_4900FFI3104_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9_4900FFI3104_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9_4900FFI3104_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p9_4900FFI3104 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p9a_4900FC3104_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9a_4900FC3104_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9a_4900FC3104_txt_ModeValue defer> p9a_4900FC3104_rec_DataScript.click
+ p9a_4900FC3104_alp_SPValue.style.visibility = GSH_HIDDEN
+ p9a_4900FC3104_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9a_4900FC3104_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9a_4900FC3104_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9a_4900FC3104_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9a_4900FC3104_txt_OPValue defer> p9a_4900FC3104_rec_DataScript.click
+ if strcomp(p9a_4900FC3104_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ p9a_4900FC3104_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p9a_4900FC3104_alp_SPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9a_4900FC3104_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9a_4900FC3104_txt_SPValue defer> p9a_4900FC3104_rec_DataScript.click
+ if strcomp(p9a_4900FC3104_cmb_ModeValue.value,GSH_ALLOWSPEDIT_MODE,vbtextcompare)=0 then
+ p9a_4900FC3104_cmb_ModeValue.style.visibility = GSH_HIDDEN
+ p9a_4900FC3104_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9a_4900FC3104_alp_SPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9a_4900FC3104_alp_SPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9a_4900FC3104_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9a_4900FC3104_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9a_4900FC3104_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p9a_4900FC3104 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9b_4900TY3301_rec_DataScript defer> 'Set Tag of Shape in Display Communication Mailbox
+ call GSH_SHAPECLICKEDNOASSOCDISP(me.parentelement.parentelement)</SCRIPT>
+
+<SCRIPT language=VBScript event=onmousedown for=p9b_4900TY3301_rec_DataScript
+defer>If window.event.button = 2 Then
+ call GSH_RIGHTCLICK(me.parentElement.parentElement)
+End If</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9b_4900TY3301_alp_OPValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9b_4900TY3301_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9b_4900TY3301_txt_OPValue defer> p9b_4900TY3301_rec_DataScript.click
+ 'Check Mode = MAN to allow OP modifiable
+ if strcomp(p9b_4900TY3301_cmb_ModeValue.value,GSH_ALLOWOPEDIT_MODE,vbtextcompare)=0 then
+ me.parentElement.parentElement.objects("p9b_4900TY3301_cmb_ModeValue").style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY (p9b_4900TY3301_alp_OPValue)
+ end if</SCRIPT>
+
+<SCRIPT language=VBScript event=onclick for=p9b_4900TY3301_txt_ModeValue defer> p9b_4900TY3301_alp_OPValue.style.visibility = GSH_HIDDEN
+ call GSH_MULTIFPSHOWENTRY(p9b_4900TY3301_cmb_ModeValue)</SCRIPT>
+
+<SCRIPT language=VBScript event=onchange for=p9b_4900TY3301_cmb_ModeValue defer> call GSH_MULTIFPHIDEENTRY(me)
+ p9b_4900TY3301_rec_DataScript.click</SCRIPT>
+
+<SCRIPT language=VBScript event=onshapeload for=p9b_4900TY3301 defer>call GSH_SETTOOLTIP(me)</SCRIPT>
+
+<BODY
+style="FONT-SIZE: 12pt; MARGIN: 0px; OVERFLOW: auto; ZOOM: 1; BACKGROUND-COLOR: transparent">
+<DIV class=Background_Gray id=Background
+style="MARGIN: 0px; WIDTH: 1156px; BACKGROUND-REPEAT: no-repeat; ZOOM: 1; POSITION: absolute; HEIGHT: 550px; BACKGROUND-COLOR: rgb(235,235,235)"></DIV>
+<DIV class=Background_Gray id=Page
+style="FONT-SIZE: 12pt; MARGIN: 0px; BEHAVIOR: url(#StnEvtReflector) url(#HDXPageBehavior) url(#DisplayDataRepository); WIDTH: 665px; ZOOM: 1; FONT-FAMILY: Arial; POSITION: absolute; HEIGHT: 330px; BACKGROUND-COLOR: transparent">
+<DIV class=hsc.shape.1 id=shape071
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 83px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 82px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1px; HEIGHT: 26px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:26;lineColorBlink:False;Width:82;"
+value = "1" src = ".\L4_LSG_FURN_1_files\GEN_NavigationTab.sha" parameters =
+"Point?Entity:L4_LSG_FURN_2_AA;Value?DisplayName:L4_LSG_FURN_2;Value?DisplayLevel:4;Value?TabLabel:Redund;Value?AssocLevel4:;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=shape071_grp_NavTab
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:26;lineColorBlink:False;Width:82;">
+<DIV class="hvg.base.1 " id=shape071_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 98.78%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7.69%; HEIGHT: 84.61%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:#ebebeb;fillColorBlink:False;FillStyle:0;Height:22;LineColor:#939393;lineColorBlink:False;LineWidth:1;Roundness:50;styleClass:;Width:81;"></DIV>
+<DIV class="hvg.base.1 " id=shape071_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 2.43%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 93.9%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 15.38%; HEIGHT: 73.07%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:#ebebeb;fillColorBlink:False;FillStyle:0;Height:19;LineColor:#ebebeb;lineColorBlink:False;LineStyle:1;LineWidth:2;Roundness:40;styleClass:;Width:77;"></DIV>
+<DIV class=hvg.base.1 id=shape071_rec_HideTabBtm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 100%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 76.92%; HEIGHT: 23.07%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:#ebebeb;fillColorBlink:False;Height:6;LineColor:#ebebeb;lineColorBlink:False;LineStyle:1;LineWidth:2;Width:82;"></DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=shape071_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.21%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 19.51%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7.69%; HEIGHT: 61.53%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=shape071_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 4.87%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 14.63%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.53%; HEIGHT: 46.15%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=shape071_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 4.87%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 14.63%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 15.38%; HEIGHT: 46.15%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=shape071_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.09%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.41%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.53%; HEIGHT: 46.15%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=shape071_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 4.87%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 14.63%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 15.38%; HEIGHT: 46.15%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=shape071_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.09%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 14.63%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.53%; HEIGHT: 46.15%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class=hvg.textbox.1 id=shape071_txtTabLabel
+style="FONT-WEIGHT: normal; FONT-SIZE: 11pt; LEFT: 21.95%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 73.17%; COLOR: #000000; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7.69%; HEIGHT: 65.38%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;HDXBINDINGID:21;Height:17;indicateAlarmState:False;indicateScanState:False;lineColorBlink:False;LineStyle:0;textColor:#000000;textColorBlink:False;TotalRotation:0;Width:60;">Redund</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=shape071_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.78%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 84.61%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:22;Height:22;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:81;"
+onupdate="VBScript:call GSH_NAVTAB_ONUPDATE(me.parentElement.parentElement)"></DIV></DIV></DIV>
+<DIV class=hsc.shape.1 id=shape001
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 616px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 40px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 308px; HEIGHT: 19px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:0;lineColorBlink:False;Width:0;"
+value = "1" src = ".\L4_LSG_FURN_1_files\gsh.sha" parameters = "" linkType =
+"embedded" globalscripts =
+"2A03E0C4-741C-4145-A5C0-BE506EDF0681 4B605EA5-055E-4956-B67E-DE5BE60D4CCC 50F477B2-C5AC-4758-A02E-EB39E352D363 9AD748A9-63A3-4F20-B029-8144F6FB00EA A188CC3F-37F3-4431-8CA1-740C5D627030"
+styleClass = "">
+<DIV class="hvg.textbox.1 GSH_Style" id=shape001_textbox001
+style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 100%; COLOR: #000000; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 100%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:19;lineColorBlink:False;LineStyle:0;styleClass:GSH_Style;textColor:#000000;textColorBlink:False;TotalRotation:0;Width:40;">GSH</DIV></DIV>
+<DIV class=hvg.base.1 id=line002
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 2px; BEHAVIOR: url(#HDXVectorFactory#line); OVERFLOW: hidden; WIDTH: 180px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 19px; HEIGHT: 1px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:1;LineColor:#b4b4b4;lineColorBlink:False;points:0 0 100 0 ;Width:180;"></DIV>
+<DIV class=hsc.shape.1 id=shape070
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 0px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 82px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7px; HEIGHT: 26px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:26;lineColorBlink:False;Width:82;"
+value = "1" src = ".\L4_LSG_FURN_1_files\GEN_NavigationTab.sha" parameters =
+"Point?Entity:L4_LSG_FURN_1_AA;Value?DisplayName:L4_LSG_FURN_1;Value?DisplayLevel:4;Value?TabLabel:Furn;Value?AssocLevel4:;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=shape070_grp_NavTab
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:26;lineColorBlink:False;Width:82;">
+<DIV class="hvg.base.1 " id=shape070_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 98.78%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7.69%; HEIGHT: 84.61%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:#ebebeb;fillColorBlink:False;FillStyle:0;Height:22;LineColor:#939393;lineColorBlink:False;LineWidth:1;Roundness:50;styleClass:;Width:81;"></DIV>
+<DIV class="hvg.base.1 " id=shape070_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 2.43%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 93.9%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 15.38%; HEIGHT: 73.07%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:#ebebeb;fillColorBlink:False;FillStyle:0;Height:19;LineColor:#ebebeb;lineColorBlink:False;LineStyle:1;LineWidth:2;Roundness:40;styleClass:;Width:77;"></DIV>
+<DIV class=hvg.base.1 id=shape070_rec_HideTabBtm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 100%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 76.92%; HEIGHT: 23.07%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:#ebebeb;fillColorBlink:False;Height:6;LineColor:#ebebeb;lineColorBlink:False;LineStyle:1;LineWidth:2;Width:82;"></DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=shape070_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.21%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 19.51%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7.69%; HEIGHT: 61.53%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=shape070_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 4.87%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 14.63%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.53%; HEIGHT: 46.15%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=shape070_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 4.87%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 14.63%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 15.38%; HEIGHT: 46.15%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=shape070_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.09%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.41%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.53%; HEIGHT: 46.15%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=shape070_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 4.87%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 14.63%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 15.38%; HEIGHT: 46.15%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=shape070_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.09%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 14.63%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.53%; HEIGHT: 46.15%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class=hvg.textbox.1 id=shape070_txtTabLabel
+style="FONT-WEIGHT: normal; FONT-SIZE: 11pt; LEFT: 21.95%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 73.17%; COLOR: #000000; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 7.69%; HEIGHT: 65.38%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;HDXBINDINGID:0;Height:17;indicateAlarmState:False;indicateScanState:False;lineColorBlink:False;LineStyle:0;textColor:#000000;textColorBlink:False;TotalRotation:0;Width:60;">Furn</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=shape070_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.78%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 84.61%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:1;Height:22;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:81;"
+onupdate="VBScript:call GSH_NAVTAB_ONUPDATE(me.parentElement.parentElement)"></DIV></DIV></DIV>
+<DIV class=hsc.shape.1 id=p7_4900PC0176
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 551px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:0;lineColorBlink:False;Width:0;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900PC0176;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p7_4900PC0176_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p7_4900PC0176_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:23;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p7_4900PC0176_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:24;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p7_4900PC0176_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:25;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p7_4900PC0176_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p7_4900PC0176_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p7_4900PC0176_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p7_4900PC0176_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p7_4900PC0176_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p7_4900PC0176_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p7_4900PC0176_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p7_4900PC0176_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p7_4900PC0176_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p7_4900PC0176_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p7_4900PC0176_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p7_4900PC0176_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p7_4900PC0176_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p7_4900PC0176_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p7_4900PC0176_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p7_4900PC0176_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:26;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p7_4900PC0176_rec_DataScript").onmousedown'
+id=p7_4900PC0176_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p7_4900PC0176_rec_DataScript").onmousedown'
+id=p7_4900PC0176_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:27;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p7_4900PC0176_rec_DataScript").onmousedown'
+id=p7_4900PC0176_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p7_4900PC0176_rec_DataScript").onmousedown'
+id=p7_4900PC0176_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255,
+255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0,
+0, 0);textColorBlink:False;TotalRotation:0;Width:58;">09.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p7_4900PC0176_rec_DataScript").onmousedown' id=p7_4900PC0176_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:28;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p7_4900PC0176_rec_DataScript").onmousedown' id=p7_4900PC0176_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:29;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p8_4900FI3006
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 3px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 179px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:0;lineColorBlink:False;Width:0;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_Analog.sha" parameters =
+"Point?Entity:4900FI3006;Parameter?CP_PV:DACA.PV;Parameter?CP_BadPV:DACA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p8_4900FI3006_grp_AnalogMFP
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p8_4900FI3006_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 35.52%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:30;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p8_4900FI3006_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:31;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p8_4900FI3006_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:32;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPANALOG_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class=hvg.base.1 id=p8_4900FI3006_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p8_4900FI3006_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p8_4900FI3006_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p8_4900FI3006_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p8_4900FI3006_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 5.43%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p8_4900FI3006_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p8_4900FI3006_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p8_4900FI3006_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p8_4900FI3006_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p8_4900FI3006_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p8_4900FI3006_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:33;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPANALOG_ONUPDATE(me.parentElement.parentElement, 0)"></DIV></DIV></DIV>
+<DIV class=hsc.shape.1 id=p9e_4900TC3301
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 369px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 179px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:0;lineColorBlink:False;Width:0;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900TC3301;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p9e_4900TC3301_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p9e_4900TC3301_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:14;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p9e_4900TC3301_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:15;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p9e_4900TC3301_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:16;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9e_4900TC3301_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9e_4900TC3301_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p9e_4900TC3301_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p9e_4900TC3301_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p9e_4900TC3301_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p9e_4900TC3301_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p9e_4900TC3301_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p9e_4900TC3301_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p9e_4900TC3301_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9e_4900TC3301_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p9e_4900TC3301_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p9e_4900TC3301_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p9e_4900TC3301_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p9e_4900TC3301_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p9e_4900TC3301_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p9e_4900TC3301_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:17;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9e_4900TC3301_rec_DataScript").onmousedown'
+id=p9e_4900TC3301_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9e_4900TC3301_rec_DataScript").onmousedown'
+id=p9e_4900TC3301_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:19;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9e_4900TC3301_rec_DataScript").onmousedown'
+id=p9e_4900TC3301_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9e_4900TC3301_rec_DataScript").onmousedown'
+id=p9e_4900TC3301_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255,
+255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0,
+0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA
+class="hsc.alpha.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9e_4900TC3301_rec_DataScript").onmousedown'
+id=p9e_4900TC3301_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px;
+FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR:
+url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW:
+hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP:
+1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none;
+POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR:
+rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE:
+none; ROWS: 1" tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255,
+255);fillColorBlink:False;HDXBINDINGID:20;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0,
+0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1
+Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9e_4900TC3301_rec_DataScript").onmousedown'
+id=p9e_4900TC3301_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px;
+FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR:
+url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW:
+hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP:
+1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none;
+POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR:
+rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE:
+none; ROWS: 1" tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255,
+255);HDXBINDINGID:34;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0,
+0, 0);">-09.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p5_4900FY0212
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 369px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_Automan.sha" parameters =
+"Point?Entity:4900FY0212;Parameter?CP_OP:AUTOMANA.OP;Parameter?CP_Mode:AUTOMANA.MODE;Parameter?CP_ModAttr:AUTOMANA.MODEATTR;Parameter?CP_RedTag:AUTOMANA.REDTAG;Parameter?CP_Windup:AUTOMANA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p5_4900FY0212_grp_C200MFAutoman
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p5_4900FY0212_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 40.78%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:35;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p5_4900FY0212_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:36;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p5_4900FY0212_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:37;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPAUTOMAN_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class=hvg.base.1 id=p5_4900FY0212_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 15.21%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 70.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.02%; HEIGHT: 11.84%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:18;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:65;"></DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p5_4900FY0212_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 3.26%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 40.78%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p5_4900FY0212_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 41.44%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p5_4900FY0212_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 5.43%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 42.1%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p5_4900FY0212_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 7.6%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 41.44%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p5_4900FY0212_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 5.43%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 42.1%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p5_4900FY0212_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 41.44%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p5_4900FY0212_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p5_4900FY0212_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p5_4900FY0212_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p5_4900FY0212_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p5_4900FY0212_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 84.78%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p5_4900FY0212_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:38;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPAUTOMAN_ONUPDATE(me.parentElement.parentElement, 0)"></DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p5_4900FY0212_rec_DataScript").onmousedown' id=p5_4900FY0212_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:39;indicateScanState:0;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p5_4900FY0212_rec_DataScript").onmousedown'
+id=p5_4900FY0212_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 19.56%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 49.34%; HEIGHT: 9.86%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:15;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p5_4900FY0212_rec_DataScript").onmousedown'
+id=p5_4900FY0212_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 19.56%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p5_4900FY0212_rec_DataScript").onmousedown'
+id=p5_4900FY0212_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 19.56%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:40;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN></DIV></DIV>
+<DIV class=hsc.shape.1 id=p1_4900TC0145
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 3px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900TC0145;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p1_4900TC0145_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p1_4900TC0145_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:41;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p1_4900TC0145_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:42;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p1_4900TC0145_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:43;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p1_4900TC0145_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p1_4900TC0145_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p1_4900TC0145_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p1_4900TC0145_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p1_4900TC0145_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p1_4900TC0145_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p1_4900TC0145_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p1_4900TC0145_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p1_4900TC0145_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p1_4900TC0145_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p1_4900TC0145_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p1_4900TC0145_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p1_4900TC0145_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p1_4900TC0145_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p1_4900TC0145_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p1_4900TC0145_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:44;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p1_4900TC0145_rec_DataScript").onmousedown'
+id=p1_4900TC0145_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p1_4900TC0145_rec_DataScript").onmousedown'
+id=p1_4900TC0145_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:45;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p1_4900TC0145_rec_DataScript").onmousedown'
+id=p1_4900TC0145_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p1_4900TC0145_rec_DataScript").onmousedown'
+id=p1_4900TC0145_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p1_4900TC0145_rec_DataScript").onmousedown' id=p1_4900TC0145_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:46;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p1_4900TC0145_rec_DataScript").onmousedown' id=p1_4900TC0145_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:47;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p2_4900TC0074
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 94px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900TC0074;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p2_4900TC0074_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p2_4900TC0074_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:48;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p2_4900TC0074_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:49;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p2_4900TC0074_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:57;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p2_4900TC0074_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p2_4900TC0074_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p2_4900TC0074_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p2_4900TC0074_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p2_4900TC0074_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p2_4900TC0074_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p2_4900TC0074_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p2_4900TC0074_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p2_4900TC0074_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p2_4900TC0074_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p2_4900TC0074_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p2_4900TC0074_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p2_4900TC0074_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p2_4900TC0074_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p2_4900TC0074_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p2_4900TC0074_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:58;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p2_4900TC0074_rec_DataScript").onmousedown'
+id=p2_4900TC0074_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p2_4900TC0074_rec_DataScript").onmousedown'
+id=p2_4900TC0074_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:59;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p2_4900TC0074_rec_DataScript").onmousedown'
+id=p2_4900TC0074_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p2_4900TC0074_rec_DataScript").onmousedown'
+id=p2_4900TC0074_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p2_4900TC0074_rec_DataScript").onmousedown' id=p2_4900TC0074_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:60;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p2_4900TC0074_rec_DataScript").onmousedown' id=p2_4900TC0074_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:61;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p3_4900FC0212
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 185px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900FC0212;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p3_4900FC0212_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p3_4900FC0212_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:62;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p3_4900FC0212_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:63;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p3_4900FC0212_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:64;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p3_4900FC0212_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p3_4900FC0212_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p3_4900FC0212_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p3_4900FC0212_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p3_4900FC0212_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p3_4900FC0212_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p3_4900FC0212_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p3_4900FC0212_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p3_4900FC0212_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p3_4900FC0212_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p3_4900FC0212_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p3_4900FC0212_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p3_4900FC0212_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p3_4900FC0212_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p3_4900FC0212_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p3_4900FC0212_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:65;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p3_4900FC0212_rec_DataScript").onmousedown'
+id=p3_4900FC0212_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p3_4900FC0212_rec_DataScript").onmousedown'
+id=p3_4900FC0212_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:66;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p3_4900FC0212_rec_DataScript").onmousedown'
+id=p3_4900FC0212_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p3_4900FC0212_rec_DataScript").onmousedown'
+id=p3_4900FC0212_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p3_4900FC0212_rec_DataScript").onmousedown' id=p3_4900FC0212_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:67;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p3_4900FC0212_rec_DataScript").onmousedown' id=p3_4900FC0212_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:68;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p4_4900PC0216
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 277px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900PC0216;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p4_4900PC0216_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p4_4900PC0216_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:2;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p4_4900PC0216_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:3;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p4_4900PC0216_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:4;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p4_4900PC0216_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p4_4900PC0216_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p4_4900PC0216_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p4_4900PC0216_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p4_4900PC0216_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p4_4900PC0216_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p4_4900PC0216_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p4_4900PC0216_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p4_4900PC0216_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p4_4900PC0216_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p4_4900PC0216_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p4_4900PC0216_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p4_4900PC0216_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p4_4900PC0216_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p4_4900PC0216_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p4_4900PC0216_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:5;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p4_4900PC0216_rec_DataScript").onmousedown'
+id=p4_4900PC0216_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p4_4900PC0216_rec_DataScript").onmousedown'
+id=p4_4900PC0216_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:6;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p4_4900PC0216_rec_DataScript").onmousedown'
+id=p4_4900PC0216_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p4_4900PC0216_rec_DataScript").onmousedown'
+id=p4_4900PC0216_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p4_4900PC0216_rec_DataScript").onmousedown' id=p4_4900PC0216_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:7;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p4_4900PC0216_rec_DataScript").onmousedown' id=p4_4900PC0216_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:18;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p9_4900FFI3104
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 94px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 179px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:0;lineColorBlink:False;Width:0;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RatioTrack.sha" parameters =
+"Point?Entity:4900FFI3104;Parameter?CP_SP:RATIOBIASA.RT;Parameter?CP_PV:RATIO_TRACKING.PV;Parameter?CP_Mode:RATIOBIASA.MODE;Parameter?CP_RFormat:RATIO_TRACKING.PVFORMAT;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p9_4900FFI3104_grpRatioTrack
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p9_4900FFI3104_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:69;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p9_4900FFI3104_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:70;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p9_4900FFI3104_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:71;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPRATIOTRACK_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class=hvg.textbox.1 id=p9_4900FFI3104_txtRT
+style="FONT-WEIGHT: normal; FONT-SIZE: 9pt; LEFT: 3.26%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 44.56%; COLOR: #bebebe; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.02%; HEIGHT: 15.78%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:24;lineColorBlink:False;LineStyle:0;textColor:#bebebe;textColorBlink:False;TotalRotation:0;Width:41;">RT</DIV>
+<DIV class=hvg.textbox.1 id=p9_4900FFI3104_txtRV
+style="FONT-WEIGHT: normal; FONT-SIZE: 9pt; LEFT: 3.26%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 44.56%; COLOR: #bebebe; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 37.5%; HEIGHT: 15.78%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:24;lineColorBlink:False;LineStyle:0;textColor:#bebebe;textColorBlink:False;TotalRotation:0;Width:41;">RV</DIV>
+<DIV class=hvg.textbox.1 id=p9_4900FFI3104_txtRM
+style="FONT-WEIGHT: normal; FONT-SIZE: 9pt; LEFT: 4.34%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 44.56%; COLOR: #bebebe; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 15.78%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:24;lineColorBlink:False;LineStyle:0;textColor:#bebebe;textColorBlink:False;TotalRotation:0;Width:41;">RM</DIV>
+<DIV class=hvg.base.1 id=p9_4900FFI3104_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 21.73%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9_4900FFI3104_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9_4900FFI3104_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p9_4900FFI3104_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:72;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPRATIOTRACK_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9_4900FFI3104_rec_DataScript").onmousedown'
+id=p9_4900FFI3104_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 26.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9_4900FFI3104_rec_DataScript").onmousedown'
+id=p9_4900FFI3104_cmb_ModeValue title=Combobox
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 26.08%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:73;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9_4900FFI3104_rec_DataScript").onmousedown'
+id=p9_4900FFI3104_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 26.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p9_4900FFI3104_rec_DataScript").onmousedown' id=p9_4900FFI3104_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" onclick='VBScript:msgbox("I am clicked")' tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:74;lineColor:transparent;lineColorBlink:False;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9_4900FFI3104_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 25%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">.99</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p9_4900FFI3104_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p9_4900FFI3104_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p9_4900FFI3104_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p9_4900FFI3104_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 14.13%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p9_4900FFI3104_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 14.13%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p9_4900FFI3104_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 15.21%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV></DIV></DIV>
+<DIV class=hsc.shape.1 id=p9a_4900FC3104
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 185px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 179px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_RegCtl.sha" parameters =
+"Point?Entity:4900FC3104;Parameter?CP_SP:PIDA.SP;Parameter?CP_PV:PIDA.PV;Parameter?CP_OP:PIDA.OP;Parameter?CP_Mode:PIDA.MODE;Parameter?CP_BadPV:PIDA.PVSTSFL.BAD;Parameter?CP_OffNormal:DACA.PVSOURCE;Parameter?CP_ModAttr:PIDA.MODEATTR;Parameter?CP_Ramp:PIDA.SPTVSTATE;Parameter?CP_RedTag:PIDA.REDTAG;Parameter?CP_Windup:PIDA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p9a_4900FC3104_grpRegCtl
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p9a_4900FC3104_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 9.21%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:50;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p9a_4900FC3104_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:51;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p9a_4900FC3104_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:52;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9a_4900FC3104_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9a_4900FC3104_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p9a_4900FC3104_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 28.94%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p9a_4900FC3104_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p9a_4900FC3104_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 8.69%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 30.26%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p9a_4900FC3104_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p9a_4900FC3104_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 9.78%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p9a_4900FC3104_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 10.86%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 29.6%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class=hvg.base.1 id=p9a_4900FC3104_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 17.39%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 67.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.18%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:16;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:62;"></DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9a_4900FC3104_txt_AnalogValue
+style="FONT-SIZE: 9pt; LEFT: 20.65%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 36.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay"
+id=p9a_4900FC3104_txt_statusmessage
+style="FONT-SIZE: 8pt; LEFT: 21.73%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 73.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:58;">RedTag</DIV>
+<DIV class="hvg.textbox.1 Group_StatusDisplay" id=p9a_4900FC3104_txt_ramp
+style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #ffffff; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 23.68%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;FillStyle:0;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;styleClass:Group_StatusDisplay;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:9;">R</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p9a_4900FC3104_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p9a_4900FC3104_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p9a_4900FC3104_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 86.95%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p9a_4900FC3104_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:53;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPREGULATORYCONTROL_ONUPDATE(me.parentElement.parentElement, 0)"></DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9a_4900FC3104_rec_DataScript").onmousedown'
+id=p9a_4900FC3104_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9a_4900FC3104_rec_DataScript").onmousedown'
+id=p9a_4900FC3104_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 21.73%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:54;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">Combobox</SPAN>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9a_4900FC3104_rec_DataScript").onmousedown'
+id=p9a_4900FC3104_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.68%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9a_4900FC3104_rec_DataScript").onmousedown'
+id=p9a_4900FC3104_txt_SPValue
+style="FONT-SIZE: 9pt; LEFT: 21.73%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 22.36%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p9a_4900FC3104_rec_DataScript").onmousedown' id=p9a_4900FC3104_alp_SPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:55;lineColor:transparent;numericDisplayFormat:%.2f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;">9999.99</TEXTAREA><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p9a_4900FC3104_rec_DataScript").onmousedown' id=p9a_4900FC3104_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:56;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA></DIV></DIV>
+<DIV class=hsc.shape.1 id=p9b_4900TY3301
+style="FONT-WEIGHT: 400; FONT-SIZE: 0px; LEFT: 277px; BEHAVIOR: url(#HSCShapeLinkBehavior) url(#HDXVectorFactory#shapelink); WIDTH: 92px; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 179px; HEIGHT: 152px; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;"
+value = "1" src = ".\L4_LSG_FURN_1_files\C200_MF_Automan.sha" parameters =
+"Point?Entity:4900TY3301;Parameter?CP_OP:AUTOMANA.OP;Parameter?CP_Mode:AUTOMANA.MODE;Parameter?CP_ModAttr:AUTOMANA.MODEATTR;Parameter?CP_RedTag:AUTOMANA.REDTAG;Parameter?CP_Windup:AUTOMANA.ARWOP;"
+linkType = "embedded" globalscripts = "" styleClass = "">
+<DIV class=hvg.group.1 id=p9b_4900TY3301_grp_C200MFAutoman
+style="FONT-SIZE: 0pt; LEFT: 0%; BEHAVIOR: url(#HDXVectorFactory#group); WIDTH: 100%; POSITION: absolute; TOP: 0%; HEIGHT: 100%"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;Height:152;lineColorBlink:False;Width:92;">
+<DIV class=hsc.alarmstate.1 id=p9b_4900TY3301_alarmstate title=""
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 65.21%; VISIBILITY: hidden; BEHAVIOR: url(#AlarmStateIconFactory#AlarmIcon) url(#BindingBehavior); WIDTH: 19.56%; FONT-STYLE: normal; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; POSITION: absolute; TOP: 40.78%; HEIGHT: 11.84%; TEXT-ALIGN: center; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="acknowledged:True;HDXBINDINGID:8;priority:3;quality:0;rtn:False;showDisableIcon:False;showTooltip:False;sizeableIcon:True;staticIcon:False;"
+ObjectType="6"></DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1 FrameMF" id=p9b_4900TY3301_frame
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 0%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 98.91%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:9;Height:150;LineColor:rgb(225,225,225);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:FrameMF;Width:91;"></DIV>
+<DIV class="hvg.base.1 FocusC200 HSC.ScriptDataObject.1" id=p9b_4900TY3301_focus
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 95.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 97.36%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,230,210);fillColorBlink:False;FillStyle:0;HDXBINDINGID:10;Height:148;LineColor:rgb(0,0,0);lineColorBlink:False;LineStyle:1;LineWidth:2;styleClass:FocusC200;Width:88;"
+onupdate="VBScript:call GSH_C200_GROUPAUTOMAN_ONUPDATE(me.parentElement.parentElement, 1)"></DIV>
+<DIV class=hvg.base.1 id=p9b_4900TY3301_outline
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 15.21%; BEHAVIOR: url(#HDXVectorFactory#roundrect); OVERFLOW: hidden; WIDTH: 70.65%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 48.02%; HEIGHT: 11.84%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:18;LineColor:#b4b4b4;lineColorBlink:False;LineWidth:1;Roundness:80;Width:65;"></DIV>
+<DIV class="hvg.base.1 AlarmEmergColor" id=p9b_4900TY3301_plg_EAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 3.26%; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 17.39%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 40.78%; HEIGHT: 10.52%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,0,0);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,0,0);lineColorBlink:False;LineStyle:1;points:0.000000 50.000000 50.000000 100.000000 50.000000 100.000000 100.000000 50.000000 100.000000 50.000000 50.000000 0.000000 ;styleClass:AlarmEmergColor;Width:16;"></DIV>
+<DIV class="hvg.textbox.1 AlarmEmergText" id=p9b_4900TY3301_txt_EAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TOP: 41.44%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(255,190,0);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmEmergText;textColor:rgb(255,255,255);textColorBlink:False;TotalRotation:0;Width:12;">U</DIV>
+<DIV class="hvg.base.1 AlarmHighColor" id=p9b_4900TY3301_rec_HAlarm
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 5.43%; BEHAVIOR: url(#HDXVectorFactory#rect); OVERFLOW: hidden; WIDTH: 13.04%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 42.1%; HEIGHT: 7.89%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255,160,0);fillColorBlink:False;Height:12;LineColor:rgb(255,160,0);lineColorBlink:False;LineStyle:1;styleClass:AlarmHighColor;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmHighText" id=p9b_4900TY3301_txt_HAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 7.6%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 11.95%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 41.44%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="fillColorBlink:False;FillStyle:1;Height:12;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmHighText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:11;">H</DIV>
+<DIV class="hvg.base.1 AlarmLowColor" id=p9b_4900TY3301_ovl_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 5.43%; BEHAVIOR: url(#HDXVectorFactory#oval); OVERFLOW: hidden; WIDTH: 13.04%; FONT-FAMILY: Arial; POSITION: absolute; TOP: 42.1%; HEIGHT: 7.89%"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:0;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:1;LineWidth:1;styleClass:AlarmLowColor;textColor:rgb(0,0,0);textColorBlink:False;Width:12;"></DIV>
+<DIV class="hvg.textbox.1 AlarmLowText" id=p9b_4900TY3301_txt_LAlarm
+style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; LEFT: 6.52%; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 13.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 41.44%; HEIGHT: 7.89%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(51,170,255);fillColorBlink:False;FillStyle:1;Height:12;LineColor:rgb(51,170,255);lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:AlarmLowText;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:12;">L</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9b_4900TY3301_txt_tagname
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 1.97%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">TagName</DIV>
+<DIV class="hvg.textbox.1 Group_DataDisplay" id=p9b_4900TY3301_txt_keyword
+style="FONT-SIZE: 9pt; LEFT: 1.08%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 97.82%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 11.84%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(235,235,235);fillColorBlink:False;FillStyle:1;Height:16;LineColor:rgb(235,235,235);lineColorBlink:False;LineStyle:0;LineWidth:1;styleClass:Group_DataDisplay;textColor:rgb(0,0,0);textColorBlink:False;TotalRotation:0;Width:90;">Keyword</DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p9b_4900TY3301_plg_OpLow
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 0 50 100 0 0 100 0 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.base.1 OffNormalLineFill" id=p9b_4900TY3301_plg_OpHigh
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 85.86%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#polygon); OVERFLOW: hidden; WIDTH: 10.86%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 50.65%; HEIGHT: 6.57%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:rgb(176,0,176);fillColorBlink:False;Height:10;LineColor:rgb(176,0,176);lineColorBlink:False;points:100 100 50 0 0 100 100 100 ;styleClass:OffNormalLineFill;Width:10;"></DIV>
+<DIV class="hvg.textbox.1 OffNormalText" id=p9b_4900TY3301_txt_Initialization
+style="FONT-WEIGHT: bold; FONT-SIZE: 16pt; LEFT: 84.78%; VISIBILITY: hidden; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 9.78%; COLOR: #b000b0; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.84%; HEIGHT: 9.21%; TEXT-ALIGN: left"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;Height:14;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:0;styleClass:OffNormalText;textColor:rgb(176,0,176);textColorBlink:False;TotalRotation:0;Width:9;">*</DIV>
+<DIV class="hvg.base.1 HSC.ScriptDataObject.1" id=p9b_4900TY3301_rec_DataScript
+style="FONT-WEIGHT: 400; FONT-SIZE: 12pt; LEFT: 1.08%; BEHAVIOR: url(#HDXVectorFactory#rect) url(#HSCScriptDataBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 97.82%; FONT-STYLE: normal; FONT-FAMILY: Arial; POSITION: absolute; TOP: 0.65%; HEIGHT: 98.68%; TEXT-DECORATION: none"
+tabIndex=-1
+hdxproperties="FillColor:transparent;fillColorBlink:False;FillStyle:1;HDXBINDINGID:11;Height:150;LineColor:transparent;lineColorBlink:False;LineStyle:0;LineWidth:2;Width:90;"
+onupdate="VBScript:call GSH_C200_GROUPAUTOMAN_ONUPDATE(me.parentElement.parentElement, 0)"></DIV><TEXTAREA class="hsc.alpha.1 Group_DataEntry" onmousedown='VBScript:me.parentElement.parentElement.objects("p9b_4900TY3301_rec_DataScript").onmousedown' id=p9b_4900TY3301_alp_OPValue style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; LEFT: 6.52%; VISIBILITY: hidden; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HDXAlphaBehavior) url(#BindingBehavior) url(#HoverBehavior); OVERFLOW: hidden; WIDTH: 86.95%; COLOR: rgb(0,0,0); BORDER-TOP-STYLE: none; PADDING-TOP: 1px; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 84.86%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; WORD-WRAP: normal; BORDER-BOTTOM-STYLE: none; ROWS: 1" tabIndex=0 hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);HDXBINDINGID:12;indicateScanState:0;lineColor:transparent;numberOfChars:9;numericDisplayFormat:%.1f;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);">9999.99</TEXTAREA>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9b_4900TY3301_rec_DataScript").onmousedown'
+id=p9b_4900TY3301_txt_OPValue
+style="FONT-SIZE: 9pt; LEFT: 19.56%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 49.34%; HEIGHT: 9.86%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:15;lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">9999.99</DIV>
+<DIV class="hvg.textbox.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9b_4900TY3301_rec_DataScript").onmousedown'
+id=p9b_4900TY3301_txt_ModeValue
+style="FONT-SIZE: 9pt; LEFT: 19.56%; VISIBILITY: visible; BEHAVIOR: url(#HDXVectorFactory#text); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: #000000; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; TEXT-ALIGN: center"
+tabIndex=-1
+hdxproperties="FillColor:rgb(255, 255, 255);fillColorBlink:False;FillStyle:0;Height:16;LineColor:rgb(255,255,255);lineColorBlink:False;LineStyle:0;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;TotalRotation:0;Width:58;">Mode</DIV><SPAN
+class="hsc.combo.1 Group_DataEntry"
+onmousedown='VBScript:me.parentElement.parentElement.objects("p9b_4900TY3301_rec_DataScript").onmousedown'
+id=p9b_4900TY3301_cmb_ModeValue
+style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; FONT-SIZE: 9pt; BORDER-LEFT-COLOR: transparent; LEFT: 19.56%; VISIBILITY: hidden; BORDER-BOTTOM-COLOR: transparent; PADDING-BOTTOM: 1px; BEHAVIOR: url(#HSCComboboxBehavior) url(#BindingBehavior); OVERFLOW: hidden; WIDTH: 63.04%; COLOR: rgb(0,0,0); BORDER-TOP-COLOR: transparent; TEXT-INDENT: 2px; PADDING-TOP: 1px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 61.18%; HEIGHT: 10.52%; BACKGROUND-COLOR: rgb(255,255,255); TEXT-ALIGN: center; BORDER-RIGHT-COLOR: transparent"
+tabIndex=0
+hdxproperties="borderStyle:none;borderWidth:1;fillColor:rgb(255, 255, 255);fillColorBlink:False;HDXBINDINGID:13;lineColor:transparent;lineColorBlink:False;styleClass:Group_DataEntry;textColor:rgb(0, 0, 0);textColorBlink:False;"></SPAN></DIV></DIV></DIV></BODY></HTML>