Lawson Labs, Inc.
Model 301/302 USB Data Acquisition System
M30x_SP
 


Links to sample code, device driver, DLL and support files, and documentation
links below default to  Win2k/XP/NT
Win98/ME  where marked
complete API Documentation

-- tailored for the developer --
updated 3-3-06


Follow the link below to download releases of the new sample applications for interfacing our Model 301 and 302. This link may move at a later date so please don't bookmark it within your browser, but rather return here when checking for an update. The link takes you to a tree of folders containing sample applications, supporting documentation, as well as the latest driver, DLL, and all required installation files. Further down the page beyond the link is a more detailed explanation of each. Please examine the links and read the contents of this page and those linked to before contacting us for support.

THE MAIN WEB LINK




Quick link to folders for all sample applications
goes quickly to links on this page showing sample apps with code for all developers - each downloadable separately from website.




At   THE MAIN WEB LINK   you'll find folders for LabView developers, VisualBasic developers, VisualC++  ( or other C/C++ developers )  and a folder that contains resources to be shared by all developers such as driver, DLL, .ini files, docs, etc.

You should be able to download any file located in any of those folders by right-clicking your mouse on it and choosing the   "Save Target As"   option from the menu that appears. You may also be able to open   Read_1st.txt   file directly into your browser just by double-clicking your mouse on it. Be aware that if you load   Read_1st.txt   into your browser, you will typically need to hit the browser "back" button to return to this page since it will be opened within the the same browser window.



The folder   _Examples   in each of the development language type folders contains groups of sample code - each showing ways to interract with the functions (API) available with the DLL. There is an archive within each of those folders which allow you to download an entire project at once or you can download a single file such as a .cpp source or .h header file to see what's going on. Depending on your browser configuration, you may be able to just left-click your mouse on one of the source files (.cpp, .h, .bas, etc.) and it will open as a text document in your browser's window (or maybe automatically load the particular file into your IDE for viewing) giving you a quick and easy way of getting a feel for how easy it can be to interract with our new DLL. The folder   _HTML_docs   contains some HTML documents that you may be able to load directly into your web-browser. Only the LabView developer's folder contains a special html file pertinent to their development process. The shared folder contains html document for all developers.



All developers can make use of the simplified API using the DLL  LL_USB2k.DLL  for Win2k/XP/NT developers with it's Device Driver  LL_USB2k.sys  located at:
    Driver, DLL, .INI, .Inf, etc. Win2k/XP/NT
or  LL_USB.DLL  with it's Device Driver  LL_USB.sys  located at:
    Driver, DLL, .INI, .Inf, etc. Win98/ME
Important:  That DLL at the link given, will always be the most recent. The various archives may contain an older copy of the DLL that was created at the time the particular archive was made. Although a new DLL may be created to fix certain errors that we became aware of, it is more often the case that a new one is created to add even more functionality to make the developer's job interracting with the DLL easier. You can always replace the copy of the DLL that was included in your archive with the newest one. The link above simply takes you to a folder located at the main link given in bold further up this page.



If you've previously installed one of our devices, you will only need to copy the .sys (device driver) into your "windows/system32/drivers" directory (overwrite previous driver) and place the .dll file within the application directory. If you haven't previously installed, you will need to place all of those files into the same location (floppy disk is preferred) to be used by the Windows installer when you first connect your device.



The API is documented with prototypes and descriptions for all programming languages mentioned above at:
    API Documentation
The link above simply takes you to one of the sub-folders located at the main link given in bold at the middle of this page.



Please Note:   the  FuncUse.htm  file located there may be updated more frequently than the one that is actually located within the archive. This is a relatively new project and we continue to add more documentation to explain the API while still allowing the download and use of the simplified DLL. There are many functions within the DLL to simplify development of an application around our Model-30x devices so it will take a little while to fully document.


