News:

  • October 17, 2026, 04:12:40 PM

Login with username, password and session length

Author Topic: Memory image treatment when going online  (Read 17749 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Memory image treatment when going online
« on: April 05, 2021, 02:16:19 PM »
I have a project that contains a memory image for most regions in the PLC, but is set to "Do not compare".   Now when I go online with this project (at a remote site), I still get the "Reading memory image" dialog for a significant period of time, no doubt due to the lower bandwidth accessing a remote PLC.

Is this normal?  It doesn't seem like the delay is universal across all projects.  Is it done only on projects that have a local memory image even when set not to compare?  Is there some place I can opt not to do it?   For most connections, I don't need to compare memory, and only sync occasionally for data backup purposes.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Memory image treatment when going online
« Reply #1 on: April 05, 2021, 02:33:53 PM »
It's the Memory Image Manager: Tools->Memory Image Manager, When Connecting to PLC with this Disk Project... radio button group box.

When connecting, the behavior is based on the DISK PROJECT's Memory Image Manager settings (in case that setting is different than what's in the PLC's MIM Config).

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Memory image treatment when going online
« Reply #2 on: April 05, 2021, 02:54:12 PM »
Sorry - I think you are connecting via the LINK, not the DISK project.

Since you have a DEFINED Memory Image, but no DISK project, it will read up the contents of the defined memory image.  There is no option to NOT read that up when connecting directly via  LINK.  It always does that whenever you have a defined Memory Image.

If you have the DISK project, connect using THAT (and make sure the option mentioned previously is set to "Do not compare")

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Memory image treatment when going online
« Reply #3 on: April 05, 2021, 03:03:44 PM »
If you have a Memory Image defined, we can definitely ask if you want to load it with PLC values or initialize it to 0 after connecting via the Link.

Not many use the MIM, so adding a nag dialog when you don't connect via the disk project file but via the comm link directly, it's not too bad.

Good? Bad? Ugly?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Memory image treatment when going online
« Reply #4 on: April 05, 2021, 03:05:29 PM »
Also, what about new online projects?    What governs the memory image handling for those?  The reason I ask is I think this happens when I'm opening from the link list and it's not opening the associated project, so I'm in an online project and don't realize it because all the docs are there.

So even though the correct project is in the recent project list, and has the link associated, if you open from the link, it will do New Online.     I assume it's not detecting a matching project because the project isn't in the Projects folder, but that's only a single folder and presumably doesn't search subfolders (and would be slow if it did), so not really a viable storage hierarchy.
 Maybe look at the recents for a matching project name instead of just the Projects folder?

I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Memory image treatment when going online
« Reply #5 on: April 05, 2021, 03:08:54 PM »
If you have a Memory Image defined, we can definitely ask if you want to load it with PLC values or initialize it to 0 after connecting via the Link.

Same conclusion I came to.   Was just expecting it to find the project and it wasn't and I didn't realize it.  I typically will save a new, versioned, copy of the project if I do anything more than observe and troubleshoot.

Quote
Not many use the MIM, so adding a nag dialog when you don't connect via the disk project file but via the comm link directly, it's not too bad.   Good? Bad? Ugly?

I vote that one good, but would prefer my other solution of more matching to disk projects.    What you suggest would definitely work though.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Memory image treatment when going online
« Reply #6 on: April 05, 2021, 03:12:03 PM »
Also, what about new online projects?    What governs the memory image handling for those?  The reason I ask is I think this happens when I'm opening from the link list and it's not opening the associated project, so I'm in an online project and don't realize it because all the docs are there.

So even though the correct project is in the recent project list, and has the link associated, if you open from the link, it will do New Online.     I assume it's not detecting a matching project because the project isn't in the Projects folder, but that's only a single folder and presumably doesn't search subfolders (and would be slow if it did), so not really a viable storage hierarchy.
 Maybe look at the recents for a matching project name instead of just the Projects folder?

We just need to utilize a true GUID and a mini database of GUID to project path (rather than hack something).

In the mean time, you could just open the disk project if you have it.  I figured you did NOT have it.

If you don't store your disk projects in the Projects folder, connecting via the link is good if you don't have the actual disk file.  However, if you do have the disk file (in non-Projects folder), you get a MUCH better launch experience if you open the disk project over doing New Online or opening the link.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Memory image treatment when going online
« Reply #7 on: April 05, 2021, 03:14:55 PM »
I guess maybe I'd like to have the MI stored more independently of the project, so it only gets invoked explicitly when I want to .   Maybe store it as an external file with the same name as the project in the same directory, so it's easy to find, but the PLC and project can ignore it pretty seamlessly.

The concept of the PLC having or not having a MI is a bit new on me.   The PLC has memory and I'm conceptualizing an MI as a full or partial snapshot of the memory that's already there, and stored somewhere else than in the PLC.    So you're saying your concept of the MI stored in the PLC is a list of regions, which can be overlaid on demand with the live data?   And that not all PLCs have such a list unless one has been created?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Memory image treatment when going online
« Reply #8 on: April 05, 2021, 03:24:48 PM »
In the mean time, you could just open the disk project if you have it.  I figured you did NOT have it.

Yup, I have it and thought the link would work backwards to find it.

Quote
If you don't store your disk projects in the Projects folder, connecting via the link is good if you don't have the actual disk file.  However, if you do have the disk file (in non-Projects folder), you get a MUCH better launch experience if you open the disk project over doing New Online or opening the link.

That's what I'll do.

Long term, I'd still like for the links to put more into finding the projects when that's a reasonable dev priority.   Despite Microsoft's 'vision', I don't store all my letters and memos from the past 30 years in the same folder and I'm sure no one else does either, and I don't think that's really viable for any other kind of documents either, including PLC programs.

My structure is like \Business Name (mine, not the customer's)\[year] Projects\Job Number\PLC  (or \HMI, \Servo, \Engineering, \Purchase Orders, \Photos, \Commissioning, etc.)
« Last Edit: April 05, 2021, 03:27:11 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Memory image treatment when going online
« Reply #9 on: April 05, 2021, 03:25:18 PM »
I guess maybe I'd like to have the MI stored more independently of the project, so it only gets invoked explicitly when I want to .   Maybe store it as an external file with the same name as the project in the same directory, so it's easy to find, but the PLC and project can ignore it pretty seamlessly.

The concept of the PLC having or not having a MI is a bit new on me.   The PLC has memory and I'm conceptualizing an MI as a full or partial snapshot of the memory that's already there, and stored somewhere else than in the PLC.    So you're saying your concept of the MI stored in the PLC is a list of regions, which can be overlaid on demand with the live data?   And that not all PLCs have such a list unless one has been created?

Memory Image is the DISK BASED COPY of memory.  Think Recipes.  Static Error Messages.  Configuration Data.  Not dynamic changing runtime values.

Very few projects need that.  You control WHEN/IF you want a Memory Image.  The default is NO.  You, as a user, must actively choose to create a Memory Image and its Regions.

Only the Memory Image CONFIGURATION is stored in the PLC.  The CONTENTs of the Memory Image is only utilized on an "event" to read/write/compare it to/from the actual memory.  The source-disk contents of the "Memory Image Data" is NOT stored in the PLC in a special file - only the MIM Configuration is.  It is only written to the PLC when you decide to write it.  It is only read from the PLC if the disk project says you want to read it and compare it.  Think recipes and changes in recipe values, critical static data that you need to have on disk and write it back to the PLC sometime in the future (e.g. after a CLEAR).

Usually, you WRITE it after you CLEARed the PLC and you need to re-load your recipes/error messages/configuration data.  Typically, you don't care about the contents of D memory after a CLEAR PLC, but some applications definitely do.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Memory image treatment when going online
« Reply #10 on: April 05, 2021, 03:31:50 PM »
OK, that's how I thought you must be visualizing it.   The region list / MI configuration is in the PLC, which if you do New Online, DMD will assume you want to upload the data.

So yeah, near term, I like the dialog (or an option setting) for what to do with MIs on New Online or opening via a link.   I actually think I like a DMD configuration setting better than the on-demand dialog, then if I get the default right, I don't have to answer the question every single time I go online with a PLC from a link.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Memory image treatment when going online
« Reply #11 on: April 05, 2021, 03:33:09 PM »
Long term, I'd still like for the links to put more into finding the projects what that's a reasonable dev priority.

We just need to utilize a better key/value mechanism than just a name (e.g. a true GUID in the PLC and a map of the GUID to a full path on the PC)
OR
Would providing a list of possible matching project files from the Recent Projects list be good enough (i.e. everything that starts with the project name in the PLC, or, possibly, matching up to first n characters, e.g. n=8 for PackageXYZZY_20210405.dmd vs. PackageXYZZY_20210331.dmd, since I've seen people do Save-As with a root name with a suffix of a date/time stamp or feature name or version number or ... you get the idea).

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Memory image treatment when going online
« Reply #12 on: April 05, 2021, 05:40:55 PM »
Yeah, I do exactly that.   My project names tend to be [Job Number]<Project Name><Upload/Working/Final>-<Date>[revision ID, for example lower case letter 'a', 'b']

So upshot of that is -- I'm not sure what my answer is to your question.  Have to cogitate on it a bit.

OTOH, I was thinking that having a very deep recent list, like 100 entries, and display all the matching / semi-matching (by project or PLC name, see following) and let the user choose, might be workable.

Another approach is for the PLC to have an internal name distinct from the PC file names.    That's what AB does.   Then that gives you another parameter to match, can even act as a screen.   Find all the projects with matching PLC names, then some combination of display for user choice and further check for logic equality.    You could do some digest number of the program as a quick equal/not equal compare (I assume you're already doing that).
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.