Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a CAN Bus Analyzer from NI?

I have a PCI-CAN/LS card in my computer
with which I didn't manage to send any CAN
frame on the BUS.
0 Kudos
Message 1 of 11
(10,330 Views)
I never heard from such an analyzer from NI.
But there are several companies who sell can analyzer. If you only want to see if there are frames on your bus, you can use an oscilloscope (differential measurement of CAN+ and CAN-). Obviously it will be difficult to decode the frames by yourself! But it will show you if there is traffic on your bus.

Did you run the NI-CAN Diagnostics for your card? May be you will need to go in the properties of the card and change the configuration (IRQ or memory conflict, determine the name of your CAN node, set the right CAN speed...)

A last idea: by the jumpers J5 and J6 (see your "Getting started with you CAN hardware..." manual) you can switch the power supply for your bus from external to internal. Check if your configuration corr
esponds to your hardware.
0 Kudos
Message 2 of 11
(10,330 Views)
Thank you BJ,

The problem is that the only traffic I
can see (with oscilosc.)in the CAN bus is an error signal of one device (a shaft encoder) which I suppose it expects some commands to enter in the operational mode.
The PCI-CAN/LS card doesn't send anything
in the bus.
The diagnostic test is passed.
I also configured the CAN network interface
settings (rate...) but when I try to send
something with 'interct.vi' I get a write
error. I also tried to catch the API calls
with NI Spy but nothing catched...
Any ideas?

Thanks
0 Kudos
Message 3 of 11
(10,330 Views)
Remark: I'm using the high speed CAN so I hope this will also apply to the low speed interface.

The CAN bus must be running before you can write a command. I don't know the "interct.vi" so I ignore what this vi does. Where did you find it? Is it shipped with the low speed card? Make sure that this vi starts the bus or that the bus starts automatically (depending on its configuration (Properties --> Start on Open) the bus starts automatically or not).

I can send you an example for a general idea of how to start the bus.

If this is not the cause of the problem I would disconnect the shaft encoder and then test again.
If this works, try to connect this device again (whithout stopping the bus).
0 Kudos
Message 4 of 11
(10,330 Views)
The 'start on open' property is set.
The interact.vi comes in the Labview
library for CAN. It's a front panel
where you can send frames via network
interface object or via CAN objects (initialy
configured in NI config).
The behaviour is the same (the same error)even if the PCI-CAN card is not connected
to the bus!
I tried to use both internal and external
power (J5 and J6) but do I have to make
a software configuration for those options
too?
I have to tell you that I tried other PCICAN card too but it doesn't work, so I guess
I'm missing some configuration..

If I disconect the endcoder I can't get any
signal from the bus except 5 V DC, even If
I then try to send frames again from the interact.vi

Thanks
0 Kudos
Message 5 of 11
(10,330 Views)
3 more ideas.

1) Do you use a cable that meets the CAN specifications? I had some problems when using any cable. Furthermore is the cabling correct? see "Getting started with your CAN hardware... pages C-4 and C-8"

2) Are the values of the termination resistances correct? see "Getting started with your CAN hardware... page C-5 to C-7"

3) Meanwhile I have found the CAN examples. If you have a card with 2 ports or 2 cards, I would suggest you to try the Object to Object example. If it works you will at least know that the card(s) and the cable are OK.

I must admit that I have never used these examples and so I can just hope that they work!
0 Kudos
Message 6 of 11
(10,330 Views)
1,2) There is a problem with the termination resistors
for LS cards: In the "Getting started with your CAN hardware... page D-5"
sais that every device on the LS CAN Network requires a termination resistor.
The thing is that on my devices I see NO RTH and RTL pins as it is drawn
in the book. So, I thought that one resistor of 120 ohms in parralel with
the bus would be enough for a very small network (25 cm).

3) I think your examples (obj2obj) wouldn't work with my card because it only has
1 port.

Anyway I run an example of simple bus analyzer made in C that also
came with the card and.. I get one warning:

COMM WARNING : CAN communication errors (form)

and one error:

COMM ERROR: Low-speed CAN transceiver error
and it
sais the same even if I take out the bus cable from
the card!


Thank you!
0 Kudos
Message 7 of 11
(10,330 Views)
Hi!

I have the exactly the same error!
I have no problem in writing to the 'writequeue', but from there on, absolutely nothing happens.
my ncWrite returns an NC_SUCCESS. But when I wait for the 'state' NC_ST_WRITE_SUCCESS, I receive the timeout-error.
And absolutely nothing happens on the CAN-port!
The examples sent with the Card doesn't work either.

You are(unfortunately) not alone :-).

If you find the source of the problem, please notify me also.

Regards Sörensen.
0 Kudos
Message 9 of 11
(10,330 Views)
PROBLEM SOLVED!

Unfortunately does the NICAN-Configuration utility not function properly. It conflicts somehow with the code written in the C++ -function ncConfig().
The thing to do is to completely reinstall the nican drivers, and then AVOID using the configuration utility. And then use CAN0 as CAN Interface Object.

So don't use the nican Configuration. Just use ncConfig in C++ or your Labview-functions.

Good Luck!

Regards Sörensen
0 Kudos
Message 10 of 11
(10,330 Views)
Hello!

I think I have the same problem:
I can send some CAN- frames, but I can't receive any (from a TMS320LF2406 = a DSP from Texas Instruments), although I can see them on an osilloscope.
I've reinstalled all drivers for NI- CAN. Then I started a CAN- receive- vi (LABView 5)
the I get an error: hex 10003
The CAN Network Interface Object name is invalid or unknown. ( CAN0 )

So I have to use the configuration utility...

Golubkov Andrej
0 Kudos
Message 11 of 11
(9,578 Views)