( HTML update:  3-3-06 )
If you've previously loaded one of the HTML files in your browser, you may need to use your browser's "refresh" button to view the contents of the updated file.

( DLL update:  3-3-06 )
Just copy the newest over top of the previous one  -  driver update required if DLL version is older than driver version

( Driver update:  7-6-04 )
Just copy the newest over top of the previous one.

( Sample application update:  frequent )
Please check  listing  to see if there is anything new for your development platform








Contact us for sales or technical assistance
lawsnlab@lawsonlabs.com

on the web
www.lawsonlabs.com

© Lawson Labs Inc. All rights reserved
Last modified 10-11-04 Tim Van Dusen


















































Quick-Links to web folders
each application example contains a copy of the DLL that was used at the time it was created
you can either use it or copy the most recent DLL for  Win2k/XP/NT  or   Win98/ME
C/C++ samplesVisualBasic samplesLabView samples
 

  VisualC++ style applications
  adaptable to any C/C++ compiler

 PROJECT  OS Link  Functions demonstrated
vc30xSP
98/ME
2K/XP/NT
connect to device,  set a channel,  read a voltage, uses the functions shown below
EX_Connect,   EX_SetPolledModeChan,   EX_GetOneConversion
vc30xSP2
98/ME
2K/XP/NT
connect to device,  set a channel,  read a voltage,  run a scan ( logs data to a file on your disk drive ),  stop a scan that was started,  send a digital output,  read a digital input, uses the functions shown below
EX_Connect,   EX_SetPolledModeChan,   EX_Run,   EX_SendDigout,   EX_GetDigin,   EX_Stop,   EX_StopComplete
vc30xSP2b
2K/XP/NT
connect to device,  set specific channels to log to disk file,  run a scan ( logs data to a file on your disk drive ),  stop a scan that was started, uses the functions shown below
EX_Connect,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetMultiChanScanChans_TO_LOG,   EX_Run,   EX_Stop,   EX_StopComplete
vc30xSP2c
2K/XP/NT
connect to device,  configure using either default values stored within the DLL or the  M30x_SP.INI  file included in this distribution,  set specific channels to log to disk file,  run a scan ( logs data to a file on your disk drive ),  stop a scan that was started, uses the functions shown below
EX_Connect,   EX_SetDevToIniSetup,   EX_SetDevToDefaultSetup,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetMultiChanScanChans_TO_LOG,   EX_Run,   EX_Stop,   EX_StopComplete
vc30xSP3
98/ME
2K/XP/NT
connect to device,  setup for a limited-time scan run that ends after preset time ( logs data to a file on your disk drive ),  set options to BEEP the PC speaker when the scan ends,  run and stop a scan, uses the functions shown below
EX_Connect,   EX_SetPolledModeChan,   EX_SetLengthOfRunSec,   EX_SetRunEndBeepOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP4
98/ME
2K/XP/NT
connect to device,  setup for a scan that ends with a digital input event ( logs data to a file on your disk drive ),  set options to BEEP the PC speaker when the scan ends,  run/stop a scan, uses the functions shown below
EX_Connect,   EX_SetPolledModeChan,   EX_SetScanType,   EX_SetLengthOfRunSec,   EX_SetScanEndEvent,   EX_SetRunEndBeepOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP5
98/ME
2K/XP/NT
connect to device,  setup for a multi-channel ( 2 channels ) scan ( logs data to memory to be displayed by application ),  run and stop a scan, uses the functions shown below
EX_Connect,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetDataLogOptions,   EX_Run,   EX_GetScanDataDbl,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP6
98/ME
2K/XP/NT
connect to device,  setup for a multi-chan-'digital-input'-calibration ( 7 channels + calibration channel 7 ) scan ,  run and stop a scan ( logs data to memory to be displayed by application ), uses the functions shown below
EX_Connect,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetDataLogOptions,   EX_Run,   EX_GetScanDataDblDigin,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP6b
98/ME
2K/XP/NT
FEATURES (for the Model 302) -   multi-chan-'digital-input'-calibration (7 channels + calibration channel) scan
threaded device connection - allows use of GUI progress-bar or other function while connecting to device(s),  connect to device,  run and stop a scan ( logs data to memory to be displayed by application ), uses the functions shown below
EX_Connect,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetDataLogOptions,   EX_Run,   EX_GetScanDataDblDigin,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP6c
98/ME
2K/XP/NT
FEATURES (for the Model 301) -   multi-chan-'digital-input'-calibration (3 channels + calibration channel) scan
threaded device connection - allows use of GUI progress-bar or other function while connecting to device(s),  connect to device,  run and stop a scan ( logs data to memory to be displayed by application ), uses the functions shown below
EX_Connect,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetDataLogOptions,   EX_Run,   EX_GetScanDataDblDigin,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP7
98/ME
2K/XP/NT
FEATURES -   Scan Data Averaging ( shows comparison of no averaging and BLOCK style averaging )
threaded device connection - allows use of GUI progress-bar or other function while connecting to device(s),  connect to device,  setup for a multi-channel-calibration (7 channels + calibration channel) scan,  run and stop a scan ( logs data to memory to be displayed by application ), uses the functions shown below
EX_Connect,   EX_SendRate,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetDataLogOptions,   EX_Run,   EX_GetScanDataInt,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
vc30xSP7b
98/ME
2K/XP/NT
FEATURES -   Scan Data Averaging ( shows comparison of no averaging, BLOCK style averaging, and RUNNING average )
threaded device connection - allows use of GUI progress-bar or other function while connecting to device(s),  connect to device,  setup for a normal-multi-channel (8 channels) scan which then uses the channel 7 data for calibrating the other channel data,  run and stop a scan ( logs data to memory to be displayed by application ), uses the functions shown below
EX_Connect,   EX_SendRate,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_SetDataLogOptions,   EX_Run,   EX_GetScanDataDblDigin,   EX_GetScanDataInt,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete


 

  VisualBasic style applications

  LINK   Functions demonstrated
