New to SBC

General PhidgetSBC Discussion.
Post Reply
esjfri
Fresh meat
Posts: 2
Joined: Thu Aug 29, 2019 5:20 am
Contact:

New to SBC

Post by esjfri »

I have a SBC connected with a weatstone bridge and a load cell. The SBC is nonnected to my windows developer PC in the ethernet port as staic ip. I can read the Voltagratio from the Phidget Control Panel. How step for step can i read from a single load cell, from a python program running on my windows.?
All the examle i can find do a lot of auto serching attaching thing, i just want to must simple getvalue from a specific loadcell.
Any who can help ?
jdecoux
Labview Developer
Posts: 161
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: New to SBC

Post by jdecoux »

It sounds like you want to use addServer to add access to your static ip server to your program.

You would do this before opening your Phidget, and the rest of your program remains the same as if it were local. You also may have to wait a bit longer for attachment over the network. For example:

Code: Select all

from Phidget22.Phidget import *
from Phidget22.Net import *
from Phidget22.Devices.VoltageRatioInput import *

bridge = VoltageRatioInput();

Net.addServer("myServer", <ipAddress>, 5661, <password>, 0)

#Any other addressing parameters here

bridge.openWaitForAttachment(20000)

#The rest of your program here, for example
bridge.getVoltageRatio()

bridge.close()
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests