Example Of A Pulse Train Output Using Single Segment Operation In Sm Memory - Siemens SIMATIC S7-200 System Manual

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

Advertisement

Example of Pulse Train Output Using Single Segment Operation
MAIN OB1
MAIN OB1
Network 1
SM0.1
SUBROUTINE 0
Network 1
SM0.0
16#8D
16#89
Figure 9-22
S7-200 Programmable Controller System Manual
A5E00066097-02
LAD
Q0.0
On the first scan,
R
reset image
1
register bit low, and
SBR0
call subroutine 0.
EN
Set up control byte:
MOV_B
- select PTO operation
EN
ENO
- select ms increments
- set the pulse count and
IN
OUT
SMB67
cycle time values
- enable the PTO function
MOV_W
EN
ENO
Set cycle time to 500 ms.
IN
OUT
SMW68
500
MOV_DW
Set pulse count to 4 pulses.
EN
ENO
4
IN
OUT
SMD72
ATCH
Define interrupt routine 3 to
be the interrupt for
EN
ENO
processing PTO complete
3
INT
interrupts.
19
EVNT
Global interrupt enable.
ENI
PLS
Invoke PTO operation.
EN
ENO
PLS 0 => Q0.0
0
Q0.X
Preload control byte for
MOV_B
subsequent cycle time
EN
ENO
changes.
IN
OUT
SMB67
Example of a Pulse Train Output Using Single Segment Operation in
SM Memory
SIMATIC Instructions
STL
Network 1
LD
SM0.1
R
Q0.0, 1
CALL
0
Network 1
LD
SM0.0
MOVB
16#8D, SMB67
MOVW
500, SMW68
MOVD
4, SMD72
ATCH
3, 19
ENI
PLS
0
MOVB
16#89, SMB67
9-65

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents