Using Libraries in ST Programs
We recommend that you store reusable blocks of code in Structured Text libraries. The ST libraries can then be attached to other ST programs. The advantages of using ST libraries, include:
- ST libraries reduce the amount of time and effort needed to create ST programs. If you create an ST library for a block of code that is needed in several ST programs, you can write the code for the library once and then attach the library to each ST program as required.
- ST libraries reduce the amount of time it takes to make alterations to a block of code that is used in several ST programs. You can make the required changes to the ST library and then update the library in each ST program. This is much quicker than having to alter the code in each ST program separately.
You can also use Function Block Libraries to store custom function blocks that can be referenced by multiple Logic programs.
For more information on ST Libraries and Function Block Libraries, see ST and Function Block Libraries.