differential pressure sensor

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

differential pressure sensor

Post by philbrown »

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

Post by philbrown »

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: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: differential pressure sensor

Post by Patrick »

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

Post by philbrown »

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: 22
Joined: Fri Oct 07, 2016 4:47 pm
Contact:

Re: differential pressure sensor

Post by LucasP »

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

Post by philbrown »

That makes a lot of sense. Thank you.
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests