Table of Contents
Read this FIRST

API

Some Questions and Answers


C/C++ code examples

VisualBasic Code Examples

LabView Code Examples


C++ Prototyping

VisualBasic Prototyping

LabView Prototyping


download the following archives

Get just the DLL
( mentioned elsewhere in the above links )
- updated 3-10-06 -


Get just the .INI file
( mentioned elsewhere in the above links )


Get just the INI creation software
( mentioned elsewhere in the above links )
- updated 3-8-06 -






























































About Configuration Settings
- some things you need to know -

The special .INI file that is included with this distribution allows for setup of the device configuration without having to do it programmably and may be useful for someone who is creating software for distribution that will always use the same configuration aside from something like setting of the COM port. The .INI file is never used unless it is loaded with the function call  EX_SetDevToIniSetup ( ).
  IMPORTANT: below is a list of the only changes that can safely be made manually to the .INI file if you intend to make use of it with your software
  by using the above mentioned function call. Other changes need to be made indirectly using the ini configuration tool.
comPortsingleChanScanMainChansingleChanScanSubChan channelsubChanbiPolargainLogScans
  You should  never  set the following manually in the .ini file:
BAUDremoteAvgtScan RateScanIntervalwordCntfilterSubChannels
There are function calls that allow you to create a new .ini file based on your current device configuration as well as calls to display the contents of the .ini file using a windows message box. You can see the configuration related function calls   HERE.  It's important to remember that the .ini file is only a convenience and is not required or even looked at by the DLL unless you make the function call mentioned above that loads it. The DLL always loads with a   default  configuration and there are function calls available to change each and every one of the configuration parameters.

The scan interval setting is one of the entries that appears within the .INI file, and one that should never be changed manually within that file. If the default isn't good for you, then use the special   "IniTool.exe"  utility (downloaded from our website) or the DLL function calls designed for that purpose. It's recommended that you become familar with the definition of and usage of the scan interval by reading the Q/A topic   HERE.   After reading the information at the previous link, you may understand that a range of possible settings for the scan interval cannot be determined until other parameters such as number of scan channels, filter settings, internal averaging, are known. The DLL always loads with default configuration parameters as described   HERE.  Those settings will work together without conflict. Having a default configuration serves a generic function of allowing a developer to quickly test the function of the Model-201 with a simple function call -   EX_Run(). It is likely that a developer will want something other than default settings except for testing purposes.

A complete set of function calls into the DLL is provided to allow each of the configuration parameters to be both set and also checked. These function calls can be reviewed   HERE,   with even more settings HERE.  It's important to note that the final setting should always be made to the scan interval since the range at which it can be set is influenced by other configuration parameters as discussed further up.































































The easist way to get started
Quick start

Follow the link to documentation that explains how to get started, and lists all available function calls.
There is also a "question and answer" section and links to function call prototypes





























































Source code examples
you can copy and paste directly from the html (at each link below) into your application
C/C++   example #1

Demonstrates using "EX_Run()" and "EX_Stop()" to start scanning and logging to disk file using all default settings.
Also shows how to setup pointers (in header file) for calling DLL functions and the way to use those pointers.

C/C++   example #2

Demonstrates using EX_SetCOMport for setting correct COM port prior to starting the run. Also demonstrates using "EX_Run()" and "EX_Stop()".
Also shows how to setup pointers (in header file) for calling DLL functions and the way to use those pointers.

C/C++   example #3

Demonstrates using M201_SP.INI for startup configuration as well as the use of "EX_Run()" and "EX_Stop()".
Also shows how to setup pointers (in header file) for calling DLL functions and the way to use those pointers.

C/C++   example #4

Demonstrates non-scan mode usage. The DLL automatically attempts to initialize the hardware the first time any of the calls shown below are made.

In the sample code I've also shown the function, "EX_GetOneConversion()" which allows reading a single voltage at any time. Take note of the setting of the desired "Polled Mode" channel prior to reading the voltage. I've also shown changing the channel and handling the Digital I/O.





























































Source code examples
you can copy and paste directly from the html into your application
VisualBasic   example #1

Demonstrates using "EX_Run()" and "EX_Stop()" to start scanning and logging to disk file using all default settings.
Also shows how to prototype function calls into the DLL.

VisualBasic   example #2

Demonstrates a lot of functionality available for configuring device, polled and scanning mode, digital I/O, and more.
Also shows how to prototype function calls into the DLL.





























































Source code examples
LabView   example #1

Demonstrates using  "EX_Run()"  and  "EX_Stop()"  to start scanning and logging to disk file using all default settings.

Demonstrates using  "EX_SetPolledModeChan()"  to set a polled mode channel and  EX_GetOneConversion()  to get the voltage on that channel.

Also shows how to prototype function calls into the DLL.

LabView   example #2
This example is not well documented at this time
The link above goes directoy to a file folder where you can download the example code
Read the documentation within the VIs to understand the processes.

Demonstrates a lot of functionality available for configuring device for a multi-channel scan. Although the focus of a lot of the functionality of this new interface revolves around the use of the M201_SP.INI file to make configuration handling simpler, these examples show a way to start with a special initialization function and then call various configuration related function calls within the DLL to custom tailor the way the device is configured.

One example provided here shows the process making use of the .INI file to start a multi-channel scan, and the other shows the same process without the use of the .INI. Note that the .INI file is provided as a convenience and is not required as is demonstrated within the example provided here that makes no use of that file.






























































Developer's API and Documentation





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

© Lawson Labs Inc. All rights reserved