ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Integrating ROS packages through PLC motor drivers

asked 2016-03-17 08:38:00 -0600

wassimhariri gravatar image

updated 2016-05-22 19:11:16 -0600

130s gravatar image

I have a robot that is already programmed with PLC beckhoff through twinCAT to give commands to the motors to move at a certain speed and direction. I want to control my robot through ROS to do more interesting things like navigation, SLAM ... but i want to keep the PLC as a driver for the motors used and use the same old code to drive the motors with the same logic. Is there a way to integrate between ROS and PLC in such a way for example sending velocity commands (/cmd_vel) and the PLC drives the motors to the desired goal? Thank you in advance

edit retag flag offensive close merge delete

Comments

I am using Beckhoff PLC. How can i interface and program it. I have support for downloading.

Balaji gravatar image Balaji  ( 2016-04-06 06:14:51 -0600 )edit

See my answer above I added link to my driver

sonyccd gravatar image sonyccd  ( 2016-04-06 09:49:00 -0600 )edit

4 Answers

Sort by » oldest newest most voted
1

answered 2016-03-21 07:49:57 -0600

updated 2016-04-06 09:48:33 -0600

Yes amusing you can use modbus. I am doing the same thing myself. I am almost done with a modbus driver for ros that runs over serial and Ethernet. You can simply have ROS read a register and write to one to set the velocity. I am using the Precision 2000 PLC from automation direct and have gotten a refresh rate of 20 registers at around 50Hz over Ethernet. Look out on my github in the next few weeks for me to publish it. https://github.com/sonyccd

Update: I finished the PLC driver you can download it from here. https://github.com/sonyccd/ros_plc_mo...

edit flag offensive delete link more
0

answered 2022-03-15 05:23:27 -0600

Probably the easiest and fastest way to communicate to a Beckhoff PLC is to use ADS libraries (pyads in python or check this repo https://github.com/Beckhoff/ADS).

In case of any other PLC probably modbus is a good option or any TCP/UDP implementation.

edit flag offensive delete link more
0

answered 2016-04-07 02:35:45 -0600

wassimhariri gravatar image

hello, you can read and write from the beckhoff PLC through this amazing package, but first make sure to download the beckhoff TwinCAT Modbus TCP Server‏ and set the port to 502 (usually when you download this tool it is 502 by default). you can download the tool from this link: http://www.beckhoff.de/forms/twincat3...

i am pretty sure it will work to interface with beckhoff PLC, but i still didnt try it yet, i will try it today and keep you updated.

Good luck

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-03-17 08:38:00 -0600

Seen: 3,487 times

Last updated: Apr 07 '16