🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Cannot get StamPLC to run main.py

    UiFlow 2.0
    3
    4
    57
    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.
    • T
      tiditidi
      last edited by

      Hello,

      I am trying to program an extremely simple PLC setup that reacts to two prox sensors and toggles relay one based on rising and falling actions.

      I have the logic laid out perfectly, and have even tried several different ways to achieve the same thing.

      However, when I upload to StamPLC, the program works until device reboot, then it will not work at all until I reupload the program.

      Any ideas? I've been stuck for days trying to get the thing to work, and I need to wrap up this project for work

      kurikoK 1 Reply Last reply Reply Quote 0
      • kurikoK
        kuriko @tiditidi
        last edited by

        @tiditidi
        You gotta push the download button to permanetly flash the code to the device:ea844718-c12d-4c91-995a-e6719f2c0bcf-image.png

        Good morning, and welcome to the Black Mesa Transit System.

        1 Reply Last reply Reply Quote 0
        • robskiR
          robski
          last edited by

          uiflow0.JPG

          Run - doesn't flash your code to device memory - also uses wifi settings made in M5burner
          Download - flashes your code so it is in device after reboot - if you need wifi then such blocks must be in the code too as device will not be visible for uiflow2 after reboot without wifi blocks

          M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ, M5Tab

          1 Reply Last reply Reply Quote 0
          • T
            tiditidi
            last edited by tiditidi

            Thank you for responding.

            Even when I use the download button, it doesn't make a difference. The code will only run until reboot.

            I can only get it to work once. I added a couple of images to the screen so that I can move them around in between attempts, and the images display properly. They even move when I move them and reload, indicating the program is in fact being downloaded. However, no matter how I upload to device, only works until reboot.

            I should also add that it seems like the relay isn't being initialized. When the program works, the relay clicks when the program starts, and the serial monitor shows the relay open and close commands as they happen. Then on reboot, the relay never clicks, and I see nothing in serial monitor indicating anything is happening at all. But the images are showing in the proper places.

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