Two OneWireMaster on one Raspberry PI 5

s1mon
2025-06-10
2025-06-13
  • s1mon - 2025-06-10

    Hi,

    I want to use two OneWireMaster on a Raspberry Pi5.
    I'm running Codesys Control for Raspberry Pi 64SL V 4.15.0.0.

    Under Linux I've configured two GPIOs for 1w bus usage on GPIO4 and GPIO27.
    Under Linux both masters seem to work fine and I can readout both sensors connected to both GPIOs.
    The two masters are 'w1_bus_master1' and 'w1_bus_master2'.
    In Codesys I've configured to OneWireMasters with the corresponding file paths.
    But in Codesys the 2nd onewiremaster "w1_bus_master2" doesn't work.
    Status is showing "OnewireMaster : Not running"

    What am I doing wrong?
    Does Codesys on Raspberry support multiple OneWireMasters?

    Any help is appreciated.

     
  • eschwellinger

    eschwellinger - 2025-06-12

    check if the second onwire master is accessible in the configfile path setting.
    /etc/codesyscontrol/

     
  • s1mon - 2025-06-13

    Thx for the hint.
    It works if I add following line to the .cfg file.

    PlaceholderFilePath.2=/sys/devices/w1_bus_master2, $OneWire2$

    Is there a documentation how to modify this config file?

    Will this be overwritten if I do an update of the CodesysControl Runtime?

     
  • eschwellinger

    eschwellinger - 2025-06-13

    CODESYScontrol.cfg will be overwritten, CODESYSControl_Usr.cfg not.

     

Log in to post a comment.