News:

  • August 14, 2026, 10:05:33 PM

Login with username, password and session length

Author Topic: Strings already used by system?  (Read 7551 times)

PLCwannabe

  • Hero Member
  • *****
  • Posts: 208
Strings already used by system?
« on: March 16, 2023, 12:30:41 PM »
I created a new memory block with 200 short strings, and when viewing the new block in a data view, noticed that some of the strings already have random text. Are these strings being used by the system, or will this be a non-issue?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Strings already used by system?
« Reply #1 on: March 16, 2023, 12:52:22 PM »
Strange.  No.  The IR memory is not technically "cleared" when repurposed, EXCEPT for things like Strings which have a critical .MaxLen member.  Not sure how the .Length member is "initialized".

Look at RecipeRecord_0.MaxLen in Data View.  Hit Ctrl+Enter to see RecipeRecord_1.MaxLen, Ctrl+Enter again for 2, again for 3, again for 4, etc. making sure you see "20" for the value (that's what appears to be your MaxLength).

Do the same with the .Length member.  Make sure those are all between 0 and 20.

Going from Pgm->Run will initialize the Data Blocks (clearing non-retentive areas for one).

Let us know what you see after doing these things.

PLCwannabe

  • Hero Member
  • *****
  • Posts: 208
Re: Strings already used by system?
« Reply #2 on: March 16, 2023, 02:49:41 PM »
The max lenght values are all 20. The lenght values all show the number of characters within string. Program to run transition did not clear anything,

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6170
  • Yes Pinky, Do-more will control the world!
Re: Strings already used by system?
« Reply #3 on: March 16, 2023, 03:08:43 PM »
The short answer is 'no', it isn't problem. We make some effort to migrate memory contents when the memconfig changes. I wonder if something is amiss in that process.

Non retentive locations are *not* cleared on PGM to RUN, only on power up. We do reinitialize the .MaxLen value of strings on PGM to RUN.

"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

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Strings already used by system?
« Reply #4 on: March 16, 2023, 03:10:24 PM »
Non retentive locations are *not* cleared on PGM to RUN, only on power up. We do reinitialize the .MaxLen value of strings on PGM to RUN.

Oops