adccommunitymod (AutomationDirect) asked a question.

Reuseable Code with BRX?

Created Date: November 25,2018

Created By: DSandelman

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I am starting to migrate several product lines from the Click to BRX platform, and was wondering if there is a way to have reusable code between common products that will be using the BRX. Right now, if a make a change to a click program, I must go to ~20 Click programs and make the same change. Is there a method I can use with the BRX now that I am starting clean, where I can have a library of code blocks, that I can cut and paste to multiple projects. Should we need to make a change to a code block, we would update the master, and then we can just update the code block in each product from the master, without editing the code line by line in each project. These code blocks could also be helpful when starting a new product, where we can start clean, and add the required code blocks to get things started, instead of taking an old program and gutting what is not needed to start. Thanks for your thoughts. David S


  • adccommunitymod (AutomationDirect)

    Created Date: November 25,2018

    Created by: Do-more PE

    I'd stick the code blocks into a "Program " Code Block and use them for management. You'll still have to make individual changes to each project, but at least the changes will be clearly defined.

    Take a look in the Software help file and pick the main topic on Code Blocks (DMD0231) for more information.

    Also take a look at importing and exporting projects and inserting instructions from a file (DMD0540).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 25,2018

    Created by: BobO

    This is definitely an area we would like to work on in the future. For now, no, there really isn't good library mechanism.

    You can get semi-close to reusability through the import/export mechanism. If you have program or task blocks that are the same across projects, you can export the project and isolate the relevant parts and copy them between projects.

  • PLC_Novice (Customer)

    Hi there,

     

    This post was back in 2020. Has there been an update since then in this regard which enables easy copy paste? Actually, I am also trying to copy-paste few code blocks across different projects and was wondering an easy way to do it?

     

     

    Thanks

    Expand Post
  • HOST_franji1 (HOST Engineering)

    Sorry, no. We've started some of the early implementation, but it won't be in the next release.