![]() |
How to use ActiveX in VB (Visual BASIC) | |
|
Let UltimaSerial unleash the power of your Windaq Starter kit!
Lessons on how to use UltimaSerial
|
The following is a step-by-step lesson on how to use ActiveX in Visual BASIC (VB). In this lesson, we will use Ultimaserial ActiveX to develop a data acquisition application with DATAQ's Starter kit. Specification of the sample program: a) Acquire voltage signal between -10 to 10V via
Channel 1 of DI-194 at a rate of 240
Samples/second Before we start, please download and install UltimaSerial then run Visual BASIC, and make sure the ToolBox is on the your screen. If not, follow View->ToolBox to enable it. The ToolBox looks like this:
1) Place the mouse cursor on the ToolBox area, click on the right button of the mouse and select Components... and you will see this dialogue box:
2) Select UltimaSerial ActiveX Control and DATAQ Instruments DQChart Control, then hit OK to bring these two controls into the ToolBox. If you can't find UltimaSerial and DQChart in the list, you need to install UltimaSerial control. Now, the ToolBox should be like this:
3) Place UltimaSerial, DQChart and Button from the ToolBox to the blank form of the project.
4) Double Click on Command1 and Command2 button to create the basic codes for them. 5) In the code editor, double-click on the NewData event of object UltimaSerial1 to use the event
6) In the code editor, change the default codes (If you decide to type in the codes, you will notice the properties and methods will be displayed in a drop-down menu once you typed in ultimaserial1.) From:
To: (Watch for the blue text, we assume button Command1 and 2 for Start and Stop action)
Last update: 10/05/07 Copyright: 2000-2005 www.UltimaSerial.com
|
|