Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-XNET C API for CAN Loopback Test - No Baud Rates Above 125k Work

Solved!
Go to solution

No problem we are all beginners at something.  So the 120 ohm resistors aren't even always needed.  Its purpose is to keep reflections from the bus from making nonsense when trying to read the values.  It is like a wave breaker in a pool.  It keeps the waves from hitting the walls of the pool then bouncing back and making the waves choppy.  Sometimes the waves aren't an issue or the reflection is small.  Plugging it in does nothing on its own.

 

You may also be interested in the Automatic Re-transmit section of Part 2.  Here it talks about how if you send some data out on the CAN bus, you need some other device on the bus to say it was received correctly.  If it doesn't see this, then it will continually keep sending it.  This is automatic and part of the hardware.  So if you have a single CAN port, when you write it, no one is there to see it.  If you put an oscilloscope on the bus you'll see all kinds of activity.  But only once another device acknowledges it, does it realize it is sent properly.  You need at least one writer, and at least one reader.  That's why this example wires two CAN ports together, writes on one, then reads it on the other.  You can enable Echo on a writing bus.  That will then put whatever you wrote, on the read. But again this only happens if the message is acknowledged by something on the bus first.  Tree falling in the woods thing.

0 Kudos
Message 11 of 12
(128 Views)

Yes Hooovahh,

 

Thanks for the advice. And yes, I am reading now your blog (pretty interesting) 

i will let you know if I have any question. 

0 Kudos
Message 12 of 12
(125 Views)