cmdMPD_CHKIndex

Command Code:

The Packet:

Description:

This command checks for a pulse input to a missing-pulse detector.  A counter ID that is out of range will generate an error message.  The min threshold must always be less than or equal to the max threhold for this command to function properly.  There is no reply packet.

A normal counter generates a raw input when the count reaches zero after a decrement or increment operation.  A missing-pulse detector generates a raw input after several consecutive cmdMPD_CHK commands fail to detect a valid pulse.  This number of failures is the pulse count failure limit in the cmdMPD_SET command.  The cmdMPD_CHK command automatically resets the failure limit to the initial value after detecting a valid pulse.

To detect pulses, a missing-pulse detector remembers the state of the last input.  When the input sample exceeds the max threshold, the state changes to 1.  When the input sample drops below the low threshold, the state changes to 0.  This input processing is similar to the operation of a Schmitt Trigger.  A valid pulse is a 0-1 transition.

For example, suppose a reflex is sampling a slowly varying sine wave that ranges in amplitude from 0 to 255.  Let the max threshold be 100 and the min threshold be 50.  When the input sample exceeds 100, the missing-pulse detector records a state of 1.  After the signal rises to its peak and then drops below 50, the missing-pulse detector records a state of 0.  When the signal rises above 100 again, the missing-pulse detector records a state of 1 and detects a 0-1 transition.  This is a valid pulse.  This comparator logic can convert a noisy sine wave into a clean square wave.  It also works if the input is already a clean square wave.


version: 1.0, build 80903
© Copyright 1994-2008 Acroname, Inc., Boulder, Colorado.  All rights reserved.