Author Topic: AdvancedHMIControls.SubscriptionHandler not updating on .NET Core 3.1  (Read 890 times)

abren01

  • Newbie
  • *
  • Posts: 1
    • View Profile
Due to Microsoft moving away from .NET Framework, I've been working on migrating some apps over to .NET Core.  I have one app in particular that is problematic.  If I subscribe to one tag with the SubscriptionHandler, everything works fine.  If I add a second tag, I will receive one initial tag value update, then tag values never update again.  I duplicated this issue in the most simple program I could build:

Code: [Select]
Public Class Form1
    Private objPLC As New AdvancedHMIDrivers.EthernetIPforMicro800Com With {.CIPConnectionSize = 508, .DisableMultiServiceRequest = False, .DisableSubscriptions = False, .IPAddress = "10.0.1.2", .PollRateOverride = 500, .Port = 44818, .Timeout = 4000}
    Private objPLCSubscriber As New AdvancedHMIControls.SubscriptionHandler With {.ComComponent = objPLC}

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        objPLCSubscriber.SubscribeTo("HMI_FLOAT_STATUS", 1, AddressOf PLCFloatUpdate)
        objPLCSubscriber.SubscribeTo("HMI_PUMP_STATUS", 1, AddressOf PLCPumpUpdate)
    End Sub

    Private Sub PLCFloatUpdate(ByVal sender As Object, ByVal e As AdvancedHMIControls.SubscriptionHandlerEventArgs)
        TextBox1.Text = e.PLCComEventArgs.Values(0)
    End Sub

    Private Sub PLCPumpUpdate(ByVal sender As Object, ByVal e As AdvancedHMIControls.SubscriptionHandlerEventArgs)
        TextBox2.Text = e.PLCComEventArgs.Values(0)
    End Sub
End Class

Again, if I comment out this line, it works and I receive constant updates for HMI_FLOAT_STATUS:

Code: [Select]
'objPLCSubscriber.SubscribeTo("HMI_PUMP_STATUS", 1, AddressOf PLCPumpUpdate)

If I reenable that line, I get one update event for each tag then no further data.  This is true for commenting out/reenabling either tag.

Has anyone seen this problem before or have a suggested workaround?

EDIT: I tried a .NET 6 migration instead of .NET Core and still have the same problem.
« Last Edit: September 08, 2022, 11:03:30 AM by abren01 »