LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to scan CAN bus to detect available nodes

Hello Forum, I have a VI to communicate with multiple CAN based modules using an IXXAT device. At present I have to provide the number of nodes (CAN devices) that I want to control. Question, instead of providing the number of nodes, how can I scan for available node IDs in the CAN bus?

 

Thanks!

0 Kudos
Message 1 of 5
(7,076 Views)

How do you know if the node is on the CAN bus? You should be able to read the frames from the CAN network and get the Message ID/data - it would be quite easy to build up an array/lookup table of the Message IDs that are present on the bus and use that to determine what nodes are there?

 

I haven't used IXXAT devices...so without you posting your VI and more detail, I can't really offer much more assistance.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 5
(7,037 Views)
If your devices are strictly CAN (and not some higher-level protocol on to of that such as CANOpen) then no, this isn't possible. Nodes on a CAN network don't have a single ID assigned to them, any node is allowed to send a message with any ID. If all your devices are using some higher-level protocol then you'll have to see if it supports a device search. The fact that you are using an IXXAT device is in this case irrelevant.
0 Kudos
Message 3 of 5
(7,023 Views)

out of several nodes, how would u identify which node has what canID

0 Kudos
Message 4 of 5
(852 Views)

You cannot. CAN doesn't work that way. Nodes on a CAN network do not have unique IDs; any device can send a message with any ID. It's up to the higher-level protocol to determine how those IDs are used.

Message 5 of 5
(831 Views)