Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

X-NET Database Confusion

Solved!
Go to solution

I have multiple commands to transmit on arbitration ID xE0E8 for my application that uses Byte 0 to send a command. the other bytes may be used as parameters depending on the specific command. There are several different commands that can be sent using the same 8 bits. My problem is that I see no way to include the actual different commands, only the locations that are used for a command. Are the the actual commands kept outside the database?, with only the command location in it?

I'm am fairly new to automotive CAN so I just don't know and I haven't been able to find an answer. I am also the only one using automotive CAN with X-NET at my location and so can't ask. 

It is possible to create a frame for each command with a specific default - is this the standard way to handle this? Or do you just call the "generic" command frame, include the desired command (from an xml file or something) and transmit that? Currently there are 32 different commands available for this product.

Thanks people!

0 Kudos
Message 1 of 4
(3,279 Views)
Solution
Accepted by topic author testproggie

This information wouldn't be contained in a DBC, or an XNet database.  You could define a single frame for this, but you would use the same frame for all commands since they all use the same ID.  What it sounds like you have is either the ISO-15765 protocol which is used for things like UDS, KWP2000, and Diagnostics over CAN for things like Reading and writing DIDs.  Or you have something like XCP and CCP where you are reading and writing memory locations in the product which can correspond to variables in the memory of the device which can be used for things like calibrations, offsets, or basically anything that it has been programmed to do.  For ISO-15765 the file you would likely have is a CDD or CANdela file (LabVIEW example here but isn't complete).  This file can be opened in Vectors CANdela Studio. Reading files is free and this program is included in CANalyzer.  If you are using XCP then you likely have an A2L which defines the variables and their structures in memory.  Vector as the ASAP2 Viewer for this.

 

As for the NI side, there is the Automotive Diagnostic Command Set (ADCS) for the ISO-15765 side of things.  I also wrote a CAN blog on it if you are interested in more details and an example of how to do it with other hardware.  XCP and CCP can be handled with the ECU Measurement and Calibration toolkit.  This toolkit can read your A2L and has an A2L viewer.

 

But if you don't want toolkits, and you don't want Vector, you can do the same thing over XNet just with the raw Frame API.  It is just more work having to track things and handle errors and all kinds of things.  NI made these toolkits and they will save you time over developing your own (take this from someone who has made their own).  And if you just want to get something working download one of those toolkits and a trial and see if you can figure stuff out.  Otherwise use XNets Frame API which I talk about in this CAN blog, and there are examples installed with XNet.  Search in Help >> Find Examples in LabVIEW.

Message 2 of 4
(3,271 Views)

YES!, exactly the kind of information I was looking for. We are working on getting the Vector software as it was already recommended by a coworker. I was thrown into this in January and still have a lot to learn. The code in this case we call "testability", and used for diagnostics, uploading calibration tables and such. I probably should have stated that. Customer code is easy by contrast.

I have read through your CAN series 3 times now and maybe the 4th time will gleen yet more information. I knew I could use raw CAN frames, it just seemed like such an effort especially when everytime I turn around another specialized test is requested. I had hoped you would respond as you seem to be very familiar with using CAN within LabVIEW. Thank you very much, Robert.

0 Kudos
Message 3 of 4
(3,266 Views)

@testproggie wrote:

 had hoped you would respond as you seem to be very familiar with using CAN within LabVIEW. Thank you very much, Robert.


Well I subscribe to this whole subforum so I get an email for every post made here.  I don't always reply but this topic is one I can give lots of information for.  CAN is such a large topic, and some people spend their whole careers in one small part of CAN so don't get discouraged if there is lots of information. 

 

CANalyzer is useful for basic CAN read/write in the frame and signal API, but as far as I know doesn't have built in support for the other protocols I mentioned.  They can probably be hacked in with the CAPL software but I wouldn't recommend it.  CANape is more the tool used for all the other protocols I mentioned but it has a higher learning curve due to all the different protocols it supports.  And if you go this way there is lots of Vector training. Of course if you are writing your own test application then Vector isn't as useful as XNet and a paid toolkit from NI.  You'll be doing more work, but will control the whole application and how it works.  Vector is great for initial development, and quickly talking to the part, but making a full test application using it is much more difficult than LabVIEW since it was made for instrumentation control and test.

0 Kudos
Message 4 of 4
(3,243 Views)