How can I send multiple CAN messages on xPC Target (without using CAN FIFO)?
1 view (last 30 days)
Show older comments
Hi,
I am trying to send/receive multiple CAN messages and so far I have managed to send/receive only one. I have tried many different ways. First, I have two CAN Pack blocks to create two CAN messages, and by using just one Send block with the corresponding identifiers defined and connected to the two CAN Pack blocks. The SendStatus for the two messages are both okay. However, (as a loopback configuration) when I receive and unpack the messages, only the one with a higher CAN ID is received and the other one is just zero. I am unpacking CAN ID, Timestamp, and so on and all the values are zero with this block (with a lower CAN ID).
Secondly, I also tried using two separate Receive and Send blocks and I also tried with different sampling times individually assigned. This does not work either. I know that there is an option of using FIFO, but I don't actually see the purpose of CAN FIFO when that is not exactly how CAN should work under any circumstances. Shouldn't CAN always take care of priorities. What is the purpose of FIFO then?
Cheers,
Kevin
0 Comments
Answers (2)
Paul
on 6 Dec 2013
I dont fully Understand what you are saying. Could you provide a picture ?
0 Comments
See Also
Categories
Find more on Target Computer Setup in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!