differential pressure sensor

Comments & issues
philbrown
Fresh meat
Posts: 4
Joined: Tue Jan 02, 2018 3:08 pm
Contact:

differential pressure sensor

Postby philbrown » Wed Jan 03, 2018 7:43 am

Hi,

I am having a hard time getting my pressure sensor to attach with the PressureSensor object. The part number for the sensor 1126 and the hub I am connecting to is a HUB0000_0. I am able to connect via the control panel and by the API as a VoltageRatio object attachment but not PressureSensor.

I notice that the pressure sensor example does not have a setishub... and when I try and add a line that does that in the appropriate space I get a error code 21 when trying to attach the device.

Thank you for your help.

philbrown
Fresh meat
Posts: 4
Joined: Tue Jan 02, 2018 3:08 pm
Contact:

Re: differential pressure sensor

Postby philbrown » Wed Jan 03, 2018 8:37 am

I think I may be able to answer my own question. It looks like Pressure Sensor objects are not supported by the HUB0000_0.

User avatar
Patrick
Lead Developer
Posts: 3212
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: differential pressure sensor

Postby Patrick » Wed Jan 03, 2018 10:44 am

1126 is an analog sensor, and so is supported by the VoltageRatioInput API.

philbrown
Fresh meat
Posts: 4
Joined: Tue Jan 02, 2018 3:08 pm
Contact:

Re: differential pressure sensor

Postby philbrown » Wed Jan 03, 2018 3:19 pm

Thanks for the reply Patrick.
this is the section of the document that is confusing me:

"Converting the voltage to pressure (kPa) is not specific to this example, it is handled by the Phidget libraries, with functions you have access to when you begin developing!"

given this sentence it is my belief that the PressureSensor API should work with this device. Is that incorrect? (I am not even able to get the Pressure.py example to work).

The error I get after uncommenting and using the same channel and hub port that works with the VoltageRatio.py example is timeout (waiting to attach).

LucasP
Phidgetly
Posts: 19
Joined: Fri Oct 07, 2016 4:47 pm
Contact:

Re: differential pressure sensor

Postby LucasP » Wed Jan 03, 2018 9:23 pm

You should only be using the VoltageRatioInput API. The documentation is referring to the Sensor Type (see VoltageRatioInput API). By matching the Sensor Type to your analog sensor, the correct formula will automatically be applied to data when you get the SensorValue or subscribe to the SensorChange event.

philbrown
Fresh meat
Posts: 4
Joined: Tue Jan 02, 2018 3:08 pm
Contact:

Re: differential pressure sensor

Postby philbrown » Fri Jan 05, 2018 7:55 am

That makes a lot of sense. Thank you.


Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests