01-20-2013 08:51 PM
Hi,
I'm having trouble when use Vehicle Network Toolbox with NI PCMCIA-CAN Series 2 card.
I used comand info = canHWInfo to check the CAN card, but it returned an error:
Error using can.ni.NICAN.checkStatus (line 118) National Instruments NI-CAN encountered an error. The function "ncGetHardwareInfo" returned the error code "-1074388687" indicating: NI-CAN: (Hex 0xBFF62131) The hardware-related attribute (such as transceiver type) cannot be determined due to hardware limitations. Solution: Remove this attribute from your list of Get calls.
I'm using:
Windows XP server pack 3 (32 bit)
Matlab 2012a
NI CAN driver 2.7.4 (lastest version)
What can I do to solve this problem?
Thank!
01-21-2013 10:06 AM
Hi,
Are you sure Matlab's "Vehicle Network Toolbox" is compatible with NI's PCMCIA-CAN Series Card?
If it indeed supported, there should be a working version of NI-CAN driver documented in VNT's manual.
Also, the example code should be provided by Mathworks.
Without the example code, it would be a big hassle to make this scenario work.
Ting
01-22-2013 08:27 AM - edited 01-22-2013 08:33 AM
Hi Ting,
Thanks for your reply. I checked on the Mathwork's site, VNT supported for my card and they recommended that I should use the latest NI CAN driver.
When I searched this error code "-1074388687", I found a document of NI about CAN error, so I think this is the hardware problem. This document is in the attached file.
I hope you can spend some time for this problem.
Best regard,
Trung - Dung
01-22-2013 09:47 PM - edited 01-22-2013 09:54 PM
Hi,
According to the NI-CAN Software and Hardware Manual, you specified an attribute to return using "ncGetHardwareInfo".
When you try to return an attribute that is not supported by your hardware, this error pops up to indicate you to change the returning attribute.
Please try to change the AttrId to a more "common" one such as the "NC_ATTR_NUM_PORTS (Number of Ports)".
You may avoid the error through this modification.
BR
Ting
01-29-2013 09:28 AM - edited 01-29-2013 09:32 AM
Hi Ting,
Sorry for reply you late, I was busy at my exam.
Thanks for your help, you are correct about the attribute. I tried to remove the AttrId in example code of MATLAB (NICAN.m) and avoided this error, but the MATLAB showed : "No CAN Devices Detected".
My hardware still working with LabVIEW 2012 and NI CAN driver 2.7.4.
Best regard,
Trung - Dung
01-30-2013 04:53 AM
01-31-2013 06:59 PM
Hi,
I've attached the MATLAB example code for NICAN.
The error pops up due to the function at line 57.
BR,
Trung - Dung
01-31-2013 07:36 PM
Hi,
I don't have Matlab in my computer.
Please indicate the function or code that induces the error more specifically instead of "line 57".
Also, please attach the error message as an image here so that I can see the error as you.
BR
Ting
02-01-2013 12:34 PM - edited 02-01-2013 12:37 PM
Sorry Ting,
I will express my problem by images:
Figure 1: I install NI CAN driver and test the card with Measurement & Automation Explorer, the card works perfectly
Figure 2: I use MATLAB command to get the hardware info (without hardware plugs in my computer), MATLAB shows virtual CAN device
Figure 3: : I use MATLAB command to get the hardware info (with hardware plugs in my computer), the error pops up
Figure 4: After remove attrId example MATLAB code, MATLAB not show both hardware and virtual driver
Figure 5: example MATLAB code, the error pops up due to line 57
BR,
Trung - Dung
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
02-03-2013 11:19 AM
Hi Dung,
I think you misunderstood what I meant in the previous post.
I don't think you can just "remove" or "comment" the AttrID input.
Check the LabVIEW function below and you'll realize what I said.
You have to specify the input, but what you specified should be "hardware supported".
There are so many kind of attribute ID that you can specify that already documented in the manual.
If the AttrID you specified is not supported by your hardware, then an error will occur.
Ting