Robbo (Customer) asked a question.

Is it possible to feed a gyro / compass signal into the PLC

Hi Everyone. Is it possible to feed a gyro / compass signal into the PLC via RS 232 or ethernet and then use that signal for PID to control a pwm output to some electric motors? For instance 4 electric motors controlling some wheels on a robot. You lock a set heading from the compass and the motors will keep it going on that heading ?

 

Thanks in advance

 

Paul


  • Adisharr (Customer)

    I don't see why not but if you're going to be doing anything high level I would look more into using an Arduino or other microcontroller.

    • Robbo (Customer)

      Hi Adisharr, thanks for the reply. I looked at Arduino options options but Coding is in no way my strong point. Im pretty happy with ladder and its something I'm hoping to do myself with a bit of help. If i went down the Arduino route i think i will be trying for years to come.

  • Todd Dice (Customer)

    RS232? How fast does response time need to be?

    • Robbo (Customer)

      Hi Todd, as fast as possible if its stable. I would be looking to have the baud rate at 115200 for the RS232. But. if its possible im happy for it to be slower just to try it all out.

      • Garry (Customer)

        What PLC were you planning to use? Some controllers are better with ASCII communication through the serial ports.

        Do you have a part number of the gyro/compass so we can see the protocol?

        Regards,

        Garry

      • Robbo (Customer)

        Hi Garry. I was hoping to use a click brand to keep the cost down and associated software, but I’m also looking into using codesys so I can use anything really.

        I have a habit of running before I can walk so I may start on simple project first. Get used to everything then move on. My main thing is I wanted something I could expand on so I wasn’t buying twice.

        here’s a link to the gyro compass for info. https://aositilt.com/compass/e1/

         

        all the best

         

        Paul

         

        Expand Post
      • PouchesInc (Customer)

        The specs on that seem to say 10 readings per second, so RS232 will be fast enough. I havent used RS232 in a long time, but from what I remember you can get something like 15 reads per second out of good systems, so the PLC shouldn't be a bottleneck here ith the device only allowing up to 10 reads per second (100ms rate)

      • Garry (Customer)

        Hi Paul,

        It looks doable with the Click PLC after reviewing the manual.

        https://aositilt.com/wp-content/uploads/2018/02/MANUAL-APPCOMP3A-360-with-LOGGING.pdf

        Here is a post that I did with the Click PLC and ASCII to the Solo Temperature controller.

        https://accautomation.ca/click-plc-modbus-ascii-protocol/

        This will give you an idea of the programming involved on the Click PLC side.

         

        You may also want to consider using a Productivity 1000 unit. This is comparable to the Click pricing but will handle ASCII code better.

        https://accautomation.ca/productivity-1000-series-plc-modbus-ascii-protocol/

        This will give you an idea of the programming involved in using the P1000 controller on the same application.

         

        I hope this helps you out.

        Regards,

        Garry

         

        Expand Post
      • Robbo (Customer)

        Hi Garry,

         

        Thank you for the advise and links. Ill have a good read through them and hopefully get something started.