beautypg.com

ADLINK ACL-8454/12 User Manual

Page 52

background image

44

High-Level Programming

@ Arguments

int CntrNo

: Counter number, equals to 1~12

int Mode

: Operation mode of counter, equals to 1 ~6

unsigned int CntrVal :The 16 bits counter value to write to the

counter.

@ Return Value

No_Error

: No error

Invalid_Counter_No : CntrNo is out of range.
Invalid_Timer_Mode : Mode is out of range

5.5 W_8454_Read_Counter

@ Description

To read the counter value from a counter. The user can directly
assign the counter number 1~12, therefore it is not necessary to care
about the chips number and other details.

@ Syntax

Microsoft C/C++ (Windows, Win95 & Win-NT)

int W_8454_Read_Counter (int CntrNo, int *Mode, unsigned
int *CntrVal)

Visual Basic

Windows 3.11 Version:
W_8454_Read_Counter (ByVal CntrNo As Integer, Mode As
Integer, CntrVal As Integer) As Long
Win-95 or Win-NT Version:
W_8454_Read_Counter (ByVal CntrNo As Long, Mode As
Long, CntrVal As Long) As Long

C/C++ (DOS)

int _8454_Read_Counter(int CntrNo, int *Mode, unsigned int
*CntrVal)

@ Arguments

int CntrNo

: Counter number, equals to 1~12

int *Mode

: Operation mode of counter, equals to 1 ~6

UINT *CntrVal : address to save the read back counter value

@ Return Value

No_Error

: No error

Invalid_Counter_No : CntrNo is out of range.