UltimaSerial How to use ActiveX in Visual BASIC under Visual Studio
USB-based DI-148, DI-158, DI-710, DI-715B & DI-718B are now supported by Ultimaserial

158u.jpg (11869 bytes)

Let UltimaSerial unleash the power of your Windaq Starter kit!

 

UltimaWaterfall

UltimaWaterfall

 

FFT1024

FFT1024

 

XChart

 

Ultimaserial Classroom

Lessons on how to use UltimaSerial

 

download.jpg (1018 bytes) Downloads

 

Registration.jpg (4365 bytes)

info@ultimaserial.com

 

 

The following is a step-by-step lesson on how to use ActiveX in VB under Visual Studio

In this lession, we will use Ultimaserial ActiveX to develop a data acquisition application with DATAQ's Starter kit. 

1) Creat a VB project with a simple form
2) Add two buttons
3) Follow Tools->Choose Toolbox Items..., under COM component tab, select Ultimaserial and DQChart
4) You should see the two items added to the toolbox
5) Add these two to the form
6) Double click on the buttons and Ultimaserial icons to so that you can add codes to it

Here are the codes:


Public
Class Form1

   
Private Sub AxUltimaSerial1_NewData(ByVal sender As Object, ByVal e As AxULTIMASERIALLib._DUltimaSerialEvents_NewDataEvent) Handles AxUltimaSerial1.NewData
        AxDQChart1.Chart(AxUltimaSerial1.GetData)
   
End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        AxUltimaSerial1.ChannelCount = 1
        AxUltimaSerial1.Device = ULTIMASERIALLib.enumDeviceType.DI710
        AxUltimaSerial1.CommPort = ULTIMASERIALLib.enumComPort.USB
        AxUltimaSerial1.SampleRate = 100
        AxUltimaSerial1.EventLevel = 1
        AxUltimaSerial1.Start()
   
End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        AxUltimaSerial1.Stop()
   
End Sub
End
Class

Last update: 10/05/07

Copyright: 2000-2005  www.UltimaSerial.com