BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Supporting 2.7 and 3.2+
sheppy
Phidgetsian
Posts: 11
Joined: Mon Nov 06, 2017 1:34 pm
Contact:

BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by sheppy »

I've got an ORP Probe connected to an ADP1000 and VINT Hub on a Raspberry Pi running Jessie. I query the probe using the Python Voltage input example.
I have added "attached.setVoltageRange(7)" as the second item in the "attached" section of the example voltage input script to change the ADP1000 into ORP mode, but "Saturation Error" usually appears once before valid readings appear in the console screen. This happens every time the script is ran, so the device must reset to PH Mode once the script is closed.
Is there a way of fixing this or is it a bug? I can work around it by commenting out the error report console statement but it doesn't seem like an ideal thing to do
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by mparadis »

If you set the voltage range right after ch.openWaitForAttachment(5000) using ch.setVoltageRange(7), the range should change before the first sample arrives. By the time the attach handler fires, the first data point has already been recorded.
sheppy
Phidgetsian
Posts: 11
Joined: Mon Nov 06, 2017 1:34 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by sheppy »

That didn't make any difference. I now have

ch.openWaitForAttachment(5000)
ch.setVoltageRange(7)

and the first result is

Error 4105 : Saturation Detected.
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by mparadis »

Ah, my mistake, I missed the error because it was on the line with some other text. If you move ch.setOnErrorHandler(ErrorEvent) after ch.setVoltageRange(7), it should fix the problem.
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by Patrick »

This is a library bug. You should be able to change the voltage input range in the attach event, without having to worry about any spurious error/data events. This will be fixed in the next library release.

-Patrick
sheppy
Phidgetsian
Posts: 11
Joined: Mon Nov 06, 2017 1:34 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by sheppy »

Thanks for the replies. I'll leave it with the error print statement commented out until the next release.
Having used a PH and ORP probe for a few days now can I suggest making a few of the settings stick between sessions, and also maybe adding basic average readings to the sample code to try and combat electrical noise.
I use a 10 point average for my ORP Probe and a 4 point average for my PH Probe, I then further limit the rate of change in OpenHAB when it processes the result of a probe query. This gives me relatively noise free graphs, and a final value that I can use to control my Pool Chlorinator
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by Patrick »

Fix is live.
sheppy
Phidgetsian
Posts: 11
Joined: Mon Nov 06, 2017 1:34 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by sheppy »

Thanks, will give it a try
sheppy
Phidgetsian
Posts: 11
Joined: Mon Nov 06, 2017 1:34 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by sheppy »

@Patrick where can I find the fix - I see only version 22 on the support page. Is the version still at 22 for the fixed version?
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: BUG? ADP1000 / ORP Probe, Can't set Voltage Range before Saturation Error

Post by mparadis »

When you download our drivers, it automatically gives you the newest release. For example, if you download the Windows drivers now, the installer filename is

Phidget22-x64_1.0.0.20171120

22 is the major version, but 1.0.0.20171120 is the release that came out on November 20, 2017.
Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests