Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - 50Hz pwm

(you are viewing a thread; or go back to list of threads)

50Hz pwm (by MURTAZA)
I made this program for a heater control by% from 0to99% duty cycle with display .but when i set pwm frequncy 50Hz then a mesg
tel that pwm is to low. but when i set pwm 70 Hz its work ok

my cycle time is 4ms and crystal 1Mhz.plz help me to get 50HZ.
Wed Feb 27 2013, 16:02:49, download attachment heater2.ld
pwm (by Volhout)
For 50Hz PWM you need to change the crystal to 500kHz. LDmicro uses a fixed divider to clock the PWM.
Tue Mar 12 2013, 09:19:58
why 50Hz (by Volhout)
Typically PWM is used to create a DC voltage (it is a stand alone process, not synchronized with anything except the crystal). If you way to duty cycle control a 50Hz (mains voltage) load you will have to sync to the mains.

You will need 100Hz PWM though, since you will allways have to control the duty cycle in the positive AND negative half of the sine wave. I am not sure how to sync mains and PWM using the PWM module inside LDmicro.

An option for a very rough PWM could be to sense the mains zero crossover in a rung (you need a HW detector). Run the PLC at it's highest cycle time (e.i. 1 mSec) and create your own PWM with a counter.

The maximum you can achieve this way is 1mSec resolution (for 100Hz=10mSec) giving you a rough control of the power in the heater. But this may be enough.
Tue Mar 12 2013, 09:31:43
50Hz (by MURTAZA)
THANKS for volhout for reply and solve the problum .as u guide me .i solve the matter .THANKS AGAIN
Wed Mar 13 2013, 06:14:14
manipulate timer (by maximus)
Hi....
Can i manipulate value of timer....?
Tue Apr 12 2016, 12:04:46, download attachment pwm discreteout.ld
(no subject) (by MGP)
Here you can find a software pwm, depending of the dutycycle.

If it's too slow then divide the analog reading by 10 and rung 3 to 102.

http://cq.cx/ladder-forum.pl?action=viewthread&parent=1544
Wed Apr 13 2016, 13:12:02
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):