Author Topic: Best way to move a project from one version of AdvancedHMI to a newer version  (Read 7447 times)

ijones

  • Newbie
  • *
  • Posts: 8
    • View Profile
I hate asking dumb questions... but what is the proper and easiest way to move a working project from an older version of AdvancedHMI to a newer one???
I see the latest version has some new goodies I'd like to incorporate into my existing project... Can it be done without starting over??




Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
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


ijones

  • Newbie
  • *
  • Posts: 8
    • View Profile
Thanks Archie! So far so good! It seems to be working. I noticed some changes to the Modbus driver as well as a new Modbus RTU driver I am excited to give a try on another little project I am going to try.
The simple water system SCADA project I have running has done really well. The only thing I had was the Modbus Comm Fail - 20 error box that kept popping up about once a day or so. Everything kept running and it has to do with the way I am pulling data to chart for trends. None of the actual control functions have ever given me any errors or problems. And reading from another post, you make the comment to take out the line 621 from the Modbus driver code to not have the message box pop up. I haven't really looked at the changes to the driver code, but am trying it to see if that will solve my pesky little annoyance error box. Maybe I should try it with it left in first... don't know. I will try both.
I need to come up with a better way of getting the data for charting that is synced with the rest of the ip requests so it gets handled better.

Anyway! I really like AdvancedHMI!! It's been fun and a learning experience and it works!

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Archie,

I followed the steps you have listed and when I did it my two forms where blank.  All of my buttons and labels copied with the form but they were not ON the form.

I started with version 3.70 and now have 3.82 and it does not seem to work coping the files or adding them as you stated.

I also have another issue.  When I add a third form it seems to lock up on me or it takes about a minute to load the form.  Then when the form is loaded it takes a lengthy period of time to execute any button or task on that form.  I am doing quite a bit with the first two forms.  I am running a tool where I have two servos on it. I also have faults, auto mode and on my setup screen I have over 50 parameter setpoints.  Ideas?

Jim

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
There are 2 milestone versions of AdvancedHMI that have changed te structure of the Solution. These are versions 3.50 and 3.80. If you are updating across either one of these boundaries, it is not an easy update.

In your case, you are crossing the 3.80 boundary, so all of the controls are in different namespaces. The update is not impossible, but does require knowledge of the long names of the controls and editing the designer code with some search and replaces.

For example, you would perform a Replace of all "MfgControl.AdvancedHMI.BasicLabel" with "AdvancedHMIControls.BasicLabel" in the designer code of each form.

The designer code is accessible by clicking the "Show All files" icon at the top of the Solution Explorer. Changing these files incorrectly can make a project completely unusable, so be sure to make a backup before attempting.

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Thanks.  I may try that or just start over in 3.8.  It shouldn't take me too long to do what I need.  I have all week next week to play with it.

Jim

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
I have no idea what the heck happened.  Everything worked great yesterday.  This morning I added some VB code to RS422 communications and ran it.  It worked great including all of my controls.  Not a problem.

Then I wanted to clean up the HMI and placed some rectangles and a few labels and then went to run it and it came up with over a hundred errors.  They all had to do with the name configuration.  Now all my screens are blank.  Is there a way to recover from that or do I have to start from scratch?  ALl of the code and button information is in the code, it will not draw the buttons, etc on the form.  My second form crashed as well and I didn't even touch that one.  This was in 3.70.  I do have 3.61, 3.63, 3.7. 3.81 and 3.82 on my computer and at times I go to the newer versions but I still run mine in 3.70.  Is it possible since I opened 3.81 at some point that my computer feels that is the latest version and corrupt the earlier one?

I love the product and like I said the HMI I had workings was awesome.  Just not sure what the heck happened.

Jim

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Double click one of the errors and post the line of code with an error on here and I will see if I can recommend an easy fix.

My guess is something was recompiled and it then found all of the naming problems at that point.

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Similar errors to this came up 5 times with no code reference:
---------------------------------------------
Could not find type 'MfgControl.AdvancedHMI.BevelButtonDisplay'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.     
     
Instances of this error (2) 
 
1.   There is no stack trace or error line information available for this error. 
 
 2.   There is no stack trace or error line information available for this error. 
 
  Help with this error 
 
Could not find an associated help topic for this error. Check Windows Forms Design-Time error list   
 

Forum posts about this error 
 
Search the MSDN Forums for posts related to this error 
-----------------------------------------------------
 This error came up for all the controls on my forms:
----------------------------------------------------
The variable 'BasicButton19' is either undeclared or was never assigned.     Go to code 
     
Instances of this error (1) 
 
1.   AdvancedHMI Main Screen.Designer.vb Line:1208 Column:1   Show Call Stack 
 
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) 
   
Help with this error 
 
MSDN Help   
 
 Forum posts about this error 
 
Search the MSDN Forums for posts related to this error   
------------------------------------------------------------
 
The code refers to one line for that button but I copied a few of the lines here:

      Me.Controls.Add(Me.BasicButton19)
        Me.Controls.Add(Me.BasicButton20)
        Me.Controls.Add(Me.BasicButton17)
        Me.Controls.Add(Me.BasicButton18)
        Me.Controls.Add(Me.BasicButton15)
        Me.Controls.Add(Me.BasicButton16)

 
   
 

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Before you spend too much time on this, I think I found the porblem.  None of the Advanced HMI COntrols are in my toolbox.  The Advanced HMI communications are.  I will see if I can recover them.  Have no idea how they disappeared.

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Archie,

I am just going to start from scratch with version 3.82.  It should go pretty fast since I know how it all works and I will have backups.  LOL.

Jim

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
I put a new version up today, so you may want to start with it

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Ok, will do.  Thanks.

If you are interested when I am finished with it I can send you a copy so you can see what I have done.

Jim

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Before you spend too much time on this, I think I found the porblem.  None of the Advanced HMI COntrols are in my toolbox.  The Advanced HMI communications are.  I will see if I can recover them.  Have no idea how they disappeared.

I been thru the exact same behaviour, I've tried deleting the OBJ and BIN folders in the project folder as Archie suggested with no good results. It was something related to the VisualBasic Power Package, i've tried also reinstalling it, with no luck. What it worked it was to uninstall the whole Visual Studio Package and reinstalling back. It took time but it works now, still had some errors on the design as it seems that the project controls got corrupted, but only had to fix a couple of controls by detelting and inserting them one more time.

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Sprungmonkey,

I agree with you about the VB Power pack.  I used the rectangle around some buttons and that is when it crashed.  I didn't think it was that at first until you had the same problem.  So I feel a bit better now.  I thought it was a small VB code someone sent me for the RS422 communications.  That works great as well now.

I installed version 3.83 and basically started my screens from scratch.  It didn't take too long since I still had one version I was able to read the code and plug my tags in from that.  I took me about 5 hours to do them all again. 

As far as my issue with only able to run two screens, that is gone now.  I have three screens and switching back and forth is fast.  The only are that takes time is my initial start up.  It takes a while for all tags to initially update.

Thank you everyone who has helped and I hope this will help others.

Jim