Author Topic: HMI Freezes when updating basic labels within tabs while PLC disconnected.  (Read 1769 times)

monteran

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hi all,

After some more testing I think I found the set of conditions that has been causing a freezing problem with my AdvancedHMI project.

I have an interface made up of regular visual basic tab controls. When I start the project with no PLC connected everything is fine, a label on the left outside of the tab control says no PLC is connected, etc. I can click on tabs that do not have basic labels on them and they also work just fine. However, the moment I click on a tab that has basic labels it appears as if they try to fetch their update text from the PLC. From then on the program is frozen.

This is a bit of a problem for me because our program is intended to be used for other tasks besides simply controlling the PLC. Any advice on how to bypass this issue would be appreciated!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
I am trying to replicate this, but having no luck. This is what I have done and it is not freezing:

- Added a TabControl to the form
- Added an EthernetIPforCLXCom driver to the form
- Added a Basiclabel to the TabControl
- Set PLCAddressValue to DINTTag
- Run the application

I can switch between the tabs at any time without it freezing. After the com timeout, the BasicLabel switches to the "No response form PLC" message.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
Something I typically do in a situation like this is to run the application in debug mode until it freezes, then click the pause button and see what line of code it goes to.

monteran

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hi Archie, thanks for your attention.

When I pause during debugging it rests within the SubscribeToComDriver() function, specifically on line 146 - Dim NotificiationID As Integer ....

In your reproduction attempt you mentioned have you put some of the basic labels on a second tab? Specifically not the default tab on application launch? This is where I am seeing the issue. Tabs 1,5,6, and 7 of my application are fine, but the three in the middle with labels are the ones that lock up.



I just tried disabling the subscriptions from the EthernetIPforCLXCom1 object and there is no issue there at that point. But of course that will be a problem when the PLC is connected.
« Last Edit: April 25, 2017, 10:09:23 AM by monteran »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
Are you using the latest version 3.99w?

monteran

  • Newbie
  • *
  • Posts: 7
    • View Profile
No, I was using whichever version was around in December last year.

I downloaded a copy of 3.99w. I'll try migrating and see if that helps with the issue. Just a little nervous of the problems that might cause since I'm a few days away from a deadline on this project. But that's life, I guess.

Ok, at a quick glance the issue seems to be resolved with this migration. I still get a bit of hang when switching to those tabs initially, but it looks like its about 2 seconds which I would probably expect with the default EthernetCLX properties here.

I'll try running it through some tests when I get in with the device later today. Thanks for the suggestion!
« Last Edit: April 25, 2017, 10:25:49 AM by monteran »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
I was able to replicate the problem by putting a BasicLabel on both tabs. I'm look deeper into this to see how I can get it to work. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5324
    • View Profile
    • AdvancedHMI
I created a driver patch for version 3.99w that may help this situation. The patch has not been fully tested, so let me know your results if you test it.

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

It is Patch 3 V3.99w

monteran

  • Newbie
  • *
  • Posts: 7
    • View Profile
Thanks Archie. I'll try applying the patch and testing the system over the next few days before I hand it off to the next user. I've been writing up my documentation and checking the program here and there throughout the day - the 3.99w update has prevented it from stalling so far with the PLC disconnected. Haven't had a chance to run it in the lab yet but I'll try to give you an update before the end of the week.

Thanks so much for your help. This software has been a real lifesaver for a computer science focused guy like me.

monteran

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hi again Archie,

I was mistaken in my announcement last time - in between our messages I had nullified the IP address of the PLC to test the interface and I forgot to set it back to the proper IP before saying that 3.99w had fixed the issue.

I just applied this patched DLL to my release build and it seems to solve the problem! Thank you for your help. I'll be sure to include this with the program as I hand off the project over the next few days.