Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems on 500Kbps

Hi everyone!
I started experimenting with CAN about 2 days ago and already have problems. I am using a PCMCIA CAN/2 card and PCMCIA CAN cabling with a notebook with Windows XP, LABView 7 Express and NI-CAN 2.1.3. I have connected the system to a vehicle and I can see the values in the Bus monitor in MAX when I set the baud rate to 500Kbps. Then I tried to do the same with using the CAN-Receive.vi example that comes with LABView. It is set up to use a baud rate of 125000 and with this setting it will obviously not read any information off the bus. Then I changed the baud rate in the setup window in the VI and it suddenly gave an error (Hex 0xBFF62005) and says that some attribute is not valid. I then changed the baud rate in every possible place that I could find in the VI and sub VIs and it always gives the same error message.

I do not understand how I have to change the baud rate if it is not possible to do so in the ncConfigCANNet.vi???

Could anyone tell me if I have been overlooking something, or is it simply something that I do not know because I am inexperienced with CAN?

Any advise will be greatly appreciated.

Thank you!

Charel Marais
0 Kudos
Message 1 of 2
(3,221 Views)
Hi Charel,

make sure that you use '500000' (or '500k') for a baud rate of 500Kbps. The NI-CAN driver knows only a few baud rates by the bit rate number, other baudrates need to be provided as BTR values. For more information on this, please take a look at knowledge base article # 0ZEF3MHR:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/cba1fc627ffa0f8f862564dc0071b3a7?OpenDocument

If that doesn't help, could you post a log file? You can capture all calls to the NI-CAN driver by running NI Spy at the same time. Open NI Spy (Start » Programs » National Instruments » NI Spy) and make sure that the NI-CAN API is selected (Spy » Options » View Selections).
Start NI Spy and then run the VI.

Regards,
-B2k
0 Kudos
Message 2 of 2
(3,214 Views)