modified 4-16-15

===============
Installation
===============
1. The Model 301 and 302 use a system driver that needs to be installed once for each USB port. The 64-bit version is a signed driver that is included with Windows, and is available for automatic installation, though an internet connection may be required. The 32-bit driver is unsigned, and must be explicitly installed. For 32-bit XP, or other 32-bit Windows, you will need to download the installation files from the Lawson Labs web site HERE, and follow the "new hardware found" instructions in the archive.
a) When you plug the USB cable from a Model 301 or 302 into a particular USB port on your PC, 64-bit Windows should automatically install the device driver. The first time on any one port, only, you should see a message indicating that your device is installed and ready for use. If Windows cannot locate the driver automatically, the instructions below should be followed to install the driver.

b) With both ends of the USB cable plugged in, open the Device Manager and look under USB for "Lawson Labs, Inc. Data . . .". If you see an orange triangle with an exclamation point, the install did not succeed. You may also find a failed install under "Other Devices". If the install failed, go to the Model 301 or 302 page at the LLI site and select the "Installation files and utilities" tab. Download the install files and then follow the instructions in the archive.

c) Sometimes a failed installation is harder to recover from. If you have problems, go to the Device Manager while the 301 or 302 is connected, and choose uninstall driver. Then, unplug the USB cable, reboot the computer, and start again.

d) Also required is a file called LL_USB2K.DLL. This file must be in your application directory in order to run the software. The dll in the achive was current at the time the achive was made, but may not be the most recent version. If you see symptoms of any problems, check the LLI site at "Installation files and utilities" to see if a newer dll version is available. To learn the version of your dll, right click on the file and select properties, then click the Version tab.

NOTE: You may need to go to Control Panel/Folder Options/View and check the box for "Show hidden files and folders" and uncheck "Hide extensions for known file types".


===============
Getting Started
===============
1. After installation, execute RunFirst.bat to copy and register various DLLs and OCX files that aren't currently on your computer and/or registered - required by the application. To properly execute the file it must be executed with administrative rights if that option is available otherwise it may seem to register but it may not function as it should. To get the option to "Run As Administrator" right-click RunFirst.bat with the mouse and the option should be in the menu that appears if it is an option in your version of Windows.

2. Once the application is loaded and prior to initialization, enter your device ID in the DevID box. The rate and channel that will be used during signon can also be changed on the panel either before or after communication is established with the Model 30x.

3. Click the initialize  button to begin. If initialization fails, first check in the message box that the correct ID number is being used. Then double check the USB cable and the external power supply. See the installation instructions for troubleshooting the software installation. There are some things that are only possible in polled mode, including: changing the internal data rate, performing a system calibration or requesting individual conversions. The change to scan mode  button can be pressed at any time after initialization to present the scanning mode options.

4. Not all options described below are available to both the 301 and 302. The application will determine at the time it loads, based on the device ID within the configuration file, which buttons and other options to make available to the user. For example, if the application determines that it is loading for a model 301, then the analog output options described below, will not be available - the button and entry boxes will not appear on the application panel.

============
Polled Mode
============
GetConv
  Get a single conversion result.
Change channel
  For 301, the valid channels are 0,1,6,7.
For 302, the valid channels are 0,1,2,3,4,5,6,7.
Digital output
  Enter any number from 0-255. Once a number is entered the button to  send  becomes active.
Digital input
  This box shows the most recent digital input word. It is updated whenever the  Get Conv  button is pressed.
SysCal
  Performs a full-scale and offset calibrations.
DevRate
  The rate can be changed any time while in Polled Mode.
DevID
  This drop down menu will be populated with multiple device ID's if more than one Model 302 is connected and listed in the  LL_USB.cfg  file. Select any ID number to make that the active Model 302 board.
Dbg options
  This is an "override" for the setting of the debug option within the LL_USB.INI  file. When the button is pressed, a box is presented that allows setting of the debug option. Debug should rarely be set to a value greater than 2 when in scanning mode. The amount of debug information being written during scanning can swamp your system at higher data rates. When debug is set to on, a debug file is written to a new folder in the application's folder called "M30x_DBG. The filename designates the instance of the application, along with a number indicating the number of debug files that have been created by the current instance.
AnalogOut
  Any one of three analog output channels can be set to any voltage between 0 and 5 volts. Select a DAC using the drop-down box, enter a voltage, and then press the  AnalogOut  button to send it.
Enter Key
  Placing the cursor in this box enables single-letter typed commands. The underlined letter on each button is the letter that will activate that button, for example, M will cause a change to scanning mode.
Mode button
  This button toggles the mode between polled and scanning.
Misc
  The  handle  box shows the numeric code known as a  "Window Handle"  that is assigned to the application by the operating system. This is the number that also appears in the filename of the debug file if debugging is enabled. The 301 or 302 checkbox will be checked based on the device ID that was entered in the configuration file. The 3 buttons pertaining to the configuration load/save/reload can be used anytime during polled mode. After either loading or reloading a configuration file, the  Initialize  button should be pressed for the changes to take effect.

===============
Scanning mode
===============
In scanning mode the Model 302 is started, and will send data continuosly until stopped. Digital I/O and analog outputs are available during scanning and do not disrupt data acquisition. The scanning rate is a function of the data rate, the scan type and the number of channels selected. For single-channel scanning, the scanning rate is the same as the data rate. For multi-channel scanning, divide the data rate by 5 times the number of channels being scanned to get the scanning rate.

Multi-Chan Scan
  When checked, more than one channel will be scanned.
DiginScan
  If checked, a digital input will be returned with each data point, instead of once per scan. The digital input word is displayed in the DigitalInput box as well as being written to the log file if the ScanLogFile box is checked.
CalScan
  When checked, an offset reading is included in each scan and subtracted from each data point. This technique provides active zero-drift correction. It requires multi-channel scanning.
NumChans
  Enter the number of channels to scan here, up to 4 for the Model 301, ot 8 for the Model 302. An extra channel is added transparently for a cal scan.
Avg
  A running average can be applied to smooth your data. If set to 4, each reading will be a running average of the last 4 conversions on that channel. Increasing the running average does not change the scanning rate.
ScanLogFile
  If checked, the scan data will be written to a file in a folder named M30x_Log where the "x" represents either a 1 or a 2.
Scan#
  Displays the number of scans that have been collected since the start of scanning.
ScanBuff
  Shows the number of scans currently within the DLL's buffer. If there are many processes taking CPU time, this number may grow when the application is starved for processing time. It can also grow if the Debug level is set too high.
ScanBoost
  Sets the thread priority of the application to a higher level. This can be used if the scan buffer begins to over-fill or scan halted errors occur due to data overrunning the Model 30x's own buffer.
ShowGraph
  The current scan can be shown in graphic form. The currently selected channel will be graphed. Scan channels as well as seconds-per-screen, autoCentering, and zoom/unzoom, can be controlled from the graphics screen. Pressing the  close  button returns to the main screen without stopping the scan.
MiscNotes
  Clicking in the lower left hand corner of the main application screen while scanning will bring the scan voltage display screen to the front. Alt-Tab can also be used to do the same thing, as well as clicking the mouse on the edge of the data screen.