first time you create Function Block (FB) or Function (FC) in Simatic manager (Block List). Open the your FB or FC and create the program in there, don't forget for define the input, output, or input-output. save the program, and ready to call. Remember FB need Data Block (DB), and FC no need. To call FB or FC is very easy. Only use Call FCxxx. Thx