according your ardoino question check the example here (Layer2 communication) http://store.codesys.com/mixedsearch/mi ... duct_area=
and J1939 see screenshot.
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?
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
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.
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
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?
please set the Compiler define: CANOPEN_DEBUG
After that (compile,download,start the project) check the plc logger for more CANopen debug Information
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?
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
PI can success with NiRen Pi mcp2515... was one problem.. in /boot/config.txt
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
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?
Log in to post a comment.