Author Topic: how to measure pulse width  (Read 11361 times)

hamidraza

  • Newbie
  • *
  • Posts: 8
  • I'm a llama!
    • View Profile
how to measure pulse width
« on: October 31, 2011, 02:26:17 AM »
how to measure the pulse width of the incoming pulse at input 1 of F1616BA.
please write the sample code showing how to enable Pulse Monitor, to save the width and to OFF the channel.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:how to measure pulse width
« Reply #1 on: October 31, 2011, 05:50:50 PM »
When you want to enable the pulse monitor say on channel 1:

   PMON 1

After that you can use the PULSEWIDTH(1) function to obtain the pulsewidth:

   A = PULSEWIDTH(1)

Pulsewidth is returned in microseconds.

To disable the pulse measurement, run:

    PMOFF 1
Email: support@triplc.com
Tel: 1-877-TRI-PLCS