Re: [Owfs-developers] max owfs polling time

2009-01-04 Thread Jaap Struyk
Doug Collinge schreef: > If you subtract 4294967196 from 200 you get -4294966996 in integer > arithmetic, which I think is what you are worried about. > > But if you use 32 bit unsigned subtraction, which is available in may > programming languages (and mysql, too, if I recall correctly) then the

Re: [Owfs-developers] max owfs polling time

2009-01-03 Thread Doug Collinge
My second point was that, even if the counter wraps around once during your race, your subtraction will still get the right answer, as long as you use unsigned arithmetic. E.g., you take your first reading just 99 counts before the wraparound at 4294967196, then your engine runs for a while and yo

Re: [Owfs-developers] max owfs polling time

2009-01-03 Thread Jaap Struyk
Doug Collinge schreef: > races before you wrap the counters. Just for fun-with-numbers sake, > that's 93 years of daily races! In that case I will be 144 before I have to worry... ;-) > Forgive me if I am being pedantic here but it sounded like you didn't > really understand that wrapping count

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Doug Collinge
I don't think there is going to be a problem. The counters on that device are 32 bits long, which gives a count length of some 4 billion. By your calculation of 126k counts per race you are going to have to run 2^32 / 126000 = 34087 races before you wrap the counters. Just for fun-with-numbers

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Paul Alfille
if you want a "delta" counter, it's not hard to add it to owfs. Paul Alfille On Fri, Jan 2, 2009 at 10:28 AM, Jaap Struyk wrote: > Matthias Urlichs schreef: > > > It'll start at zero when you remove power. Don't tell me you'll never > > power the thing down. > > There is a small battery soldere

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Jaap Struyk
Matthias Urlichs schreef: > It'll start at zero when you remove power. Don't tell me you'll never > power the thing down. There is a small battery soldered on it... ;-) > It'll also wrap (i.e., start at zero) after 32bits or whatever. I suppose that is not done via owfs? (if it doesn't crash wh

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Matthias Urlichs
Hi, Jaap Struyk: > = 126000 counts for each race, 15 races a year not counting various test > at our own yard, will the counter end one day? or will it start again at > zero then? > It'll start at zero when you remove power. Don't tell me you'll never power the thing down. It'll also wrap (i.e.,

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Jaap Struyk
Matthias Urlichs schreef: >> One thing remaining do, is there a way to reset the counters after every >> reading? > > No. Why? Just remember the old value and subtract. Yes, but the engine gives 2 counts every rotation so at idle it's 30 per second and at full throttle it's 300 per second. At a

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Matthias Urlichs
Hi, Jaap Struyk: > One thing remaining do, is there a way to reset the counters after every > reading? No. Why? Just remember the old value and subtract. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | sm...@smurf.noris.de Disclaimer: The quote was selected randomly. Really. | http:/

Re: [Owfs-developers] max owfs polling time

2009-01-02 Thread Jaap Struyk
njh schreef: >> That sounds quite good, I will give that a try later this year when I > > Hehe, better hurry up! :-) bet I am too late now? -- ___ Owfs-developers mailing lis

Re: [Owfs-developers] max owfs polling time

2008-12-31 Thread njh
On Wed, 31 Dec 2008, Jaap Struyk wrote: > That sounds quite good, I will give that a try later this year when I Hehe, better hurry up! njh -- ___ Owfs-developers mailing list

Re: [Owfs-developers] max owfs polling time

2008-12-30 Thread Jaap Struyk
Paul Alfille schreef: > We have a feature that isn't fully implemented or tested called > --one_device. > > The idea is that only one device is on that bus, so after the initial > discovery, much faster techniques can be used to access the slave. > UIsing that an a dedicated bus master for each r

Re: [Owfs-developers] max owfs polling time

2008-12-29 Thread Paul Alfille
We have a feature that isn't fully implemented or tested called --one_device. The idea is that only one device is on that bus, so after the initial discovery, much faster techniques can be used to access the slave. UIsing that an a dedicated bus master for each rpm sensor could get you near your g

Re: [Owfs-developers] max owfs polling time

2008-12-29 Thread Jaap Struyk
Matthias Urlichs schreef: > You'll need to put the RPM sensors onto a different bus. > >> So I like to poll those 2 sensors (counters DS2423) every 10ms. >> > 10ms is very ambitious. That is why I bought a HUB at first instance, unfortunately it was broken on arrival, the plan was to use one bus

Re: [Owfs-developers] max owfs polling time

2008-12-28 Thread Matthias Urlichs
Hi, Jaap Struyk: > On our tractor-puller (www.minimumrisk.nl) I want to read 6 temps., 3 > pressure readings (don't know how yet) and 2 rpm readings. > The temps. are not that important, if they are updated every second it's > enough but the rpm's are from the engine and from the drive shaft. You

Re: [Owfs-developers] max owfs polling time

2008-12-28 Thread Jaap Struyk
Paul Alfille schreef: > The cache has a known lifetime -- default 15 seconds for "volatile" data > (like temperature readings). This can be bypassed (uncached directory) > or changed to a different timeout. > > One approach might be to have you fast-polling control loop reading > uncached, and yo

Re: [Owfs-developers] max owfs polling time

2008-12-28 Thread Paul Alfille
The cache has a known lifetime -- default 15 seconds for "volatile" data (like temperature readings). This can be bypassed (uncached directory) or changed to a different timeout. One approach might be to have you fast-polling control loop reading uncached, and your monitoring thread reading cached

Re: [Owfs-developers] max owfs polling time

2008-12-28 Thread Jaap Struyk
Paul Alfille schreef: > If you have more than one process accessing owfs, you wil either get > data from the cache,or wait until the bus is free. The 1-wire bus is > locked during each query, but each 1-wire bus is locked independently. So the cached data is always updated at the highest possible

Re: [Owfs-developers] max owfs polling time

2008-12-28 Thread Paul Alfille
Any specific read/write/directory listing is blocking -- it returns a value after the appropriate 1-wire communication. So you can perform as tight a loop as you want. If you have more than one process accessing owfs, you wil either get data from the cache,or wait until the bus is free. The 1-wire

[Owfs-developers] max owfs polling time

2008-12-28 Thread Jaap Struyk
Hello, I was wondering what the max. polling time of owfs itself is. If I recall correctly the shortest interval to poll 1-wire sensors is 10ms. to 50ms. depending on the type is that correct? Currently I am trying to write a C interface to collect data and writing it into mysql and are wondering