Jump to content

XCP and CCP in LabVIEW (and X-NET)


ninick

Recommended Posts

Hello,

My actual requirements are a bit nebulous at the moment but just assessing my options.

Has anyone had any luck with 3rd party software with XCP/CCP and LabVIEW? This could be 3rd party hardware or XNET stuff. Maybe a home-brew driver or vendor supplied?

I realise NI offers the  NI ECU Measurement and Calibration toolkit for XCP/CCP support with XNET hardware but I want to know if this is my only option!


Thanks!

Link to comment

I've been in the process of re-writing the XCP/CCP drivers to work with other hardware.  A while ago I re-wrote the ISO-15765 drivers (KWP2000, OBD, UDS) into pure G so that any CAN hardware can use it.  This basically replaces the NI Automotive Diagnostic Toolkit from NI.  The code was simple enough and all I needed to do was re-write the core state machine and the rest was more or less the same NI subVIs.

XCP/CCP is more complicated as there isn't just a single core used by NI's toolkit to replace.  I do have an internal toolkit for doing XCP, but parsing and processing the A2L file still leverages NI's DLLs and if I ever wanted to release it I would want to rewrite this file parsing stuff too.  My toolkit does support a Raw mode which doesn't rely on an A2L (and doesn't need NI's parsing) but in this case doing things like reading a characteristic you'll need to provide the Address, Extension, Byte Order, Number of Elements to Read, and Number of Elements in an Item.  Returned would be an array of bytes.  Where when using the A2L you can call a function to list all the Characteristics by name, and then read the engineering unit based on the name, with all that other stuff pulled from the A2L.  I was able to accomplish this just by sniffing the CAN bus while using NI's toolkit and seeing the commands performed to do things like Connect, Unlock, Get Processor Info, Get DAQ Resolution, get PGM Info, etc.  NI's toolkit has an ECU simulator, and I have a couple actual ECUs to test with.  Combined with sniffing I found some documentation here that helped understand the protocol more.  At the moment I can't post what I have, way too coupled with NI, and not robust, and cleaned up.  But I can point you in the direction of what I learned if you have any questions about the order of commands needed for an operation, or the type of things needed.  If your scope is small enough I'd attempt to just use NI's toolkit on your ECU, sniff the bus, and figure out what the commands are to get what you need.

But honestly for the money the NI toolkit is worth it.  I'd argue the ADCS toolkit might not be worth it (since it is available on my website and open), but the ECU one is and if you can get away with using NI hardware I'd recommend using that toolkit.

  • Like 1
  • Thanks 1
Link to comment

The only other company I know of that does XCP is Vector. Vector does have a .NET interface for their CANoe/CANAlyzer software, and there is a way to broadcast/receive UDP from their VN boxes. The price tag on Vector hardware and software is pretty hefty (I expect 14k to 25k USD every time I get a quote for a single station).

Dearborn Group with their Gryphon boxes may be able to do XCP/CCP. Haven't done anything with them in a decade, so can't relate much more. Once again not cheap.

Kvaser is an outfit I've heard about and briefly looked into a couple years back, but not used any of their products.

Link to comment

Vector isn't the only one, Intrepid has hardware for doing it, and ETAS does too.  But as far as software capabilities go none of these hardware options provide drivers which are capable of doing this in LabVIEW.  They may have LabVIEW drivers for reading and writing raw frames but no software layer on top of that other than NI's, or writing your own.  I've avoided the .NET capability due to the high price tag of having that software and hardware on the system.  Vector hardware is licensed for software so installing CANoe, and then calling it via .NET only works if you buy Vector hardware, then pay for it to have CANoe enabled.

Link to comment

Hi Hooovahh,

Thanks for your reply. (P.S your CAN series on your blog has been super helpful in the past - thanks!)

Getting a bit confused when you refer to 'toolkit' whether you are referring to the ADCS toolkit or the ECU toolkit (and XNET driver I think)

Also, unfortunately the link here is broken: 

23 hours ago, hooovahh said:

Combined with sniffing I found some documentation here that helped understand the protocol more

All that aside, proper A2L support is essential really as these will chop and change and I can't go packet sniffing everytime that happens.

Looking like the ECU toolkit is gonna be required. Pretty sure some people are gonna wanna buy Vector kit though...

Thanks!

Link to comment

Sorry if I wasn't clear.  NI's ADCS has more or less been replaced by the ISO 15765 I posted online.  It doesn't do hardware abstraction with classes (it should) but I was just in a hurry to post it online and thought most people would just be interested in the G state machine.  Turns out most people are interested in a different things.  The ECU toolkit is the one I've started to replace but may never be able to post online.  This is the one that uses an A2L for XCP/CCP.  If I had time to work on it I would probably update the ISO 15765 toolkit I posted online first to add hardware abstraction, and then make a post on how to flash an ECU using it.  That is a lot less effort than re-writing the ECU toolkit.

That documentation link isn't broken, it is just realllllly slow.  I downloaded it and attached it here.

XCP -Part 2- Protocol Layer Specification -1.0.pdf

Link to comment

This clears things up and yes I have the file now.

I think your ISO15765 toolkit could prove useful too. 

The NI ECU toolkit is fairly good value tbh, so its not too big a sell. 

Thanks for all your help.

 

Edited by ninick
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.