Author Topic: DataSubscriber error  (Read 4077 times)

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
DataSubscriber error
« on: August 20, 2013, 04:40:03 PM »
When I add the DataSubscriber to a form with a valid tag and then run the app I get the error I attached in the picture. It appears that it cannot subscribe to the tag for some reason. Not sure what the problem is.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: DataSubscriber error
« Reply #1 on: August 20, 2013, 04:51:28 PM »
This is a problem I still have to work out. It tries to send the value back to the form before the handle is created. It is only a problem on some computers. So far I have not been able to replicate it on my PC which has been making it difficult to fix.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: DataSubscriber error
« Reply #2 on: August 20, 2013, 05:33:02 PM »
I am running it on an Intel I7-2600, running Windows 7, 64 bit.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: DataSubscriber error
« Reply #3 on: August 20, 2013, 06:46:26 PM »
I've been testing everything on an Intel i7-2720QM, Win7 64 bit, so I'm not sure if it speed related, software, or even possibly Visual Studio since I am still developing on VS2010 with .NET framework 4.5

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: DataSubscriber error
« Reply #4 on: August 26, 2013, 07:50:57 PM »
I have tested this on two different computers with the same error. Have you made any progress on what is causing this error?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: DataSubscriber error
« Reply #5 on: August 26, 2013, 08:54:59 PM »
I tried a few different things with it. I'll be posting version 3.58 tonight with the changes I made.

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: DataSubscriber error
« Reply #6 on: August 27, 2013, 12:41:03 AM »
I tried version 3.58 with the same results. Anything I can check on my system?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: DataSubscriber error
« Reply #7 on: August 27, 2013, 05:29:42 AM »
Try to comment out this one line of code:

Code: [Select]
    Protected Overridable Sub OnSuccessfulSubscription(ByVal e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
        RaiseEvent SuccessfulSubscription(Me, e)
    End Sub

BLFTech

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • BLF-Tech LLC Website
Re: DataSubscriber error
« Reply #8 on: August 27, 2013, 01:41:21 PM »
I tried commenting out the code and the same error message appears. I can continue on and it will work. It appears that the subscription is happening prior to the form being created.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: DataSubscriber error
« Reply #9 on: August 27, 2013, 03:30:18 PM »
I think I found the problem. When the IPAddress is set, it tries to subscribe, which in turn makes it try to read from the PLC before the MainForm is initialized. I implemented ISupportInitialize to avoid subscribing until the fill application is initialized. I will send you an update later this evening to try out.