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

    M5STATION NO RS485 SUPPORT (let alone Modbus RTU) [EDIT: solution w/example inside]

    Arduino
    3
    8
    8.5k
    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.
    • C
      Caterpillaraoz
      last edited by Caterpillaraoz

      Hello,

      the main reason i bought the M5STATION was the RS485 support.
      I was pretty puzzled when I saw this element not to be included in the examples! - Let alone the modbus RTU implementation.

      I hope I'm in being mistaken and effectively the support for this port is available because it's the basics for use in industrial environment.

      To be fair and concise, at the cost of sounding not so nice :-) : Arduino has a very good Modbus library that any device with aspiration of industrial adoption should support:
      https://www.arduino.cc/reference/en/libraries/arduinomodbus/

      Are there any plans/maybe it's already done to "fix" it to run on M5STATION?

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        I had it working via a roundabout method but the screen has died on mine and so its sat on the desk doing nothing.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        C 1 Reply Last reply Reply Quote 0
        • C
          Caterpillaraoz @ajb2k3
          last edited by

          @ajb2k3 What's the method? I am seriously considering about embedding such devices in an industrial context but I'm having some doubts now.

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by

            Hello @Caterpillaraoz

            your post made me curious and since I have both an M5Station 485 and an M5Unit-ACSSR which has a Modbus mode I've put together an example. You can find it here.

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            C 1 Reply Last reply Reply Quote 2
            • C
              Caterpillaraoz @felmue
              last edited by

              @felmue said in M5STATION NO RS485 SUPPORT (let alone Modbus RTU):

              Hello @Caterpillaraoz

              your post made me curious and since I have both an M5Station 485 and an M5Unit-ACSSR which has a Modbus mode I've put together an example. You can find it here.

              Thanks
              Felix

              Thank you for your time! It's compiling OK, that's a huge step forward for me, I'll take it as a starting point. Tomorrow in the ofice I'll do a live test & update you.

              Let's see if I understood correctly... it should be communicating via the RS485 port built in in the station_485, NOT via the ACSSR unit, right?

              1 Reply Last reply Reply Quote 0
              • felmueF
                felmue
                last edited by

                Hello @Caterpillaraoz

                yes, my example uses the RS485 port from the M5Station (acting as Modbus client) controlling the ACSSR (as Modbus server).

                You will need to modify the example to send out the proper commands to the Modbus device (or devices) you want to control.

                Thanks
                Felix

                GPIO translation table M5Stack / M5Core2
                Information about various M5Stack products.
                Code examples

                1 Reply Last reply Reply Quote 1
                • C
                  Caterpillaraoz
                  last edited by

                  @felmue Seems to be working - at least in producing compliants packets. Thanks again!

                  1 Reply Last reply Reply Quote 0
                  • C
                    Caterpillaraoz
                    last edited by

                    @felmue Just an udpate: everything is working as intended. Thanks!

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