01-16-2014 06:07 PM
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
Solved! Go to Solution.
01-17-2014 06:45 PM
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,
01-19-2014 06:13 PM
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