Phidgets - Server

Navigation:  Widget Designer > Devices > Phidgets >

Phidgets - Server

prev main next

Navigation:  Widget Designer > Devices > Phidgets >

Phidgets - Server

prev main next


The Phidgets Server enables you to access Phidget devices that are connected not to your local machine, but to a machine in the network.
If you want to make use of Phidgets via network, the respective remote machine needs to be added to your project as Phidget Server device .

The Network Server must be enabled in the Phidget Control Panel of the remote machine, please make sure that it is reachable via your local Phidget Control Panel.

Note that all Phidget devices are only available in the licensed Widget Designer edition, not the Free version.

Adding a New Phidgets Server

To add a Phidget Server device, open the Devices menu and select Phidgets Device > Server Device. This will open the Configuration dialog. Alternatively, you can add a new device in the Configuration dialog with the "+" button when the dialog is already open.

On the right side, you can name, dis-/enable the device or configure it as explained in the next paragraph.

The Type informs you about the type of device or connection. The Groups lists the groups to which this device belongs. The Name is the unique identifier for this Phidgets Server object in WD and the general rules for naming objects apply here as well: only letters, numbers and underscores are allowed; the first symbol must be a letter. It is possible to change the default name to a more descriptive one. When scripting, enter this Name to access available members or use the Project object and device Type instead; examples are shown further down.

The Id offers an alternative way to address the device when scripting.

The "Enable" check box is ticked per default. On the left side, you should see that the icon in front of your Phidgets Server is a filled blue circle. An empty blue circle indicates an enabled device which is not connected. A filled gray circle indicates a disabled device.

You can close the dialog at any time. The newly created device will also be added to the Devices menu > Phidgets Device > Server Device and can be opened from here or with Devices menu > Configuration.

The Phidgets Server Settings

click to enlargeTo connect to a Phidgets Server, simply enter the remote IP Address and correct Port. There is no need to pick a specific network adapter as WD assigns one automatically based on the IP.
The standard port is 5661, but you may select any free port in the Network Server settings of the remote machine.

If you have set up a Password to access the remote Phidgets, you need to enter it here as well.
Press Apply to confirm your settings.

After the connection is established, all Phidget devices connected to the remote machine are listed in this dialog.
The list is updated automatically as soon as a device is physically connected or disconnected.

Using the Device in Regular Scripting

After adding a Phidget Server, it can also be scripted which allows to perform actions on the device as well as retrieve information from it.

To send commands to the device, create a CustomScript button or anything with a scripting field. Enter the device's identifier name into the script field (per default that is e.g. "Phidgets_Server1") and Script Assist will offer a list of all available members.

You can for example en- or disable the device via scripting:

It also offers you the possibility to retrieve a list of the serial numbers of the connected device and write this to a global or local list variable:
vlist = Phidgets_Server1.GetSerialList
This enables you for example to check whether new devices were added or if one was disconnected.

For a list with all available members and commands with examples and descriptions, please refer to the chapter Phidgets Server Members.

As an alternative to explicitly naming the device, the "Project" object can be used. Choose the device type and address the device by entering its ID or name. Script Assist then offers you the same list of members. This is the alternative for the first example from above:

Substituting the ID with a dynamic variable allows automation. Actions can be performed on many connections of the same type simultaneously, e.g. by using for-loops:
For i = 1 to 10 {



The chapter "Project and Context Member" shows more examples with for-loops and if-clauses; of course, normal variables can also be used.

Using the Device with Event Listeners

Event Listeners can be added in the Configuration dialog and provide a simple way of listening to triggers from connected devices.

Please see the chapter Event Listener for a detailed description of its functionality and the Phidgets Server Events chapter for a list (with examples and description) of the possible events raised by this device type.