RevPi Connect 4 as CANopen Master

Topics about the Hardware of Revolution Pi
Post Reply
gcr
Posts: 5
Joined: 21 Jun 2023, 11:04
Answers: 0

RevPi Connect 4 as CANopen Master

Post by gcr »

Hello,

We have ordered the new RevPI4 Connect 4. For our application we need to control 2 servo drives via CANOpen.

Our idea was to use the RevPi Con CAN module and Codesys. However, RevPI4 Connect 4 does not have any ConBridges so it cannot be uses with the Con CAN module. We have an spare CANopen gateway (now depreciated?) that we could connect to the RevPI4 Connect 4. However, I believe it can only act as an slave, not as a master.

Is there a way with the RevPI4 Connect 4 to control servo drives using CANopen?

Thank you,
User avatar
nicolaiB
KUNBUS
Posts: 877
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: RevPi Connect 4 as CANopen Master

Post by nicolaiB »

Hi,

you can use an USB interface like a USB pCan. The Gateways are not compatible with the Connect 4, only IO modules.

Nicolai
gcr
Posts: 5
Joined: 21 Jun 2023, 11:04
Answers: 0

Re: RevPi Connect 4 as CANopen Master

Post by gcr »

Hello,
While waiting for the RevPI connect 4 I´m testing the setup with a RevPIconnect+ using a PCAN-USB converter from PEAK system. However, I can´t get it to work with Codesys. I created a script as explained in this tutorial (https://revolutionpi.com/tutorials/code ... pen-master) and also followed the steps described in in here (https://forge.codesys.com/forge/talk/Ru ... abb016b38/) but can´t get Codesys to work with any of the methods.
For example, trying to replace the example of the Con CAN and the mGate CANopen but using the PEAK USB-CAN adapter I get this error:
Codesys_CAN_Error.PNG
Codesys_CAN_Error.PNG (285.96 KiB) Viewed 3161 times
Codesys_CAN_Error1.PNG
Codesys_CAN_Error1.PNG (159.33 KiB) Viewed 3161 times
Here is our current CODESYScontrol.cfg file. Tried different settings but none worked.
Codesys_cfg.PNG
Codesys_cfg.PNG (46.84 KiB) Viewed 3161 times
What could I be missing?

Thanks
Last edited by gcr on 08 Aug 2023, 09:20, edited 2 times in total.
User avatar
nicolaiB
KUNBUS
Posts: 877
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: RevPi Connect 4 as CANopen Master

Post by nicolaiB »

Why do you configure modules which are not attached to the RevPi (ConCan / GW CanOpen)? The PCan Adapter should be available as a CAN interface. There is no need to configure any RevPi extension module for this.

Nicolai
gcr
Posts: 5
Joined: 21 Jun 2023, 11:04
Answers: 0

Re: RevPi Connect 4 as CANopen Master

Post by gcr »

Hi Nicolai,

Thanks for your help. We have a RevPi mGate CANopen connected to the RevPI connect. Currently, we are trying to replicate this tutorial: https://revolutionpi.com/tutorials/code ... pen-master. Instead of using the RevPi Con CAN we are using the PEAK USB-PCAN adapter to be able to use the RevPI Conenct as the master. We want to make sure we can get the RevPI Connect 4 to work as a CANbus master before building the whole application and ordering the servo drives. However, we can´t get it to work because of the errors listed above. We are using Codesys V3.5 SP19 and the CODESYS Control for Raspberry Pi MC 4.8.0. Is the possible to stablish a master-slave CAN communication with the setup we are using? If yes, you know what the issue could be)
User avatar
dirk
KUNBUS
Posts: 1948
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: RevPi Connect 4 as CANopen Master

Post by dirk »

Dear gcr, unfortunately We have not tried this yet, as we do not have a PEAK USB-PCAN at the moment. So please contact CODESYS or PEAK support for further information. They have the expertise and can certainly provide competent support here.

Thank you
Post Reply