UltimaSerial How to use ActiveX in ATEasy
 

Windaq add-ons
Windaq Add-ons

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 
b) The data is streamed back to the PC via COM 1
c) The input signal is displayed on a scrolling waveform window

1) Please download and install UltimaSerial

2) Install DI-194 on COM 1:

3) Start a new work space with ATEasy, and use Application Wizard to add a new program to it

4) Follow Programs->Libraries, Right click and follow Insert Object Below... to load UltimaSerial and DQChart controls into the program 

5) Create a new form under Programs->Form and call it WaveForm. Add the UltimaSerial, DqChart and Start and Stop buttons to it.

6) Double click on Start button and add the following codes in response to OnClick 

ultimaserial1.CommPort=COM1
ultimaserial1.Device=DI194
ultimaserial1.EventLevel=EventLevel
ultimaserial1.ChannelCount=ChannelCount
ultimaserial1.SampleRate=SampleRate
ultimaserial1.Start()

7) Double click on Stop button and add the following codes in response to OnClick

ultimaserial1.Stop()

8) Double click on UltimaSerial icon and add the following codes in response to OnNewData

dqchart1.Chart(ultimaserial1.GetData())

9) Add the following variables to Programs->Variables section:

ChannelCount: Word
EventLeve:Word
SampleRate: Double
TheForm: WaveForm

10) Add the following to Programs->Tests->Untitled Task->Untitled Test section

SampleRate=240.
ChannelCount=1
EventLevel=1

load TheForm, true
TheForm=nothing

Now you can go ahead and run the test!

 

Last update: 11/18/16

Copyright: 2000-2005  www.UltimaSerial.com