Up | CentralPluginPage | CustomPage | DataInput | ImageView | Indicatorpanel | Resultpanel | Release Notes

  

Indicatorpanel

The Indicator panel module provides access to the Scorpion Indicator panel.


The IndicatorpanelMatrix class

The IndicatorPanelMatrix class gives full access to the indicator panels in Scorpion.

Use the function

  • GetIndicatorPanelMatrix()

to retrieve an instance of the class.

Attributes of the Indicator PanelMatrix class

Attribute Access Type Description
name R string the internal name of the panel
visible R/W 0/1 the visibility of the IndicatorPanelMatrix
caption R/W string the panel caption
showCaption R/W 0/1 visibility of the caption
height R/W int height of panel
rows R/W int no of rows in matrix
columns R/W int no of columns in matrix
manualUpdate R/W 0/1 toggles default update on/off after inspection for all panels

Note: the manualUpdate attribute is set to 1 to manually update indicatorpanels

Methods of the IndicatorPanelMatrix class

Method Returns Description
getIndicatorPanel(row,col) Indicatorpanel returns a Indicatorpanel object given by zero indexed row and column


The Indicatorpanel class

The Indicatorpanel class is the individual panel in the IndicatorPanelMatrix. This class is derived from the panel class and has some additional properties. 

Attributes of the Indicatorpanel class

Attribute Access Type Description
stateParam R/W string the parameter name in the tagdatabase used to set the state of the panel after inspection. This property may be left blank and the state property accessed directly in order to set the indicator panel in wanted state 
valueParam R/W string the parameter name in the tagdatabase used to set the value of the panel after inspection. This property may be left blank and only the panel caption will be shown
valueCaption R/W string caption of value field
valueUnit R/W string unit of value field
undefColor R/W string the color when the panel is in an undefined state
okColor R/W string the color when the panel is in an ok/true state
failColor R/W string the color when the panel is in an fail/false state
state R/W int the current state, 0=undefined, 1=OK, 2=fail
value R/W string additional text below the panel caption, normally set by default by the valueParameter. If blank this field is not shown
manualUpdate R/W 0/1 toggles default update on/off after inspection for individual panel


Example 1: Modify indicator panel

ipm=GetIndicatorPanelMatrix()
ipm.caption='DEMO FROM PYTHON'
ipm.showCaption=1
ipm.rows=2
ipm.columns=4
ipm.manualUpdate=1 # automatic update is turned off
for r in range(ipm.rows):
    for c in range(ipm.columns):
        p=ipm.getIndicatorPanel(r,c)
        p.caption='IP['+str(r+1)+','+str(c+1)+']'
        if p.state<2:
            p.state=p.state+1
        else:
            p.state=0
        f=p.font
        f.name='New Courier'
        f.color='blue'
        f.size=12
        f.bold=1
        f.italic=1

Hint: To access CustomPanel1 and 2 together with resultpanel see GetPanel.

 

Scorpion Vision Software Version: 9.2.0.515 - Date: 20120502
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2012 Tordivel AS.