![Kinco HP043-20DT User Manual Download Page 49](http://html1.mh-extra.com/html/kinco/hp043-20dt/hp043-20dt_user-manual_1967647049.webp)
Kinco-HP
User Manual
49
5) Execute the
PLS
instruction to configure PTO0 and start it.
3.2.4.2.4 PWM Operations
Following takes PWM0 as an example to introduce how to configure and operate the
PTO/PWM generator in the user program.
There are two procedures for using PWM: 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 PWM
1) Set control byte SMB67 according to the desired operation.
For example, SMB67 = B#16#D3 indicates:
Enable the PTO/PWM function
Select PWM operation
Select 1μs as the time base
Allow updating the pulse width value and cycle time value
2) Set SMW68 according to desired cycle time.
3) Set SMW70 according to desired pulse width.
4) Execute the
PLS
instruction to configure PWM0 and start it.
Changing the Pulse Width for the PWM Output
The following steps describes how to change PWM output pulse width.
1) Set control byte SMB67 according to the desired operation.
For example, SMB67 = B#16#D2 indicates:
Enable the PTO/PWM function
Select PWM operation
Summary of Contents for HP043-20DT
Page 8: ...Kinco HP User Manual 8 1 4 4 Dimension Dimension 132 102 40 1mm Cutout size 119 93mm...
Page 22: ...Kinco HP User Manual 22...
Page 23: ...Kinco HP User Manual 23...
Page 25: ...Kinco HP User Manual 25...
Page 27: ...Kinco HP User Manual 27 3 Click update and recovery in the PC settings...
Page 28: ...Kinco HP User Manual 28 4 Click restart now at advanced startup 5 Click advanced options...
Page 29: ...Kinco HP User Manual 29 6 click startup settings 7 Click restart...
Page 31: ...Kinco HP User Manual 31 10 Figure as below after successful...