Page 1 of 1

PEAK CAN reading sent message

Posted: Thu 2. Apr 2020, 09:06
by Frolgo
Hello,
I have a severe problem with the PEAK CAN dongle and Visual Studio C++. At random occasions the dongle reads the last sent message instead of the actually received one.
To clarify:
1) I send a message request with

Code: Select all

st_Result = p_PCANBasic->Write(h_Channel, &st_CAN_Msg);
2) I do a

Code: Select all

st_Result = p_PCANBasic->Read(h_Channel, p_Msg, &st_TimeStamp) & ~PCAN_ERROR_IGNORE_MASK;
to receive the answer to the request.

Mostly the answer is received as normal. But sometimes the answer is not received. Instead the message that was last sent is given back by the p_PCANBasic->Read. There are only the master and slave on the bus. In a trace of the communication I can see that the messages on the bus are correct. Still the message received is not correct.

What could be the reason here??? There must be a bug in the PCAN BASIC driver. Am very thankfull for any hint as this problem is currently delaying production. If it can not be fixed I will have to eliminate the PEAK dongles and make an own solution what would cost more time.

Re: PEAK CAN reading sent message

Posted: Thu 2. Apr 2020, 10:14
by M.Maidhof
Hi,

we received nearly the same issue by email to our support email address (same code, same questions). This was already answered, and it makes no sense for us to answer twice to the same issue, this will just double our work.

regards

Michael