Author Topic: Digital Panel Meter Stack overflow with small values  (Read 1002 times)

halfshaft

  • Newbie
  • *
  • Posts: 3
    • View Profile
Digital Panel Meter Stack overflow with small values
« on: July 19, 2017, 03:42:28 PM »
Using a series of 90 digital panel meters to display values from a series of product tests for the current part, and the previous 9 parts as well. The code works well until the PLC (CLX) moves a value from the analog flow meter into the data register that is a very small number. There are times the meter reads -1.3E-45 or smaller instead of zero when the part is occluded. When such a value moves into the register the screen instantly crashes with a stack overflow error. I can click a button on the screen after hitting continue (no longer displays values, and shows red X's in place of some of the panels) that clears this array and relaunch, and everything works great until another part creates a similar value. Is there a way to round or truncate the data so that it doesn't try to display it? Or is there some other underlying problem driving this? Would it work better using a basic label to display?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: Digital Panel Meter Stack overflow with small values
« Reply #1 on: July 19, 2017, 06:19:29 PM »
What version of AdvancedHMI are you using? When it pops up the crash details, can you show details and post them to let me see if the problem is in the meter or the driver.

halfshaft

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Digital Panel Meter Stack overflow with small values
« Reply #2 on: July 20, 2017, 10:12:56 AM »
Attached are a screen shot as well as the text in the details area of the fault.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: Digital Panel Meter Stack overflow with small values
« Reply #3 on: July 20, 2017, 08:16:47 PM »
It's definitely in the DigitalPanelMeter. I will see if I can replicate the problem. Are you using 3.99w or higher?

Phrog30

  • Guest
Re: Digital Panel Meter Stack overflow with small values
« Reply #4 on: July 20, 2017, 09:29:23 PM »
According to the picture it's w.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: Digital Panel Meter Stack overflow with small values
« Reply #5 on: July 20, 2017, 10:06:23 PM »
I made a patch that fixes this problem.

https://sourceforge.net/projects/advancedhmi/files/advancedhmi/3.5/Patches

Download and extract 3.99x Patch1
Replace the file found in AdvancedHMIControls\Support
Rebuild the solution

This is a patch for 3.99x and it looks like you are running 3.99w. I did not get to test it, so I'm not sure if it will work with 3.99w

halfshaft

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Digital Panel Meter Stack overflow with small values
« Reply #6 on: July 21, 2017, 04:46:35 PM »
I hadn't realized a new version was released since last week when I download 3.99w and started this program. I downloaded 3.99x and applied the patch and recreated the screen with a change in the layout that doesn't affect its function. I saved both applications to the desktop and ran the older w version which crashes with the data that is currently on my CLX. Running the new x version with the same data everything appears to work great. I've tried running it for a while today with no crashes. Thanks for all the help, that worked perfectly.