News:

  • May 29, 2026, 01:52:33 PM

Login with username, password and session length

Author Topic: Differences in Disk and PLC programs message.  (Read 53872 times)

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Differences in Disk and PLC programs message.
« on: January 21, 2013, 08:49:32 AM »
Whenever I disconnect from my plc with Designer at the end of work, I always save the program to disk and to plc. But almost every morning when I re-connect I get a pop-up message that tells me there are differences between the Disk and the PLC project. When I click on the button to view the differences I get the message that the projects match. I'm not sure if this happens EVERY time, but I know it happens most of the time. Why?
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6157
  • Yes Pinky, Do-more will control the world!
Re: Differences in Disk and PLC programs message.
« Reply #1 on: January 21, 2013, 09:32:38 AM »
Not sure, could be a bug. What is the exact order than you do things?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: Differences in Disk and PLC programs message.
« Reply #2 on: January 21, 2013, 12:35:42 PM »
plcnut you talking about the large box that gives you both options, not specially there is a difference. It asks if you want to use the disk or plc. I have to connect to see exactly the two choices are. yea, I save my programs too, but it seems the box pops up for me too.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Differences in Disk and PLC programs message.
« Reply #3 on: January 21, 2013, 01:35:43 PM »
plcnut you talking about the large box that gives you both options, not specially there is a difference. It asks if you want to use the disk or plc. I have to connect to see exactly the two choices are. yea, I save my programs too, but it seems the box pops up for me too.

In DirectSoft, that box doesn't pop up UNLESS it thinks there's a difference.  It just goes directly to online mode otherwise.  Don't remember in DMD.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6157
  • Yes Pinky, Do-more will control the world!
Re: Differences in Disk and PLC programs message.
« Reply #4 on: January 21, 2013, 02:31:46 PM »
plcnut you talking about the large box that gives you both options, not specially there is a difference. It asks if you want to use the disk or plc. I have to connect to see exactly the two choices are. yea, I save my programs too, but it seems the box pops up for me too.

In DirectSoft, that box doesn't pop up UNLESS it thinks there's a difference.  It just goes directly to online mode otherwise.  Don't remember in DMD.

It should work the same in DmD. If there are no differences it will connect without prompting. Part of the issue is that there are more things in the project file now and in the PLC. If there is one particular pathway where a difference flag is getting bumped or some part of the comparison that is wrong, we need to figure it out. We know that there is an occasion where we can get an extra NOP appended to the disk project that causes some of the comparisons to bust, but I don't think we have successfully duplicated it. We also felt that the priority for fixing it was lower than, say, shipping the product. ;)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Differences in Disk and PLC programs message.
« Reply #5 on: January 21, 2013, 04:31:55 PM »
Any chance the project path could be different one day to the next?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Differences in Disk and PLC programs message.
« Reply #6 on: January 21, 2013, 07:36:15 PM »
It should work the same in DmD. If there are no differences it will connect without prompting. Part of the issue is that there are more things in the project file now and in the PLC. If there is one particular pathway where a difference flag is getting bumped or some part of the comparison that is wrong, we need to figure it out.

Exactly.  I was saying that if the dialog comes up it implies that the software thinks, correctly or not, that there are differences between disk and PLC.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Differences in Disk and PLC programs message.
« Reply #7 on: January 22, 2013, 06:01:21 AM »
I will monitor more carefully the exact steps that I take when shutting down and starting up...
This morning when I opened DMD and double-clicked my project it opened without issue.
I normally have my project open all day and edit the program throughout the day, and depending on what I was doing I may have saved to disk , or I may have saved to PLC for testing. So when I am ready to shut down, if one or both of the save boxes is highlighted, then I will click it to make sure that everything is up to date, and then close DMD and power down the PLC (after the PC is shut down).
Also I occasionally (once or twice a week, or before a major program change) will back-up my project.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3825
    • Host Engineering
