Author Topic: Error/Event Log Text Box  (Read 8845 times)

Offline JHansonHere

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
Error/Event Log Text Box
« on: October 08, 2021, 05:41:37 PM »
I'm new to the VBSE and trying to create a text box that displays error or event messages as they are reported. A scrollable text box would be even better, but I'd be thrilled with a static box that can display the most current 20 or so messages.

Current method I'm trying: Create a string array with all the data and add the '$N'(Newline) to the end of the string array. Convert the string array to a U8 array to use the insert array elements component to insert at head of the Messages List. Convert the messages list back to string and pass to display. Plan on doing length checks to remove data that will no longer be displayed so that the array doesn't grow past the array limit.

Any ideas on better methods or snippets of other implementations used would be much appreciated.
I'm working with a DM1000T. GUIDE 12.2.10.

Offline JHansonHere

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
Re: Error/Event Log Text Box
« Reply #1 on: November 30, 2021, 06:21:58 PM »
I used 3 different input strings for each of the columns of data I needed. When parsing the data to use in the table, I always appended a "newline" at the end of each entry to created a list that builds. I've added a picture of the Screen Definition I built for my fault tables. As you can see, it accepts a standard string for each of the columns. I also had an extra input for the header of the table. This was the simplest solution I could come up with that gave a list of more than 20 rows.

Please add your solution to this thread if you have a different one.

Offline JHansonHere

  • PLUS+1 User
  • **
  • Posts: 6
  • Karma: +0/-0
Re: Error/Event Log Text Box
« Reply #2 on: January 11, 2022, 10:28:45 PM »
Another thing to double check is your default string length for the project. Default is 255 I believe. So if you are using a string and not a string array of a set size, your text may get cut off.