Author Topic: DigitalPanelMeterBlue.SuppressErrorDisplay not found  (Read 1246 times)

ianfinlay_aus

  • Newbie
  • *
  • Posts: 21
  • www.earthed.net.au
    • View Profile
    • Earthed Solutions Pty Ltd [Custom Software for Engineering]
DigitalPanelMeterBlue.SuppressErrorDisplay not found
« on: September 22, 2015, 12:48:59 AM »
Hi Archie,

I am using basiclabels to gather all live plc tag values at various poll rates for the modbusRTU driver
These basic labels are visible at all times (so always forces a poll for data)   

I am doing some custom chart and data logging using the basiclabel.value's as my data source

I also do some more fancy display with the same tag data, but as I didnt want to add an extra burden on the modbus rtu driver.
I have attached all the fancy display readouts (digitalpanelmeterblue) to use a modbusRTU_DISABLED driver instance that has its disable subscriptions = true, and the address range for tags is outside the physical address range used in the actual device. (I tried to use the simulation device but couldn't get it working, so this was the next best thing, I will revist later, but I only tried numeric addresses not alphabetic addresses)

In code I then manually refresh the digitalpanelmeterblue.value's to update the screen

This works fine, except every now and then I get the digitalpanelmeterblue.text showing as offline, but I have no ability to suppress this, as there is no DigitalPanelMeterBlue.SuppressErrorDisplay property

I am using a device called ModbusRTUCom_DISABLED, which has DisableSubscriptions = True , so shoulnt I would expect generate an offline condition at all.
To suppress this, copied code from the momentartyButon.vb to add the SuppressErrorDisplay feature - code below:

I have added the following to displaypanelmeterblue.vb
Code: [Select]

    Private m_SuppressErrorDisplay As Boolean
    <System.ComponentModel.DefaultValue(False)> _
    Public Property SuppressErrorDisplay As Boolean
        Get
            Return m_SuppressErrorDisplay
        End Get
        Set(value As Boolean)
            m_SuppressErrorDisplay = value
        End Set
    End Property

and modified DisplayError() as follows:

Code: [Select]
  Private Sub DisplayError(ByVal ErrorMessage As String)
      [color=red]  If Not m_SuppressErrorDisplay Then[/color]


            If ErrorDisplayTime Is Nothing Then
                ErrorDisplayTime = New System.Windows.Forms.Timer
                AddHandler ErrorDisplayTime.Tick, AddressOf ErrorDisplay_Tick
                ErrorDisplayTime.Interval = 6000
            End If

            '* Save the text to return to
            If Not ErrorDisplayTime.Enabled Then
                OriginalText = Me.Text
            End If

            ErrorDisplayTime.Enabled = True

            Text = ErrorMessage
    [color=red]    End If[/color]
    End Sub
Former Citect SCADA Developer, and integrator
now specialist in bespoke\custom engineering software for scientific and automation sectors