Connect to SBC directly with IPaddress

Supporting Visual Studio on Windows
knas
Fresh meat
Posts: 1
Joined: Fri Dec 01, 2017 4:25 am
Contact:

Connect to SBC directly with IPaddress

Postby knas » Fri Dec 01, 2017 5:25 am

I have a vb.net programm and connect to PhidgetSBC directly through lan IP
I use phidget21.net.dll

Since all examples are for phidgets local connect, is any example for Phidget22.net.dll?

This is my code

Dim WithEvents phidgetSBCA As Phidgets.InterfaceKit
Dim WithEvents phidgetIO16A As Phidgets.InterfaceKit


Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim ipaddress As String

ipaddress = "192.168.1.40"

phidgetSBCA = New Phidgets.InterfaceKit
phidgetIO16A = New Phidgets.InterfaceKit

phidgetSBCA.open(111730, ipaddress, 5001)
phidgetIO16A.open(101029, ipaddress, 5001)

End Sub

User avatar
mparadis
Site Admin
Posts: 644
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Connect to SBC directly with IPaddress

Postby mparadis » Fri Dec 01, 2017 12:14 pm

In Phidget22, you can use AddServer from our Networking API in order to configure a server with an IP address and port. Then, when opening a Phidget you can set the ServerName property to the same name you gave the server in order to connect to the SBC at that IP address.


Return to “VB .NET”

Who is online

Users browsing this forum: No registered users and 1 guest