Re: Differences in Disk and PLC programs message.
« Reply #8 on: January 22, 2013, 09:42:57 AM »
This is a known issue and is relatively easy to replicate.  One issue deals with trailing NOPs in various code-blocks.  The initial comparison checks for length first, and if they are different, then it flags the two as "being different".  It does not bother doing any comparison if the lengths are different and just flags the two sets of control-logic as being "different" (note that if the lengths match, then it goes on and compares the two programs to see if they are different).  So the control logic is labeled different.  But then when you use the Program Compare tool, it ignores trailing NOPs, hence the two sets of control-logic "match".  Doh!  ::)

We need to initially eliminate the length comparison because of it reporting false differences.

There could be other issues that I won't go into, but it's related to trailing NOPs and rung handles (for rung comments) that are also stored as part of the program, and could be flagged as being different, but not really.  Doh**2!

EDIT - the first case was eliminated a while ago, so it must be the second case (or the Doh-squared case, or something else).  Apologies   :-[
« Last Edit: January 22, 2013, 09:53:00 AM by franji1 »

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Differences in Disk and PLC programs message.
« Reply #9 on: January 22, 2013, 11:40:30 AM »
Any chance the project path could be different one day to the next?

DMD calls moving the project to a different PC directory and trying to go online a difference??!!  If so, I don't like that at all.   :(
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6157
  • Yes Pinky, Do-more will control the world!
Re: Differences in Disk and PLC programs message.
« Reply #10 on: January 22, 2013, 06:09:05 PM »
DMD calls moving the project to a different PC directory and trying to go online a difference??!!  If so, I don't like that at all.   :(

I'm confused by this: Are you seeing this to be true, or are you asking if it is?

We store the project path to the PLC when we write to it, in an effort to help restore the connection to the project that was last used when connecting to the PLC without a project open. If we are using the source project path as a basis for comparison of online and offline projects, I am unaware of it and it is unintentional. If that is the case I am happy to change it.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Differences in Disk and PLC programs message.
« Reply #11 on: January 22, 2013, 07:02:33 PM »
I'm confused by this: Are you seeing this to be true, or are you asking if it is?

I don't know whether it's true or not -- I posted that in response to ATU's troubleshooting post about the project directory, and that in turn I don't know is based on first-hand knowledge or not.

I can see if you just went online with the PLC first, having DMD select by default the online file from the last known location (better to store that in DMD in case the same PLC is programmed with multiple PC's?), but if you open the file first and then go online with the PLC, I don't think DMD should flag a difference based on the directory location.  It runs the risk of obscuring an actual code or config difference, plus desensitizing people to the dialog.

Actually, I guess what you'd need to do is store the program name but not the path in the PLC.  Then when DMD opens it and tries to match it with a disk file, it says "OK, the most recently edited file I have on disk with a matching name is in the path c:\blah\blah" or else look at ALL matching name projects and see if there are any with no differences.
« Last Edit: January 22, 2013, 07:09:12 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Differences in Disk and PLC programs message.
« Reply #12 on: January 22, 2013, 09:03:09 PM »
That link seems to be broken
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3825
    • Host Engineering
Re: Differences in Disk and PLC programs message.
« Reply #13 on: January 22, 2013, 09:20:42 PM »
That link seems to be broken
That was a private link, hence why it appeared "broken".  I removed it.

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Differences in Disk and PLC programs message.
« Reply #14 on: January 23, 2013, 05:16:57 AM »
OK, this morning when I tried to connect I got the "Resolve online/offline differences" dialog.

Rundown:
Yesterday, at shut down time with an open program that had been edited, I clicked Save to disk, then Write to PLC, then I clicked X to close the program, and clicked Close with forces active in the popup dialog. I then shut down PC and PLC.

This morning, I power up PC and PLC and connect my network cable, I open DMD and double click my project in the Launchpad, and the system proceeds to connect and download the program and do the compares and the attached message pops up.

After  pressing the Compare programs button the second attached message appears.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com