beautypg.com

Daqtest – Measurement Computing TempBook rev.3.0 User Manual

Page 155

background image

TempBook User’s Manual

daqCommand Reference (Enhanced API) 11-31

daqTest

DLL Function

daqTest(DaqHandleT handle, DaqTestCommand command, DWORD count, PBOOL

cmdAvailable, PDWORD result);

C

daqTest(DaqHandleT handle, DaqTestCommand command, DWORD count, PBOOL

cmdAvailable, PDWORD result);

Visual BASIC

VBdaqTest&(ByVal handle&, ByVal command&, ByVal count&, cmdAvailable&, result&)

Delphi

[not supported]

Parameters

handle

Handle to the device for which the test is to be performed

command

Specifies the type of test to be run

count

Optional parameter which specifies the length of the test

cmdAvailable

Return Boolean indicating the availability of the test for the device

result

Pointer to the test result field

Returns

DerrNoError

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

See Also

daqOpen

Program References

None

Used With

All devices

daqTest

allows you to test a Daq* device for specific functionality. Test types vary, and test

results are based on the type of test requested. Tests can only be performed on valid, opened Daq*
devices. If there are problems with the test, be sure to check the device for proper configuration and
that the device is powered-on and properly connected.

The command parameter specifies the test to run. There are two main types of tests: resource and
performance.

Resource tests are pass/fail and are useful in determining if the device has the appropriate resources
to function efficiently. If one or more of the resource tests fail, the Daq Configuration utility (found
in the operating system’s Control Panel) may be used to change the resource settings related to the
problem. Valid resource test types are defined as follows:

DtsBaseAddressValid

- This test will indicate if there is a problem communicating with

the device at its currently specified base address. A non-zero in the result parameter will
indicate a failed condition.

DtsInterruptLevelValid

- This test will indicate if there is a problem with performing

acquisitions using interrupts. A non-zero in the result parameter will indicate a failed
condition. If this is the case, the interrupts may not be properly configured (if the device is a
DaqBook, the LPT interrupts may not be enabled on the system) or an interrupt conflict exists
with another device.

DtsDmaChannelValid

- (DaqBoard only) This test will indicate if there is a problem with

performing acquisitions through DMA transfers with the currently configured DMA channel for
the device. A non-zero in the result parameter will indicate a failed condition. If this is the
case, DMA may not be enabled for the device or a conflict may exist with another device.

Performance tests measure the speed at which certain operations can be performed on the device.
In general, the performance test results indicate the maximum rate at which the operation can be
performed on the device. The valid performance test types are defined as follows:

DtsAdcFifoInputSpeed

- This test will determine the maximum rate at which analog

input can be acquired and transferred to system memory. Analog input performance results will
be returned in the result parameter with units of samples/second.

DtsDacFifoOutputSpeed

- (DaqBoard only) This test will determine the maximum rate

at which analog output data can be read from system memory and transferred to the device’s
DAC FIFO. Analog output performance results will be returned in the result parameter with
units of samples/second.

DtsIOInputSpeed

- This test will determine the maximum rate at which digital input can

be read from the device’s DIO port and transferred to system memory. Digital input
performance results will be returned in the result parameter with units of bytes/second.

DtsIOOutputSpeed

- This test will determine the maximum rate at which digital output can

be read from system memory and output to the device’s DIO port. Digital output performance
results will be returned in the result parameter with units of bytes/second.

The cmdAvailable parameter is a pointer to a Boolean value that indicates whether or not the
specified test is available for the device.