News:

  • August 05, 2026, 01:44:41 AM

Login with username, password and session length

Author Topic: Ladder Memory Usage  (Read 7122 times)

JeffS

  • Hero Member
  • *****
  • Posts: 113
Ladder Memory Usage
« on: May 16, 2023, 04:34:46 PM »
Just noticed today that my program ladder memory usage changes after writing to a PLC.

Shows 59533/65536 before writing to the PLC, then shows 59930/65536 after written to the PLC.  I can disconnect, close the project, reopen it and it will show 59533/65536 again.

Not a big deal, just something that could become something I need to watch out for as I get closer to full ladder memory.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3839
    • Host Engineering
Re: Ladder Memory Usage
« Reply #1 on: May 16, 2023, 04:59:51 PM »
When read from disk, the size is a guestimate.  But after doing a Write to PLC, Designer knows EXACTLY how large the program is.

Things like number of rungs and system task usage can affect the ACTUAL size.

After you "reconnect", do you get a "differences" dialog or not?  If you DO get the "differences" dialog, do you choose DISK or PLC?

JeffS

  • Hero Member
  • *****
  • Posts: 113
Re: Ladder Memory Usage
« Reply #2 on: May 16, 2023, 05:32:56 PM »
No differences dialog box.  It connects like the programs are identical, but the program size remains wrong until I write to the PLC again.  If I look at the System information I can see the actual size of the program.  See attached picture and you can see the disagreement even though the programs are identical.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3839
    • Host Engineering
Re: Ladder Memory Usage
« Reply #3 on: May 16, 2023, 07:23:14 PM »
The "user logic" is identical, but there is some information stored in code block headers and hidden system tasks that may not be known, or trailing NOPs in certain code blocks that may not be counted for.  The larger the program and more complex code blocks, the more "hidden" parts of program memory are used up.