Page 1 of 1

New to SBC

Posted: Thu Aug 29, 2019 6:56 am
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 ?

Re: New to SBC

Posted: Fri Aug 30, 2019 3:52 pm
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()