Spectral Products
Appendix C
C.1. SP SDK functions
Function spTestBoard() should be called first to get and set the appropriate information of the board. Then
spSetHv(), spSetRC(),spSetGain(), spSetTrigLevel(), spSetTrigSource(), spHvSource(), spSetAvg().
For AD111 status call spReadInfo(), and for data call spReadDataEx().
Call spCloseEx() as the last function before exiting the AD111 software.
Function Name
Description
RETURN
when
successful
RETURN
when
unsuccessful
Zero A
non-zero
number
spTestBoard
short spTestBoard
(
)
Checks the status of the electronic board and
its connection.
Closes the USB board. It should be called
when exiting the application.
None None
spCloseEx
void spCloseEx
(
)
spSetHv
Spectral
Products
2659 Pan American Fwy, Suite A, NE Albuquerque, NM 87107 Ph. (505) 343-9700 Fax (505) 343-9705
23
short spSetHv
(
short
sHV
)
sets the high voltage (1-1000V)
Zero A
non-zero
number
spSetRC
short spSetRC
(
short
sRC
)
Sets the time constant.
sRC
can be 1
μ
s, 10
μ
s, 100
μ
s, 1 ms, and 10
ms (0 to 4 respectively).
Zero A
non-zero
number
spSetGain
short spSetGain
(
short
sGain
)
Sets the gain.
sGain
can be from 1 to 10
Zero A
non-zero
number
spSetTrigLevel
short spSetRC
(
short
sTrigValue
)
Sets the voltage trigger level.
sTrigValue
can be from 0 to 50, which
corresponds to 0 - 5V.
Zero A
non-zero
number
spSetTrigSource
short spSetTrigSource
(
short
sTrigSource
)
Sets the voltage trigger source.
sTrigValue
can be External, Level, or
Software (0, 1, or 2 respectively).
Zero A
non-zero
number