PCI 703 User Manual
Eagle Technology - Data Acquisition
Eagle Technology © Copyright 2001-2004 – www.eagledaq.com
28
Query Codes
This chapter explains query codes and their functions relating to the PCI703 series. It will
show examples of typical query codes that can make custom application allot easier to
develop and tailor made for the PCI703 boards. Please note that all examples or pseudo code
will show the API call and not the ActiveX call. Use the section below to translate between the
two different implementations.
How to use query codes
The appendix shows a list of query code that can be used. The function prototypes below
show how to implement a query code for both the EDR Enhanced API and Utility ActiveX
control.
API Call
Long EDRE_Query (ulng Sn, ulng QueryCode, ulng Param)
Parameter
Type
Description
Sn
Unsigned long
Board’s serial number
QueryCode
Unsigned long
Query code. See appendix
Example:
ADUNREAD: This will tell you the number of available
samples.
ADBUSY: Is the ADC subsystem busy?
Param
Unsigned long
Extra parameter.
Return
Long
Returned query code
ActiveX Call
Long EDREUTLX.Query (long Code, long Param)
Parameter
Type
Description
Code
Unsigned long
Query code. See appendix
Param
Unsigned long
Extra parameter.
Return
Long
Returned query code
The above functions are used to execute query codes that can do a variety of functions. The
returned value will have the result of the query code. The query function can also execute
functions or changes settings of the driver system.
How to change the hardware FIFO depth
The hardware FIFO depth can be set with a single query call. This also relates to the interrupt
depth and data update rate. If sampling at maximum speed set this depth to max and for
slower speeds, under a 1000 Hz to a lower level.
PSEUDO BEGIN
UI32 Sn=1000000001 /*32-bit unsigned integer - Serial Number*/
UI32 Depth=1000 /*32-bit unsigned integer - FIFO Depth, Max is 4095*/
I32 Status /*32-bit integer*/
Status=EDRE_Query(Sn, ADIRQLEVEL /*Code 142*/,Depth)
If Status < 0 Then Error
PSEUDO END