Author Topic: Clear data when driver is disabled  (Read 781 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Clear data when driver is disabled
« on: November 06, 2015, 07:08:17 PM »
Archie, is there a way to clear the data displayed when the Modbus driver  DisableSubscriptions = True?  I would like to clear the data  to prevent someone from reading the data which is not being updated and possibly causing operator confusion.  Thank you.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Clear data when driver is disabled
« Reply #1 on: November 06, 2015, 07:14:03 PM »
You would have to write code to clear everything on the form after disabling subscriptions. For example:

ModbusTCPCom1.DisableSubscriptions=True
BasicLabel1.Value=""
DigitalPanelMeter1.Value=""

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: Clear data when driver is disabled
« Reply #2 on: November 07, 2015, 08:34:30 PM »
Hey Archie, I did try this method and the only problem I have is that when the DisableSubscriptions returns to "True", the text will not change from what I set it to unless the data changes...so if I have the same value in the device, I still see the text "----" (this is what I set it to on false).  Is there a way around this?  Maybe set an "ElseIf" to the datasubscriber value? I'm not sure how to access the Datasubscriber values.  Thx