PCANBasic: Read event problem with PCAN USB + PCI

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
A.Kapp
Posts: 10
Joined: Wed 29. Feb 2012, 09:43

PCANBasic: Read event problem with PCAN USB + PCI

Post by A.Kapp » Thu 1. Mar 2012, 14:01

Hello,

I use PCANBasic with Python 2.6 on a Windows 7 machine (Windows 7 Ultimate, 64 bit).
PCANBasic.dll, dating 20.01.2012
PCAN-View, version 3.1.5.200
Before yesterday I only used PCAN USB-adapter and managed to set up a Read event which reliably triggered when a message was in the message queue.

Yesterday I installed a PCI express card.

Adapting the code I managed to set up a Read event for the PCI channel.
However, after having installed the PCI card and resetting the code, the Read event of the PCAN USB adapter gets triggered before a message is in the message queue (checked with PCAN-View).
Error message: "Bus error: an error counter reached the 'heavy' limit" (code 8)

Is there some "hidden" linkage between the different CAN channels?
There is no traffic on the other CAN channels.

Best regards,

Andreas

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

Re: PCANBasic: Read event problem with PCAN USB + PCI

Post by K.Wagner » Thu 1. Mar 2012, 14:54

Dear,
A.Kapp wrote:Error message: "Bus error: an error counter reached the 'heavy' limit" (code 8)
The error you see is a BUSHEAVY error. It seems to be a problem within the CAN network, for example the use of different baudrates at a time. Please take a look to this post
A.Kapp wrote: Is there some "hidden" linkage between the different CAN channels?
There is no traffic on the other CAN channels.
There is any hidden linkage between two channels of a PCI-Express card; they are completly independient. The link between both channels exists when they are connected to the same CAN-Network.
A.Kapp wrote:However, after having installed the PCI card and resetting the code, the Read event of the PCAN USB adapter gets triggered before a message is in the message queue (checked with PCAN-View).
Error message: "Bus error: an error counter reached the 'heavy' limit" (code 8)
Some additional information about the topology of your connection is necessary in order to help you:
  • * Are your cables terminated?
    * How many CAN applications do you start at the same time (including your application)?
    * How many hardware/channels are you connecting at a time?
    * Which baurate do you use within all applications?
    * Is there a communication between two pcan-views (one connected to each hardware/channel) possible?
Best regards,
Keneth

A.Kapp
Posts: 10
Joined: Wed 29. Feb 2012, 09:43

Re: PCANBasic: Read event problem with PCAN USB + PCI

Post by A.Kapp » Fri 2. Mar 2012, 08:45

Hello Kenneth,

I try to answer your list of questions.
K.Wagner wrote:
  • * Are your cables terminated?
    * How many CAN applications do you start at the same time (including your application)?
    * How many hardware/channels are you connecting at a time?
    * Which baurate do you use within all applications?
    * Is there a communication between two pcan-views (one connected to each hardware/channel) possible?
Here are my answers:
  • * I have a one-to-one connection between the PCAN-USB adapter and a microcontroller.
    * The cables are terminated.
    * The baudrate is set to 500kbit/sec.
    * One instance of PCAN-View and only one self-written application (32bit Python 2.6 on Windows7, 64bit) is running (since I am using PCANBasic more applications are not possible).
    * Reading and writing are possible.
    * Every now and then a Read event is triggered even though there is no message in the queue. The corresponding error is code 0x8 (Bus heavy).
    * When using the same physical network together with a PCI 4channel card there is no problem at all, i.e. Read events are only triggered when messages are in the queue.
Why do you think that re-initializing might be a solution when reading and writing are working alright?

I hope that I have provided the necessary information this time.
Thank you very much for your help.

Kind regards,

Andreas

G.Lang
Support
Support
Posts: 169
Joined: Wed 22. Sep 2010, 14:58

Re: PCANBasic: Read event problem with PCAN USB + PCI

Post by G.Lang » Fri 2. Mar 2012, 10:55

Hello,

which driver version from the "pcan_usb.sys" do you use? If not version 3.8.2.10146 then please download the current version from the following link: http://www.peak-system.com/cupd2/PeakOemDrv.zip

What´s the firmware version from the PCAN-USB adaptor?

regards
Gunther

A.Kapp
Posts: 10
Joined: Wed 29. Feb 2012, 09:43

Re: PCANBasic: Read event problem with PCAN USB + PCI

Post by A.Kapp » Fri 2. Mar 2012, 13:30

Hello,

I have to admit that I had not updated the driver lately.

But even now having updated the driver I still have this strange behaviour:
Read event triggered, no message in the queue. Error: Bus heavy.
This holds even when no hardware is connected to the USB adaptor.
  • * PCAN-Channel-Version: PCAN_USB 3.8.2.10146
    * PCAN-API-Version: 1, 2, 1, 31
    * Firmware: 2.8
Regards,
Andreas

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: PCANBasic: Read event problem with PCAN USB + PCI

Post by PEAK-Support » Fri 2. Mar 2012, 21:25

Dear,
if you get a BUSHEAVY please first check this:
http://www.peak-system.com/forum/viewto ... f=120&t=39
Looks like you have a physical problem on your bus. Is the bus terminated?, are two active nodes on the bus?, are they use the same Baudrate? (incl. same sample point)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply