<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to 1-wire using DS2482-100</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/</id><updated>2020-02-27T16:36:55.247000Z</updated><subtitle>Recent posts to 1-wire using DS2482-100</subtitle><entry><title>1-wire using DS2482-100</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/?limit=25#c4c5" rel="alternate"/><published>2020-02-27T16:36:55.247000Z</published><updated>2020-02-27T16:36:55.247000Z</updated><author><name>DavidCozens</name><uri>https://forge.codesys.com/u/davidcozens/</uri></author><id>https://forge.codesys.combaa522d0431268485744a4261713e733db580c33</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Getting this working was actually very straightforward - I should have come back and updated this sooner.&lt;/p&gt;
&lt;p&gt;I needed to install the kernel module for the DS2482 and then create the device (NOTE 12C drivers already installed). &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;sudo&lt;/span&gt; &lt;span class="nv"&gt;sh&lt;/span&gt;
&lt;span class="nv"&gt;modprobe&lt;/span&gt; &lt;span class="nv"&gt;ds2482&lt;/span&gt;
&lt;span class="nv"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;ds2482&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="nv"&gt;x18&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;bus&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;i2c&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;devices&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;i2c&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;new_device&lt;/span&gt;
&lt;span class="k"&gt;exit&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;for me this created a 1wire master matching the default name of . In CODESYS I added the onewire_master and a single DS18B20 device. On the pi look in the device directory&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ls&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;devices&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;w1_bus_master1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The directory will have a directory for each connected device - mine was named , add this as the  in the DS2482 configuration. &lt;/p&gt;
&lt;p&gt;As mentioned in previous posts updating the 1 wire devices is very slow - the suggestion is to put them on another lower priority slow task.&lt;/p&gt;
&lt;p&gt;To make these changes will be lost on a reboot, to make them permanent add ds2482 to /etc/modules. Then one of the startup scripts can be used to create the new_device. I haven't decided where I want to do this yet.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>1-wire using DS2482-100</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/?limit=25#3844" rel="alternate"/><published>2020-02-27T16:36:52.743000Z</published><updated>2020-02-27T16:36:52.743000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com687063dd2a2c5e9dd0f448fc247045dd6d22465a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi David,&lt;br/&gt;
CODESYS read only the values in/sys/devices/w1_bus_master1/&lt;br/&gt;
the real Job is done by the Linux kernelmodul.&lt;br/&gt;
So why no change the path to the new location of your sensor Location... and maybe adapt it.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>1-wire using DS2482-100</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/?limit=25#17a2" rel="alternate"/><published>2020-02-27T16:36:51.873000Z</published><updated>2020-02-27T16:36:51.873000Z</updated><author><name>DavidCozens</name><uri>https://forge.codesys.com/u/davidcozens/</uri></author><id>https://forge.codesys.com936a8b315ce2e8ba5f054e28525fd5250250e35b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Edwin Schwellinger hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi David,&lt;br/&gt;
no, but this link seems to be straight forward, then you need to change the location in CODESYS were the sensors are read from.&lt;br/&gt;
&lt;a class="" href="http://raspberrypi.tomasgreno.cz/thermal-sensor-i2c.html" rel="nofollow"&gt;http://raspberrypi.tomasgreno.cz/therma ... r-i2c.html&lt;/a&gt;&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks Edwin, I hadn't gone down this route because the CODESYS driver is using /sys/devices/w1_bus_master1/. I think that means that CODESYS must access 1-wire masters as Linux one wire devices, I found source code for the drivers here &lt;a class="" href="http://lxr.free-electrons.com/source/drivers/w1/masters/" rel="nofollow"&gt;http://lxr.free-electrons.com/source/dr ... 1/masters/&lt;/a&gt;. I believe that owns provides a different interface mechanism that isn't compatible with CODESYS. I'll post when I have something working. Thank you for the suggestion.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>1-wire using DS2482-100</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/?limit=25#1379" rel="alternate"/><published>2020-02-27T16:36:49.366000Z</published><updated>2020-02-27T16:36:49.366000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comcde1682d4a7dc642e6c8be9534cf31863ff207ab</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;no, but this link seems to be straight forward, then you need to change the location in CODESYS were the sensors are read from.&lt;br/&gt;
&lt;a class="" href="http://raspberrypi.tomasgreno.cz/thermal-sensor-i2c.html" rel="nofollow"&gt;http://raspberrypi.tomasgreno.cz/therma ... r-i2c.html&lt;/a&gt;&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>1-wire using DS2482-100</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/4c887ca6e3/?limit=25#501e" rel="alternate"/><published>2020-02-27T16:36:48.503000Z</published><updated>2020-02-27T16:36:48.503000Z</updated><author><name>DavidCozens</name><uri>https://forge.codesys.com/u/davidcozens/</uri></author><id>https://forge.codesys.com5aa233f58186b526893ead3f7b24686f5bbdbbde</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Has anyone had any success using 1-wire devices connected using the DS2482-100 with CODESYS?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>