Is it possible to write a small example for me to read and write a j1939 message using CANpi. I am still confused with using the TX RX entries in the device tree.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you please Explain when you would use all the PNG RX and TX messages in the device tree under the can ecu module?
Can you explain the different ways of communicating over CAN with the Pi? You talked about layer 2 which I assume is a level in which all message transactions are performed on a software level within the codesys program. There does however look to be another layer inwhich you can use the RX and TX PNG messages directly within the device tree. Can you explain the difference and how to use the device tree message selections?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i have raspberry pi 3 with pican 2 rev B i make all setting but the can interface i don't see in cosesys , i check the can interface with candump and receive all packet
Please help me to config can interface
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First, thank you to all of you have contributed to this thread. Using this, I am able to mostly get everything working. I am using RPI3 and Codesys v3.5 sp9 sp1 and the PiCAN2.
I have a CANOpen bus coupler and have installed the manufacturers EDS file. The Canbus and CANOpen_manager run fine.
However, when I try to run the Can slave device, I get the following errors.
Any advice on how to trouble-shoot this?
Any advice/suggestions on where to get started?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
please set the Compiler define: CANOPEN_DEBUG
After that (compile,download,start the project) check the plc logger for more CANopen debug Information
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do have exactly the same problem, that I can not get CANopen running properly.
My setup is: 2x Raspberry Pi 3 with CanberryDual 2.1, connected to each other. SocketCAN is working properly and I can send CAN messages from one Raspberry Pi to the next and vice versa. Also in CodeSys, the SocketCAN driver is working properly as CAN messages are received if I configure one Pi as a CANopen slave that produces heartbeat messages.
What I did is configure one Pi as a CANopen slave, export the EDS file to the other Pi that adds this CANopen device.
However, the CANopen manager says it is not running. After added CANOPEN_DEBUG, I noticed in the PLC log that it remains stuck in the SDO exchange phase. The message is: SDO read timeout for object 16#1000sub16#00, AbortCode: 16#05040000.
Appreciated if someone can give some guidance what goes wrong here?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
first thank you very much for the fantastic descriptions.
I got everything running with J1939.
But why couldn't i get it running with CANOpen? Which CANOpen-Modul in Codesys do i have to choose.
Thanks for helping
Timo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PI can success with NiRen Pi mcp2515... was one problem.. in /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=spi1-2cs
I have 8Mhz oscill .. and maximum speed limit on Canopen 500kbs. For 1Mbs needed 16Mhz osill on canoprn board.. and chip selesct in my case 2nd dtoverlay=spi1-2cs
From another sime PC with Runtime and PeakUSB working fine. Pi was tested as salve and as master on canopen bus.
I followed all the steps above and CANbus and CANopen_manager seem to work fine but I still cannot communicate with my Festo Servo Drive through CANopen.
Can someone help me please.
Yannick, Did you ever resolve this problem? I am trying to do the exact same thing with RPI and 3 axis CMMP-AS. Please let me know if you did.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good afternoon, my at Alexsandro Serra.
my projects already do with powerlink and modbus rtu communication but I need to implement can. Does anyone have a picture of the raspberry pi 3 card working with the can in codesys, I've done everything and I can't get mine to work, could someone pass it on to me so I could take a look?
and in case anyone needs help with the Powerlink communication I'm available.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Em ter., 12 de jul. de 2022 Γ s 12:57, alexmserra no-reply@codesys.com
escreveu:
Good afternoon, my at Alexsandro Serra.
my projects already do with powerlink and modbus rtu communication but I
need to implement can. Does anyone have a picture of the raspberry pi 3
card working with the can in codesys, I've done everything and I can't get
mine to work, could someone pass it on to me so I could take a look?
and in case anyone needs help with the Powerlink communication I'm
available.
Hi,
according your ardoino question check the example here (Layer2 communication) http://store.codesys.com/mixedsearch/mi ... duct_area=
and J1939 see screenshot.
BR
Edwin
I looked at the example code but I am unable to determine how the code is linked to the specific J1939 ecu in the tree.
Also, If the CAN messages are controlled within the program, Why is there a spot to select TX and RX PNG messages in the device?
Is there a manual on how to use CAN with Codesys?
Hi,
sorry to confuse you with that.
The device tree screenshot is not relatet with the store example.
CANApi projct from store is for CAN Layer 2 communication.
J1939 from my screenshot is only to Show how to configure J1939 devices by this configurator pages
BR
Edwin
Edwin,
Is it possible to write a small example for me to read and write a j1939 message using CANpi. I am still confused with using the TX RX entries in the device tree.
http://www.industrialberry.com/can-bus-with-codesys/
they have RPI+CANbus work with codesys. is possible also work with CANopen to add device CANopen?
sure if this implementation is stable (SocketCAN)
you could use:
Pi as CANopen Master is possible
Pi as CANopen Slave is possible
Pi using for CAN Layer 2 communication (Store CAN API example)
Pi using J1939
BR
Edwin
Edwin,
Can you please Explain when you would use all the PNG RX and TX messages in the device tree under the can ecu module?
Can you explain the different ways of communicating over CAN with the Pi? You talked about layer 2 which I assume is a level in which all message transactions are performed on a software level within the codesys program. There does however look to be another layer inwhich you can use the RX and TX PNG messages directly within the device tree. Can you explain the difference and how to use the device tree message selections?
i have raspberry pi 3 with pican 2 rev B i make all setting but the can interface i don't see in cosesys , i check the can interface with candump and receive all packet
Please help me to config can interface
First, thank you to all of you have contributed to this thread. Using this, I am able to mostly get everything working. I am using RPI3 and Codesys v3.5 sp9 sp1 and the PiCAN2.
I have a CANOpen bus coupler and have installed the manufacturers EDS file. The Canbus and CANOpen_manager run fine.
However, when I try to run the Can slave device, I get the following errors.
Any advice on how to trouble-shoot this?
Any advice/suggestions on where to get started?
Hi,
please set the Compiler define: CANOPEN_DEBUG
After that (compile,download,start the project) check the plc logger for more CANopen debug Information
BR
Edwin
I do have exactly the same problem, that I can not get CANopen running properly.
My setup is: 2x Raspberry Pi 3 with CanberryDual 2.1, connected to each other. SocketCAN is working properly and I can send CAN messages from one Raspberry Pi to the next and vice versa. Also in CodeSys, the SocketCAN driver is working properly as CAN messages are received if I configure one Pi as a CANopen slave that produces heartbeat messages.
What I did is configure one Pi as a CANopen slave, export the EDS file to the other Pi that adds this CANopen device.
However, the CANopen manager says it is not running. After added CANOPEN_DEBUG, I noticed in the PLC log that it remains stuck in the SDO exchange phase. The message is: SDO read timeout for object 16#1000sub16#00, AbortCode: 16#05040000.
Appreciated if someone can give some guidance what goes wrong here?
Hello everybody,
first thank you very much for the fantastic descriptions.
I got everything running with J1939.
But why couldn't i get it running with CANOpen? Which CANOpen-Modul in Codesys do i have to choose.
Thanks for helping
Timo
PI can success with NiRen Pi mcp2515... was one problem.. in /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=spi1-2cs
I have 8Mhz oscill .. and maximum speed limit on Canopen 500kbs. For 1Mbs needed 16Mhz osill on canoprn board.. and chip selesct in my case 2nd dtoverlay=spi1-2cs
From another sime PC with Runtime and PeakUSB working fine. Pi was tested as salve and as master on canopen bus.
And have to connect 5V separate to TJA1050 as here descrbed. https://vimtut0r.com/2017/01/17/can-bus ... nel-4-4-x/ m
[quote="yannickasselin1"]Hi everyone,
I followed all the steps above and CANbus and CANopen_manager seem to work fine but I still cannot communicate with my Festo Servo Drive through CANopen.
Can someone help me please.
Yannick, Did you ever resolve this problem? I am trying to do the exact same thing with RPI and 3 axis CMMP-AS. Please let me know if you did.
You can show screen with PDO and SDO configuration?
Good afternoon, my at Alexsandro Serra.
my projects already do with powerlink and modbus rtu communication but I need to implement can. Does anyone have a picture of the raspberry pi 3 card working with the can in codesys, I've done everything and I can't get mine to work, could someone pass it on to me so I could take a look?
and in case anyone needs help with the Powerlink communication I'm available.
It can be yes in SPI.
Em ter., 12 de jul. de 2022 Γ s 12:57, alexmserra no-reply@codesys.com
escreveu: