Daqtest – Measurement Computing WaveBook rev.3.0 User Manual
Page 225

WaveBook User’s Manual,
6-24-99
daqX API - Command Reference D-29
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]
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
Parameters
result
Pointer to the test result field
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqOpen
Program References
None
Used With
All devices
Description
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 Windows 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.
The count parameter can be used to indicate the duration or length of the test. For instance, a resource test will be run count times; and
if any one iteration of the test fails, it will indicate an overall failure of the test. For a performance test, the count parameter will indicate
the number of times to run the test, and the test result will be an average of all the tests performed.