Communication with can interface

The customer has several CAN interface devices. Can I use R1 controller to complete data communication? If I can, what should I do?

You would need to use the following module;
https://www.opto22.com/products/snap-scm-can2b

How many devices can this module connect?

That’s not how the CAN bus works… Its not about the number of devices, but the amount of traffic.
I suggest that you take a very careful and detailed read of a CAN bus overview, like this one;

Part of the answer to the number of devices on a CAN Network will depend on the protocol you are using. J1939 for example, has an address (like Source Address) which can range from 0 to 255, with a few of the addresses reserved. Normally you can pack many devices on the network until you get a situation where all the bandwidth is consumed. Then you will get bus errors. I have worked on networks with over 100 devices with no bandwidth issues, and others with 15 or 20 devices producing lots of very fast data where the network is full.
You can download the CAN Toolkit https://opto22.com/products/pac-int-can-rxtx and go from there. It is a set of subroutines that handle much of the grunt work. It is relatively advanced code, but can be very helpful. You need to really get a handle on the devices you are communicating to, exactly what those CAN messages look like, and then dig into the Toolkit.
If you just 10 or 15 devices, or less, I doubt that you will have any bus loading issues.

I highly recommend a CAN Analyzer. Peak-Systems makes a product called PCAN which has a USB interface for a PC and Windows software, PCAN View, for watching the CAN messages live. It is a necessary tool for completing a project.

1 Like

Thank you very much.