beautypg.com

Daqgetlasterror, Daqonline, Daqopen – Measurement Computing TempBook rev.3.0 User Manual

Page 152

background image

11-28 daqCommand Reference (Enhanced API)

TempBook User’s Manual

daqGetLastError

DLL Function

daqGetLastError(DaqHandleT handle, DaqError *errCode);

C

daqGetLastError(DaqHandleT handle, DaqError *errCode);

Visual BASIC

VBdaqGetLastError&(ByVal handle&, errCode&)

Delphi

daqGetLastError(handle:DaqHandleT; var errCode:DaqError): DaqError; stdcall;

external DAQX_DLL; procedure daqDefaultErrorHandler(handle:DaqHandleT;
errCode:DaqError)

Parameters

handle

Handle to the device

*errCode

Returned last error code

Returns

DerrNoError

- No error (also, refer to API Error Codes on page 11-39)

See Also

daqDefaultErrorHandler, daqProcessError, daqSetDefaultErrorHandler

Program References

None

Used With

All devices

daqGetLastError

allows you to retrieve the last error condition registered by the driver.

daqOnline

DLL Function

daqOnline(DaqHandleT handle, PBOOL online);

C

daqOnline(DaqHandleT handle, PBOOL online);

Visual BASIC

VBdaqOnline&(ByVal handle&, online&)

Delphi

daqOnline(handle: DaqHandleT; var online: longbool)

Parameters

handle

Handle of the device to test for online

online

Boolean indicating whether the device is currently online

Returns

DerrNoError

- No error (also, refer to API Error Codes on page 11-39)

See Also

daqOpen, daqClose

Program References

ERREX.PAS (Delphi)

Used With

All devices

daqOnline

allows you to determine if a device is online. The device handle must be a valid

device handle which has been opened using the daqOpen function. The online parameter
indicates the current online state of the device (TRUE - device online; FALSE - device not online).

daqOpen

DLL Function

daqOpen(LPSTR daqName);

C

daqOpen(LPSTR daqName);

Visual BASIC

VBdaqOpen&(ByVal daqName$)

Delphi

daqOpen(devName: PChar)

Parameters

daqName

String representing the name of the device to be opened

Returns

A handle to the specified device (also, refer to API Error Codes on page 11-39)

See Also

daqClose, daqOnline

Program References

ADCEX1.C, DIGEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ERREX.PAS, ADCEX.PAS (Delphi)

Used With

daqOpen

allows you to open an installed Daq* device for operation. The daqOpen function will

initiate a session for the device name specified by the daqName parameter by opening the device,
initializing it, and preparing it for further operation. The daqName specified must reference a
currently configured device. See Daq* Configuration utility (in the …Installation chapter) for more
details on configuring devices and assigning device names.

daqOpen

should be performed prior to any other operation performed on the device. This function

will return a device handle that is used by other functions to reference the device. Once the device
has been opened, the device handle should be used to perform subsequent operations on the device.

Most functions in this manual require a device handle in order to perform their operation. When the
device session is complete, daqClose may be called with the device handle to close the device
session.