Copy LL_USB2k.sys into your windows/system32/drivers directory (overwrite old).

Load  "GetTVolts.vi".

===============

Note that practically all function return values are an 8-bit unsigned integer which is the same
size as the "BOOLEAN" return type shown in the prototypes. Depending on your programming 
language this can be a value which is equal in size to one of the following:
    Byte, byte, BYTE, usigned char, uint8, BOOLEAN 
It is NOT the same as any of the following as some may assume it to be:
    Bool, Boolean, BOOL
The device ID is located on the chip and other information supplied with your board(s). Multiple 
devices can be managed at the same time. You must initialize all of the boards at the same 
time, and then access each individually for the function calls into the DLL. Pass all the device IDs 
to the DLL in the initialization call. If one or more devices fail to enumerate, it will be removed from 
the list by the DLL, so be sure to check the list after the return from the call.

Below is a partial listing of the DLL API

Required for connecting (use one or the other, and always do this first ) --- 
BOOLEAN EX_ConnectAllDevices ( USHORT* pDevList, double* pRates, BYTE* pbNumDevices );
   -- Attempts to connect to all devices passed in 32-element array, "pDevList. On return, that
     same list will also contain the DevId's that were successfully connected - if the call returns 
     success. If the call returns "failed" the device ID's in that list are meaningless and there was
     no successful connection made to any device. A successful enumeration to a device must
     be performed before any other interraction can occur.

BOOLEAN EX_Connect ( USHORT* pDevID);
   -- This function attempts to connect to and then return the device ID of the first device that it
      finds. This is a simple and quick way to connect to a device when you know that you will 
      have only one connected to your PC.  The DLL will search for any Model 30x device which
      is connected to the PC. It will then enumerate the  device ( this is a USB requirement) and 
      return the Device ID to you. If no device ID is returned,  then no enumeration was successfully 
      performed. If more than one  Model 30x  device is connected to your system,   it is highly 
      recommended that you use the EX_ConnectAllDevices(...)  function call instead or erroneous 
      behavior could result. A successful enumeration to a device must be performed before any 
      other interraction can occur.

Various I/O --------------------------------------------------------------------------
BOOLEAN EX_SendDAC ( USHORT usDevID, DOUBLE dblVoltage, BYTE bDAC );
   -- used with Model-302 only. Sends analog output.

BOOLEAN EX_SendDigout ( USHORT usDevID, BYTE bDigOut );
   -- send a digital output - with some built-in error protection. This digital output is slightly 
      different than the others in that it incorporates a brief "wait" period of approximately 20  
      milliseconds to  automatically compensate for the time which may be required for a 
      previous  I/O to complete.

BOOLEAN EX_DigoutBitPreserve ( USHORT usDevID, BOOLEAN fDo, BYTE bPreserve );
   -- preserve digital output bits while writing others. Send a digital output you want preserved 
      thensend the mask and send anything else and the masked bits will remain unchanged. If 
      you want to set a bit-mask that will be used constantly, this may be an an easy way to set
      things up, then send digital outputs with the next function call shown. If you think you may  
      be changing the mask constantly then the longer version, "EX_Digout_Quick_BP"  may 
      be better for you.

BOOLEAN EX_Digout_Quick ( USHORT usDevID, BYTE bDigOut );
   -- send a digital output - normal. If Bit-preserve was turned on with call to,  "EX_DigoutBitPreserve"
      then the mask passed as bPreserve in that call will prevent the masked bits from the digital 
      output preceding that call from being changed.

