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 controller (APC2100 with double i210 was used in this case):

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

You should see following 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 are indexed in the ROS topic list:

$ rostopic list

You should see that **powerlink/data_from_plc and powerlink/data_to_plc 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 these data are being received properly:

$ rostopic echo /powerlink/data_from_plc

You should see the output similar to the picture below

Clone this wiki locally