News:

  • October 18, 2026, 07:50:54 PM

Login with username, password and session length

Author Topic: Local/Global Tags  (Read 6189 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Local/Global Tags
« on: January 29, 2021, 10:42:22 AM »
BobO/Franji,
Could one of you provide a brief summary of the pros/cons and general design strategy of all tags being global in DmD (other PLC's in general)? Is there possibility to have local tags?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: Local/Global Tags
« Reply #1 on: January 29, 2021, 11:31:05 AM »
BobO/Franji,
Could one of you provide a brief summary of the pros/cons and general design strategy of all tags being global in DmD (other PLC's in general)? Is there possibility to have local tags?

It's simply an issue of where you put them and how they are addressed. We absolutely have a vision for local data, as well as instanced data (objects), but that wasn't part of our original PLC design, so it takes a bit more effort.

We are currently working on a textual language, essentially a hybrid of Structured Text and a curly brace language like C or Java. Syntactically speaking, it is the easiest place to add it, so we are planning to start there. Once we have a solid implementation, we'd like to push that back into ladder.

The biggest architecture change is the math stack. Our call structure uses that stack, and any local data really needs to be stack based, but the stack is comparatively small. The plan is to move calls to a new larger stack, which would more easily support decent amounts of local data. The second issue is addressing. How do you define local data and how do you address local data? Our current element structure has packed 10 pounds into a 5 pound bag, so finding a way to get that 11th pound in there is a challenge.
"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