UltimaSerial How to program DI-148/145/149/155 Starter kit in LabView 

Windaq add-ons
Windaq Add-ons

The following is a sample vi on how to use Ultimaserial ActiveX in LabView 9 (LabView 9 Evaluation Package is what we tested on). It also demonstrates how to retrieve individual data from the variant returned by GetData.

    The following example VI is created on Labview 9, if you are using an older version of LabView that has compatibility issue with the example vi, please follow the Step-by-Step tutorial to create your own VI  

Required hardware: DI-148U/145/149/155 or other Windaq starter kit

To use it:

  1. Locate LabView Sample VI, us.vi
  2. Launch us.vi
  3. Enter the Device model number. Supported hardware include DI-148U (default) or other Windaq Starter kit
  4. Select the COMM port, 0 for USB port  (default)
  5. Choose a sample rate
  6. Click Start, and here is what you will see



To retrieve the latest data from the variant returned by GetData (See the image below for reference) 

  1. The returned from Ultimaserial::GetData is a variant of two dimensional 16-bit integer array, with the latest data at the end of the array. Refer to GetData for more detail.
  2. This variant is first fed to Variant to Data from the Variant palette to be converted to a data array. 
  3. Once it is converted to a integer array, Array Size from Array palette is used to retrieve the size of the array.
  4. Index of Array from Array palette is used to retrieve the max column index
  5. max column index -1 yields the last data scan in the array
  6. Use Index Array from the Array palette to extract the last data point
  7. Next, the 16-bit integer data is multiplied by 10 then divided by 32768 to convert to volt reading. Note, this is an approximation by assuming the input range of +/- 10V

To add an ActiveX control in LabView 8 (See the image below for reference)

  1. Right click on the grid panel
  2. When the drop down menu shows up, click on the double down arrow  at the bottom of the menu, select .NET & ActiveX->ActivX Container: 
  3. An ActiveX container will be placed in the grid panel
  4. Right click inside the ActiveX container, select Insert ActiveX Object...., then Ultimaserial from the list.
  5. If you need to interface to multiple Windaq Starter kits at the same time, you will need to create one ActiveX container with Ultimaserial in it for each device


Last update: 03/14/22

Copyright: 2000-2005  www.UltimaSerial.com