Welcome to the OpenPLC sharing code area. Following the open source nature of the project, I created the space to encourage users to share their code with the community. If you've created a nice function that you believe can solve other people's problems as well, please share it with us. Below are some general guidelines/rules/instructions to post your Function Blocks:

1. Make sure that you're the author of the code you're publishing. If you're not the author, make sure that the author agreed to have his/her code shared publicly on the web, and to add the author's name on the Function Block

2. Please create a new topic to post your code. Don't post code as a reply of a previous topic, unless you are posting an update related to the topic's code.

3. OpenPLC Editor does not have an easy FB sharing mechanism. Therefore, for now to share your code you will have to create a blank project on OpenPLC Editor and then put all your blocks in there. Save the project and share the project's folder in compressed zip format.

4. To encourage contribution to your code, make sure you have added proper comments to your Function Blocks.

5. To use the function blocks attached to the shared projects you will need to copy and paste them to your project. This will copy the entire block including its internal variables and code. For that you will have to right click on the Function Block at the left panel tree and select "Copy POU". Then open your project, right click on your project's name (the top item at the tree hierarchy on the left panel) and select "Paste POU".


Thiago Alves
Quote 2 0