beautypg.com

Function usage – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 310

background image

4.6-32 Daq API Command Reference

908594

Programmer’s

Manual


Function Usage

Test types performed by the daqTest function vary; test results are based on the type of test requested. Tests can
only be performed on valid, opened devices. If there are problems with the test, be sure to check that the device is
properly configured, that the device is powered-on, and that it is properly connected.

The command parameter specifies the test to run. There are two main types of tests: resource and performance.
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.

Resource Tests

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. For
DaqBook/2000 Series, DaqBoard/2000 Series and cPCI DaqBoard/2000c Series this command definition returns
the bus and slot code of the hardware as “slot + (bus * 256).”

DtsInterruptLevelValid

- This test is not available for DaqBook/2000 Series, DaqBoard/2000 Series or

cPCI DaqBoard/2000c Series boards. For other devices the 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

- (DaqBoards 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. For DaqBook/2000 Series, DaqBoard/2000 Series and cPCI
DaqBoard/2000c Series, this command definition verifies DMA via available Input and Output speed tests, i.e.,
DtstAdcFifoInputSpeed, DtstDacFifoOutputSpeed, DtstIOInputSpeed, and

DtstIOOutputSpeed

. See the following Performance Tests section for more information.

Performance Tests

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. (Note 1).

DtsDacFifoOutputSpeed -

(DaqBoards 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. (Note 1).

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. (Note 1).

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. (Note 1).

Note 1: For DaqBook/2000 Series, DaqBoard/2000 Series and cPCI DaqBoard/2000c Series the results are limited to 200 kHz and

are only available on the correct hardware.