Technical data
Appendix
27.6 Sample Programs
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 645
T #Time_bin
LC #Timer_No
T #Time_BCD
A #Timer_No
AN #Response
S #Fault
R #Motor
Network 3 Start lamp and fault reset
A #Response
= #Start_Dsp
R #Fault
Network 4 Stop lamp
AN #Response
= #Stop_Dsp
Network 5 Counting the starts
A #Motor
FP #Start_Edge
JCN lab1
L #Starts
+ 1
T #Starts
lab1: NOP 0
Network 6 Maintenance lamp
L #Starts
L 50
>=I
= #Maint
Network 7 Reset counter for number of starts
A #Reset_Maint
A #Maint
JCN END
L 0
T #Starts
END: NOP 0
Creating the Instance Data Blocks
Create three data blocks and open them one after another. In the "New Data Block" dialog box
select the option "Data block referencing a function block." In the "Reference" list box select "FB1."
The data blocks are then specified as instance data blocks with a fixed assignment to FB1.