In the previous post, I show about using the PWM ladder diagram instruction in LDMicro. Furthermore, its duty cycle could be adjusted. The adjustment is made by copying any duty cycle value to the PWM duty cycle parameter.
In this example, I use two input contacts to adjust the duty cycle. The increment has a step of 10% of duty cycle. In the ladder diagram I set the default duty cycle to 0% with a frequency of 10kHz.
Ladder Diagram Program |
PIC16F876A is selected as the CPU of PLC. It clocks at 20MHz to get the maximum computing performance.
Schematic Diagram |
No comments:
Post a Comment