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

    RS485 ASCII-Protocoll

    Mervis
    4
    14
    3082
    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.
    • A
      Andmo last edited by

      Hello
      I have a L503 with a Advantech ADAM-4017 over RS485. How i configure the L503 in Mervis to read the 8 value?
      The Adam-4017 has the RS485 ASCII protocoll. Danks for your reply

      Andi

      T 1 Reply Last reply Reply Quote 0
      • T
        tomas_hora administrators @Andmo last edited by

        @andmo Check the custom serial protocol in Example project in our download section for Mervis

        1 Reply Last reply Reply Quote 0
        • A
          Andmo last edited by

          I found only a Excel and a Text file.
          Danks

          T 1 Reply Last reply Reply Quote 0
          • T
            tomas_hora administrators @Andmo last edited by

            @andmo Yep, the text file contains an example of ST code which parses communication with a custom RS485 ASCII protocol.

            1 Reply Last reply Reply Quote 0
            • A
              Andmo last edited by

              Please can you make a example for me with the configuration off this ADAM-4017? I'm not able to do this.
              Danks Andi

              Martin Kudláček 1 Reply Last reply Reply Quote 0
              • A
                Andmo last edited by

                AA is 01xh for Modul 1

                0_1533708351810_0477f287-3d69-4384-9eb5-7302899b2783-grafik.png

                0_1533708168022_b8892f75-f588-4458-9ff5-bed161afe9a8-grafik.png

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

                  Hello @andmo,
                  unfortunately we don't have any Modbus ASCII device at hand, so we cannot give you a working example. But I'm adding this to my tutorial TODO list and schedule it for upcoming weeks.

                  Anyway, here you can find needed info, if you are keen to dive into the protocol parsing in ST by yourself. Remember - it works the same as ModbusRTU, but with different "formatting" so to speak.

                  Martin

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

                    Hi @Andmo @Martin-Kudláček ,

                    Just as a correction - the protocol is not Modbus ASCII, but rather consists of a textual command-response interface, similar to e.g. AT commands - but this means it is easier to work with in Mervis! Unfortunately the example may be a bit hard to understand.

                    You might find it easier to write a simple function block to send a static command string first, and then go on from there.

                    The number of possible permutations of various command protocols is so high that we cannot provide support for it the same way as we can for e.g. Modbus.

                    On a related note - it may be possible to switch some ADAM-4000 devices to Modbus, as per section H.1 in the user manual:

                    Changing Configuration to Modbus Protocol
                    The ADAM-4000 Modbus version modules may come from the factory set for which
                    ADAM ASCII protocol are set as the default protocol.
                    If the module is connected to a Modbus network, the Modbus network may not recognize
                    the module. This may be caused by the incorrect settings. ADAM-4000 module
                    should be set-up for Modbus protocol instead of ADAM ASCII protocol.
                    Please follow the steps as below for configuring an ADAM-4000 module to Modbus
                    protocol.
                    1. Configure the ADAM-4000 Module with the ADAM-4000 utility (latest ADAM4000
                    utility can be found at www.advantech.com service & support.)
                    2. Initialize the ADAM-4000 on a RS-485 network (the preferred method is one
                    module at a time on the RS-485 network).
                    3. With the module powered off, turn the switch in the “Init” position. (For some
                    older Adam models, use an external wire to connect the INIT* terminal to the
                    GND terminal)
                    4. Power up the module
                    5. Wait 10 seconds for the module to initialize.
                    6. Using the ADAM-4000 utility, search (scan) for the module to change the protocol.
                    (Initial COM settings: 9600 baud, N-8-1)
                    7. The utility will identify the module from the search function.
                    8. The ADAM-4000 utility will now permit the serial data protocol to be changed to
                    the Modbus protocol.
                    9. The address and COM port settings can also be changed at this time.
                    10. To access the module, click on the module icon in the utility.
                    11. Update the settings by pressing the “Update” button.
                    12. Power off the module.
                    13. Turn the switch back to NORMAL* position. (For the older Adam models,
                    remove the wire between the INIT* and GND terminals)
                    14. The module is now ready to be placed in the Modbus network.
                    

                    Either me or Martin would like to create a quick example function block later, but unfortunately we are otherwise quite busy at the moment so it may take some time before we do so.

                    1 Reply Last reply Reply Quote 0
                    • A
                      Andmo last edited by

                      now i try with the example. But whats the numbre of the Serialport RS485 1.1 on L503. Danks

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

                        Hi @andmo,
                        I'm not sure what did you try, but from the product page of the ADAM-4017+ I can see that it indeed supports the ModbusRTU, as stated by Tomas. I strongly recommend using this protocol, since there is a built in support in the Mervis.

                        Martin

                        1 Reply Last reply Reply Quote 0
                        • A
                          Andmo last edited by

                          I have the ADAM-4017 and not the ADAM-4017+. Now i try to implement the example custom serial protokoll.

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

                            @Andmo
                            It should be possible, as we've implemented several similar protocols before. Unfortunately as I mentioned earlier we are quite busy at the moment to offer more detailed support.

                            The port should be the same as in the example I believe, i.e.:

                              def := 'serial:6:9600,8,N,1';
                              handle := io.openport(def);
                            

                            But if it does not work you can try the other adjacent numbers. The numbering comes from the underlying OS, and so unfortunately it's a bit raw in terms of user-friendliness.

                            1 Reply Last reply Reply Quote 0
                            • A
                              Andmo last edited by

                              0_1533807183907_6ddebc9c-2e84-44e5-bdf5-86ebb3111611-grafik.png

                              0_1533807271655_27d82e74-1294-4f80-96b2-18dc2b29c6c8-grafik.png

                              0_1533807232493_1297fbf8-66ed-44b8-8bb5-2636891f59e7-grafik.png

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

                                @Andmo
                                That looks about right - could you describe in more detail the problems you are having?

                                It's quite hard to tell from the screenshot.

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