VisualBasic style prototypes
Win98 & WinME
Initializ
ation
Pre-initialization
Declare Function SP_DisableDialog Lib "LL_USB.DLL"
() As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Pre-initialization
Declare Function SPx_SetProcessPriorityBoost Lib
"LL_USB.DLL" _
ByVal bProcessPriority As Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Intialization of DEVICES
new style (non-threaded) recommended for less than 3 devices
Declare Function SP_InitAllDevices Lib "LL_USB.DLL"
_
(ByRef pausDevList As Integer, ByRef
pbNumDevices_SP As Byte _
ByRef padblRate As Double, ByVal
fShowDevList As Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
new style (threaded) recommended for 3 or more devices
Includes supporting functions (must be used together)
Declare Function SP_InitAllDevices_Thread Lib
"LL_USB.DLL" _
(ByRef pausDevList As Integer, ByRef padblRate
As Double,
ByVal fShowDevList As Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Declare Function SP_GetInitThreadStat Lib
"LL_USB.DLL" () As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Declare Function SP_GetLastInitDevAndRates Lib
"LL_USB.DLL" _
(ByRef pausDevList As Integer, ByRef padblRate
As Double) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
old style (non-threaded) no longer recommended
Declare Function DLL_Init Lib "LL_USB.DLL" _
(ByVal hMainWin As Long, ByVal hValIgnored As
Long, _
ByVal hValIgnored As Long, ByVal fDebugLevel
As Integer, _
ByRef pNumDevices As Byte, ByRef
pbDeviceStatusShared As Byte, _
ByRef pausLLABS_DeviceIDList As Integer) As
Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Device rate
and calibration
Changing rate
Declare Function SP_SendRate Lib "LL_USB.DLL" _
(ByRef pdblRate As Double, ByVal usDevID As
Integer) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
System calibration
Declare Function SP_SystemCalibration Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal bCurChan as
Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Basic
I/O
change channel
Declare Function SP_SendChan Lib "LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal bCurChan as
Byte, ByRef pbReserved as Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
send digital output
Declare Function SP_SendDigOut Lib "LL_USB.DLL"
_
(ByVal usDevID As Integer, ByVal bDigOut as
Byte, ByRef pbReserved as Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
send analog output (Model 302 only)
Declare Function SP_SendDAC Lib "LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal dblVoltage As
Double, _
ByVal bDAC as Byte, ByRef pbReserved as
Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
direct read/write of device
Declare Function SP_ReadWriteOneDevice Lib
"LL_USB.DLL" _
(ByVal fReadWrite As Byte, ByRef
pbDynamicDataArray as Byte _
ByVal usDevID As Integer, ByRef pNumBytes as
Long, ByRef pbDigIn as Byte _
ByVal bCurChan As Byte, ByRef puiFlags as
Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
Polled
data
mode
get one conversion (new style - see note that follows)
Note: This is the newest and recommended method for reading a
single 24-bit data (voltage) from the device. This call has both error
recover and is much easier to implement than the "old style" method
that required a special token to be written to the device, the data read,
and error recovery implemented.
Declare Function SP_GetOneConversion Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByRef
puiConvRawCount as Long _
ByVal bCurChan As Byte, ByRef pbLastDigin as
Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
Scanning
data mode
start scan
Declare Function DLL_StartScan_DIO Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByRef pScanObject
As SCAN_OBJECT _
ByVal bReserved As Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
read scan data
Declare Function DLL_ReadScanData_DIO Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByRef pauiDataBuff
as Long _
ByVal usNumPointsToRead As Integer, ByRef
pScanObject As SCAN_OBJECT) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
read scan data with digital input
Declare Function DLL_ReadScanDataWithDigin Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByRef pauiDataBuff
as Long, _
ByRef pabDiginBuff as Byte, ByRef pbCurChan
as Byte, _
ByVal usNumPointsToRead As Integer, ByRef
pScanObject As SCAN_OBJECT) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
write device while scanning
Declare Function SP_WriteWhileScanning Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal bCmnd as
Byte _
ByVal bArg As Byte, ByRef puiCurWriteStat As
Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
write to device while scanning (special)
Declare Function SP_WriteWhileScanning Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal bCmnd as
Byte, _
ByRef pabDiginBuff as Byte, ByRef pbCurChan
as Byte, _
ByVal bArg As Byte, ByRef puiCurWriteStat As
Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
end scan (see note below)
It is recommended that you now use the newer "SP_EndScan()"
function shown further down in this document. Many of the arguments
of this old style function call are no longer used by the DLL and those
have been removed from the new function call.
Please use newer SP_EndScan function shown further down within
this document
Declare Function DLL_EndScan_DIO Lib
"LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal fReserved As
Byte _
ByVal uiReserved As Long, ByVal uiReserved As
Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
end scan (recommended)
Declare Function SP_EndScan Lib "LL_USB.DLL" _
(ByVal usDevID) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
code sample
Miscella
neous
get last device initialization status
Declare Function SP_GetLastInitStat Lib
"LL_USB.DLL" _
(ByRef pDevList as Integer, ByRef puiFlags as
Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
get device status (one device)
Declare Function SP_GetDevStat Lib "LL_USB.DLL" _
(ByVal usDevID as Integer, ByRef puiDevStat as
Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
get device status (multiple devices)
Declare Function SP_GetDevStatEx Lib
"LL_USB.DLL" _
(ByRef pauiDevStat As Long, ByRef
pausAllDevList as Integer _
ByRef pbNumDevices as Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
check device power
Declare Function SP_CheckPower Lib "LL_USB.DLL"
_
(ByVal usDevID as Integer, ByVal bCurChan as
Byte, ByRef pbDigIn As Byte, _
ByRef puiFlags as Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
send a reset to device
Declare Function SP_SendReset Lib "LL_USB.DLL" _
(ByVal usDevID As Integer, ByVal bCurChan As
Byte _
ByRef pbDigIin as Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
get copy of registry device list
Declare Function SP_GetRegDevList Lib
"LL_USB.DLL" _
(ByRef usDevIDList As Integer, ByVal uiUnused
as Long) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"
increase process priority level
Declare Function SP_SetProcessPriorityBoost Lib
"LL_USB.DLL" _
(ByVal bBoost as Byte) As Byte
back to "C" prototypes includes info on arg usage
back to "Table of Contents"
back to "List of all function calls"