Programming a Function
8-3
STEP 7 Getting Started
A5E00171228-01
8.2 Programming
Functions
In this section, you will program a timer function in our example. The timer function
enables a fan to switch on as soon as an engine is switched on (see Chapter 5),
and the fan then continues running for four seconds after the engine is switched
off (off-delay).
As mentioned earlier, you must specify the input and output parameters of the
function ("in" and "out" declaration) in the variable detail view.
The LAD/STL/FBD program window is open. You work with this variable detail
view in the same way as with the detail view for the function block (see Chapter
5).
Enter the following declarations:
Programming the Timer Function in Ladder Logic
Select the current path for entering the
Ladder instruction.
Navigate in the Program Elements
catalog until you reach the element
S_OFFDT (start off-delay timer), and
select the element.
Insert a normally open contact in front
of input S.
Insert a coil after output Q.
Содержание SIMATIC STEP 7 V5.2
Страница 4: ...Welcome to STEP 7 STEP 7 Getting Started iv A5E00171228 01 ...
Страница 12: ...Introduction to STEP 7 1 6 STEP 7 Getting Started A5E00171228 01 ...
Страница 22: ...Programming with Symbols 3 4 STEP 7 Getting Started A5E00171228 01 ...
Страница 60: ...Creating a Program with Function Blocks and Data Blocks 5 24 STEP 7 Getting Started A5E00171228 01 ...
Страница 76: ...Downloading and Debugging the Program 7 14 STEP 7 Getting Started A5E00171228 01 ...
Страница 88: ...Programming a Shared Data Block 9 4 STEP 7 Getting Started A5E00171228 01 ...
Страница 100: ...Programming a Multiple Instance 10 12 STEP 7 Getting Started A5E00171228 01 ...
Страница 110: ...Appendix A STEP 7 Getting Started A 2 A5E00171228 01 ...