GetOneVoltage connect to device,  read a voltage from default channel zero, uses the functions shown below
EX_Connect,   EX_GetOneConversion
.INI example load configuration from M30x_SP.ini,  start and end a single-channel scan, uses the functions shown below
EX_Connect,   EX_SetDevToIniSetup,   EX_SetDevToDefaultSetup,   EX_GetPolledModeChan,   EX_GetRoundedRate,   EX_GetCalculatedRate,   EX_SetDataLogOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
Scan Example connect to device,  start and end a single-channel scan,  perform channel change during scan, uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_SetScanType,   EX_SetPolledModeChan,   EX_Run,   EX_CheckScanStatus,   EX_GetScanDataInt,   EX_Stop,   EX_StopComplete
Scan Example2 connect to device,  start and end a multi-channel scan, uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_Run,   EX_CheckScanStatus,   EX_GetScanDataInt,   EX_Stop,   EX_StopComplete
MultiFunction connect to device,  set a channel,  read a voltage,  send analog output,  send and read digital I/O, uses the functions shown below
EX_Connect,   EX_GetDigin,   EX_SendDigout,   EX_SetPolledModeChan,   EX_GetOneConversion,   EX_SendDAC
AutoScanEnd connect to device,  setup for a scan that ends after the data log file reaches a size that you set,  shows how to check status of the scan that is running  run and stop a scan - this sample application logs the scan data to a disk file. See documentation for logging to memory to be read by application or log to both disk and memory.  -  Uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete




 

  VisualBasic.NET style applications     ( you must have the .NET environment installed to use these )

  LINK   Functions demonstrated
