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

CANBUS tutorial

Thread Tools
 
Search this Thread
 
  #1  
Old 12-24-2021, 02:42 AM
drmike's Avatar
Senior Member
Thread Starter
Join Date: Nov 2013
Location: Worcester UK
Posts: 549
Received 89 Likes on 69 Posts
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
 
  #2  
Old 12-24-2021, 07:50 AM
Thermo's Avatar
Veteran member
Join Date: May 2008
Location: Great Mills, MD
Posts: 14,387
Likes: 0
Received 3,892 Likes on 3,199 Posts
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.
 
  #3  
Old 12-24-2021, 08:28 AM
JagV8's Avatar
Veteran Member
Join Date: May 2009
Location: Yorkshire, England
Posts: 26,767
Received 4,531 Likes on 3,941 Posts
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; 12-24-2021 at 08:32 AM.
  #4  
Old 12-24-2021, 08:34 AM
drmike's Avatar
Senior Member
Thread Starter
Join Date: Nov 2013
Location: Worcester UK
Posts: 549
Received 89 Likes on 69 Posts
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.
 
  #5  
Old 12-24-2021, 09:04 AM
JagV8's Avatar
Veteran Member
Join Date: May 2009
Location: Yorkshire, England
Posts: 26,767
Received 4,531 Likes on 3,941 Posts
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; 12-24-2021 at 09:16 AM.
  #6  
Old 12-24-2021, 01:15 PM
drmike's Avatar
Senior Member
Thread Starter
Join Date: Nov 2013
Location: Worcester UK
Posts: 549
Received 89 Likes on 69 Posts
Default

Module = node. Same thing.

So only the modules generate packets, there are no subsystems that generate packets.
 
  #7  
Old 12-24-2021, 02:57 PM
JagV8's Avatar
Veteran Member
Join Date: May 2009
Location: Yorkshire, England
Posts: 26,767
Received 4,531 Likes on 3,941 Posts
Default

What? No idea what you mean.
 
  #8  
Old 12-25-2021, 02:24 AM
drmike's Avatar
Senior Member
Thread Starter
Join Date: Nov 2013
Location: Worcester UK
Posts: 549
Received 89 Likes on 69 Posts
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?

 
  #9  
Old 12-25-2021, 05:03 AM
JagV8's Avatar
Veteran Member
Join Date: May 2009
Location: Yorkshire, England
Posts: 26,767
Received 4,531 Likes on 3,941 Posts
Default

Call them node, module or control unit, whichever you prefer.
 
  #10  
Old 01-13-2022, 11:09 PM
Bill400's Avatar
Senior Member
Join Date: Aug 2012
Location: Mechanicsville, Virginia, USA
Posts: 613
Received 298 Likes on 171 Posts
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

 
  #11  
Old 01-13-2022, 11:32 PM
Bill400's Avatar
Senior Member
Join Date: Aug 2012
Location: Mechanicsville, Virginia, USA
Posts: 613
Received 298 Likes on 171 Posts
  #12  
Old 01-14-2022, 01:42 AM
drmike's Avatar
Senior Member
Thread Starter
Join Date: Nov 2013
Location: Worcester UK
Posts: 549
Received 89 Likes on 69 Posts
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.
 
  #13  
Old 01-14-2022, 04:43 AM
JagV8's Avatar
Veteran Member
Join Date: May 2009
Location: Yorkshire, England
Posts: 26,767
Received 4,531 Likes on 3,941 Posts
Default

Originally Posted by Bill400
It's a LOT about low level stuff you're very unlikely to need.
 
  #14  
Old 01-14-2022, 09:26 AM
Bill400's Avatar
Senior Member
Join Date: Aug 2012
Location: Mechanicsville, Virginia, USA
Posts: 613
Received 298 Likes on 171 Posts
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
 
  #15  
Old 01-14-2022, 09:33 AM
Bill400's Avatar
Senior Member
Join Date: Aug 2012
Location: Mechanicsville, Virginia, USA
Posts: 613
Received 298 Likes on 171 Posts
Default

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

Bill
 
  #16  
Old 01-14-2022, 10:26 AM
drmike's Avatar
Senior Member
Thread Starter
Join Date: Nov 2013
Location: Worcester UK
Posts: 549
Received 89 Likes on 69 Posts
Default

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

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


Quick Reply: CANBUS tutorial



All times are GMT -5. The time now is 07:00 AM.