DS18B20 doesent work

o5i
2016-11-08
2020-06-01
  • o5i - 2016-11-08

    Hi i have tried to read the onewire DS18B20 using codesys but it seems that the bus doesent work. Everything is green except the DS18b20.. In status it says "Kein Treiber gefunden" (No driver found) ?? Realy strange.. The Sensors work well. I can read the temps on the console.. An other strange thing is that i cant set up the address in the sensor parameter field. If i clich on the "value" tab nothing happen... The example code shows me all the sensors in the list.

     
  • eschwellinger

    eschwellinger - 2016-11-08

    Hi,
    you could use attached example to check.

    BR
    Edwin

    IMG: ID.jpg

    Onewire_twoTasks.project [73.53 KiB]

     
    πŸ‘
    1
    • zawadzki666 - 2020-05-21

      I downloaded this project, but i can't connect to my Raspberrry pi 4. Another projects working wery well, only this one, I can't connect to Raspberry. I'am using Codesys V3.5.16. This has something to do with version of Codesys Runtime Package? If yes where i can downloaded the older version of Codesys Runtime Package. Please help me.

       

      Last edit: zawadzki666 2020-05-21
      • eschwellinger

        eschwellinger - 2020-05-22

        Hi,
        just try to use everything in 3.5SP16 then it should work,
        and add the Sensor ID's to the parameter in the configuration.

         
        • zawadzki666 - 2020-05-22

          Thanks Edwin
          I will try upgrade whole libraries into the project, to the newest version.
          BR
          Martin

           
          πŸ‘
          1

          Last edit: zawadzki666 2020-05-22
          • zawadzki666 - 2020-06-01

            Thanks a lot Edwin it hepls. I will have, yet one question but in another topic.
            Best Regards

             
            πŸ‘
            1
  • o5i - 2016-11-09

    Nope, it doesent compile... I have made a screenshot... The strange Thing is that the master reads the serial number from the sensors but it doesent read the sensor value... Maybee i need to change some userrights? I have made a screenshot...

    IMG: Neue Bitmap.jpg

     
  • eschwellinger

    eschwellinger - 2016-11-09

    Hi,
    If you have connected 4 sensors your project should have 4 sensors added in the device tree.
    Your screenshot has 1.
    My project and rightclick on the rasperry pi - update device then compile and add 3 sensors to the device tree would
    work like charm.
    BR
    Edwin

     
  • o5i - 2016-11-10

    Nope it doesent work... But i dont know whats the fourth address, i have only 3 sensors connected... Im using Pi2 on latest debian...
    Can i insert the sensors address manualy?

     
  • o5i - 2016-11-10

    Are you shure i dont have to set up some userprivileges?
    Its realy strange, i can read the sensors from linux whitout problems bus codesys doesent...
    I have changed the resolution from 12 to 9, wich i had changed before when i was working on the arduino whit the sensors.. Dont know whats default... But i realy need help how to fix this problem... Is there a debug screen where i can see some output or somthing what helps me to fix...

     
  • eschwellinger

    eschwellinger - 2016-11-10

    Hi,

    ok try to explain:

    1. if you have 3 sensors identify the ID of them in the VISU.
      Then add their ID's to the configuration.
      Hope the screenshot is clear.

    BR
    Edwin

    IMG: Paramter.jpg

     
  • o5i - 2016-11-11

    Hi ok i get it but i cant insert values there... If i click on it nothing happens...??

     
  • o5i - 2016-11-11

    I noticed that the values are inserted automaticly... But nothing happens...
    Here is the output of the commandline if it helps... The sensor works...

    root@raspberrypi:~# cat /sys/devices/w1_bus_master1/28-011572667aff/w1_slave
    40 01 4b 01 1f ff 1f 10 2d : crc=2d YES
    40 01 4b 01 1f ff 1f 10 2d t=20000
    root@raspberrypi:~# cat /sys/bus/w1/devices/28-011572667aff/w1_slave
    40 01 4b 01 1f ff 1f 10 2d : crc=2d YES
    40 01 4b 01 1f ff 1f 10 2d t=20000
    

    IMG: Neue Bitmap.jpg

     
  • o5i - 2016-11-11

    I noticed that the 2 tabs for onewire address configuration are missing... Why?

    IMG: Neue Bitmap.jpg

     
  • eschwellinger

    eschwellinger - 2016-11-11

    Hi,

    here:

    and once again, if you use my project the sensor id's are scanned and you could read the values in the visualisation.

    BR
    Edwin

    IMG: change_value.jpg

    IMG: adjust_the_row.jpg

     
  • o5i - 2016-11-12

    Hi, i managed it.. It was just the point that i missed to insert the address.. It was hard work to discover the missing address tab!

     

Log in to post a comment.