Example Of A Pulse Train Output Using Multiple Segment Operation - Siemens SIMATIC S7-200 System Manual

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

Advertisement

SIMATIC Instructions
Example of Pulse Train Output Using Multiple Segment Operation
MAIN OB1
MAIN OB1
Network 1
SM0.1
SUBROUTINE 0
Network 1
SM0.0
16#AO
Figure 9-23
9-68
LAD
Q0.0
On the first scan,
R
reset image
1
register bit low, and
SBR0
call subroutine 0.
EN
Set up control byte:
- select PTO operation
MOV_B
- select multiple segment
EN
ENO
operation
select µs increments
IN
OUT
SMB67
- enable the PTO function
MOV_W
Specify that the start address
of the profile table is V500.
EN
ENO
IN
OUT
SMW168
500
Set number of profile
MOV_B
table segments to 3.
EN
ENO
3
IN
OUT
VB500
Set the initial cycle time for
MOV_W
segment #1 to 500 µs
EN ENO
IN
OUT
VW501
500
Set the delta cycle time for
MOV_W
segment #1 to -2 µs
EN ENO
IN
OUT
-2
VW503
MOV_D
Set the number of pulses
EN ENO
in segment #1 to 200.
IN
OUT
200
VD505

Example of a Pulse Train Output Using Multiple Segment Operation

STL
Network 1
LD
SM0.1
R
Q0.0, 1
CALL
0
Network 1
LD
SM0.0
MOVB
16#A0, SMB67
MOVW
500, SMW168
MOVB
3, VB500
MOVW
500, VW501
MOVW
-2, VD503
MOVD
200, VD505
S7-200 Programmable Controller System Manual
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents