Edwin Schwellinger hat geschrieben:
Hi David,
no, but this link seems to be straight forward, then you need to change the location in CODESYS were the sensors are read from. http://raspberrypi.tomasgreno.cz/therma ... r-i2c.html
BR
Edwin
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 http://lxr.free-electrons.com/source/dr ... 1/masters/. 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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi David,
CODESYS read only the values in/sys/devices/w1_bus_master1/
the real Job is done by the Linux kernelmodul.
So why no change the path to the new location of your sensor Location... and maybe adapt it.
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
ls/sys/devices/w1_bus_master1
The directory will have a directory for each connected device - mine was named , add this as the in the DS2482 configuration.
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has anyone had any success using 1-wire devices connected using the DS2482-100 with CODESYS?
Hi David,
no, but this link seems to be straight forward, then you need to change the location in CODESYS were the sensors are read from.
http://raspberrypi.tomasgreno.cz/therma ... r-i2c.html
BR
Edwin
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 http://lxr.free-electrons.com/source/dr ... 1/masters/. 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.
Hi David,
CODESYS read only the values in/sys/devices/w1_bus_master1/
the real Job is done by the Linux kernelmodul.
So why no change the path to the new location of your sensor Location... and maybe adapt it.
BR
Edwin
Getting this working was actually very straightforward - I should have come back and updated this sooner.
I needed to install the kernel module for the DS2482 and then create the device (NOTE 12C drivers already installed).
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
The directory will have a directory for each connected device - mine was named , add this as the in the DS2482 configuration.
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.
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.