I programme PLCs with CANopen and. I'm always using about 12 CANopen nodes digital I/O, analog I/O. I've never needed SDO protocol, I have never needed heartbeat or nodeguarding. So now these needs become reality and quick problem.
Can some one please give me an advice or example code in codesys V3 how to check these nodes if their heartbeat works and give an error code of certain error. Simple monitoring FB for NMT protocol. Because all documentation about Canopen and his use in codesys is like sprinkled crumbs allover the internet.
I want to make a little guide for CANopen in codesys, if someone will respond of course.
thanks in advance
regards
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I agree that for beginners the CANOpen protocol is not very simple, because it has many advanced options.
The basic idea of just configuring the PDO's is in most cases not sufficient.
Although the CoDeSys CANOpen driver handles almost everything automatically for you, you probably need some status information in your application.
I also agree there is not a "CoDeSys CANOpen for Dummies", which could be very usefull also for users who work with the protocol frequently.
1) To get a good understanding of the protocol: use an analyser!!! This way you can see exactly what is happening on the network. This helps you find problems much faster than any other method. I use the PEAK CAN-USB analyser, but any other will also do.
2) The basic CAN configuration is described in the help. General CAN configuration can be found on the internet.
The most important CANOpen fb's and fun's are in the CAA CiA 405 library (automatically added when adding the CAN device). This also includes a pdf with an explanation about the functionality.
Hopefully this helps a little in your quest.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I programme PLCs with CANopen and. I'm always using about 12 CANopen nodes digital I/O, analog I/O. I've never needed SDO protocol, I have never needed heartbeat or nodeguarding. So now these needs become reality and quick problem.
Can some one please give me an advice or example code in codesys V3 how to check these nodes if their heartbeat works and give an error code of certain error. Simple monitoring FB for NMT protocol. Because all documentation about Canopen and his use in codesys is like sprinkled crumbs allover the internet.
I want to make a little guide for CANopen in codesys, if someone will respond of course.
thanks in advance
regards
Alex
I agree that for beginners the CANOpen protocol is not very simple, because it has many advanced options.
The basic idea of just configuring the PDO's is in most cases not sufficient.
Although the CoDeSys CANOpen driver handles almost everything automatically for you, you probably need some status information in your application.
I also agree there is not a "CoDeSys CANOpen for Dummies", which could be very usefull also for users who work with the protocol frequently.
1) To get a good understanding of the protocol: use an analyser!!! This way you can see exactly what is happening on the network. This helps you find problems much faster than any other method. I use the PEAK CAN-USB analyser, but any other will also do.
2) The basic CAN configuration is described in the help. General CAN configuration can be found on the internet.
The most important CANOpen fb's and fun's are in the CAA CiA 405 library (automatically added when adding the CAN device). This also includes a pdf with an explanation about the functionality.
Hopefully this helps a little in your quest.
In the topic "CANOpen slave and heartbeat" http://forum-en.3s-software.com/viewtopic.php?f=11&t=4823:
Well if it is CANopen compliant it is up to the Master to configure it.