Search the web
Sign In
New User? Sign Up
ultimaserial_group · UltimaSerial Users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
newbie and DI-148U and AC input   Message List  
Reply | Forward Message #541 of 794 |
Hi: I'm learning to use a DI-148U with Ultimaserial and VB 6.0. I
have a small AC signal (about 6 volts alternating voltage) connected
to channel 1 and am sampling at 240Hz. I want to do the following:

1) Grab every new "batch" of 240 samples (without missing samples
or overlapping).

2) Plot each new batch of 240 samples across entire DQChart
screen. That is, I want my first sample to plot on the far left of
the chart and my 240th sample to plot on the far right of the
chart. In other words I want the chart to be 240 samples across (x-
axis).

How do I achieve this? Below is my code hacked from Ultimaserial
samples.

thanks,
rwpatter357


Private Sub Command1_Click()
UltimaSerial.Device = 148
UltimaSerial.CommPort = 1
UltimaSerial.AcquisitionMode = NoCondition
UltimaSerial.ChannelCount = 1
UltimaSerial.EventLevel = 240
UltimaSerial.SampleRate = 240
UltimaSerial.Key = ********** (I hid my key)
UltimaSerial.Start

Private Sub Command2_Click()
UltimaSerial.Stop
End Sub

Private Sub UltimaSerial_NewData(ByVal Count As Integer)
Dim A(240) As Integer
UltimaSerial.GetDataEx A(0), 240 'Get data
DQChart1.Chart (A) 'Plot 240 samples of channel 1
End Sub






Fri Oct 27, 2006 6:33 pm

rwpatter357
Offline Offline
Send Email Send Email

Forward
Message #541 of 794 |
Expand Messages Author Sort by Date

Hi: I'm learning to use a DI-148U with Ultimaserial and VB 6.0. I have a small AC signal (about 6 volts alternating voltage) connected to channel 1 and am...
rwpatter357
Offline Send Email
Oct 27, 2006
6:39 pm

1) Unless you are sure about COM1 to be the virtual COM port of 148, you should use UltimaSerial.CommPort = 0 to let Ultimaserial to search the device for you ...
ultimaserial
Offline
Oct 27, 2006
7:22 pm

I can't find a DQChart1.X attribute. I can find the XMax attribute but all it does is shrink my graph. It appears that the number of points per length of...
rwpatter357
Offline Send Email
Oct 28, 2006
4:00 am

Xmax can specify the length of DQChart GetDataEx will allow you to fetch a fixed number of data without missing nor overlapping...
ultimaserial
Offline
Oct 30, 2006
2:07 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help