AdvancedHMI Software

General Category => Support Questions => Topic started by: MrPike on November 18, 2015, 07:39:28 PM

Title: change error message on loss of comms
Post by: MrPike on November 18, 2015, 07:39:28 PM
Archie, I would like to change the error message returned when there are no comms established with the Modbus TCP driver.  I would like to see ??? instead of "Could not connect to IP x.x.x.x".  The reason for this is because I am using textboxes that are only 4 characters long and would rather see the question marks than "Coul".  I would also like to do this when comms are lost.  That way I can make the Highlight character ? and show red text... I think.  I'm not able to see the errors in the code, is this possible and where can I find them?  Creating a property in the driver for Error Message Text would be great!  Thanks.   
Title: Re: change error message on loss of comms
Post by: Archie on November 18, 2015, 07:49:40 PM
Your easiest option is probably to edit BasicLabel.vb and go to line 570 :

                    MyBase.Text = ErrorMessage


Then change ErrorMessage to whatever you want to display, such as

                    MyBase.Text = "???"


Keep in mind that no matter what the error is, you will override it to always be the same.
Title: Re: change error message on loss of comms
Post by: MrPike on November 18, 2015, 10:47:22 PM
That's great, works for now.  Is it possible to create a property that allows you to set this for each Basiclabel?  Thanks