beautypg.com

ADLINK ACL-8111 User Manual

Page 41

background image

C/C++ Library for DOS 35

5.2 _8111_Initial

@ Description

An ACL-8111 card is initialized according to the card number and the
corresponding base address. Every ACL-8111 Multi-Function Data
Acquisition Card have to be initialized by this function before calling other
functions.

@ Syntax

int _8111_Initial(int card_number, int base_addresss )

@ Argument:

card_number: the card number to be initialized, only

two cards can be initialized, the card
number must be CARD_1 or CARD_2.

base_address:the I/O port base address of the card,

the default address on the hardware
setting is Hex 220.

@ Return Code:

ERR_NoError
ERR_InvalidBoardNumber
ERR_BaseAddressError

@ Example:

#include "8111.h"

main()
{

int ErrCode;


Errcode = _8111_Initial( CARD_1, 0x210 );

if ( ErrCode != ERR_NoError )

exit(0);

ErrCode = _8111_Initial( CARD_2, 0x220 );

if ( ErrCode != ERR_NoError )

exit(0);

...

}