Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger pulse on reception of CAN message

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(2,485 Views)
Solution
Accepted by topic author AlCar

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.

0 Kudos
Message 2 of 3
(2,473 Views)

Thanks Hooovahh for both the info and quick response.  Your CAN blog looks like a good resource, I'll check it out.

0 Kudos
Message 3 of 3
(2,460 Views)