0
\$\begingroup\$

We have a system with multiple CAN bus protocols. All are running at 250 kbit/s. These are NMEA 2000, J1939, and CANopen. These systems do not have to communicate with each other, but I would like to read all their data.

Is it possible to link all these together for easy cable management and to have a CAN controller with just one interface, or will these systems interfere with each other?

\$\endgroup\$
0

2 Answers 2

2
\$\begingroup\$

Yes. As long as the bitrate is the same, there should be no problem. The whole idea of having a bus is the easy integration. The CAN controller manages the bus access. If two or more nodes try to take control of the bus, the one with the lower ID will win the race.

Having CAN Open is a software layer on top of the CAN Controller to make it more manageable to handle the messages. In your case, it seems you have one master and multiple devices. It's a normal configuration, and the data reading is usually started by the master. This is called the pooling method. However, in CAN Open, you can have multiple masters too. It makes it a little complicated, but you can have more than one master if you need to.

The only consideration here is to make sure to make it a bus. It should not have any branches. The bus must start from one node, go to the next nodes one by one, and be terminated by a 120R resistor in the first and last nodes (image source).

CAN Bus

\$\endgroup\$
9
  • \$\begingroup\$ CANopen "masters" are only concerned with network supervision, not with the data. Saying things like "the data reading is usually started by the master" doesn't make any sense. However, it is common that one "smart" node configures up other nodes on the bus over SDO before putting it in operational mode. \$\endgroup\$
    – Lundin
    Commented Dec 5, 2023 at 9:55
  • \$\begingroup\$ I am reading 2 contrary answers so I don't really know which one to follow. Is @Lundin right or is Saadat right? I want to read the canbus at the same time. So reading them one by one is not really an option because they send out some critical errors I need to monitor. Just for some reference. It is an self build electric propulsion system with 3rd party battery systems and electric motors. That's why they use different protocols. I could by something like this: peak-system.com/PCAN-USB-X6.438.0.html?&L=1 , but I rather just hook it up together if it is possible. \$\endgroup\$
    – Arne123456
    Commented Dec 6, 2023 at 7:52
  • \$\begingroup\$ What do you mean by "at the same time?" If you mean each node will try to send data over the bus at the same time, don't worry. The CAN Protocol manages that part and does not allow two nodes to send data over the "Physical Bus" at the same time. This prevents the data loss. Two nodes can have data at the same time, and CAN Open does the Network Management and will make sure to send them over the bus. Then, every node can receive it if it matches their ID filters. From the user's point of view, it seems the data is sent at the same time, but in reality, the bus is accessed at different times. \$\endgroup\$
    – Saadat
    Commented Dec 6, 2023 at 8:05
  • \$\begingroup\$ @ArnedenBoon The question could be clearer - it's not clear if you speak of 3 different systems co-existing with 3 different application layers, or if there is just 1 system but with support for 3 application layers - but not at the same time. "We have a system" ... "These systems". The physical bus can be the same for all 3 application layers but they cannot coexist at the same time on the same bus. CAN is not like Ethernet where you can have application tiers HTTP, FTP, SMTP etc peacefully co-exist at the same time, on the same hardware. \$\endgroup\$
    – Lundin
    Commented Dec 6, 2023 at 8:32
  • \$\begingroup\$ Specifically, CAN is a real-time system and application-tier network design assumes certain real-time deadlines. If someone unknown starts sending when they shouldn't, they will screw up the real-time. Furthermore, identifier re-use/collisions between different protocols could cause severe and dangerous malfunctioning (CANopen most often uses 11 bit and J1939 always uses 29 bit though). \$\endgroup\$
    – Lundin
    Commented Dec 6, 2023 at 8:35
0
\$\begingroup\$

You can't link them together if they should run at the same time. As a rule of thumb you cannot combine multiple application-tier protocols at once, on the same bus hardware. It would be perfectly possible to inspect them one at a time, with the others disabled. If that makes sense for your application, I have no idea.

If you need to supervise all 3 simultaneously, you will need 3 different connectors.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.