Kinco-KS series
PTO profile terminated due to user command:
0=No, 1=Yes
The PTO idle bit or PWM idle bit indicate the completion of the PTO or PWM output.
The fallowing takes PTO0 as an example to introduce how to configure and operate the
PTO/PWM generator in the user program.
There are two procedures for using PTO: Configure related control registers and initialize
PTO. Execute PLS instruction.
Use SM0.1 (the first scan memory bit) to call a subroutine that contains the initialization
instructions. Since SM0.1 is used, the subroutine shall be executed only once, and this reduces
CPU scan time and provides a better program structure.
Execute the PTO (Single-Segment Operation)
1) Set control byte SMB67 according to the desired operation.
For example, SMB67 = B#16#85 indicates:
Enable the PTO/PWM function
Select 1μs as the time base
Allow updating the pulse number and cycling time.
2) Set SMW68 according to desired cycle time.
3) Set SMD72 according to desired pulse number.
4) (Optional) use ATCH to attach the PTO0-complete event (event 28) to an interrupt
routine to respond in real time to a PTO0-complete event.
5) Execute the PLS instruction to configure PTO0 and start it.
Changing the PTO Cycle Time (Single-Segment Operation)