Author Topic: Enable / Disable Data logging  (Read 8138 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Enable / Disable Data logging
« Reply #15 on: July 29, 2015, 07:31:15 PM »
To fix the "Object reference not set" problem, edit DataSubscriber2.vb and go to line 272 and change the subroutine to this:


    Protected Overridable Sub SubscribedItemsChanged(ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs)
        If Not Me.DesignMode Then
            If SubScriptions IsNot Nothing Then
                SubScriptions.UnsubscribeAll()
            End If
            SubscribeToCommDriver()
        End If
    End Sub

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Enable / Disable Data logging
« Reply #16 on: July 29, 2015, 08:06:01 PM »
That resolved the issue of adding/removing items in the collection.

All testing still done in 3.98r.

Interesting thing for those who might need it, I set DataSubscriber2 to a different PLC than BasicDataLogger2 and it works fine.

sdove05

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Enable / Disable Data logging
« Reply #17 on: July 30, 2015, 09:14:08 AM »
Temporarily I've just added code to the PLC to take care of my issue but I would like to get this working. SF doesn't seem to have the older versions available anymore would you mind emailing me the v3.98r?

I'll pm you the info.

Thanks,

RD

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Enable / Disable Data logging
« Reply #18 on: July 30, 2015, 12:40:35 PM »

fohdeesha

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Enable / Disable Data logging
« Reply #19 on: August 18, 2015, 08:55:32 AM »
To fix the "Object reference not set" problem, edit DataSubscriber2.vb and go to line 272 and change the subroutine to this:


    Protected Overridable Sub SubscribedItemsChanged(ByVal sender As Object, ByVal e As System.Collections.Specialized.NotifyCollectionChangedEventArgs)
        If Not Me.DesignMode Then
            If SubScriptions IsNot Nothing Then
                SubScriptions.UnsubscribeAll()
            End If
            SubscribeToCommDriver()
        End If
    End Sub


Just a heads up for anyone wondering, this still needs to be done in the latest release, it wasn't added in. But after you do it the collection windows works great

needhmi

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Enable / Disable Data logging
« Reply #20 on: May 05, 2017, 12:40:45 AM »
Is this still an issue now with 3.99w? 

I would like to open the main form with logging paused by default and use a button on the form to start it (un-pause it).  I have my button writing to my plc and it turns a bit on.  It then turns another bit on or off as an indicator that I am using as my pauselogging address.  I also copied that indicator bit to an output on my plc to make sure the button in the hmi is working, and it is. 

Using time interval of 40 ms. 

All I get in my .csv after several minutes of pressing my pause button a few times is zero bytes.  Writing to the .bin folder in the solution. 

thanks!
« Last Edit: May 05, 2017, 10:09:53 AM by needhmi »