LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN trigger frame

Solved!
Go to solution

I have a simple problem but I do not know how to solve it. I need to wait in a loop till I get a specific CAN frame from the device I am testing. The frame has no data field so I cannot specify a signal name. I tried to use the XNET Read in 'Frame CAN' mode and I used the size of the output array as a stop for the while loop. I thought that if no frame arrived that the size would be zero and if a frame arrived it would be 1. However, it always gives a size of 1 regardless of whether the frame arrives or not. The help text talks about trigger signals and the functionality sounds exactly what I want but I do not understand how to use it. It shows :trigger:.<frame name> as the signal name but non alpha numeric characters are not allowed in a signal name.

Any help appreciated.

 

Thanks

Andy

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

Andy,

 

You may get some more information by posting on the Automotive and Embedded Networks forum. In addition, you might want to loop through the incoming CAN frames, perform a comparison on the payload and arbitration ID to stop the while loop when a certain CAN frame is on the bus.


Thanks,

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

Hi Bryan,

 

Thank you. I wil accept your reply as a solution and repost onto the automotive forum. In the mean time I found an alternate solution which is to use a queued CAN sequence instead of a single point CAN sequence. The queued sequence will time out and set the error cluster if no frame has arrived unlike the single point sequence.

 

Regards

 

Andy

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