CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Single BUS 1-Wire
https://forum.codesys.com/viewtopic.php?f=21&t=9420
Page 1 of 1

Author:  g.neva [ Thu Jan 03, 2019 3:44 pm ]
Post subject:  Single BUS 1-Wire

Hi, i'm trying to set up my RPi 3 B+ to exchange datas with a slave in "SINGLE BUS 1- WIRE" fieldbus.
I think everything is quite clear about the protocol .
My doubt is : in Single bus 1 - wire mode, a GPIO pin must change its working mode from OUTPUT (when the Rpi must pull down the line to activate the start frame signal) to INPUT (when the slave/device or other will send data ) .
How could be possible to implement this double functionality "on fly" ????
I suppose that the only setup window to configure the working mode is the one in the image that is an OFFLINE configuration mode.
Thanks

Author:  Edwin Schwellinger [ Thu Jan 03, 2019 5:25 pm ]
Post subject:  Re: Single BUS 1-Wire

Hi,
are you trying to use this?
viewtopic.php?f=23&t=6247&p=16920#p16920

BR
Edwin

Author:  g.neva [ Fri Jan 04, 2019 8:54 pm ]
Post subject:  Re: Single BUS 1-Wire

No Edwin,
i'm using a DHT11.
I supposed that the only device description file in xml available is for DS18B20 that is the only example on the net related to Codesys.
I could not find any other dev description file on internet.
So i thought i had to build my own code following the sw. and hw. rules for 1-wire bus.
I cannot even find the way to insert a "generic" slave and maybe trying to use the automatic ID scan example project you posted in the past.
My job is automation engineer and Codesys is my work tool but this test is really hard to achieved.
Thanks.

Author:  Edwin Schwellinger [ Sat Jan 05, 2019 9:07 am ]
Post subject:  Re: Single BUS 1-Wire

Hi,
but isn't this SHT21 quit similar.., Maybe with minor modification of the library?
viewtopic.php?f=23&t=5872&p=10867#p11612

BR
Edwin

Author:  g.neva [ Sat Jan 05, 2019 6:48 pm ]
Post subject:  Re: Single BUS 1-Wire

Maybe u gave me an idea.
i cannot use SHT21 : this is a I2C bus sensor.
DHT11 is 1-wire bus.
But what do u think about this :
the only devdec.xml for 1-wire sensor provided by you and/or your team is for DS18B20; i tried to open it and it doesn't seem containing specific information about the Type of the sensor.
So i suppose i can use that devdesc.xml even if in reality my RPi is connected to a DHT11.
Then (and here i need your opinion) i could open the related library (if exists ) that manages DS18B20 and working on minor modification to fit what is the real protocol rule for DHT11 instead DS18B20
What do u think??

Thanks.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/