Comments (4)
It is possible to implement different combinations of CANopen devices and CAN channels. Stack is object-oriented. CANopen.c file must be edited.
The easiest approach may be to use one CANopen device (with one object dictionary with objects for multiple motors). PDOs may then be split into multiple CAN channels.
Please note, Linux is currently not best for hard real-time.
Some example for multiple CANopen could be interesting for someone. So some link is very welcome. But if solution is very specific or if it adds much complexity into the code, I wouldn’t like to include it into the stack. Otherwise I will accept a pull request.
from canopennode.
It is possible to implement different combinations of CANopen devices
and CAN channels. Stack is object-oriented. CANopen.c file must be
edited.The easiest approach may be to use one CANopen device (with one object
dictionary with objects for multiple motors). PDOs may then be split
into multiple CAN channels.
The approach I took was to eliminate the global variables altogether.
The user can now create a CO_t structure of their own and have as many
as they would like. A pointer to this is passed into CO_init() and
everywhere else in CANopen.c.
Is there a reason for going the global variable route? I feel that
eliminating the global variable makes the code more understandable and
flexible, at least from my perspective. However, my experience is
fairly limited in the CAN world - maybe there is some other common
application where having globals simplifies things greatly.
Please note, Linux is currently not best for hard real-time.
Right. Our application doesn't have hard real-time requirements.
Some example for multiple CANopen could be interesting for someone. So
some link is very welcome. But if solution is very specific or if it
adds much complexity into the code, I wouldn’t like to include it into
the stack. Otherwise I will accept a pull request.
As I mentioned, I've got an implementation ready to test and I hope to
do so over the next few days. If everything works I'll submit a pull
request so you can take a look at the changes. Whether or not you
accept it is fine either way. I've got a fork that I can pull from with
my changes.
Thanks!
from canopennode.
Hi,
Globals are sometimes nice for debugging on some microcontrollers. However, it is possible to have separate CANopenSimple.c, which uses only globals and CANopen.c without them.
Object dictionary is now implemented with globals only. I plan to change that in future. For now there is a workaround in OD editor. If you use a underscore in the beginning of project name, OD editor can generate globals prefixed with different names.
from canopennode.
Hello.
I would be very interested in such change. It is actually mandatory in larger scale solutions.
My kindly question is if you have a plans to integrate this change ? That would be great.
Best Regards
Greg.
from canopennode.
Related Issues (20)
- Configuring the micro as MASTER problem, CO_NMT_sendCommand() not defined HOT 1
- Multiple nodes, NMT problem HOT 2
- return CO_ERROR_OUT_OF_MEMORY HOT 1
- Questing about NMT and Heartbeat status queries HOT 1
- MISRA 2004 compliant for a few rules HOT 3
- Issue with include style fo Arduino HOT 4
- Porting SRDO to v4.0 HOT 4
- Trying to receive SDO messages in SDO client over the CO_SDOclient_receive HOT 5
- Unsigned int 24 bits HOT 5
- Enter the pre-oprational state HOT 5
- Please help HOT 3
- RPDO configuration every 2 Syncs HOT 1
- How to make it possible to receive all messages (SDO, PDO, NMT) in raw form? HOT 2
- Compiler warnings HOT 1
- Compiling without "CO_SINGLE_THREAD", using "1 w 0x1010 1 vs save" via ascii gateway causes deadlock (CO_LOCK_OD)
- Send CO_NMT_RESET_COMMUNICATION to node
- Wrong definition of CO_storage_entry_t
- SDO Client - Read request missing Index and subIndex byte. HOT 3
- Changing PDO mapping doesn't appear to follow ds301 remapping requirements. HOT 2
- Objects assigned to TPDO are sent as 0. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canopennode.