Page 1 of 1

Syntax question for serverdiscovery

Posted: Thu Nov 14, 2019 9:58 am
by danthoskin
Hi again,
Working through my VB NET project with a VINT hub and Stepper controllers. The simplest code example I found so far that I can relate to was the Python 4a Stepper sample code and I'm trying to use that as a guide to tell me the individual steps I need to accomplish to get this running in VBNET. (I still haven't been able to find a VBNET code sample that uses the VINT Hub.)
A lot of the code is easy to translate without errors into VBNET, but I am struggling with this one:
Net.enableServerDiscovery(PhidgetServerType.PHIDGETSERVER_DEVICEREMOTE)
Can anyone show me the VBNET equivalent for that, or point me to a resource that explains it?

Thanks again,
Dan

Re: Syntax question for serverdiscovery

Posted: Thu Nov 14, 2019 11:12 am
by fraser
The VB.NET equivalent is simply

Code: Select all

Phidget22.Net.EnableServerDiscovery(ServerType.DeviceRemote)
Using the VINT Hub only requires a couple extra lines of code. For example, if you have a stepper controller attached to a VINT hub on port 1, you only need to set ".HubPort = 1" on the stepper object before calling open. if you have multiple steppers, it's also a good idea to set the serial number of the hub using ".DeviceSerialNumber"

Re: Syntax question for serverdiscovery

Posted: Thu Nov 14, 2019 11:16 am
by danthoskin
I really appreciate the response, my nerves are getting frazzled trying to sort this out.
Thanks,
Dan

Re: Syntax question for serverdiscovery

Posted: Thu Nov 14, 2019 11:59 am
by danthoskin
Yup, that was the last bit I needed. All working nicely now. Thanks Fraser.
Dan