Skip to content

4. Runtime Instructions

Frantisek Durovsky edited this page Jun 29, 2017 · 10 revisions

This tutorial summarizes steps required to launch communication between B&R PLC and ROS.

1. Load POWERLINK driver

Navigate to bin folder of POWERLINK stack and load driver for your Ethernet controller (APC2100 with two Intel i210 based Ethernet Controllers was used within this tutorial):

$ cd /home/user/openPOWERLINK_V2.5.2/bin/linux/x86_64/oplkdrv_kernelmodule_edrv
$ sudo ./plkload oplki210cn.ko

You should see similar output:

2. Start your PLC

Plug Compact Flash Card created in previous step into your PLC, turn on the power supply and wait until everything initializes properly.

3. Launch ros_powerlink node

Plug your PC into the POWERLINK network and launch ros_powerlink node compiled in step 2:

$ roslaunch ros_powerlink ros_powerlink.launch

If everything works fine you should see following output:

4. Communication Test

First make sure that both ROS topics provided by ros_powerlink node are indexed in the ROS topic list:

$ rostopic list

You should see that powerlink/data_from_plc and powerlink/data_to_plc topics are available:

Now use B&R Automation Studio to force values from CiA401 profile that are being continuously transmitted (In this case Digital Output I6200 S01-S04 values were forced to 10,20,30,40):

Use rostopic echo command to see if data are being received properly:

$ rostopic echo /powerlink/data_from_plc

You should see the output similar to the picture below, with forced values (I6200:S01-S04) being available on ROS topics

Clone this wiki locally