Al_counterin – Measurement Computing ADLIB WIN User Manual

Page 119

Advertising
background image

Chapter 39 Counter / Timer

26-1

26.3 AL_CounterIn

Prototype

C\C++

STATUS

AL_API

AL_CounterIn(LHLD

lhld);


Visual Basic for Windows

Function

AL_CounterIn(ByVal

lhld As Long,) As Long


LHLD lhld

handle of the LDSD


After the Counter has been initialized, AL_CounterIn function immediately retrieves the current count of
a Counter Input port. The first time AL_CounterIn is called the return number is meaningless and returns
a value of zero; subsequent calls return the number of counts since the last call to AL_CounterIn in
PULSE_COUNTER_INCREMENTAL mode or the totalized number of counts for
PULSE_COUNTER_CUMMULATIVE mode. See the function AL_SetCtrMode for specific mode
settings.

Parameter Description

lhld

Identifies the instance of the logical device subsystem.


Returns:
On success STATUS contains the current count, otherwise ERRNUM contains the negative error code that
occurred during the call.

Related Functions:
AL_SetCtrMode
AL_GetCtrMode

Supported Logical Device Subsystems:
Pci55xx

Series:

CTR0,

CTR1

Note that CTR0, CTR1 Counters are referenced in the user manual as CNTR0/1.


Advertising