Al_digoutput – Measurement Computing ADLIB WIN User Manual

Page 66

Advertising
background image

Chapter 19 Digital Input/Output

18-2

18.2 AL_DigOutput

Prototype

C\C++

ERRNUM

AL_API

AL_DigOutput(LHLD

lhld, long lChan, long lOutputData, long

lMaskBits);


Visual Basic for Windows

Function

AL_DigOutput(ByVal

lhld As Long, ByVal lChan As Long,

ByVal lOutputData As Long,

ByVal lMaskBits As Long) As Long

LHLD lhld

handle of the LDSD

long lChan

specifies the output port channel number

long lOutputData specifies the data to be output
long lMaskBits

specifies the output port masking bits


The AL_DigOutput function immediately sets a digital output port.

Parameter

Description

lhld

Identifies the instance of the logical device subsystem.


lChan

Specifies the output port channel.


lOutputData

Specifies the output data to be sent to the port.


lMaskBits

Selects the bits that the function will operate on. All bits set in the mask will

be acted upon. Unselected bits in the mask will not change state.


Returns:
On success ERRNUM is set to 1, otherwise ERRNUM contains the negative error code that occurred
during the call.

Note:
Digital IO channels 0 & 1 for all supported hardware are only 8 bit ports. Digital Channels 2 & 3, for all
except a Pci5500 (which don’t have ports 2 & 3), are 16 bit ports. The lChan parameter for all Pci55xx
boards should be set to zero. All four digital ports are hardware programmable as either input or output
ports and are represented by DOTx for output ports. Port direction programming is determined by the first
call to either the AL_DigInput or AL_DigOuput functions.

Related Functions:
AL_DigInput
AL_DigBitsTest

Program References:
Adldio01, Adldio23

Supported Logical Device Subsystems:
Pci5500: DOT0, DOT1
Pci55xx Series: DOT0, DOT1, DOT2, DOT3

Program References:
Adldio01, Adldio23

Advertising