Basically you must read the errors returned from the NI-CAN driver, and decode them. They are a Hex number, and each number includes bits set for the severity of the error, the can object which generated the error, and the specific problem reported.
If you look in the NI-CAN Manual you will see a detailed explanation of the errors. click on the link below to find the manual
<>
Take a look in the NI-CAN discussion forum to see if someone else has already done what you need
<>
(If the link above doesn't work, go to www.ni.com
click N
I developer Zone,
then click on Developer Exchange,
then click on forums, and select CAN under the industrial networking)
>>