General Tech Help Good at troubleshooting? Have a non specific issue? Discuss general tech topics here.

CANBUS tutorial

Thread Tools
 
Search this Thread
 
Old Dec 24, 2021 | 02:42 AM
  #1  
drmike's Avatar
Thread Starter
|
Senior Member
10 Year Member
Liked
Joined: Nov 2013
Posts: 563
Likes: 90
From: Worcester UK
Default CANBUS tutorial

Can anyone recommend a tutorial on how CANBUS works? Not really Jaguar specific just in general. I have read one or two I found via Google but they seem to concentrate on the networking aspect which I get as I have a computer background, I'm more interested in the way it's used to control and communicate in real applications - I suspect like the way the wing mirror will dip to help parking if you are in reverse and under 12 kph (I think).

Mike
 
Reply
Old Dec 24, 2021 | 07:50 AM
  #2  
Thermo's Avatar
Veteran member
Veteran: Navy
15 Year Member
Top Answer: 1
Joined: May 2008
Posts: 14,803
Likes: 4,101
From: Great Mills, MD
Default

drmike, if I remember things correctly, you have to start with thinking of a loop of data. The points looked at are in the same order time after time after time. This loop of data then runs through every computer on the bus, making many, many loops a second (the number depends on the amount of data and the speed of the slowest computer). As a data point comes by, the computer it is going through goes "is this a bit of data that I need to fill in or use? If no, it lets that value remain and keeps passing it on. If yes, it takes its last value and puts it in the loop or notes the value and puts it into the registry of the local computer. After 1 loop, all the values should have been updated. In addition, there are a few check values put in that say the computer turns a 1 to say "yes, I am alive" and when it goes to a later computer, it gets turned back to a 0 You then have a computer between the two that is looking for a 1 to say all is good and if it sees a 0, it throws up an error code after a number of failed checks in a row.

With the data updated and the registries filled with the latest data, the computers can then process this data and perform the necessary actions or create the needed values to calculate other items.
 
Reply
Old Dec 24, 2021 | 08:28 AM
  #3  
JagV8's Avatar
Veteran Member
15 Year Member
Liked
Loved
Community Favorite
Joined: May 2009
Posts: 27,527
Likes: 4,912
From: Yorkshire, England
Default

Data goes past each module, visible by each - ignored if for other(s).

Not a loop, think of a string of modules, 60ohm resistor at each end (conceptually, at least).

That's why a module can be removed without grief if it's not vital.

Two wires (plus ground) with the voltage difference signalling a 0 or 1. Packets of data with checksums etc. Each packet with ID for who to & from.

Far more on web sites
 

Last edited by JagV8; Dec 24, 2021 at 08:32 AM.
Reply
Old Dec 24, 2021 | 08:34 AM
  #4  
drmike's Avatar
Thread Starter
|
Senior Member
10 Year Member
Liked
Joined: Nov 2013
Posts: 563
Likes: 90
From: Worcester UK
Default

Thank you both.

So are you suggesting only the modules can create and modify the packets of data on the bus or are there other bus nodes that can do this as well? It would certainly be possible to create a simple PCB that could post/update data on the bus but it might be simpler if each module is wired to say the window PCB where relevant.
 
Reply
Old Dec 24, 2021 | 09:04 AM
  #5  
JagV8's Avatar
Veteran Member
15 Year Member
Liked
Loved
Community Favorite
Joined: May 2009
Posts: 27,527
Likes: 4,912
From: Yorkshire, England
Default

Module = node. Same thing.

Packets don't go through a module (*) so can't be altered.

(*) except with more than one bus (used to be very rare), when the "bridge" aka "gateway" might.

A DIYer might add such a gateway e.g. to watch packets and alter or add them.

(Or just add a node, such as an OBD device.)

Jaguar do use such gateways...

More than one car maker has joined the vital CAN to e.g. music/etc CAN and allowed hackers to get from music/etc to vital & take control e.g. of brakes!! Yes - that bad at system design!
 

Last edited by JagV8; Dec 24, 2021 at 09:16 AM.
Reply
Old Dec 24, 2021 | 01:15 PM
  #6  
drmike's Avatar
Thread Starter
|
Senior Member
10 Year Member
Liked
Joined: Nov 2013
Posts: 563
Likes: 90
From: Worcester UK
Default

Module = node. Same thing.

