News:

  • October 16, 2026, 09:52:01 AM

Login with username, password and session length

Author Topic: Dynamically resize UDT  (Read 7119 times)

etElMadr

  • Full Member
  • ***
  • Posts: 37
Dynamically resize UDT
« on: October 03, 2021, 11:57:37 PM »
Is it possible to dynamically resize a UDT memory structure using ladder logic?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3628
  • Darth Ladder
Re: Dynamically resize UDT
« Reply #1 on: October 04, 2021, 12:44:59 AM »
Technically no, because a system config change like a UDT definition will require a prog mode update.

However, I recommend designing UDTs with extra spare elements that can be quickly pressed into service, which could be done at runtime.  Even changing member names, while it will require a program mode download will not change the size of the UDT elements and thus will not clear data.
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: Dynamically resize UDT
« Reply #2 on: October 04, 2021, 08:04:39 AM »
Is it possible to dynamically resize a UDT memory structure using ladder logic?
C++ cannot do that.  It is strongly typed also.
What are you actually trying to do?

etElMadr

  • Full Member
  • ***
  • Posts: 37
Re: Dynamically resize UDT
« Reply #3 on: October 04, 2021, 10:10:14 AM »
Thanks. I'm doing what at @Controls_Guy suggested. I just wanted to make sure I wasn't missing something.