Friday, September 25, 2020

PLC UART example to adjust the PWM duty cycle

Revising the UART and PWM ladder diagram instructions as a topic, Today I use these two main instructions to adjust the PWM output.

The UART terminal of the host PC receives the character command from the user to increase/decrease the duty cycle. I use letter 'P' to increase the duty cycle and letter 'N' to decrease the duty cycle.

There some others remanding instruction that I don't want to show any detail here due to the previous post's explanation.

PLC UART example to adjust the PWM duty cycle
Ladder diagram example


The initial set up assigns the duty cycle to 0 - there's no output power. A UART terminal prompt the user once in how to adjust the duty cycle.

Once the character command is prompted the PWM duty cycle is adjust within the step of 10% in duty cycle.

PLC UART example to adjust the PWM duty cycle
The schematic diagram

Click here to download the zip file of this working ladder diagram example.

No comments:

Post a Comment

Labels

ADC (10) Analog (14) Arduino (12) Atmega16 (19) Audio (2) AVR (20) Charger (1) Cortex-M0 (1) Counter (10) CPLD (25) Digital I/O (22) Display (34) EEPROM (2) Environment Sensor (1) esp8266 (2) Experiment Board (10) I2C (4) Interrupt (7) LCD (1) LDmicro (29) measurement and instrumentation (7) Microchip Studio (3) MikroC (1) One-Shot (3) OpAmp (1) PCB (31) PIC16 Microcontrollers (16) PIC16F877A (2) PIC16F887 MikroC (22) PLC (35) PWM (11) Regulator (1) RTC (2) Sensor (8) Shift Registers (5) SPI (5) Timer (34) UART (2) ultra-sonic sensor (1) USB (1) VHDL (21) xc8 (1) XC95108 (9) XC9536 (15) XC9572 (1) Xilinx (23) Xilinx ISE (22)