GetOneVoltage connect to device,  read a voltage from default channel zero, uses the functions shown below
EX_Connect,   EX_GetOneConversion
.INI example load configuration from M30x_SP.ini,  start and end a single-channel scan, uses the functions shown below
EX_Connect,   EX_SetDevToIniSetup,   EX_SetDevToDefaultSetup,   EX_GetPolledModeChan,   EX_GetRoundedRate,   EX_GetCalculatedRate,   EX_SetDataLogOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
Scan Example connect to device,  start and end a single-channel scan,  perform channel change during scan, uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_SetScanType,   EX_SetPolledModeChan,   EX_Run,   EX_CheckScanStatus,   EX_GetScanDataInt,   EX_Stop,   EX_StopComplete
Scan Example2 connect to device,  start and end a multi-channel scan, uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_SetScanType,   EX_SetMultiChanScanChans,   EX_Run,   EX_CheckScanStatus,   EX_GetScanDataInt,   EX_Stop,   EX_StopComplete
MultiFunction connect to device,  set a channel,  read a voltage,  send analog output,  send and read digital I/O, uses the functions shown below
EX_Connect,   EX_GetDigin,   EX_SendDigout,   EX_SetPolledModeChan,   EX_GetOneConversion,   EX_SendDAC
AutoScanEnd connect to device,  setup for a scan that ends after the data log file reaches a size that you set,  shows how to check status of the scan that is running  run and stop a scan - this sample application logs the scan data to a disk file. See documentation for logging to memory to be read by application or log to both disk and memory.  -  Uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete


 

  LabView style applications

  LINK   Functions demonstrated
_PleaseTryThisTest demonstrates how to interract with the DLL using arrays and strings, uses the functions shown below
DLLtest_StringFill,   DLLtest_IncrementArrayElements,   DLLtest_IncrementOne
_SimpleExample connect to device,  read a voltage from default channel zero, uses the functions shown below
EX_Connect,   EX_GetOneConversion
_GetVersionInfo an example that demonstrates getting the DLL version number and expected driver version, uses the functions shown below
SP_GetDLL_Version,   SP_GetDLL_CompilationInfo,   DLL_GetDriverMemVersionInfo
_ConnectJustOneDevice simple example of DLL function that locates and connects to the first Model-30x device it finds on your system, uses the functions shown below
EX_Connect
_ConnectMultipleDevices demonstrates connecting to multiple Model-30x devices. You pass the DLL device ID numbers and rates and it attempts to connect to them. Lets you know which ones it successfully connects to, uses the functions shown below
EX_ConnectAllDevices
_AutoScanEnding connect to a device and then start a scan that will end after the data log file reaches the size that you set, uses the functions shown below
EX_Connect,   EX_SetDataLogOptions,   EX_Run,   EX_CheckScanStatus,   EX_Stop,   EX_StopComplete
_MainMulti-Function_App demonstrates connecting to multiple devices at the same time,  channel changing,  reading a single voltage (polled mode),  using scan mode,  writing data to either memory or log file on disk,  sending an analog output,  using digital I/O  and more, uses the functions shown below
EX_ConnectAllDevices,   EX_SendRate,   EX_SetPolledModeChan,   EX_GetOneConversion,   EX_SendDigout,   EX_GetDigin,   EX_SendDAC,   SP2_GetDevOwnershipList,   EX_SetDataLogOptions,   EX_SetScanType,   EX_GetScanType,   EX_SetMultiChanScanChans,   EX_Run,   EX_CheckScanStatus,   EX_GetScanDataInt,   EX_GetScanDataIntDigin,   EX_GetScanDataDbl,   EX_GetScanDataDblDigin,   EX_Stop,   EX_StopComplete
_35b_Related demonstrates an interface for our 35b thermocouple amplifier
_All_VIs listing of all available VIs placed in one location. May make things confusing for some of you but gives a lot of functionality for development.






Contact us for sales or technical assistance
lawsnlab@lawsonlabs.com

on the web
www.lawsonlabs.com

© Lawson Labs Inc. All rights reserved
Last modified 12-5-05 Tim Van Dusen