PhidgetFrequencyCounter

PhidgetFrequencyCounter

A class for controlling a PhidgetFrequencyCounter.  See your product manual for more specific API details, supported functionality, units, etc.

Summary
PhidgetFrequencyCounterA class for controlling a PhidgetFrequencyCounter.
EventsEvents supported by PhidgetFrequencyCounter.
Constants
FrequencyCounter filter typesThese are the filter types supported by PhidgetFrequencyCounter.
Properties
FrequencyInputCountGets the number of inputs on this frequencycounter.
Functions
getEnabledGets the enabled state of an input.
getFrequencyGets the frequency, in Hz.
getFilterGets the filter type for an input.
getTimeoutGets the timeout for an input, in microseconds
getTotalCountGets the total count of input pulses.
getTotalTimeGets the total time of input pulses.
setEnabledEnables/Disables an input.
setFilterSets the filter type for an input.
setTimeoutSets the timout for an input, in microseconds.
resetResets the totalCount and totalTime for an input.

Events

Events supported by PhidgetFrequencyCounter.  Pass these constants to the addEventListener() function when adding event listeners to a Phidget object.

PhidgetDataEvent.COUNTcounts (Array:[timeChange, countChange]).  Happens when input counts are recieved, or when the timeout occurs.

Constants

FrequencyCounter filter types

These are the filter types supported by PhidgetFrequencyCounter.  These constants are used with getFilter and setFilter.

PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSINGzero crossing filter.
PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVELlogic level filter.

Properties

FrequencyInputCount

public function get FrequencyInputCount():int

Gets the number of inputs on this frequencycounter.

Functions

getEnabled

public function getEnabled(index: int):Boolean

Gets the enabled state of an input.

Parameters

indexinput index

getFrequency

public function getFrequency(index: int):Number

Gets the frequency, in Hz.

Parameters

indexinput index

getFilter

public function getFilter(index: int):int

Gets the filter type for an input.

Parameters

indexinput index.

getTimeout

public function getTimeout(index: int):int

Gets the timeout for an input, in microseconds

Parameters

indexinput index.

getTotalCount

public function getTotalCount(index: int):Number

Gets the total count of input pulses.

Parameters

indexinput index.

getTotalTime

public function getTotalTime(index: int):Number

Gets the total time of input pulses.

Parameters

indexinput index.

setEnabled

public function setEnabled(index: int,
val: Boolean):void

Enables/Disables an input.

Parameters

indexinput index
valstate

setFilter

public function setFilter(index: int,
val: int):void

Sets the filter type for an input.  Set to one of the defined filter types - PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSING - PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVEL.

Parameters

indexinput index
valstate

setTimeout

public function setTimeout(index: int,
val: int):void

Sets the timout for an input, in microseconds.

Parameters

indexinput index
valstate

reset

public function reset(val: int):void

Resets the totalCount and totalTime for an input.

Base Phidget class from which all specific device classes inherit.
public function get FrequencyInputCount():int
Gets the number of inputs on this frequencycounter.
public function getEnabled(index: int):Boolean
Gets the enabled state of an input.
public function getFrequency(index: int):Number
Gets the frequency, in Hz.
public function getFilter(index: int):int
Gets the filter type for an input.
public function getTimeout(index: int):int
Gets the timeout for an input, in microseconds
public function getTotalCount(index: int):Number
Gets the total count of input pulses.
public function getTotalTime(index: int):Number
Gets the total time of input pulses.
public function setEnabled(index: int,
val: Boolean):void
Enables/Disables an input.
public function setFilter(index: int,
val: int):void
Sets the filter type for an input.
public function setTimeout(index: int,
val: int):void
Sets the timout for an input, in microseconds.
public function reset(val: int):void
Resets the totalCount and totalTime for an input.
zero crossing filter.
logic level filter.
Close