Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the acknowlegment set by H/W or S/W?

Hello,

I'm communicating with a device on my network and everything seems ok until I hook-up a CANalyzer. If I set the acknowlege bit in the CANalyzer to on.
Everything is ok. If I turn off the Bit my vi receives the data but the device transmits the data non stop because no acknowledgment has been done by my VI or either the PCMCIA-CAN/2 card is not setting it.

I'm using the CANalyzer and the CANcardX by Vector on an other laptop to view the network's trafic.

Let me know what you think!
0 Kudos
Message 1 of 14
(6,255 Views)
Hello-

The ACK bit is a necessary response to a CAN frame by the receiver (analyzer in this case). Without this bit, the NI-CAN card will send the frame again and again. See pg 1-5 of the NI-CAN User's Manual for more details on the CAN frame and Error
Detection.


Regards

Randy Solomonson
Applications Engineer
National Instruments
http://www.ni.com/support
Message 2 of 14
(6,255 Views)
Hello,

Thanks for your response but my problem is the oposite. The CAN controller on my device always send the frame because the NI-CAN card doesn't respond with the ACK bit.

I've read the book manual but it doesn't help me. I do know what the ACK bit is but I don't know why my NI-CAN card doesn't respond with it. I've also tested with another card and the same problem occurs.

Thx again.

Eric Paulin
0 Kudos
Message 3 of 14
(6,255 Views)
>If I set the acknowlege bit in the CANalyzer to on.
Everything is ok.

This should happen. The CAN hardware will not retransmit if it gets the ACK bit.

>If I turn off the Bit my vi receives the data but the device transmits the data non stop because no acknowledgment has been done by my VI or either the PCMCIA-CAN/2 card is not setting it.

This is expected. If the CAN hardware doesn't receive the ACK bit it should retransmit. The NI-CAN User's Manual gives more insight:
"If the transmitter of the frame detects no acknowledgment..or there are no receivers (for example, only one device on the network). In such cases, the transmitter automatically retransmits the frame."

It is automatically retransmitting as the User Manua
l has stated.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 4 of 14
(6,255 Views)
So you're telling me that if I have my NI-CAN card in my laptop computer and my device hooked up on the same network, this network is considered to be a 1 device network!?!!??!?!?!?... Or basically what your telling me is that the NI-CAN card will not be part of the network.

>"If the transmitter of the frame detects no acknowledgment..or there are no receivers

The receiver is supposed to be the NI-CAN card.

Thank you!

Eric Paulin
0 Kudos
Message 5 of 14
(6,255 Views)
The only way for any CAN card to determine if a CAN host received the message is through the ACK bit sent by the receiver. If this bit is not received, the sender must assume that no host received the message. This would happen if the receiver doesn't send the ACK or there are no other CAN hosts. In such a case, the sender retransmits the message again and again until it receives an ACK from another CAN host.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 6 of 14
(6,255 Views)
Hello,

There is no problem sending something from my NI-CAN card. There is a problem when the NI-CAN must receive something from my device. The NI-CAN card receives the message but my device retransmits the message because the ACK bit isn't received from the NI-CAN card. How do I fix this?

Thx,


Eric Paulin
0 Kudos
Message 7 of 14
(6,255 Views)
Hello-

Maybe I've been misunderstanding the setup. I used to think the Analyzer was the receiver. Now, here's a new list on what I think is on your CAN bus. Please correct me if I'm wrong:
-NI-CAN (receiving)
-CAN Analyzer (Analyzing)
-Device (transmitting)

If this is the setup, one of the chips on the NI-CAN may be failing to assert the ACK when it receives messages. Can the Analyzer detect the ACK? If so is it being asserted? If not, has it ever? Also, is the bus monitor or some CAN program running on the NI-CAN card?

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 8 of 14
(6,255 Views)
Hello,

You are right, that's my setup. If I set the CANalyzer to acknowledge the messages, everything works fine, but if I set it not to (sniffer only) then the retransmission starts from the device to my NI-CAN card.

Only my VI runs on the NI-CAN card.

I've tested the setup with two different NI-CAN cards and the same problem occurs.
Thank you!


Eric Paulin
0 Kudos
Message 9 of 14
(6,255 Views)
Hmm. That's an interesting problem. I've never seen this before. Let's see if we can narrow down this problem. Maybe there's some little fact that could help us solve this issue. Here's some information that will help:
-serial number of NI-CAN cards
-Make and Model of computer with NI-CAN (eg Dell Optiplex).
-Make and Model of the device.
-chipset of device.
-cable setup (length, placement of terminations resistors, configuration, etc)?
-baudrate

This information should help us to pinpoint the exact cause of the issue. In the meantime here's a few things that might help:
-Lower the baudrate.
-Measure resistance between CAN_HIGH and CAN_LOW (should be 60 ohms).
-Chan
ge cables.
-Try another device.

We look forward to hearing from you.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 10 of 14
(6,255 Views)