Siemens Simatic S7-200 System Manual page 148

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

Advertisement

S7-200 Programmable Controller System Manual
Example: Single-Segment Pulse Train Operation (PTO)
M
A
I
N
S
B
R
0
6
136
Network 1
//On the first scan,
//set the image register bit low and call subroutine 0.
LD
SM0.1
R
Q0.0, 1
CALL
SBR_0
Network 1
//Start of subroutine 0: Configure PTO
//1. Set up the control byte:
//
– Select PTO operation.
//
– Select single segment operation.
//
– Select ms increments.
//
– Enable the loading of the pulse count
//
and cycle time value.
//
– Enable the PTO function.
//2. Set cycle time to 500ms.
//3. Set pulse count to 4 pulses.
//4. Define interrupt routine 0 to be the interrupt
//
for processing PTO complete interrupts.
//5. Global interrupt enable.
//6. Invoke PTO operation, PLS0 => Q0.0.
//7. Preload the control byte for subsequent cycle time
//changes.
LD
SM0.0
MOVB
16#8D, SMB67
MOVW
+500, SMW68
MOVD
+4, SMD72
ATCH
INT_0, 19
ENI
PLS
0
MOVB
16#89, SMB67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents