Page 1 of 1

PCAN-Basic 07 example 'heavy'/'warning' error

Posted: Thu 16. Mar 2023, 03:30
by tn1314
Hello, I am new to CAN protocol. There is something wrong with my example...
Here are the results from the Code and PCAN-VEIW Trace tabs.
I'm wondering if it's a hardware problem or a software problem.
Thank you.

Code: Select all

=========================================================================================
|                           PCAN-Basic ThreadRead Example                                |
=========================================================================================
Following parameters are to be adjusted before launching, according to the hardware used |
                                                                                         |
* PcanHandle: Numeric value that represents the handle of the PCAN-Basic channel to use. |
              See 'PCAN-Handle Definitions' within the documentation                     |
* IsFD: Boolean value that indicates the communication mode, CAN (false) or CAN-FD (true)|
* Bitrate: Numeric value that represents the BTR0/BR1 bitrate value to be used for CAN   |
           communication                                                                 |
* BitrateFD: String value that represents the nominal/data bitrate value to be used for  |
             CAN-FD communication                                                        |
=========================================================================================

Parameter values used
----------------------
* PCANHandle: PCAN_USB 1 (51h)
* IsFD: False
* Bitrate: 500 kBit/sec
* BitrateFD: f_clock_mhz=20, nom_brp=5, nom_tseg1=2, nom_tseg2=1, nom_sjw=1, data_brp=2, data_tseg1=3, data_tseg2=1, data_sjw=1

Successfully initialized.
Started reading messages...

Closing...
Type: STATUS
ID: 001
Length: 4
Time: 65302243.5
Data: 00 00 00 04
----------------------------------------------------------
Type: STD
ID: 710
Length: 8
Time: 65302247.9
Data: 12 A1 0D E5 0A 04 08 40
----------------------------------------------------------
Type: STATUS
ID: 001
Length: 4
Time: 65302248.9
Data: 00 00 00 08
----------------------------------------------------------
=========================================================================================
Bus error: an error counter reached the 'heavy'/'warning' limit
=========================================================================================
계속하려면 아무 키나 누르십시오 . . . Type: STD
ID: 710
Length: 8
Time: 65302684.9
Data: 12 A0 0D E4 0A 04 08 57
----------------------------------------------------------
Type: STATUS
ID: 001
Length: 4
Time: 65303244.8
Data: 00 00 00 08
----------------------------------------------------------
=========================================================================================
Bus error: an error counter reached the 'heavy'/'warning' limit
=========================================================================================
Type: STD
ID: 710
Length: 8
Time: 65303558.9
Data: 12 A1 0D E5 0A 04 08 85
----------------------------------------------------------
Type: STD
ID: 710
Length: 8
Time: 65304033.8
Data: 12 A1 0D E5 0A 04 08 9E
----------------------------------------------------------
Type: STATUS
ID: 001
Length: 4
Time: 65304244.8
Data: 00 00 00 08
----------------------------------------------------------
=========================================================================================
Bus error: an error counter reached the 'heavy'/'warning' limit
=========================================================================================
Type: STATUS
ID: 001
Length: 4
Time: 65305244.8
Data: 00 00 00 08
----------------------------------------------------------
=========================================================================================
Bus error: an error counter reached the 'heavy'/'warning' limit
=========================================================================================
Type: STATUS

ID: 001
Length: 4
Time: 65306244.8
Data: 00 00 00 08
----------------------------------------------------------
=========================================================================================
Bus error: an error counter reached the 'heavy'/'warning' limit
=========================================================================================

Re: PCAN-Basic 07 example 'heavy'/'warning' error

Posted: Thu 16. Mar 2023, 08:47
by K.Wagner
Moved from Hardware Support\PC Interfaces\PCAN-USB to the right forum, Software Support\Development Packages\PCAN-Basic.

Re: PCAN-Basic 07 example 'heavy'/'warning' error

Posted: Thu 16. Mar 2023, 09:02
by K.Wagner
Hello,

The picture shows a BUSHEAVY status and CAN error frames. Please check that:
  1. you have your device connected to a CAN network with at least one additional CAN node (CAN needs at least two nodes for communication).
  2. you use a termination resistor on both ends of your CAN cable.
  3. you are using the same bit rate configuration for all CAN participants, i.e. the same bit rate register.
If all these points are taken into account, the communication should work without problems.