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:

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

Post by sheppy »

Thanks
On Linux, I executed apt-get update & apt-get upgrade which seems to have changed the version.

My setup queries each probe 10 times at 2 second intervals every minute and averages the results for each probe.

Since upgrading to the latest version I get a "Phidget Exception 3: Timed Out Press Enter to Exit..." error every 2-13 minutes on both my PH Probe, and ORP Probes. doubling ch.openWaitForAttachment doesn't help.

With the updated code it ignored my original ch.setVoltageRange(7) in the line after ch.openWaitForAttachment(5000), and gave lower readings up to 400 when it reported saturation. Moving ch.setVoltageRange(7) to the attached section has allowed it to read higher readings and it has jumped around 380.

Presumably when it is in the wrong range it under reports the voltage? With the old code it jumped at around 400 to around 700
User avatar
mparadis
Site Admin
Posts: 660
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 say you get the error every 2-13 minutes, do you mean you're running the program constantly, and every once in a while you get the error when it tries to attach? Usually open will timeout when the Phidget is open in another program, such as the control panel or the process of another program that hasn't closed yet.
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 »

When the pool pump is on I run each script 30 seconds apart with an enforced timeout of 25 seconds. Usually each script terminates with a result after 21 seconds, so the system is idle for at least 8 seconds before it is queried again. The Network Server isn't running so nothing other than the 2 scripts can take control of it.
Can you suggest a better way? I use an averaged value of ORP to control the SaltWater Chlorinator
User avatar
mparadis
Site Admin
Posts: 660
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 »

I'm not entirely clear on why two scripts are necessary in this application. It seems like it would be easier to combine them both into one script and have it run for as long as you need it, outputting probe data to the terminal or an external file.
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 »

I run 2 scripts as it was the easiest way to combine my newbie level of Python Skills with OpenHAB. I'm very happy to try something more efficient if you can point me in the right direction, I'd like to do as much work as possible in Python as it seems to run on a different CPU core to the 2 used by my busy OpenHAB system.
Over the weekend I've combined the 2 scripts, and got them to output the 2 values together. They now run for the first 48 seconds of each minute, and so far things seem to be working much better with one dropout approximately every 14-20 minutes. :D
Thanks for the tip!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests