Simatic Lad Program For Using A Subroutine And An Interrupt Routine; Simatic Stl Program For Using A Subroutine And An Interrupt Routine - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

MAIN PROGRAM OB1
Network 1
SM0.1
SUBROUTINE 0
Network 1
SM0.0
100
INTERRUPT ROUTINE 0
Network 1
SM0.0
AIW4
Figure 4-7
Figure 4-8
S7-200 Programmable Controller System Manual
A5E00066097-02
Basic Concepts for Programming an S7-200 CPU
SIMATIC LAD
SBR0
EN
MOV_B
EN
ENO
IN
OUT
SMB34
0
10
MOV_W
EN
ENO
IN
OUT
VW100

SIMATIC LAD Program for Using a Subroutine and an Interrupt Routine

Statement List
Main Program OB1
Network 1
LD
SM0.1
CALL
0
Subroutine 0
Network 1
LD
SM0.0
MOVB
100, SMB34
AENO
ATCH
0, 10
AENO
ENI
Interrupt Routine 0
Network 1
LD SM0.0
MOVW
AIW4,VW100

SIMATIC STL Program for Using a Subroutine and an Interrupt Routine

ATCH
EN
ENO
ENI
INT
EVNT
//When first scan cycle
//bit comes on
//Call subroutine 0.
//Always on memory bit.
//Set timed interrupt 0
//interval to 100 ms.
//If move is successful,
//attach timed interrupt 0
//to interrupt routine 0.
//If attach is successful,
//then enable Global Interrupt.
//Begin interrupt routine 0.
//Always on memory bit.
//Sample Analog Input 4.
4-19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents