Author Topic: Program locks up if connection is interrupted  (Read 4988 times)

opmal7

  • Newbie
  • *
  • Posts: 19
    • View Profile
Program locks up if connection is interrupted
« on: April 17, 2017, 04:42:42 PM »
I'm using a Micrologix 1100 PLC with a tablet running AdvancedHMI 3.98t.

One of the issues that I've run into is that when the tablet screen is locked, the connection to the PLC gets disconnected.  Then when the screen is unlocked, the program locks up, and doesn't appear to be communicating with the PLC anymore.  If I exit the program, and restart it, the program works fine.

I was wondering if there is any way to prevent this from happening.  Or, if there is a way to make a button to re-establish the connection with the PLC.  Then I could make a popup dialog box saying "Connection interrupted, Click OK to re-establish the connection" or something along those lines.  Thanks.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Program locks up if connection is interrupted
« Reply #1 on: April 17, 2017, 05:08:43 PM »
Try using 3.99w

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #2 on: March 03, 2023, 01:34:45 PM »
I'm on 3.99x and if the IP isn't correct when you start the HMI it locks up before I have a chance to update the IP from my on screen textbox.  Trying to figure out how to prevent this.  Any help would be appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Program locks up if connection is interrupted
« Reply #3 on: March 03, 2023, 03:59:08 PM »
I'm on 3.99x and if the IP isn't correct when you start the HMI it locks up before I have a chance to update the IP from my on screen textbox.  Trying to figure out how to prevent this.  Any help would be appreciated.
Try it on V3.99y Beta that you can download from this forum.

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #4 on: March 03, 2023, 04:34:31 PM »
Thanks, I'll give that a try!

I did build a work around but would like it not to freeze up if it looses comms.

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #5 on: March 13, 2023, 07:28:29 PM »
Try it on V3.99y Beta that you can download from this forum.

How do I migrate my project to 3.99y or does running the "AdvancedHMIv35.sln" file from 3.99y update my PC so when opening the project from the old folder opens with "y"?

I did try this from another thread and I get a bunch of "...not a member of..." errors

"As long as you don't cross over the 3.5 version update:

1) Open the newest version in Visual Studio
2) Right Click AdvancedHMI in Solution Explorer
3) Select Add->Existing Item
4) Browse to and select your .vb files (forms) from your previous project"

I added my MainForm.vb which is my only page. Is there something else I need to import using the Add function?

Thanks.
« Last Edit: March 13, 2023, 07:38:18 PM by qsiguy »

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #6 on: March 15, 2023, 12:20:06 AM »
Anyone?  I'm sure I am missing some minor detail or I've over simplified adding just the MainForm.vb file.  It can't be that difficult to move my project from 'x' to 'y'.

One error I did notice was for an image file I had on my MainForm so that was easy to import manually. Since it didn't migrate the graphic over, there must be more to do to bring the project over than import the one .vb file?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Program locks up if connection is interrupted
« Reply #7 on: March 15, 2023, 12:35:11 AM »
Anyone?  I'm sure I am missing some minor detail or I've over simplified adding just the MainForm.vb file.  It can't be that difficult to move my project from 'x' to 'y'.

One error I did notice was for an image file I had on my MainForm so that was easy to import manually. Since it didn't migrate the graphic over, there must be more to do to bring the project over than import the one .vb file?
Can you post more details of at least one of the errors?

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #8 on: March 16, 2023, 12:55:29 AM »
A screenshot seemed the easiest way to share what I'm seeing.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Program locks up if connection is interrupted
« Reply #9 on: March 16, 2023, 01:03:07 AM »
Open MainForm.designer.vb and do a Search and Replace for ".LightColors" to ".LightColorOption"

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #10 on: March 16, 2023, 01:13:35 AM »
That seems to have cleared up quite a few.  Here's what is left.

Thanks for the assistance!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Program locks up if connection is interrupted
« Reply #11 on: March 16, 2023, 01:45:38 AM »
VisibleControlEnum -> VisibleControlOptions
ForeColoeAltername -> ForeColorAlternate

HighLightColor* and HighlightKey* -> delete each line completely. Those properties no longer exist.

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #12 on: March 16, 2023, 02:14:15 AM »
Thank you very much, would have never figured that out on my own.  Some things are broken now as I was using those obsolete things but I think I can work with this.

Really appreciate it.

Shane

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #13 on: March 16, 2023, 02:16:18 AM »
Unfortunately it still locks up if the Modbus TCP comm fails.

qsiguy

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Program locks up if connection is interrupted
« Reply #14 on: March 16, 2023, 02:22:33 AM »
I have a couple "MessageByDisplayValue" functions that broke after that.  When I try to open the "Collection" to repair the messages Visual Studio shuts off and restarts.

Update:
I just copied the old ones from 399x and pasted them to 399y and it seems to have worked.
« Last Edit: March 16, 2023, 02:31:55 AM by qsiguy »