This tutorial want to be a suggestion to the Codesys and Simatic Step 7 developers: download the OSCAT library! It's a free open source community that share library for some specific PLC IDE.  Over the library itself, a pdf user manual is available. it contains all need info to use the library

I tested it and found it very good, especially in Codesys where the standard lib contains few blocks/samples and people often need to create some small routines from your own.