필터 지우기
필터 지우기

How can I send multiple CAN messages on xPC Target (without using CAN FIFO)?

조회 수: 2 (최근 30일)
Kevin Kyeong
Kevin Kyeong 2013년 11월 29일
답변: Kevin Kyeong 2013년 12월 6일
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

답변 (2개)

Paul
Paul 2013년 12월 6일
I dont fully Understand what you are saying. Could you provide a picture ?

Kevin Kyeong
Kevin Kyeong 2013년 12월 6일
I got an answer from the MathWorks technical support and they said that this is a known bug and it would probably be fixed in the future releases. For now, I have a patch file that temporarily fixes the problem.

카테고리

Help CenterFile Exchange에서 Development Computer Setup에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by