News:

  • May 02, 2026, 12:10:34 PM

Login with username, password and session length

Author Topic: User defined structures  (Read 15748 times)

dfox

  • Newbie
  • *
  • Posts: 1
User defined structures
« on: December 13, 2012, 11:08:39 AM »
User defined structures would be VERY useful.  In a large program, it is so easy to "lose" variables that otherwise would share some memory space.  For example, a common need is for a structure that contains booleans for GUI pushbuttons and integers/floats for display.  Using the current memory management, booleans are in one place, dints another and reals yet another.  User defined structures allow the programmer to keep related data organized.  The Do-more Designer and the H2 CPU are a hugely-tremendous improvement over previous versions of Direct-Soft.  But the lack of structures is a big weakness.  I wonder if there is any discussion for this improvement.

:)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: User defined structures
« Reply #1 on: December 13, 2012, 11:36:20 AM »
Absolutely!  User Defined structures are a KEY feature we want to add soon, for the exact reasons you describe.  The current structure implementation in the CPU firmware is designed such that structure definitions are "configured", not "hard coded", so that it will be "relatively easy" to add user-defined structures.

Key issues:
1. Do-more Designer User Interface and Work Flow model for creating, using, editing (eek!), and monitoring user-defined structures
2. How should Designer handle the situation when a user-defined structure member is DELETED (e.g. PushButtonXYZZY), but it is still being USED in the ladder logic (e.g. a PushButtonXYZZY contact)?

We have a good idea on how to address these, but the solutions are non-trivial on the Designer side.

Remember, we at Host Engineering are just getting started with Do-more and Do-more Designer, so please keep these ideas flowing!!

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: User defined structures
« Reply #2 on: December 13, 2012, 11:47:56 AM »
Quote
2. How should Designer handle the situation when a user-defined structure member is DELETED (e.g. PushButtonXYZZY), but it is still being USED in the ladder logic (e.g. a PushButtonXYZZY contact)?

As an example, RSLogix5000 just flat out won't allow it. All instances must be deleted first before a user-defined structure (or User Defined Type in the AB world) can be deleted.
An output is a PLC's way of getting its inputs to change.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: User defined structures
« Reply #3 on: December 13, 2012, 12:17:58 PM »
As an example, RSLogix5000 just flat out won't allow it. All instances must be deleted first before a user-defined structure (or User Defined Type in the AB world) can be deleted.
Yeah, that's the wimpy way out ;).  We learned a lot when we figure out how to handle the deletion of heap items from the Memory Configuration when they are still being referenced in the program.  Yes, we WARN you (multiple times), but due to our Unassigned Nickname mechanism, we had an alternative to let you do it anyway.  We are hoping to utilize a similar mechanism with deleted/redefined user struct fields (or even deleting entire user struct definitions!).