CANopenNode / CANopenLinux

CANopenNode on Linux devices
Apache License 2.0
111 stars 51 forks source link

How to process 1 master to 2 slave #10

Open tuhai711 opened 2 years ago

tuhai711 commented 2 years ago

Hello I am use CANopenLinux to master and CANopenDemo is a slave. Can i use 2 slave connect to CANopenLinux master?

CANopenNode commented 2 years ago

You can connect up to 127 devices on one cable. Make sure, you have 120ohm resistors on both sides of the cable. Each device has own node-id, also the "master".

And don't think about CANopen as a master-slave protocol. It is more like conversation between devices, each with own task.

tuhai711 commented 2 years ago

Yes. Thank you.

tuhai711 commented 2 years ago

Hello again. How to know NodeID other from message received. I only use one node so i don't know if have 2 nodes more.

tuhai711 commented 2 years ago

If I use node 1 receive PDO from 10 other nodes, I need define 10 RPDOs on node 1, that is right?

CANopenNode commented 2 years ago

Please read some literature about CANopen.

tuhai711 commented 2 years ago

Hello, I've read a lot of about canopen. and i am using CANopenLinux as master to control 10 slaves (CANopenDemo). I use PDO for control slaves. because to receive message from slaves, master need to define 10 RPDO had COB-ID for each slave. Is that a good method?