So only the modules generate packets, there are no subsystems that generate packets.
 
Reply
Old Dec 24, 2021 | 02:57 PM
  #7  
JagV8's Avatar
Veteran Member
15 Year Member
Liked
Loved
Community Favorite
Joined: May 2009
Posts: 27,527
Likes: 4,912
From: Yorkshire, England
Default

What? No idea what you mean.
 
Reply
Old Dec 25, 2021 | 02:24 AM
  #8  
drmike's Avatar
Thread Starter
|
Senior Member
10 Year Member
Liked
Joined: Nov 2013
Posts: 563
Likes: 90
From: Worcester UK
Default

I'm sorry I didn't express myself well!

I think you're saying that the only CANBUS nodes are the control units - is that right?

 
Reply
Old Dec 25, 2021 | 05:03 AM
  #9  
JagV8's Avatar
Veteran Member
15 Year Member
Liked
Loved
Community Favorite
Joined: May 2009
Posts: 27,527
Likes: 4,912
From: Yorkshire, England
Default

Call them node, module or control unit, whichever you prefer.
 
Reply
Old Jan 13, 2022 | 11:09 PM
  #10  
Bill400's Avatar
Senior Member
Joined: Aug 2012
Posts: 820
Likes: 436
From: Mechanicsville, Virginia, USA
Default

drMike,
The best CAN training videos that I have found are by Kvaser trainer Bryan Hennessy.
The first video is:
Check the Kvaser U-tube video index for additional videos.

If you intend to start a CAN study group, count me in!

best regards,
Bill

 
Reply
Old Jan 13, 2022 | 11:32 PM
  #11  
Bill400's Avatar
Senior Member
Joined: Aug 2012
Posts: 820
Likes: 436
From: Mechanicsville, Virginia, USA
Default

Also see:
https://www.kvaser.com/course/can-protocol-tutorial/
 
Reply
Old Jan 14, 2022 | 01:42 AM
  #12  
drmike's Avatar
Thread Starter
|
Senior Member
10 Year Member
Liked
Joined: Nov 2013
Posts: 563
Likes: 90
From: Worcester UK
Default

Thank you. I met a guy who lives in my village who works for what remains of Lucas (yes I know all the US thinks Lucas is useless but in fact they were highly innovative) having been bought by Rolls Royce and he has some knowledge of CANBUS so I'm moving forward.
 
Reply
Old Jan 14, 2022 | 04:43 AM
  #13  
JagV8's Avatar
Veteran Member
15 Year Member
Liked
Loved
Community Favorite
Joined: May 2009
Posts: 27,527
Likes: 4,912
From: Yorkshire, England
Default

Originally Posted by Bill400
It's a LOT about low level stuff you're very unlikely to need.
 
Reply
Old Jan 14, 2022 | 09:26 AM
  #14  
Bill400's Avatar
Senior Member
Joined: Aug 2012
Posts: 820
Likes: 436
From: Mechanicsville, Virginia, USA
Default

Originally Posted by JagV8
It's a LOT about low level stuff you're very unlikely to need.
Kvaser does have a LOT of information available. I'm still studying CAN too, so your tutorial suggestions are welcome.

Bill
 
Reply
Old Jan 14, 2022 | 09:33 AM
  #15  
Bill400's Avatar
Senior Member
Joined: Aug 2012
Posts: 820
Likes: 436
From: Mechanicsville, Virginia, USA
Default

Adam Varga has a much more practical series of tutorials.
The first is
A discussion on this level would be welcome.

Bill
 
Reply
Old Jan 14, 2022 | 10:26 AM
  #16  
drmike's Avatar
Thread Starter
|
Senior Member
10 Year Member
Liked
Joined: Nov 2013
Posts: 563
Likes: 90
From: Worcester UK
Default

Thank you!
 
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
hcardle
XF (X260)
10
Jul 15, 2019 09:51 AM
PBBarb
F-Type ( X152 )
4
Apr 19, 2019 02:05 PM
Chaos236
XK / XKR ( X150 )
9
Sep 1, 2016 02:09 PM
mcm97
XJ XJ8 / XJR ( X308 )
8
Nov 17, 2014 07:22 PM
Holeecow
XF and XFR ( X250 )
6
Sep 2, 2013 10:00 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 



All times are GMT -5. The time now is 11:32 PM.