To convert count to volt
Count*Fullscale_at_the_gain/32768
From volt, you can convert to degree according to your sensor's spec
--- In ultimaserial_group@yahoogroups.com, "vr_man02" <vr_man02@...>
wrote:
>
> I was introduce to this group
> Hi im new here,i would like u guys to help me out..Real thx
>
> Im trying to create a VB program.
> basically my DATAQ (Dl-710) was connected to Angle Sensor
> ( Eletrogoniometry ) & EMG Sensor ( Electromyography )..i created a
> VB program (Picture1) which able to monitor the wave produced in
> both equipment..everything was fine till part (picture2) where i
> must recorded down the form to excel in micro volt (uV) for EMG
> Sensor & Degree for Angle Sensor ..but it didnt show a (uV) &
> Degree instead showing Count..i suspected error on this codes (given
> below)..anyone could troubleshoot it out for me? cos im new in
> VB..thx alot and effort spend here will be greatly appreciated..
>
>
> James
>
> [img]http://i5.photobucket.com/albums/y187/puyo86/stuff/1.jpg[/img]
> Picture 1
>
>
> [img]http://i5.photobucket.com/albums/y187/puyo86/stuff/123_845.jpg
> [/img]
> Picture2
>
>
>
>
> VB codes:
>
> Private Sub Command3_Click()
>
> v = UltimaSerial.GetDataFrame(Val(Text1.Text))
>
> If CheckReuseSheet.Value = 0 Then
> Set oBook = oExcel.Workbooks.Add
> Set oSheet = oBook.Worksheets(1)
> Else
> Set oSheet = oBook.Worksheets(1)
> If bClearSheet Then
> oSheet.cells.Clear
> End If
> End If
>
> oSheet.Application.Visible = True
>
>
> For i = 0 To UltimaSerial.ChannelCount - 1
> oSheet.Range(Chr$(Asc("A") + i) + "1").Value = "Chn " +
> Format$(i)
> oSheet.Range(Chr$(Asc("A") + i) + "2").Value = "Counts"
> Next
>
> If CheckTimeStamp.Value = 1 Then
> oSheet.Range(Chr$(Asc("A") + i) + "1").Value = Array("Time")
> oSheet.Range(Chr$(Asc("A") + i) + "2").Value = Array("sec")
> End If
>
> oSheet.Range("A3").Resize(Val(Text1.Text),
> UltimaSerial.ChannelCount).Value = oExcel.Worksheetfunction.Transpose
> (v)
> If CheckTimeStamp.Value = 1 Then
> ReDim dataarray(1 To Val(Text1.Text), 1 To 1) As Variant
> For i = 1 To Val(Text1.Text)
> dataarray(i, 1) = (i - 1) / UltimaSerial.SampleRate
> Next
> s$ = Chr$(Asc("A") + UltimaSerial.ChannelCount) + "3"
> oSheet.Range(s$).Resize(Val(Text1.Text), 1).Value = dataarray
> End If
>
>
> End Sub
>