unCPC6
WinCC-OA implementation of UNICOS CPC
 All Files Functions Variables Pages
cpcFaceplate.ctl File Reference

This library contains generic functions for faceplate animation. More...

Functions

void cpcFaceplate_animateTextParameter (dyn_string dpes, dyn_string values, string paramName, string value)
 
void cpcFaceplate_animateTranslatedValue (dyn_string dpes, dyn_string values, string dpeName, mapping dict, string color)
 
void cpcFaceplate_animateInterlock (dyn_string dpes, dyn_string values, string bitName, string interlockName, string unAckBitName="UN_STSREG01_ALUNACK")
 
void cpcFaceplate_animateOnlineValue (dyn_string dpes, dyn_string values, string dpeName, string dpeUnit, string dpeFormat, string color)
 
void cpcFaceplate_animateAnalogValue (dyn_string dpes, dyn_string values, string dpeName, string refPrefix, string color)
 
void cpcFaceplate_animateStsRegBit (dyn_string dpes, dyn_string values, string bitName, bool enabled, string color)
 
void cpcFaceplate_animateStsRegNotBit (dyn_string dpes, dyn_string values, string bitName, bool enabled, string color)
 
void cpcFaceplate_animateRange (dyn_string dpes, dyn_string values, string dpeName, int rangeType, string dpeUnit, string dpeFormat)
 
void cpcFaceplate_animateNeedRestart (dyn_string dpes, dyn_string values)
 
void cpcFaceplate_animateMaskEvent (dyn_string dpes, dyn_string values)
 
void cpcFaceplate_fetchStsRegBitAndValidness (dyn_string dpes, dyn_string values, string bitName, bool &value, bool &invalid)
 
void cpcFaceplate_fetchAnimationCBOnlineValue (dyn_string dpes, dyn_string values, string dpeName, anytype &value, bool &invalid)
 
anytype cpcFaceplate_fetchAnimationCBValue (dyn_string dpes, dyn_string values, string dpeName)
 
bool cpcFaceplate_connectionValid (dyn_string values)
 

Detailed Description

This library contains generic functions for faceplate animation.

First two parameters are dpes and values, which should be transfered straight from callback. First two places in dpes/values are reserved for frontend statuses.

All animation functions check system validness before animation which reflects on color. Also they are capable to animate disconnection.

Functions are supposed to have corresponding field(s) in the faceplate named in a special way. Function description contains an information about required fields. Naming convention for graphical objects:

  • for analog values object should have the same name as dpe ("PosSt" for ".ProcessInput.PosSt" dpe);
  • for bit values object should have a bit's name in capital that responds to bit's position constant (e.g. "IOERRORW").

For bit animation bit position constant should be used (e.g. "UN_STSREG01_IOERRORW"). This constant contains 3 parts joined with underscore:

  • first part is reflect package prefix and does not participate in animation;
  • second part contains an information about StsReg where a bit is located;
  • third part is bit name ($BIT_NAME$ in other examples).
See Also
cpcGenericAnimation.ctl
Author
Alexey Merezhin (EN-ICE-SIC)
Creation Date
03.10.2011
Modification History
10/10/2012: Alexey
    refactor function names and update documentation

08/02/2012: Alexey
    [UCPC-656] fixed collision in cpcFaceplate_fetchAnimationCBOnlineValue (use dot in the beginning of dpe pattern)

20/01/2012: Alexey
    cpcFaceplate_animateTextParameter, cpcFaceplate_animateTranslatedValue and cpcFaceplate_animateInterlock
    extracted cpcFaceplate_fetchStsRegBitAndValidness from cpcFaceplate_animateStsRegBit

Function Documentation

void cpcFaceplate_animateTextParameter ( dyn_string  dpes,
dyn_string  values,
string  paramName,
string  value 
)

Animate text parameter.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$paramName$' name.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
paramNamename of parameter to animate
valuevalue of parameter to animate

Referenced by CPC_MassFlowController_FaceplateStatusAnimationCB().

void cpcFaceplate_animateTranslatedValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
mapping  dict,
string  color 
)

Fetch value of dpe and animate a translation from dict.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$dpeName$' name.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
dpeNamename of dpe to animate
dictmapping with translated values
colorfield color on valid state

