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