3 Replies Latest reply on May 16, 2017 2:07 PM by Intel Corporation

    reading values via modbus with Gen 2

    sdau

      Hi

       

      I am currently working on a project with modbus. I have made a setup that works well and tested with the Arduino Mega, however I would like for it to run on my Galileo.

       

      The project compiles fine in my IDE (visual micro), but I keep getting a timeout error from my modbus device.

      I however do not have this issue when using my Arduino, only when using my galileo.

       

      Any ideas on what my cause the problem, any help would be appreciated.

       

      Kind Regards

       

      Stefan Dausell

       

      Denmark

        • 1. Re: reading values via modbus with Gen 2
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Stefan Dausell,

          Thanks for reaching out.

          I have seen some similar issues using the Intel Galileo with Modbus, and normally they are related to the AVR library. Personally, I recommend you to check these threads:

          https://communities.intel.com/thread/78644, in this thread the customer wanted to use Modbus, but he was using a library based on the AVR architecture and those libraries can’t be used with Galileo. Another user gave some recommendations that maybe can be useful for you.

          There is another thread that you can find more information about this: https://communities.intel.com/thread/104689

          If you still have issues, can you give us more details about it? Please include all the information that you consider helpful to assist you in a better way.

          We will be waiting for your reply.

          Regards,
          Leonardo R.

          • 2. Re: reading values via modbus with Gen 2
            sdau

            Hi Leonardo

             

            Thank you for the quick response.

             

            I tried to read through your examples, but with no new outcome.

             

            Below is a screendump from the setup code. The Ctrpin is used as the R/T pin on serial1.

             

            intelPic.PNG

             

            This is the method that is called in the loop - this has been tested and works well with the arduino mega.

            With the Galileo it compiles fine, but I keep running into the "Timeout" statement.

            below is an image of the hardware setup as it is now.

            18552896_10155494319015116_194556272_o.jpg

             

            As seen in this picture I can see that the Tx and Rx are responding on the modbus module - but for reasons i cannot understand I still recieve a timeout response.

            18519357_10155494327535116_1178873768_o.jpg

             

            and this is the response I get on my serial monitor:

             

             

            Kind Regards

             

            Stefan Dausell

            • 3. Re: reading values via modbus with Gen 2
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi Stefan Dausell,

              Thanks for the information provided.

              This is a weird issue, like I mentioned before there are some libraries that are made for Arduino that don't work on Galileo, but we are not sure if this is the case.

              To make sure, you can try to check the signals that the Galileo is sending or receiving using an Oscilloscope (if it is possible), and compare them with the Arduino signals.

              We will be waiting for your results.

              Have a nice day.

              Regards,
              Leonardo R.