Specifications

SIMATIC Instructions
9-175
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Figure 9-66 shows how to set up a timed interrupt to read the value of an analog
input.
Network 1
LD SM0.1
CALL 0
SM0.1
Network 1
IN100
MOV_B
OUT
SMB34
EN
SM0.0
INT0
ATCH
EN
EVNT10
Network 1
INAIW4
MOV_W
OUT VW100
EN
ENI
LAD STL
MAIN PROGRAM
SUBROUTINE 0
INTERRUPT 0
First scan memory bit:
Call Subroutine 0.
Begin Subroutine 0.
Always on memory bit:
Set timed interrupt 0
interval to 100 ms.
Network 1
LD SM0.0
MOVB 100, SMB34
ATCH 0, 10
ENI
Global Interrupt Enable
Attach timed interrupt 0 to
Interrupt routine 0.
Begin Interrupt routine 0.
Sample AIW4.
Terminate Interrupt routine.
Network 1
LD SM0.0
MOVW AIW4, VW100
FBD
ENO
ENO
ENO
Network 1
SM0.0
MAIN PROGRAM
SUBROUTINE 0
SBR0
ENSM0.1
IN100
MOV_B
OUT
SMB34
EN
INT0
ATCH
EN
EVNT10
ENO
ENO
ENI
SM0.0
INTERRUPT 0
INAIW4
MOV_W
OUT VW100
EN ENO
SM0.0
Network 1
Network 1
Network 1
SBR0
Figure 9-66 Example of How to Set Up a Timed Interrupt to Read the Value of an Analog
Input