Technical data
Appendix
27.6 Sample Programs
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 639
27.6.2.1 Defining Logic Blocks
You structure the program by distributing the user program in various blocks and by establishing a
hierarchy for block calls.
Hierarchy of the Block Calls
The following figure shows the hierarchy of the blocks to be called in the structured program.
• OB1: The interface to the operating system of the CPU and contains the main program. In OB1
the blocks FB1 and FC1 are called and the specific parameters required to control the process
are transferred.
• FB1: The feed pump for ingredient A, the feed pump for ingredient B and the agitator motor can
be controlled by a single function block because the requirements (on, off, count applications
etc.) are identical.
• Instance DB 1-3: The actual parameters and the static data for controlling the feed pumps for
ingredient A, ingredient B and for the agitator motor are different and are therefore stored in
three instance DBs associated with FB1.
• FC1: The inlet and feed valves for ingredients A and B and the drain valve also use a common
logic block. As only the function "open and close" must be programmed, one single FC is
sufficient.