Normally you address a specific device before sending a command. All the other devices drop off and stop listening.
If there is only one device on the bus, you can use the special 0x33 command that addresses it.
The convert command for temperature is only recognized by appropriate devices, so using 0x33 on a crowded bus will set every device listening, and all potentially converting. Only temperature sensors will actually do anything with the command. They will all start temperature measurement simultaneously, and all share the same delay.
Same for voltage. (Different "convert" command.
Caveates -- needs a lot of power, so parasytic is unwise.
Can't be in different DS2409 branches.
Timing can get complex if more than one program is accessing the bus.
The other data from the devices is not affected -- but usually don't require a significant delay.
Note the DS2438 can measure voltage on 2 channels, but not simultaneously. Humidity measurements won't be sped up by "simultaneous".
Paul Alfille
On 11/5/06, Serg Oskin <[EMAIL PROTECTED]> wrote:
It starts procedure "convert" on all devices on the bus - hence it actually only
for values volt* and temp*.
While read from simultaneous/volt value "1" (time of it is set by cache-options)
procedure "convert" is not started at data reading from device/volt*. Here an
example of my script for the program similar rrdtool:
[ -f $Base/simultaneous/temperature ] && {
sim=`cat $Base/simultaneous/temperature`
if [ "$sim" = "0" ]; then
echo 1 >$Base/simultaneous/temperature
fi
}
val=`cat $Base/$dev/temperature`
It allows very quickly to obtain data from such quantity of gauges:
# ls -d /mnt/1wire/28.* | wc -l
77
#
:)
Rob Conway wrote:
> Serg & Paul,
>
> I use powered devices so I have updated my script to set
> simultaneous/voltage and temp to 1 then read all device data out
> of cached data. crontab was also starting a rrdtool trend script at the
> same time as my 1wire read script. It seemed to work OK however I put a
> sleep in my rrdtool script such that my 1wire script can complete first.
>
> Question: does setting "simultaneous/volt & temp" to 1 initiate a
> reading of just the volts (I assume Volts.all & volt.x) and temp
> parameters or all data from the devices.
>
> cheers
>
>
> ----- Original Message -----
> *From:* Paul Alfille <mailto: [EMAIL PROTECTED]>
> *To:* owfs-developers@lists.sourceforge.net
> <mailto: owfs-developers@lists.sourceforge.net>
> *Sent:* Monday, November 06, 2006 3:00 AM
> *Subject:* Re: [Owfs-developers] Fwd: [owfs - Help] DS2450 and the
> NSLU2 (SLUG)
>
>
>
> On 11/5/06, *Serg Oskin* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Rob Conway wrote:
> > In an attempt to optimise the 1wire communications can you
> comment on
> > the following:
> >
> > *Reading data*
> > My current requirment is to read the volts every two minutes
> (although
> > would like it faster especially when I get my weather
> station) from all
> > channels of 2 x DS2450 (A/D), temperature from 4 x DS18B20,
> counter
> > readings from 1 x DS2423 (counter) and read/write 4 x DS2406
> (Switch).
> >
> > It is very convienient to use awk as I can do some calcs as
> well, all in
> > one line.
> >
> > My script currently just uses individual awk lines for each
> > "uncached/Volt.X" parameter....
> > Would it be better for the first line to get
> uncached/Volt.All and
> > subsequent lines to use cached/Volt.All. I think awk will
> allow me to
> > use $0, $1,$2,$3 for each of the values in Volt.All. I
> "assume" the
> > first line /"uncached/Volt.X"/ would cause a direct read from
> the device
> > and the three subsequent reads to /"cached/Volt.X" /would
> simply get the
> > last scanned data from cache and not cause additional
> traffic. Is this
> > correct and a better utilisation of owfs.
>
> Before data reading from DS2450 execute a command:
>
> echo 1 > simultaneous/voltage
>
> and then read cached data.
>
>
> Serg is correct. The fastest method, especially if you have "power"
> (rather than parasytically powered) devices is the initiate all the
> temperatuer and voltage conversions, then read the cached results.
>
> As an anternative, especially if unpowered, there is a benefit to
> reading uncached/volts.ALL, and parsing the result in your script.
> The time required is 1 fourth of the individual readings.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers