ladder logic diagrams and DS18B20

2016-12-15
2016-12-17
  • florinpetreus - 2016-12-15

    Hi.
    I installed Codesys one week ago. From this it result that I'm very newer in this .
    I try to make a ladder logic diagrams project. In this project i want to read temperature from a DS18B20 sensor on a Raspberry device but without success.
    Can someone to help me in this? I put an screenshot for clarification.

    Thanks

    IMG: ds18b20.jpg

     
  • eschwellinger

    eschwellinger - 2016-12-17

    Hi,

    see attched project, the instance of the onwire sensor is implicit generated by the System (name of the sensor in the device tree = instance name)
    you just need to access the Output DS18B20.rTemp
    See attached project - would recommend to access the onwire sensors in an own low prio task!

    BR
    Edwin

    IMG: OneWireLd.jpg

    Onewire_twoTasks.project [74.04 KiB]

     

Log in to post a comment.