BOOLEAN EX_Digout_Quick_BP( USHORT usDevID, BYTE bDigOut, BYTE bBitPreserve )
   -- send a digital output with bit-preservation. The bBitPreserve mask prevents the bits currently
      on the digital output from being changed with this call. For example, if you previously sent a
      digital output using,  "EX_SendDigout(myDevID, 4)" and then use this one like, 
      "EX_Digout_Quick_BP(myDevID, 1, 4)"  then the actual value appearing on the digital outputs
      would be "5" since the "4" (bit-2) would be preserved and the "1" (bit-0) would be added. If
      the bit was not preserved, the last digital output would have produced "1" or  0001 binary.
      Another example would be use:
         EX_SendDigout(myDevID, 4)     -> sends binary 00000100
      then use:
         EX_Digout_Quick_BP(myDevID, 9, 5)  -> sends binary 000001001
      the value on the digital output would be:
         12 which in binary is 00001100
      the mask of "5" prevented overwriting the lower bit of the previous digital output (remember it's
      also preserved if it's not set) , so even though you sent "9" with the current call, only "8" was 
      added to the previous digital output of 4, which made the actual digital output value "12".

BOOLEAN EX_GetDigin ( USHORT usDevID, BYTE* bDigIn );
   -- Gets the current digital input value and sets your variable, "bDigIn" to it. Returns True if it 
      succeeded in reading the digital input.

BOOLEAN EX_GetOneConversion ( USHORT usDevID, double* dblMilliVolts );
   -- Reads the voltage from the channel that is currently selected. Use EX_SetPolledModeChan()
      to set that channel.

BOOLEAN EX_SetPolledModeChan ( USHORT usDevID, BYTE bChan );
   -- Sets the channel that will be used for reading analog data while in polled mode, or in any
      of the single-channel scanning modes. Valid channels for a Model-301 are 0,1,6,7 and valid
      channels for a Model 302 are 0,1,2,3,4,5,6,7. Channel 6 always returns the Full-Scale voltage
      and channel 7 always returns the offset voltage.

Misc functions  --------------------------------------------------------------------
BOOLEAN EX_SendRate ( USHORT usDevID , double* dblRate );
   -- send a rate (50-1000) defaults to 100 when first connected. The VI defaults
   --   to sending 600Hz, but any value within the range above can be sent.

Scanning related functions  -------------------------------------------------
BOOLEAN EX_SetScanType ( USHORT usDevID, BYTE bScanType );
   -- setup for the type of scanning you want to do. Here are the available scan types:
            1 = SINGLE_CHAN_SCAN
            2 = MULTI_CHAN_SCAN
            3 = MULTI_CHAN_CAL_SCAN
            4 = SINGLE_CHAN_DIGIN_SCAN
            5 = MULTI_CHAN_DIGIN_SCAN
            6 = MULTI_CHAN_CAL_DIGIN_SCAN
      The default after a connection is "SINGLE_CHAN_SCAN", scanning channel "0". All of the 
      single-channel scan modes scan the channel that has been selected using function call,
      "EX_SetPolledModeChan" which is documented elsewhere.   The channels to be used for 
      multi-chan type of scan modes are selected using, "EX_SetMultiChanScanChans" which is
      also documented elsewhere. Note that the calibration type scans add channel 7 to the data
      that is returned. Using a typical multi-channel scan mode, it's not possible to read the data
      from channel 7 without including all the other channels in the scan. This mode allows you 
      to get the offset voltage (chan 7)  regardless of the number of channels you scan. You may 
      have already guessed that scanning a regular mluti-channel scan with all 8 channels (model 
      302) returns the same voltages as if you use one of the cal-scan modes.

BOOLEAN EX_SetMultiChanScanChans ( USHORT usDevID, BYTE bChanCnt );
   -- Sets the number of channels to scan in mulit-channel scan mode. The Model-302 has a 
     possible 8 channels, and the Model-301 has 4.

BOOLEAN EX_SetDataLogOptions ( USHORT usDevID, UINT uiDataLogMethod, 
               UINT uiLogFileMaxSize, UINT uiMisc )
   -- Allows you to set the way that the scan data will be recorded. By default, the scan data 
      is written to a disk file which has a naming that looks like,  "ScanLog_0.txt" where the 
      numeric value is incremented with each new scan that is started during the duration of time 
      the current application is loaded. The scan data can also be written to memory (instead of 
      the disk file) where you can read it, or it can be written both to a disk file (for analyzing later) 
      and to memory (for presenting at runtime). If you use the option for the scan data to be 
      written to memory, you must use the appropriate function call to retrieve the data and you
      must do so diligently to prevent the memory data buffers from wrapping. There is also an 
      option to set the approximate size that the data log file can grow to. If uiLogFileMaxSize  is
      set to zero, there will be no limit set and the file will be written to until the scan is stopped.
      Below are the values that can be used for the uiDataLogMethod parameter:
            1  = USE_SCAN_DATA_LOG_FILE 
            2  = USE_SCAN_DATA_ARRAY 
            4  = SCAN_STOP_ON_DATA_ARRAY_WRAP 
            8  = SCAN_LIMIT_LOG_FILE_SIZE 

BOOLEAN EX_Run ( USHORT usDevID )
   -- Runs the scan using the scan type and logging method set by the other function calls which
      are documented elsewhere.

BOOLEAN EX_Stop ( USHORT usDevID )
   -- Step one of the two steps required to stop the scan that was started using  "EX_Run".
      The ending of the scan is a two requiring two function calls into the DLL due to the use of
      threads to manage the data collection. Be sure to to call  "EX_StopComplete" after calling this
      function.

BOOLEAN EX_StopComplete ( USHORT usDevID )
   -- Step two of the two steps required to stop the scan that was started using  "EX_Run".
      The ending of the scan is a two requiring two function calls into the DLL due to the use of
      threads to manage the data collection. Be sure to to call  "EX_Stop"  prior to calling this
      function.

Functions specifically for use with our Model 35b ---------------- 
   using the scanning mode operation for thermocouple reading.  ----------------------- 
BOOLEAN EX_ScanS1_Setup ( USHORT usDevID, BYTE bNumChans, USHORT usAvg, UINT uiTimeout)
   -- setup the Thermocouple scan. Do this before starting the scan!

BOOLEAN EX_ScanS1_Run ( USHORT usDevID );
  --  start the thermocouple scan.

BOOLEAN EX_ScanS1_GetTemperature ( USHORT usDevID, double* dblVoltages, 
                      BYTE bCnt,  USHORT usAvg, UINT uiTimeout, BOOLEAN fDoBitPreserve)
   --  retrieve the temperature related voltages.

BOOLEAN EX_ScanS1_Stop ( USHORT usDevID );
  --  end the thermocouple scan.