Author Topic: v3.99x DataSubscriber2 bug? Windows 7 64bit vs2017  (Read 965 times)

lnw32

  • Newbie
  • *
  • Posts: 7
    • View Profile
v3.99x DataSubscriber2 bug? Windows 7 64bit vs2017
« on: August 18, 2017, 11:24:02 AM »

I setup a simple HMI to experiment with the DataSubscriber2 and I think I might have found a bug.

I downloaded the latest version v3.99x and added a rich text box an EthernetIPforSLCMicroCom and a DataSubscriber2. I put in the IP address of our micrologix 1400 into the com. I put in 2 plc addresses into the data subscriber. I printed out the return value to the text box.

Code: [Select]

Private Sub DataSubscriber21_DataChanged(sender As Object, e As PlcComEventArgs) Handles DataSubscriber21.DataChanged
        RichTextBox1.Text += e.PlcAddress + ", " + e.Values(0) + vbCrLf
 End Sub

The issue I have is that the data appears to become corrupted. Instead of just reading the state of the bit, true or false, the value starts continuously reading and some of the data is wrong. If I subscribe to only one address the value is correct and only updates when the data changes. When I subscribe to 2 items they show up as always changing, even though they are not. It continuously updates. Here is a sample.

I:2/11, False
I:2/8, False
I:2/11, True
I:2/8, True
I:2/11, False
I:2/8, False
I:2/11, True
I:2/8, True
I:2/11, False
I:2/8, False
I:2/11, True
I:2/8, True
I:2/11, False
...

Additionally, it is probably worth noting that the other controls on the screen (I added a button) also will start to toggle on and off, if it is assigned the same address as one that is in the data subscriber. I do not see this actually happening in the PLC.

I tried changing Framework versions and I don't see any effect.

I tried this same exact setup on an older version of the AdvancedHMI (v3.99a) I found in some downloads and the code worked as expected with multiple addresses.

Thanks, AdvancedHMI is great!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: v3.99x DataSubscriber2 bug? Windows 7 64bit vs2017
« Reply #1 on: August 18, 2017, 01:08:02 PM »
Try it with internal bits like B3/0 and B3/1 to see if it is related to the IO addresses. Those addresses are unique in the way they are read by the driver.

lnw32

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: v3.99x DataSubscriber2 bug? Windows 7 64bit vs2017
« Reply #2 on: August 18, 2017, 06:22:13 PM »
Yes, that looks like it is working.

Thanks,

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: v3.99x DataSubscriber2 bug? Windows 7 64bit vs2017
« Reply #3 on: August 18, 2017, 06:39:14 PM »
I will look into this to see why the IO addresses do not work correctly.

timryder

  • Jr. Member
  • **
  • Posts: 83
  • Still trying to figure it out
    • View Profile
Re: v3.99x DataSubscriber2 bug? Windows 7 64bit vs2017
« Reply #4 on: September 14, 2017, 09:42:24 AM »
Would there be any difference doing the following instead?

Code: [Select]
Private Sub DataSubscriber21_DataChanged(sender As Object, e As PlcComEventArgs) Handles DataSubscriber21.DataChanged
        RichTextBox1.Text += e.PlcAddress + ", " + DataSubscriber21.PLCAddressValueItems.Item(0).LastValue + vbCrLf
End Sub
Still just trying to figure out this thing called Life.