News:

  • September 28, 2026, 11:12:39 AM

Login with username, password and session length

Author Topic: Feature Suggestion: Plugins, Reusable Code Blocks  (Read 7583 times)

Mike@Forshock

  • Sr. Member
  • ****
  • Posts: 58
Feature Suggestion: Plugins, Reusable Code Blocks
« on: September 14, 2020, 05:22:57 PM »
Really making use of BRX a lot lately and have some suggestions I would like to put out there (in addition to the others I have submitted).

Reusable Code Blocks (Function Blocks, Plugins, addon, etc.)
Similar to Subroutines, except there would be an "instruction" on the Toolbox. The code would be reusable in multiple projects and any updates would be "automatic" (within limits obviously).
Examples already in include the SCALE, ALHILO, ALDEV, etc.  Allow for a scriptable method developers can access to set the input variables:
-Checking for type (numeric/integer, boolean, string, etc.)
-Hooks for Top/Bottom, First/Last scan
-Hooks for Networking (MRX/MWX, RXWX, etc.)
-Optional/Required Variables

We have developed so many little functions that take multiple rungs and when these functions need accessing 20, 30, 100 times it makes tracking changes to a single rung of the "same code" troublesome. This would clean it up and allow for automatic updating of the core code changes.
When you have multiple programs for different controllers that use a shared code base, these changes require a manual process to implement changes vs. just recompile.
Obviously there are challenges (changing counts of input & output variables, types, etc.).

Expanding on that, some sort of "code-protection" for these functions as well.  Primarily a software developer, gotta protect that IP ;) Could open a new "code store" opportunity within the software for further monetization (commission for resold functions). Just thinking out loud.

Keep up the good work, loving it so far.

Mike

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: Feature Suggestion: Plugins, Reusable Code Blocks
« Reply #1 on: September 14, 2020, 05:40:13 PM »
This is on our TODO list.  However, it is non-trivial.

There is currently an IP protection mechanism at the code-block level already (just not part of the "library" concept).  Not sure if you knew it was there (been there since 1.0).

Mike@Forshock

  • Sr. Member
  • ****
  • Posts: 58
Re: Feature Suggestion: Plugins, Reusable Code Blocks
« Reply #2 on: September 14, 2020, 06:09:55 PM »
This is on our TODO list.  However, it is non-trivial.

There is currently an IP protection mechanism at the code-block level already (just not part of the "library" concept).  Not sure if you knew it was there (been there since 1.0).

Yes, have used the code protection feature. Thanks.
I am sure it will take quite a bit of work and other more important features are in front, but I appreciate the response and continued improvements.

clyleadams

  • Newbie
  • *
  • Posts: 7
Re: Feature Suggestion: Plugins, Reusable Code Blocks
« Reply #3 on: September 18, 2020, 06:00:02 PM »
For BRX built in High Speed I/O function.  I have the following problem to solve.  I need one high speed counter with a reset on a rotary axis.  I would like to use up to FIVE SEPERATE  pulse capture events with the same high speed counter.  Currently,  I can only use the single AWESOME pulse catch feature and it works marvelously consistently @ 60,000 HZ and.  If I could use MORE of the other high speed inputs to pulse catch themselves that would be even Awesomer!  I have a customer who is dictating we use AB PLC's which cannot perform the pulse catch function at all (because I have to use the reset pulse also).  I would really love to design it so only BRX could be used ...

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Feature Suggestion: Plugins, Reusable Code Blocks
« Reply #4 on: September 19, 2020, 10:47:12 AM »
For BRX built in High Speed I/O function.  I have the following problem to solve.  I need one high speed counter with a reset on a rotary axis.  I would like to use up to FIVE SEPERATE  pulse capture events with the same high speed counter.  Currently,  I can only use the single AWESOME pulse catch feature and it works marvelously consistently @ 60,000 HZ and.  If I could use MORE of the other high speed inputs to pulse catch themselves that would be even Awesomer!  I have a customer who is dictating we use AB PLC's which cannot perform the pulse catch function at all (because I have to use the reset pulse also).  I would really love to design it so only BRX could be used ...

You may be able to cobble together something with the input event interrupts and TICKus().
"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