Is it only because of the fact that it is asynchronous and can be used for long distance message transfer. An example of where other protocols will fail would help. Thanks.
Asked By : Sirius
Answered By : Pseudonym
Historical reasons, for the most part. Automotive systems started using CAN because nothing else was good, and now they've all standardised on it. Having said that, CAN has one particular feature which makes it ideal for this class of applications.
CAN dates from around the same time as Ethernet (Ethernet was commercialised in 1980, CAN in 1983 IIRC), and solves the same problem: attaching a moderate number of devices to a single bus.
When two Ethernet devices want to transmit at the same time, they both back off for a random amount of time, and the time increases as the number of tries increases. Neither sender proceeds immediately. This is the famous CSMA/CD protocol.
As any network engineer knows, this has a bunch of unfortunate implications, one of which is that the effective maximum capacity of a shared Ethernet wire is around 30% of the theoretical capacity. (Obviously point-to-point full duplex Ethernet connections can get much closer, because there is no contention.)
With CAN, messages have a priority, and the priority is in the frame header. If two devices want to transmit at the same time, only the lower-priority message backs off. Not only does this increase the practical capacity of the bus, the designer gets something that's much closer to a real-time guarantee. That is valuable in the world of metal, speed, and danger.
The difference doesn't matter so much these days, since networks are much faster than they were in 1983, so even 30% utilisation is still a lot of bandwidth. But still, a near-guarantee is a near-guarantee.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/35848
0 comments:
Post a Comment
Let us know your responses and feedback