AdvancedHMI Software

General Category => Support Questions => Topic started by: MrPike on November 06, 2015, 07:08:17 PM

Title: Clear data when driver is disabled
Post by: MrPike 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.
Title: Re: Clear data when driver is disabled
Post by: Archie 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=""
Title: Re: Clear data when driver is disabled
Post by: MrPike 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