10-09-2017 04:01 PM
Hi All
I'd like to implement a custom CAN protocol to interface to a model using Veristand, XNET, and a PXIe XNET card. What are my options? I see that VeriStand offers XNET Databases along with Single-Point, Event Triggered, Cyclic Event, Cyclic session modes. This will cover some of the requirement, but not all. For example, there is a multi-frame transport protocol. Is it possible to extend the existing session modes to also add something like a transport protocol? Is it possible to create a custom device to accomplish this? If so, can the XNET Databases be incorporated and do the existing session modes need to re-implemented? Thank you!
10-10-2017 03:25 PM
Hey andy_3141593,
What kind of protocol are you trying to implement? If it's some close-to-standard (like J1939), there may be some example code for a custom device available. A good rule of thumb is that if it's possible to do through LabVIEW, you can most likely do it through VeriStand as well. I'd suggest you look into doing this communication through LabVIEW, which could then be built into a custom device to use with VeriStand.
-aprillest
10-17-2017 07:23 AM
For a multi-frame message,
you will need to follow UDS spec (hopefully your device does) by sending/receiving flow control
by sending point-to-point or queued frame sessions.
What I mean is:
write the first frame using XNET Write ($10 $0A-$0D $xx $xx etc)
listen for response flow control frame ($30 $xx $xx $AA $AA $AA $AA $AA)
send your second frame and beyond ($21 $xx etc)
you will have to code all this - there isnt a way XNET handles this UDS spec in the background.
10-17-2017 07:49 AM
If it's UDS you're looking to do check out my Part 8 of my CAN Blog which goes over ISO15765 and some of the protocols that sit on top of that. The source is available and written in pure G and shows how to do the communication with three different 3rd party drivers with a raw frame API. These Read/Write frame functions can be replaced with the Read/Write frame functions of any hardware (including XNet). If your protocol isn't 15765 you can just use that code as an example of a way to write your own protocol.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord