Page 1 of 1

Connect to SBC directly with IPaddress

Posted: Fri Dec 01, 2017 5:25 am
by knas
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

Re: Connect to SBC directly with IPaddress

Posted: Fri Dec 01, 2017 12:14 pm
by mparadis
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.