CANOpen Manager not visible with Codesys

Topics about the Hardware of Revolution Pi
Post Reply
GussH
Posts: 4
Joined: 10 Nov 2020, 15:51

CANOpen Manager not visible with Codesys

Post by GussH »

I am following the instructions on using Codesys as CANOpen Master: https://revolution.kunbus.com/tutorials ... rect=en_US
We are using:
  • RevPi ConnectPlus
  • RevPi Con CAN
  • Connect Bridge
  • CODESYS Development System ver 3.5.16.30 (installed on ConnectPlus) and CodeSys Runtime for RaspberryPi v4.0.0.0
  • RevPi mGate CANopen


Following the above instructions, Codesys does NOT see the CANOpen Manager (master). There is a RED triangle next to it.
Please see attached screenshot:
Screenshot (1644).png
Screenshot (1644).png (411.43 KiB) Viewed 8990 times


The CANOpen mGate is installed on the left side of the ConnectPlus. And Con CAN is on the right side.
The CON CAN is visible in Pictory and with piTest -d. And the CANOpen mGate is visible in Pictory and piTest -d (as gateway CANOpen).[/b]

  • 1. What needs to be done to allow Codesys to see the CANOpen Manager?
    How do we go about troubleshooting the issue
  • 2. The above instructions (Codesys as CANOpen Master) say:
    Add KUNBUS CANopen mGate into CODESYS (Download the device description file (EDS) for the mGate CANopen from the KUNBUS homepage).
    >> where is this EDS file? It is not found anywhere on the Kunbus homepage?

Thanks,
Guss H.
Last edited by GussH on 05 Mar 2021, 14:17, edited 1 time in total.
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: CANOpen Manager not visible with Codesys

Post by Amar »

Hello Guss,
RevPiLib on the website is older Codesys library and you will not require that.

You need RevolutionPiBridge,which is the new RevPi Codesys libary currently in Beta release. (RevolutionPiBridgeV1.0.1.99.zip)

here is the RevPi Codesys package download link for you.
Link: RevolutionPiBridgeV1.0.1.99.zip
https://kunbusgmbh-my.sharepoint.com/:u ... w?e=UL5O2i

This link is valid for one month.

The package also installs Examples and a Help file for a quick start.

Prerequisites:

CODESYS Development System V3

Version: 3.5.16.20 or higher

CODESYS Control for Raspberry Pi SL: 3.5.16.20 or higher

https://store.codesys.com/softplc/codes ... pi-sl.html

Revolution Pi Codesys package - RevolutionPiBridge

Image: Stretch 06/2020 for RevPi Core, Connect and Compact or later

Download Link:
https://revolution.kunbus.de/shop/de/stretch
You could otherwise upgrade your current image on your RevPi device as below:
sudo apt-get update && sudo apt-get uppgrade && sudo reboot

To verify the upgrade check the kernel version as following:
$ uname -a
Linux RevPi16860 4.19.95-rt38-v7+ #1 SMP PREEMPT RT Tue, 16 Jun 2020 13:25:43 +0200 armv7l GNU/Linux

Let me know if you have any issues for getting started with this library package.


The new Revolution Pi Codesys library works independent of pictory configuration and overwrites the config.rsc file at application startup.

You need to do following steps:
1) configure Connect and Con Can module to Right side in codesys IDE.

2) configure the script for setting baud rate
sudo nano /var/opt/codesys/rts_set_baud.sh

#!/bin/sh
BITRATE=`expr $2 \\* 1000`
ifconfig $1 down
echo ip link set $1 type can bitrate $BITRATE
ip link set $1 type can bitrate $BITRATE
ifconfig $1 up

sudo chmod +x /var/opt/codesys/rts_set_baud.sh
sudo revpi-config enable revpi-con-can


3) Enable RevPi Con CAN either from pictory or using following command
sudo revpi-config enable revpi-con-can

4) Download codesys application

5) reboot system or do a hard reset

6) Con CAN module should then work with Codesys.

Here is an example which also has a Con CAN module running CANOpen master and communicates with Kunbus CANOpen Gateway.Check CANopen I/O mapping in this example.

Attachment:
https://kunbusgmbh-my.sharepoint.com/:u ... Q?e=h9WH36

Regards,
Amar
KUNBUS
GussH
Posts: 4
Joined: 10 Nov 2020, 15:51

Re: CANOpen Manager not visible with Codesys

Post by GussH »

Hello Amar,

Thanks for the detailed reply. I will try the steps and let you know how it works.

One question still remains:
2. The above instructions (Codesys as CANOpen Master) say:
Add KUNBUS CANopen mGate into CODESYS (Download the device description file (EDS) for the mGate CANopen from the KUNBUS homepage).

>> where is this EDS file? It is not found anywhere on the Kunbus homepage?
User avatar
pi_admin
Administrator
Posts: 117
Joined: 26 Aug 2016, 15:38

Re: CANOpen Manager not visible with Codesys

Post by pi_admin »

GussH wrote: 05 Mar 2021, 14:24 Hello Amar,

Thanks for the detailed reply. I will try the steps and let you know how it works.

One question still remains:
2. The above instructions (Codesys as CANOpen Master) say:
Add KUNBUS CANopen mGate into CODESYS (Download the device description file (EDS) for the mGate CANopen from the KUNBUS homepage).

>> where is this EDS file? It is not found anywhere on the Kunbus homepage?
Hi,
the EDS-file can be found here(at the bottom of the page):

https://www.kunbus.com/canopen-gateway-module.html

or just use the direct download link:

https://www.kunbus.com/files/media/gsd/ ... env1_1.zip
Tuscan
Posts: 24
Joined: 26 Aug 2021, 08:15

Re: CANOpen Manager not visible with Codesys

Post by Tuscan »

Hello Amar,
Can you please share again this link " https://kunbusgmbh-my.sharepoint.com/:u ... Q?e=h9WH36 " because i think i have the same problem and i want to try this method.

best regards,
Tuscan
Post Reply