02-11-2019 01:32 PM
We're needing to sync a couple of pieces of hardware and would like to do it using a trigger pulse when the CAN adapter receives a specific CAN message. Do any of the NI CAN adapters support this and if so can someone point me to the relevant documentation?
Thanks,
Al
Solved! Go to Solution.
02-11-2019 02:38 PM - edited 02-11-2019 02:40 PM
This is not something that is supported on the hardware level, but some pretty basic software can be written that does this. After installing NI-XNet launch the Example Finder from LabVIEW Help >> Find Examples. There are a couple ways to do this and my suggestion will depend on the rest of the application. If you really are just looking for a single frame, from a single ID, then I'd recommend looking at the CAN Frame Input Queued.vi example showing how to read when a frame comes in. Combine this with the From here search for CAN Frame Output Stream.vi example and a case structure and you should be able to see when a frame comes in, and to write another when it does.
If you are looking for lots of pairs of requests/replies then I'd recommend a Stream In and a Stream Out, which will return all frames at which point you need to do some condition checking to see if it is the frame you are looking for.
There are lots of XNet session types and I go over some of them in a high level description in Part 6 of my CAN Blog.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-12-2019 04:46 AM
Thanks Hooovahh for both the info and quick response. Your CAN blog looks like a good resource, I'll check it out.