Author Topic: Objects disappear when I run my project  (Read 2031 times)

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Objects disappear when I run my project
« on: July 14, 2015, 09:30:50 PM »
I have been working on a project and created a second page to the project. When I ran the first test all of my objects started to disappear when the page loaded. This happens on both pages. I have since deleted my second page and the original fist page still loses the objects. It says I have 44 errors undeclared object?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Objects disappear when I run my project
« Reply #1 on: July 14, 2015, 10:21:46 PM »
Windows->Close All Documents
Project->Rebuild Solution
Close Visual Studio
Reopen your Solution and open your MainForm

That should resolve your errors

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #2 on: July 15, 2015, 09:48:35 AM »
Archie,

Thanks for the help. Is there a proper procedure for adding a windows to a project so this doesn't happen again? I added the window and changed the name. I then copied some of the objects from the first window into the second since they already are linked to the PLC addresses. I didn't change the communication protocol on the second page until after I had tried to run the project so I crashed my PLC as well.  Any help would be greatly appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Objects disappear when I run my project
« Reply #3 on: July 15, 2015, 12:34:32 PM »
Adding a new form should not cause the problem you saw. Typically the problem occurs when doing a Rebuild Solution when a form with controls on it is open in design view. You typically want to avoid Rebuild Solution and just use Build. Or when you start the application it will perform a build automatically b

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #4 on: July 15, 2015, 01:34:39 PM »
So copying objects from 1 page to another is ok and shouldn't cause a problem or do I need to create each object on each page? Sorry for so many questions and thanks for all your help.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Objects disappear when I run my project
« Reply #5 on: July 15, 2015, 07:02:21 PM »
Yes, copying from one form to another is not a problem. To make things easier be sure to copy the driver first. Otherwise the control may create a new driver and point itself to it.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #6 on: July 16, 2015, 06:59:08 PM »
Archie,
I have my PLC back running but the objects are still disappearing from my screen when I run the HMI. I lose half of them not all and have 1 digital panel meter that is giving accurate temp readings.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #7 on: July 16, 2015, 08:34:44 PM »
Another update. Anything I add to the main form in design disappears when I run the program. If I have to start over I will just don't know how to clear form to start from the beginning.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #8 on: July 16, 2015, 08:57:24 PM »
Finally figured it out. My objects were link to addresses on my PLC that don't have values since my program had crashed and I haven't finished setting it back up.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #9 on: July 16, 2015, 09:05:02 PM »
Well I was wrong about that I put address of a working analog level transmitter and ran program an the digital panel meter disappeared again. It will stay displayed without the mod us address but goes away when I put address in. Any help would be greatly appreciated.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Objects disappear when I run my project
« Reply #10 on: July 16, 2015, 09:53:29 PM »
Do you by any chance have anything in the PLCAddressVisible property for the objects that are disappearing?

What is the value of the Visible property?

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #11 on: July 16, 2015, 10:37:19 PM »
Yes I have the Modbus address of the analog level transmitter 404116 register D19 value is currently 0. I think you walked me into my answer that it hides when I have zero for a value. How can I stop that or can I work around it? Archie thanks for your help as I'm sure you can tell I have no past experience with PLCs or HMIs.
« Last Edit: July 16, 2015, 10:45:11 PM by Cowboy1 »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Objects disappear when I run my project
« Reply #12 on: July 17, 2015, 07:36:34 AM »
Make sure you have 404116 in the property PLCAddressValue and not in PLCAddressVisible.

Cowboy1

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Objects disappear when I run my project
« Reply #13 on: July 17, 2015, 02:54:58 PM »
Archie that was the problem I had went through and put visible address in most of my objects and that was hiding them. One other question though. How do I open and close a valve by clicking on it I would need to control a M register and display the x register or am I going about it wrong? Thanks for your help.