Internet PLC Forum

General => Technical support => Topic started by: hamidraza on October 31, 2011, 02:26:17 AM

Title: how to measure pulse width
Post by: hamidraza 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.
Title: Re:how to measure pulse width
Post by: support 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