PEAK CAN reading sent message

USB to CAN Interface
Post Reply
Frolgo
Posts: 1
Joined: Thu 2. Apr 2020, 08:58

PEAK CAN reading sent message

Post by Frolgo » Thu 2. Apr 2020, 09:06

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.

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: PEAK CAN reading sent message

Post by M.Maidhof » Thu 2. Apr 2020, 10:14

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

Post Reply