Pto Initialization-Multiple Segment Operation - Siemens SIMATIC S7-200 System Manual

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

Advertisement

SIMATIC Instructions
PTO Initialization - Multiple Segment Operation
To initialize the PTO, follow these steps:
1.
Use the first scan memory bit (SM0.1) to initialize the output to 0, and call the
subroutine that you need to perform the initialization operations. This reduces
the scan time execution and provides a more structured program.
2.
In the initialization subroutine, load SMB67 with a value of 16#A0 for PTO
using microsecond increments (or 16#A8 for PTO using millisecond
increments). These values set the control byte to enable the PTO/PWM
function, select PTO and multiple segment operation, and select either
microsecond or millisecond increments
3.
Load SMW168 (word size value) with the starting V memory offset of the
profile table.
4.
Set up the segment values in the profile table. Ensure that the Number of
Segment field (the first byte of the table) is correct.
5.
This is an optional step. If you want to perform a related function as soon as
the PTO profile is complete, you can program an interrupt by attaching the
pulse train complete event (Interrupt Category 19) to an interrupt subroutine.
Use the ATCH instruction, and execute the global interrupt enable instruction
ENI. Refer to Section 9.15 for complete details on interrupt processing.
6.
Execute the PLS instruction. The S7-200 programs the PTO/PWM generator.
7.
Exit the subroutine.
9-62
S7-200 Programmable Controller System Manual
A5E00066097-02

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents