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

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
tn1314
Posts: 1
Joined: Thu 16. Mar 2023, 03:23

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

Post by tn1314 » Thu 16. Mar 2023, 03:30

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
=========================================================================================
Attachments
화면 캡처 2023-03-16 112745.png
화면 캡처 2023-03-16 112745.png (53.86 KiB) Viewed 3460 times

K.Wagner
Software Development
Software Development
Posts: 1082
Joined: Wed 22. Sep 2010, 13:36

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

Post by K.Wagner » Thu 16. Mar 2023, 08:47

Moved from Hardware Support\PC Interfaces\PCAN-USB to the right forum, Software Support\Development Packages\PCAN-Basic.
Best regards,
Keneth

K.Wagner
Software Development
Software Development
Posts: 1082
Joined: Wed 22. Sep 2010, 13:36

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

Post by K.Wagner » Thu 16. Mar 2023, 09:02

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.
Best regards,
Keneth

Post Reply