Page 1 of 1

Why does the RX error counter increase while only sending?

Posted: Tue 19. Nov 2024, 13:23
by martinmoe
Hi,

I am sending CAN messages with CANAPI4 with CAN_MSGTYPE_SINGLESHOT. When there is no cable connected, I see an increasing RECEIVE (RX) Error Counter (REC), when there is a cable mit termination restistor but no other node ACKing, I see TRANSMIT (TX) Error Counter (TEC) increasing.

Why does the REC increase when I only send?

PCAN USB X6 Firmware is 3.3.2.

Re: Why does the RX error counter increase while only sending?

Posted: Tue 19. Nov 2024, 13:39
by PEAK-System
Hello,

In this case you would need to self-acknowledge the frame, as there is not other node involved.When no cable is connected, the CAN controller doesn't receive any valid signal or ACK from the network. In this case, the controller doesn't even detect its own transmitted frames correctly, leading to receive errors.

BR

Marvin

Re: Why does the RX error counter increase while only sending?

Posted: Wed 20. Nov 2024, 06:56
by martinmoe
Hello,

thank you for your explanation. For the self-ack reason I am using the SINGLESHOT Feature of the CANAPI4.

But: When the REC increases during transmitting without cable, why does it not count down again when transmitting succeeds afterwards (after connecting a proper cable to a proper other CAN node)? Is there any way to make the REC count down without actually receiving frames?

It's no show stopper, but users might be irritated by the REC stuck at 136 and the interface LED on the device not being green anymore although communication is up and running.

Kind Regards
Martin Mödlinger

Re: Why does the RX error counter increase while only sending?

Posted: Wed 20. Nov 2024, 08:47
by M.Heidemann
Hello Martin,

Singleshot does not self-acknowledge on its own,
it will just not retransmit after error detection as it would do due to the
default behavior in CAN.

You can use CAN_PARAM_TX_SELF_ACK to set the self-acknowledgment active.

Once acknowledged the counter should decrease again.

BR

Marvin

Re: Why does the RX error counter increase while only sending?

Posted: Wed 20. Nov 2024, 09:12
by martinmoe
Hello Marvin,

that's good news!

CAN_PARAM_TX_SELF_ACK is not defined in my version of CanApi4 (Header version 4.1.2 with CanApi4.dll version 4.2.0.128).

Is it possible to use this feature with this version somehow?
Do I need a new version of CanApi4?

Kind Regards
Martin Mödlinger

Re: Why does the RX error counter increase while only sending?

Posted: Wed 20. Nov 2024, 09:16
by M.Heidemann
Hello,

Please contact us via email regarding this.

BR

Marvin