Program instructions
7.10 Interrupt
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
333
Example 2: Timed interrupt for reading the value of an analog input
MAIN
Network 1
On the first scan, call subrou-
tine 0.
LD SM0.1
CALL SBR_0
SBR 0
Network 1
Set the interval for the timed
interrupt 0 to 100 ms.
Attach timed interrupt 0
(Event 10) to INT_0.
Global interrupt enable.
LD SM0.0
MOVB 100, SMB34
ATCH INT_0, 10
ENI
INT 0
Network 1
Read the value of AIW16 every
100 ms.
LD SM0.0
MOVW AIW16, VW100