• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Neuron L303 and M303 DI not working -- LED not showing

    UniPi Neuron Series
    2
    9
    989
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Martijn Hemeryck
      Martijn Hemeryck last edited by

      I did buy a Neuron L303 and M303 somewhere last year, to get acquainted with the hardware and to write software to read the digital inputs (e.g. https://github.com/mhemeryck/unipitt).

      Now that I am nearing the end of the electrical installation of my house, I did start wiring up all of my push buttons, only to find out that a large number of them simply do not work. I first figured it could be related due to the software (I did read there was an issue with the sysfs SDK on which my implementation was based), but the LEDs on the unipi itself does not even light up for these DI.

      I am hoping it could be a software issue -- but since the LEDs aren't even showing I actually fear for a hardware issue. Can you help me to further debug this?

      Martin Kudláček 1 Reply Last reply Reply Quote 0
      • Martin Kudláček
        Martin Kudláček @Martijn Hemeryck last edited by

        Hi @martijn-hemeryck,
        that seems like a HW error, but let's try to update the PLC to latest packages and firmware.

        sudo bash
        apt update
        For Axon: apt install axon-kernel unipi-kernel-modules
        For Neuron: apt install unipi-kernel-modules
        apt dist-upgrade
        reboot
        sudo /opt/unipi/tools/fwspi --auto -PR -v

        1 Reply Last reply Reply Quote 1
        • Martijn Hemeryck
          Martijn Hemeryck last edited by

          @martin-kudláček said in Neuron L303 and M303 DI not working -- LED not showing:

          sudo /opt/unipi/tools/fwspi --auto -PR -v

          Thanks for the quick reply. I did try the upgrades as you suggested.

          There was no dist-upgrade to perform -- could run the firmware upgrade for L303:

          mhemeryck@L303-sn17:~ $ sudo apt install unipi-kernel-modules
          [sudo] password for mhemeryck:
          Reading package lists... Done
          Building dependency tree       
          Reading state information... Done
          Package unipi-kernel-modules is not available, but is referred to by another package.
          This may mean that the package is missing, has been obsoleted, or
          is only available from another source
          However the following packages replace it:
            unipi-kernel-modules-dkms
          
          E: Package 'unipi-kernel-modules' has no installation candidate
          mhemeryck@L303-sn17:~ $ sudo apt install unipi-kernel-module
          Reading package lists... Done
          Building dependency tree       
          Reading state information... Done
          E: Unable to locate package unipi-kernel-module
          mhemeryck@L303-sn17:~ $ apt-get dist-upgrade
          E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
          E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
          mhemeryck@L303-sn17:~ $ sudo apt-get dist-upgrade
          Reading package lists... Done
          Building dependency tree       
          Reading state information... Done
          Calculating upgrade... Done
          0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
          mhemeryck@L303-sn17:~ $ sudo /opt/unipi/tools/fwspi --auto -PR -v
          Board on /dev/unipispi firmware=5.3  hardware=0.1 (B-1000) (spi 8MHz)
          NEW firmware=5.40 found
          N2000 = 22
          8800 OK
          e000 OK REBOOTING...
          Board on /dev/unipispi firmware=5.3  hardware=10.1 (E-16Di_U-14Di) (spi 8MHz)
          NEW firmware=5.40 found
          N2000 = 37
          8000 OK
          e000 OK REBOOTING...
          Board on /dev/unipispi firmware=5.3  hardware=10.1 (E-16Di_U-14Di) (spi 8MHz)
          NEW firmware=5.40 found
          N2000 = 37
          8000 OK
          e000 OK REBOOTING...
          Firmware autoupdate finished
          

          After testing the involved DI ports, I still could not see any LEDs lighting up ... Would it make sense to break the seal and have a look at the DI board itself? Or what would be the best next step to check?

          1 Reply Last reply Reply Quote 0
          • Martijn Hemeryck
            Martijn Hemeryck last edited by

            Update: I did check the issue with the faulty DIs again and I did notice that they actually still do respond -- but only after a 10s delay. This delay seems consistent for all the DIs. Additionally, it all concerns the upper 4 DIs (27...30) in all cases.

            My guess is thus that it's probably not due to a hardware issue but rather a firmware issue.

            Is this a known issue? Could this be related to the latest firmware upgrade?

            Martin Kudláček 1 Reply Last reply Reply Quote 0
            • Martin Kudláček
              Martin Kudláček @Martijn Hemeryck last edited by

              Hi @martijn-hemeryck,
              this isn't a known issue. Have you tried reading the DIs solely via SysFS for example? Turn off your software and do:

              watch -n 0.1 cat /run/unipi/io_group1/di_1_01/di_value

              What is the response time with this command?

              Best regards,
              Martin

              Martijn Hemeryck 1 Reply Last reply Reply Quote 0
              • Martijn Hemeryck
                Martijn Hemeryck @Martin Kudláček last edited by

                @martin-kudláček I did try they approach you suggested:

                • I did not have my own custom software running right now (or before), so this shouldn't have been the issue
                • I did check first for e.g. di_2_13: reaction was pretty much instantaneous
                • Afterwards, checked for di_2_27: same reaction time as when I check with the LED indicator lights

                Any other things I can check? Thx!

                Martin Kudláček 1 Reply Last reply Reply Quote 0
                • Martin Kudláček
                  Martin Kudláček @Martijn Hemeryck last edited by

                  Hi @martijn-hemeryck,
                  that looks like you were playing with the debounce settings. Can you please verify it:

                  mbpoll 127.0.0.1 -a 0 -0 -1 -r 1136

                  This will return the debounce settings for DI_2_27 and normally it should be 50 (5ms = 50 * 100us). You can set it up to 65535 which means 6.5s

                  Martin

                  Martin Kudláček Martijn Hemeryck 2 Replies Last reply Reply Quote 0
                  • Martin Kudláček
                    Martin Kudláček @Martin Kudláček last edited by

                    By the way, the flashing firmware with -PR parameter will reset the firmware settings to the default one. So it should set the debounce back to 5ms, but since you were flashing from ancient firmware 5.3 to 5.40 it probably didn't happen. Running it know again will reset it:

                    sudo /opt/unipi/tools/fwspi -i 0 -PR -v
                    sudo /opt/unipi/tools/fwspi -i 1 -PR -v
                    sudo /opt/unipi/tools/fwspi -i 2 -PR -v

                    Martin

                    1 Reply Last reply Reply Quote 0
                    • Martijn Hemeryck
                      Martijn Hemeryck @Martin Kudláček last edited by Martijn Hemeryck

                      @martin-kudláček said in Neuron L303 and M303 DI not working -- LED not showing:

                      mbpoll 127.0.0.1 -a 0 -0 -1 -r 1136

                      mhemeryck@L303-sn17:~ $ mbpoll 127.0.0.1 -a 0 -0 -1 -r 1130
                      mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
                      Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
                      This program comes with ABSOLUTELY NO WARRANTY.
                      This is free software, and you are welcome to redistribute it
                      under certain conditions; type 'mbpoll -w' for details.
                      
                      Protocol configuration: Modbus TCP
                      Slave configuration...: address = [0]
                                              start reference = 1130, count = 1
                      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
                      Data type.............: 16-bit register, output (holding) register table
                      
                      -- Polling slave 0...
                      [1130]: 	50
                      
                      mhemeryck@L303-sn17:~ $ mbpoll 127.0.0.1 -a 0 -0 -1 -r 1137
                      mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
                      Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
                      This program comes with ABSOLUTELY NO WARRANTY.
                      This is free software, and you are welcome to redistribute it
                      under certain conditions; type 'mbpoll -w' for details.
                      
                      Protocol configuration: Modbus TCP
                      Slave configuration...: address = [0]
                                              start reference = 1137, count = 1
                      Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
                      Data type.............: 16-bit register, output (holding) register table
                      
                      -- Polling slave 0...
                      [1137]: 	65535 (-1)
                      
                      

                      Right, so it indeed looks like a very high debounce time!

                      Strange, since I thought I had already checked that with the web view / can't recall changing it myself.

                      Anyways, I ran the firmware updates again, and now it's fixed! Thanks a lot!!

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post