References cpcFaceplate_fetchAnimationCBOnlineValue(), and cpcGenericObject_animateTranslatedValue().

Referenced by CPC_MassFlowController_FaceplateStatusAnimationCB().

void cpcFaceplate_animateInterlock ( dyn_string  dpes,
dyn_string  values,
string  bitName,
string  interlockName,
string  unAckBitName = "UN_STSREG01_ALUNACK" 
)

Animate interlock.

Faceplate should contain unFaceplate_ColoredSquare.pnl graphical object with the '$interlockName$' name ('FuStopISt' for example).

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
bitNameinterlock bit constant in StsReg (e.g. UN_STSREG01_STARTAL); see detailed description for more info
interlockNameinterlock DPE name
unAckBitNameAlUnAck (alarm un-acknowledge) bit constant as string

References cpcFaceplate_fetchAnimationCBValue(), cpcFaceplate_fetchStsRegBitAndValidness(), and cpcGenericObject_ColorBoxAnimateInterlock().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), CPC_OnOff_FaceplateStatusAnimationCB(), and CPC_ProcessControlObject_FaceplateStatusAnimationCB().

void cpcFaceplate_animateOnlineValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
string  dpeUnit,
string  dpeFormat,
string  color 
)

Animate analog value.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$dpeName$' name ("PosSt" for example).

Todo:
: should be replaced with cpcFaceplate_animateAnalogValue
Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
dpeNamename of dpe to animate
dpeUnitdpe unit
dpeFormatdpe format
colorfield color on valid state

References cpcFaceplate_fetchAnimationCBOnlineValue().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogParameter_FaceplateStatusAnimationCB(), CPC_Controller_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and CPC_WordParameter_FaceplateStatusAnimationCB().

void cpcFaceplate_animateAnalogValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
string  refPrefix,
string  color 
)

Animate analog value.

Faceplate should contain unFaceplate_DisplayColor.pnl or unFaceplate_DisplayNormal.pnl graphical object with the '$dpeName$' name ("PosSt" for example).

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
dpeNamename of dpe to animate
refPrefixprefix for unit and format in g_params
colorfield color on valid state

References cpcFaceplate_fetchAnimationCBOnlineValue().

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB().

void cpcFaceplate_animateStsRegBit ( dyn_string  dpes,
dyn_string  values,
string  bitName,
bool  enabled,
string  color 
)

Animate StsReg bit.

Function accept bit's constant name (e.g. "UN_STSREG01_IOERRORW") as bitName. Constant's value should correspond to bit position in StsReg dpe. Faceplate should contain unFaceplate_Colorbox.pnl graphical object named '$BIT_NAME$' ("IOERRORW" in given example).

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
bitNameconstant as a string; see detailed description for more info
enabledif it's enabled
colorfield color on valid state

References cpcFaceplate_fetchStsRegBitAndValidness().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogParameter_FaceplateStatusAnimationCB(), CPC_Controller_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_DigitalParameter_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), CPC_OnOff_FaceplateStatusAnimationCB(), CPC_ProcessControlObject_FaceplateStatusAnimationCB(), and CPC_WordParameter_FaceplateStatusAnimationCB().

void cpcFaceplate_animateStsRegNotBit ( dyn_string  dpes,
dyn_string  values,
string  bitName,
bool  enabled,
string  color 
)

Animate reverse StsReg bit.

Opposite animation (TRUE->FALSE) of cpcFaceplate_animateStsRegBit. As bitName should be used normal bit constant. Faceplate should contain unFaceplate_Colorbox.pnl graphical object named 'NOT_$BIT_NAME$' ("NOT_IOERRORW" in given example).

Constraints
None
Usage
Public
PVSS managers
UI
See Also
cpcFaceplate_animateStsRegBit
Parameters
dpesconnected dpe names
valuesconnected dpe values
bitNameconstant as a string
enabledif it's enabled
colorfield color on valid state

References cpcFaceplate_fetchStsRegBitAndValidness().

Referenced by CPC_DigitalInput_FaceplateStatusAnimationCB(), and CPC_OnOff_FaceplateStatusAnimationCB().

void cpcFaceplate_animateRange ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
int  rangeType,
string  dpeUnit,
string  dpeFormat 
)

