beautypg.com

Daqioreadbit, Daqiowrite – Measurement Computing Personal Daq rev.6.0 User Manual

Page 155

background image

Personal Daq User’s Manual

Appendix B,

887095

API Commands B-23


daqIOReadBit

DLL Function

daqIOReadBit(DaqHandleT handle, daqIODeviceType devType, daqIODevicePort devPort,

DWORD whichDevice, daqIOExpansionPort whichExpPort, DWORD bitNum, PBOOL bitValue);

C

daqIOReadBit(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort,

DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD bitNum, PBOOL bitValue);

Visual BASIC

VBdaqIOReadBit&(ByVal handle&, ByVal devType&, ByVal devPort&, ByVal whichDevice&,

ByVal whichExpPort&, ByVal bitNum&, bitValue&)

Delphi

daqIOReadBit(handle:DaqHandleT; devType:daqIODeviceType; dvPort:daqIODevicePort;

whichDevice:DWORD; whichExpPort:daqIOExpansionPort; bitNum:DWORD; var
bitValue:longbool)

handle

Handle to the device from which to perform the IO

devType

IO Device type

devPort

IO device port selection

whichDevice

IO device selection

whichExpPort

IO expansion port address

bitNum

IO port bit location to read

Parameters

bitValue

IO port bit value (TRUE - high, FALSE - low)

Returns

DerrNoError

No error

See Also

daqIORead, daqIOWrite, daqIOWriteBit

Program References

DIGEX1.C, DAQEX.FRM (VB), DAQEX.PAS (Delphi)

Used With

All devices except Personal Daq/54

Description

daqIOReadBit

allows you to read a specified bit on the selected device and port. The read operation will return the current state of the

selected bit in the bitValue parameter. The selected bit (specified by the bitNum parameter) corresponds to the IO channel on the port
which is to be read. The bitValue will be TRUE indicating a high state or FALSE indicating a low state.


daqIOWrite

DLL Function

daqIOWrite(DaqHandleT handle, daqIODeviceType devType, daqIODevicePort devPort,

DWORD whichDevice, daqIOExpansionPort whichExpPort, DWORD value);

C

daqIOWrite(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort,

DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD value);

Visual BASIC

VBdaqIOWrite&(ByVal handle&, ByVal devType&, ByVal devPort&, ByVal whichDevice&,

ByVal whichExpPort&, ByVal value&)

Delphi

daqIOWrite(handle:DaqHandleT; devType:daqIODeviceType; dvPort:daqIODevicePort;
whichDevice:DWORD; whichExpPort:daqIOExpansionPort; value:DWORD);

handle

Handle of the device to perform an IO write operation

devType

IO device type

devPort

IO device port selection

whichDevice

IO device selection

whichExpPort

IO device expansion port address

Parameters

value

Value to write

Returns

DerrNoError

No error

See Also

daqIORead, daqIOWriteBit, daqIOReadBit

Program References

DIGEX1.C, DAQEX.FRM (VB), DAQEX.PAS (Delphi)

Used With

All devices except Personal Daq/54

Description

daqIOWrite

allows you to write to the specified port on the selected device. The write operation will write the settings indicated in the

value

parameter to the selected port. The value written will depend on the width of the selected port. Normally, for byte-wide ports, only

the low-order byte of the value parameter will be written. The IO channels for the port correspond to each bit within the value written. If the
channel is to be driven to a high state, then the corresponding bit should be set. Likewise, if the channel is to be driven to a low state, then
the corresponding bit should not be set.

This manual is related to the following products: