As Ben said in his posting. you should try to read the uncached values, just
to be sure it's the current value.

Change the reading by adding /uncached before the paths.

 

DI_4=$(/opt/bin/owread -s 3002 /uncached/05.FC152D000000/sensed)



/Christian

 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob
Conway
Sent: den 5 april 2007 14:32
To: [email protected]
Subject: [Owfs-developers] HELP Using DS2405 as Digital Inputs (NSLU2) and
some great I/O boards

 

After my NSLU2 has now run faultlessly with owserver for 3 weeks, thanks
Christian for the help, having got rid of fuse and only startup owserver. I
decided to move into control.  I built two I/O boards from the futurlec opto
isolated digital input board and a Digital output board.  I included a link
as at US13.00 each they work out great with only minor modifications.  They
have an area to mount the DS2405/6 chip directly onto the board.

 

I had 4 off each of the following chips so I installed them as follows

 

DI board uses 4 x  DS2405

DO boards use 4 x DS2406

 

Included link to some pics of the I/O boards

 

DO board no 1wire as yet however driver transistor removed
http://img.photobucket.com/albums/v319/rjconway/IMG_0018.jpg

DO board fitted into enclosure
http://img.photobucket.com/albums/v319/rjconway/IMG_0024.jpg

 

DI board with DS2405 fitted (no enclusre as yet)
http://img.photobucket.com/albums/v319/rjconway/IMG_0025-1.jpg

DI board underside wires not too many mods required...
http://img.photobucket.com/albums/v319/rjconway/IMG_0023-1.jpg

 

 

NOW MY PROBLEM

The digital input board uses DS2405 and I just read the sense parameter.  It
seems that regardless of how fast I scan these (2 sec or 20 sec) it takes 2
(sometimes 3) reads of the sense parameter before the state changes. Again
if I  physically turn off the input, the 1st read no change the 2nd read it
will show a change.  

 

I am now approaching 20 devices on the network and do not particulary want
to scan these Digital inputs twice as fast as nessecary.  I am going to use
some inputs as "momentary buttons and a high level alarm" thus wanting to
read the status on every scan.

 

 

 

this is my test script...I just turn on the DO to watch the lights turn on
in succession looks cool and is fast !

###########################################################

#!/bin/bash
DO_2="/opt/bin/owwrite -s 3002 12.267745000000/PIO.BYTE"
DO_3="/opt/bin/owwrite -s 3002 12.A37645000000/PIO.BYTE"
DO_4="/opt/bin/owwrite -s 3002 12.D37245000000/PIO.BYTE"
DO_1="/opt/bin/owwrite -s 3002 12.276B45000000/PIO.BYTE"

 

while true
do

 

DI_4=$(/opt/bin/owread -s 3002 05.FC152D000000/sensed)
DI_1=$(/opt/bin/owread -s 3002 05.76132D000000/sensed)
DI_3=$(/opt/bin/owread -s 3002 05.65142D000000/sensed)
DI_2=$(/opt/bin/owread -s 3002 05.07202D000000/sensed)

 

$DO_1 1
$DO_2 1
$DO_3 1
$DO_4 1
sleep 1
$DO_1 0
$DO_2 0
$DO_3 0
$DO_4 0
sleep 20

 

echo $DI_1 $DI_2 $DI_3 $DI_4
done

####################################

 

cheers

 

rob Australia

 

 

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to