PulseCounterEnable Method

Initializes and enables the pulse counter. Used for measuring pulses applied to input pin A2. Max pulse frequency 500hz. Inputs on A2 will not be registered as events whilst pulse counting is enabled.

Definition

Namespace: RoboTx.Api
Assembly: RoboTx.Api (in RoboTx.Api.dll) Version: 1.0.0
C#
public void Enable(
	int timeoutMs,
	int triggerEdge
)

Parameters

timeoutMs  Int32
The number of milliseconds to wait for a pulse before resetting pulse period to 0. Must be between 250 and 10000 inclusive.
triggerEdge  Int32
Trigger counter on either rising (1) or falling (0) edge of pulse signal.

Exceptions

IOExceptionSerial port is in error state or not open.
ArgumentOutOfRangeExceptiontimeoutMs is out of range.

See Also