AdvancedHMI Software
General Category => Support Questions => Topic started by: oqapsking on April 22, 2017, 03:20:49 PM
-
hello
i disabled the comms Subscriptions
but i want to show it as error massages text on one label that i chose instead of showing up on every thing i use
and can i chose what is the text?
with thanks
-
You will have to add it to the code where you disable subscriptions. For example:
ModbusTCPCom1.DisableSubscriptions=True
Label1.Text="Subscriptions Disabled"
-
i had disabled it from the property !
-
Then do it in your form load event:
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If ModbusTCPCom1.DisableSubscriptions Then
Label1.Text = "Subscriptions Disabled"
End If
End Sub
-
oh i mean
the error massage
for example
can not connect to the address 192.168.0.5
-
Is the property of each control SupressErrorDisplay what you are looking for?
-
for example
i have basic label ,basic button and AnalogValueDisplay
if there is a connection error say there is no internet
the value in the label and AnalogValueDisplay shows an error massage
i need to stop that
and show the error on its own label
-
Set SupressErrorDisplay to True on all the controls.
Add a BasicLabel and set PLCAddressValue to any random address. Make sure SuppressErrorDisplay is set to False.
-
it says no value returned
and i want the connection error message
-
Archie already suggested that you can use the form's Load event to display the error on a standard Label:
Then do it in your form load event:
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If ModbusTCPCom1.DisableSubscriptions Then
Label1.Text = "Subscriptions Disabled"
End If
End Sub
Instead of putting "Subscriptions Disabled" you can just put your text (and also Set SupressErrorDisplay to True on all AHMI controls).
If you add a timer to the form then you can continuously check the DisableSubscriptions property to see when it changes to False so you can remove the message and if necessary disable this timer (you could also use this timer to initially set the message instead of using the form's Load event).