Author Topic: Phase Lock Loop  (Read 6166 times)

M.Wysong

  • Newbie
  • *
  • Posts: 7
  • I'm a llama!
    • View Profile
Phase Lock Loop
« on: August 03, 2011, 09:36:02 AM »
What would be the easiest way to program a phase lock loop or what basic keywords would i use to get started. Should i try to take a loop and compare set frequency to incoming frequency and make the two match?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Phase Lock Loop
« Reply #1 on: August 03, 2011, 09:43:53 AM »
I don't think PLC is designed to generate PLL output.

What do you need to do? Do you need to generate a square wave output of certain frequency?
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

M.Wysong

  • Newbie
  • *
  • Posts: 7
  • I'm a llama!
    • View Profile
Re:Phase Lock Loop
« Reply #2 on: August 03, 2011, 10:34:17 AM »
Well the plc would generate an outgoing frequency and then recieve a frequency that it needs to match. So that the plc output frequency tunes to the incoming frequency. I hope that make since.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Phase Lock Loop
« Reply #3 on: August 03, 2011, 02:22:34 PM »
You could program the PLC PWM to output a pulse with variable duty cycle and frequency between 50 Hz to 50KHz. The frequency is generated using 16-bit counter and hence at low frequency the resolution is well below 0.1Hz. What frequency range do you need to work with?

The PLC can measure the frequency or pulse width of the incoming pulses very accurately (down to 0.1 microsecond pulse width) and this can be compared with the frequency it is supposed to output and get the difference.

Hopefully this will meet your application objectives.
« Last Edit: August 03, 2011, 02:23:07 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS