Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN card fails to initialise intermittently.Needs System reboot

Hi,
I have a problem in initialising one of my CAN Cards.
I have 5 CAN cards in my PC and they were initialising fine sometime back.
Now i am facing a problem which keeps occuring frequently but not all the time.
One of the channels(Channel 0) fails to initialise after closing and starting my application(which initialises all my channels)a number of times , while all others initialise perfectly fine.
The only solution to this problem is to reboot the system.The moment this is done, the card and the channel initialises properly.
But the problems again re-occurs.

Please suggest

Regards,
Ekta
0 Kudos
Message 1 of 8
(4,914 Views)
Hi Ekta,

I have a few more questions about this application. Are you using the same program that you used when it worked in the past? What programming language are you using, and are you using the Channel or the Frame API? My best recommendation on the information I have now is to make sure to close out the CAN communication before you close the application, by calling a function such as ncClose.

If you post back with a little more detail on your application and what is going on, we will try to come to an effective solution.

John M
Applications Engineer
0 Kudos
Message 2 of 8
(4,900 Views)
Hi Jhon,
I close all CAN communication before closing the application.
Could you tell me the difference between the frame API and channel API?
Do you think there could be a problem due to the Driver versiob 2.1.3.12290 for CAN that we are using?
Regards,
Ekta
0 Kudos
Message 3 of 8
(4,852 Views)
Hi Ekta,

The Frame API receives and sends entire CAN frames to and from objects on the bus. The data from the frames has to be interpreted in software. The Channel API allows for separating the data into channels and even giving those channels physical units and scaling. There is a lot more to it than that, but I will spare all the details here. If you would like to learn more about the different APIs, they are described in depth in the manual.

NI-CAN Hardware and Software Manual

I do not know of any errors in previous drivers that could cause this, but it can't hurt to upgrade the driver. You can download the latest version of the NI-CAN driver, version 2.2, at the following link:

NI-CAN Version 2.2 for Windows 2000/98/ME/NT/XP

To further help you with this issue, I would like to have some more information about your application.

1. What software are you using to run this application? LabVIEW? CVI? Visual Studio? Something else?
2. When you say that this worked before without any problem, were you using the same program back then?

Any other information you would like to give can help us come to a resolution on this.

Have a great day!

john
0 Kudos
Message 4 of 8
(4,831 Views)
Hi John,
Thanks for the link to the manual.
I downloaded the driver from the site as well.
Need to check if that helps.
We have our own software(Visual C++ front end, C programming language).
Yes,it was working fine with the same software.
Never experienced such a problem earlier.

Regards,
Ekta
0 Kudos
Message 5 of 8
(4,825 Views)
Hello again Ekta,

The fact that it was the exact same software before without any problem is interesting to me. It seems like one of two things may have happened: either something about the application has changed to create the error, or one of the cards has become damaged.

Have you made any additions or changes to the program during the time that you started seeing the error? Is anything else different about the setup?

Does it seem to be the same card that has the problem of failing to initialize each time? If so, can you rearrange the cards in the PC to see if the issue follows that same card? It may just be that the card has some hardware problem and needs to be repaired.

john
0 Kudos
Message 6 of 8
(4,822 Views)
Hi again,
Well surprisingly after updating the driver, i have not encountered the problem again.
I have been trying to reproduce the problem all this while but somehow am unable to do so.
Do you think it had something to do with the driver?
Somehow i am not convinced.
How can the driver be responsible for intermittent initialisation of the data?
And if that was the case then why didnt we face the same problem earlier.
Can you suggest something regarding this?

Thanks and Regards,
Ekta
0 Kudos
Message 7 of 8
(4,749 Views)
Hi Ekta,

I'm glad that reinstalling/updating the driver worked! I honestly can't say what happened with the old driver, but I can say that I have seen stranger things in my experience with computers before. If you see this behavior again, please let us know, and we'll continue troubleshooting!

john
0 Kudos
Message 8 of 8
(4,743 Views)