Libraries
9.6 Creating a user-defined library of instructions
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
563
9.6
Creating a user-defined library of instructions
STEP 7-Micro/WIN SMART allows you either to create a custom library of instructions, or to
use a library created by someone else.
Creating a library
To create a user-defined library of instructions, you create standard
STEP 7-Micro/WIN SMART subroutines and group them together. By grouping these
subroutines into a library, you can hide the code. Putting code into a library helps prevent
unwanted changes and provides a higher degree of protection for the technology (know-
how) of the author.
To create a user-defined library, perform the following tasks:
1.
Write the program as a standard project and put the function to be included in the library
into subroutines.
2.
Ensure that you have assigned a symbolic name to all V memory addresses in the
subroutines or interrupt routines. To minimize the amount of V memory that the library
requires, use sequential V memory addresses.
3.
Rename the subroutines to the names that you want to appear in the instruction library.
4.
Select the subroutines that you want to include in the library.
5.
Click the Create button
from the Libraries area of the File menu ribbon strip to
compile and create the new library. If the subroutine references interrupts, STEP 7-
Micro/WIN SMART also includes the interrupt routines in the library.
The libraries that you create are available for new or existing projects. They are not available
for the project from which you created them.
Further information
See the STEP 7-Micro/WIN SMART online help library topics for library programming tips
and a user-defined library example.
Note
Using custom libraries
You must be responsible for testing any libraries that you add to your project. Siemens bears
no responsibility for custom libraries.
If the CPU in your project does not support the instructions in your library, you will get errors
when you compile.