Animate dpe's range.

For given dpe function fetch range properties from dpes/values and animate them accordingly. Faceplate should contain two unFaceplate_DisplayNormal.pnl graphical objects with the '$DPE_NAME$RangeMax' and '$DPE_NAME$RangeMin' names ("PosStRangeMax" and "PosStRangeMax" for "PosSt" dpe).

Constraints
None
Usage
Public
PVSS managers
UI
See Also
cpcFaceplate_animateStsRegBit
Parameters
dpesconnected dpe names
valuesconnected dpe values
dpeNamename of dpe with range configured to animate
rangeTyperange type, should be statically initialized
dpeUnitdpe unit
dpeFormatdpe format

References cpcFaceplate_fetchAnimationCBValue().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_AnalogParameter_FaceplateStatusAnimationCB(), and CPC_WordParameter_FaceplateStatusAnimationCB().

void cpcFaceplate_animateNeedRestart ( dyn_string  dpes,
dyn_string  values 
)

Animate 'allow restart needed' bit.

Faceplate should contain unFaceplate_Colorbox.pnl graphical object named "NEEDRESTART".

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values

References cpcFaceplate_fetchStsRegBitAndValidness(), and cpcGenericObject_ColorBoxAnimate().

Referenced by CPC_AnaDig_FaceplateStatusAnimationCB(), CPC_AnaDO_FaceplateStatusAnimationCB(), CPC_Analog_FaceplateStatusAnimationCB(), CPC_OnOff_FaceplateStatusAnimationCB(), and CPC_ProcessControlObject_FaceplateStatusAnimationCB().

void cpcFaceplate_fetchStsRegBitAndValidness ( dyn_string  dpes,
dyn_string  values,
string  bitName,
bool &  value,
bool &  invalid 
)

Fetch value and validness of given bit.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
bitNameconstant as a string
valueoutput
invalidoutput

References cpcConfigGenericFunctions_getConstantByName(), cpcFaceplate_fetchAnimationCBOnlineValue(), and cpcGenericObject_getBit().

Referenced by CPC_MassFlowController_FaceplateStatusAnimationCB(), cpcFaceplate_animateInterlock(), cpcFaceplate_animateNeedRestart(), cpcFaceplate_animateStsRegBit(), and cpcFaceplate_animateStsRegNotBit().

void cpcFaceplate_fetchAnimationCBOnlineValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName,
anytype &  value,
bool &  invalid 
)

Fetch value and validness of given dpe. Returns as fast as both value and invalid are found.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
dpeNamename of dpe
valueoutput
invalidoutput

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_ProcessControlObject_animateOptionMode(), cpcFaceplate_animateAnalogValue(), cpcFaceplate_animateMaskEvent(), cpcFaceplate_animateOnlineValue(), cpcFaceplate_animateTranslatedValue(), and cpcFaceplate_fetchStsRegBitAndValidness().

anytype cpcFaceplate_fetchAnimationCBValue ( dyn_string  dpes,
dyn_string  values,
string  dpeName 
)

Fetch value of given dpe.

Constraints
None
Usage
Public
PVSS managers
UI
Parameters
dpesconnected dpe names
valuesconnected dpe values
dpeNamename of dpe
Returns
dpe value or CPC_FACEPLATE_MISSED_VALUE if dpe's not found in dpes/values

References CPC_FACEPLATE_MISSED_VALUE.

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_AnalogInput_FaceplateStatusAnimationCB(), CPC_Controller_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_FaceplateStatusAnimationCB(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_DigitalParameter_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), cpcFaceplate_animateInterlock(), and cpcFaceplate_animateRange().

bool cpcFaceplate_connectionValid ( dyn_string  values)

Return front-end validness.

Constraints
None
Usage
Public
PVSS managers
UI
Todo:
rename me to cpcFaceplate_frontEndValid
Returns
is front-end valid

Referenced by CPC_AnalogAlarm_FaceplateStatusAnimationCB(), CPC_DigitalAlarm_WidgetAnimation(), CPC_DigitalInput_FaceplateStatusAnimationCB(), CPC_Local_FaceplateStatusAnimationCB(), CPC_MassFlowController_FaceplateStatusAnimationCB(), and cpcFaceplate_animateMaskEvent().