Author Topic: Project keeps Crashing when I build  (Read 2168 times)

Michal_dk

  • Newbie
  • *
  • Posts: 6
    • View Profile
Project keeps Crashing when I build
« on: March 27, 2014, 10:17:34 AM »
Hi Guys!

Building my first AdvancedHMI project and I have run into problems.

It started out realle great Archie pointed me to how I could do a graph of my motor current, then I just went from there. Trying to write values to integer/double Integer as well as bit tags in my CompactLogix PLC and that is when it went down the drain.

If I comment out all code it is able to build and run, but as soon as I try to enable any code it crashes.

AND When I zip my project it is 15MB!!! What do I need to make a version I can attach here?

I have attached the two pages with the VB code, in case it can help?

Best regards,

Michal

dmroeder

  • Administrator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Project keeps Crashing when I build
« Reply #1 on: March 27, 2014, 11:07:48 AM »
In order to post large files, I recommend using Dropbox.  You get 2gb for free and can share the links to files you have saved.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project keeps Crashing when I build
« Reply #2 on: March 27, 2014, 08:36:51 PM »
Before zipping, go through and delete all of the \obj and \bin directories. They are rebuild when the solution is opened in Visual Studio.

Can you elaborate on "crashes". Does it throw an exception? If so, have you looked at the details to see what line of code is causing the problem?

Michal_dk

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Project keeps Crashing when I build
« Reply #3 on: March 30, 2014, 01:08:40 PM »
Hi All!

Thanks for the suggestions.

With Crashing I did mean it crashed - the VB studio just shut down.

BUT after deleting the Obj and Bin files it stopped crashing - Great!

The ZIP'ed file is still about 9 MB, but still less than 15 MB.

And as for writing to tags....
In RSLogix5000 til LIM function limits for values from that value...

I wanted to make sure that my SetupNumber was never anything else than 1, 2 or 3, so I set my limits as this:
Low Lim = 1
High Lim = 3
Move SetupNumber to PLC_Tag

Low Lim = 3
High Lim = 1
Move 1 to PLC_Tag

And of course every time I wrote 1, it would "overwrite" that value with 1. If I wrote 2 it would be fine and if I wrote 3 it would be "overwritten" with a 1.
But I only saw the error at 3 as I could not see the difference between 1 and 1 (hmmm).

The next question from me would then be:

Can I make a exe file of my project that will run on another PC? Without VB Studio installed?

Best regards,

Michal

Michal_dk

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Project keeps Crashing when I build
« Reply #4 on: March 31, 2014, 08:29:46 PM »
I am able to Publish my project :-)

But when building it I get this Warning:

Warning   1   Assembly 'support\MfgControl.AdvancedHMI.Controls.dll' is incorrectly specified as a file.   AdvancedHMI

It has come up a few times in the forum here and at PLCs.net, but no real solution?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project keeps Crashing when I build
« Reply #5 on: April 01, 2014, 08:36:42 PM »
I suggest avoiding the use of Publish. The best practice is to copy the complete solution to the target device and create a shortcut to AdvancedHMI\bin\Debug\AdvancedHMI.exe

Be sure to install .NET framework on the target device.

Michal_dk

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Project keeps Crashing when I build
« Reply #6 on: April 02, 2014, 03:50:13 AM »
Hi Archie!

I'll try that in the future, it just seemd like a nice and easy way. But since I still get a folder and 2 "programs" , I might as well copy the project - size wise it does not seem to matter either.

BTW!
I work at a company employing a great deal of software developers for embedded software and yesterday my Project Manager invited a bunch of our colleagues to see the finished result. A couple of them were genuinely impressed with the HMI I had build, SO hat off to you and your team :-)

Thanks for the support.

Best regards,

Michal