PicoScope 7 Software
Available on Windows, Mac and Linux
PicoScope 7 Software
Available on Windows, Mac and Linux
OEM & custom applications
PicoScope, Pico data logger and RF products can be used as components in custom applications and OEM projects.
A to Z of PC oscilloscopes
Everything you need to know about PC oscilloscopes from Advanced Triggers to Zooming.
A to Z of Data Loggers
Everything you need to know about PC-based data loggers from Alarms to Zooming.
Application Notes
Details of some of the many applications for Pico data logger and oscilloscope products.
How do I measure...?
Find out how you can measure using Pico products
Videos
Showing you how to get the most out of PicoScope oscilloscope software.
Documentation
Up-to-date versions of the documentation supplied with your products in PDF format.
Educational Experiments
Our library of science experiments suitable for use with oscilloscope and data logging products.
PicoApps
Want to share hints, tips and code with other developers? Show your Pico-based products to the world.
Newsletter
Archive of our monthly Test and Measurement Newsletters.
Code: Select all
Imports System.Runtime.InteropServices
Public Class Form1
Declare Function usb_tc08_open_unit Lib "usbtc08.dll" () As Short
Declare Function usb_tc08_get_unit_info Lib "usbtc08.dll" (ByVal handle As Short, ByRef info As tUSBTC08Info) As Short
Declare Function usb_tc08_get_single Lib "usbtc08.dll" (ByVal handle As Integer, ByRef temp As Single, ByRef overflow_flags As Integer, ByVal units As Integer) As Long
Structure tUSBTC08Info
Public size As Short
Public DriverVersion As Short
Public PicoppVersion As Short
Public HardwareVersion As Short
Public picovar As Short
Public szSerial As String
Public szCalDate As String
End Structure
Public info As tUSBTC08Info
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim handle As Short = usb_tc08_open_unit()
MessageBox.Show(handle)
'info.size = Marshal.SizeOf(info)
Dim infook As Short = usb_tc08_get_unit_info(handle, info)
MessageBox.Show(infook)
End Sub
Private Sub getUSBTC08()
Dim unitResult As Long
Dim handle As Integer = 1
Dim tempReadings(9) As Single
Dim ofFlag As Integer
Dim tempUnits As Integer = 1
For n = 0 To 8
unitResult = usb_tc08_set_channel(handle, n, "K")
Debug.Print(unitResult)
Next
unitResult = usb_tc08_get_single(handle, tempReadings(0), ofFlag, tempUnits)
Debug.Print(unitResult & " " & ofFlag)
For n = 0 To 8
Debug.Print(tempReadings(n))
Next
End Sub
End Class
Post by Hitesh »
Return to “.Net Languages (C#, VB.Net, .)”