Hi Paul,
Thanks for your reply. I think my questions were based on some
misconceptions and you have cleared them up. A couple comments and one more
question (which I think I've already answered) inline below....
On 12/11/06, Paul Alfille <[EMAIL PROTECTED]> wrote:
On 12/11/06, Ben Griffith <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> There was some talk about simultaneous a while back, and I'm wondering
> if I could benefit from using it. I'm using MisterHouse, which is basically
> a big perl loop. I use owperl to read a different temperature sensor every
> 15 seconds. There is, of course, a short pause when reading a sensor.
> Could I use simultaneous to reduce the number of pauses, and would the
> pauses I'd still see be of the same duration or longer than what I'm seeing
> while reading one sensor at a time? How would I use owperl with the
> simultaneous feature. All of the examples I saw were from the command line.
>
Just call the simultaneous conversion at the start of the loop. All the
values (except perhaps the first) will be waiting for you.
OW::put("/simultaneous",1) ;
I think I completely misunderstood how simultaneous works. I thought the
"simultaneous" object was a flag, and that when it was set I could request
more than one temperature at once. So setting it actually causes all of the
temperatures on the network to be read and loaded into the cache, in about
the same time as it would normally take to read just one sensor. Much
better than what I thought it did.
.....
I know that the delay is due to the A/D conversion on the chip. During that
> conversion, can other 1wire operations be going on? So, could you send the
> command for the conversion, then go poll a few 1wire switches, then come
> back and read the converted temperature? I know owfs can't do this, but I
> just wondered if the 1wire protocol allows it.
owfs can certainly do this (if powered rather than parasytic). You need a
multithreaded application to take advantage of it, however.
Or two applications? What would happen in my example below of reading
temperatures with an external application if MH tries to poll a switch
during the conversion period? I thought before that MH would have to wait,
but now I think maybe that's not the case.
I realize I could have an external (to MH) process reading temperatures.
> Since I do have some switches that I'm polling I think I would get no
> benefit because MH would still have to wait for the 1wire bus to be free.
> The same would be true of my "pre-reading" idea above I suppose.
.....
Thanks again Paul.
-Ben
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers