Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Single BUS 1-Wire

g.neva
2019-01-03
2019-01-05
  • g.neva - 2019-01-03

    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

    IMG: GPIO_cfg.jpg

     
  • g.neva - 2019-01-04

    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.

     
  • eschwellinger

    eschwellinger - 2019-01-05

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

    BR
    Edwin

     
  • g.neva - 2019-01-05

    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.

     

Log in to post a comment.