05-28-2019 07:06 AM
How and where to load the .ldf file through the Vector XL Driver - LabVIEW wrappers built by TroyK. I am using VECTOR CAN/LIN VN 1630A Hardware. I am new to VECTOR hardwares, so please help me out.
05-28-2019 08:48 AM
Where does it say that loading an LDF is part of TroyK's wrapper VIs or the XLWrapper DLL at all? Loading an LDF is possible and parsing it through NI's XNet which can function on a software layer and not require XNet hardware.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-28-2019 11:52 PM
Thanks Hooovahh.
So I can use TroyK's LabVIEW wrapper to communicate with vector hardware along the NI XNET functions to load and parse the .ldf file.
Please correct me if I am wrong.
Since I am very new to LIN communication, its hard for me to understand the use of LDF files while programming.
What is the importance of LDF files? When and where in the code should I use it? What data should I extract from it? What actions should I take according to the data extracted from LDF file?
Also can someone please let me know the detailed procedure/flow to communicate with Vector LIN hardware.
05-29-2019 12:04 PM
An LDF file has a couple purposes. The first and easiest to understand it it can be used similarly to a DBC is on CAN, in that it defines what bits of a payload are used for what signals, and scaling. This LDF will say things like "If my ID is 0x123, then the first byte is Temperature and it is from X degrees to Y degrees". If you open an LDF in the XNet Database Editor (check your start menu after installing XNet) you should be able to see how the scaling is done. This is most convenient for times when you want to read or write values as engineering units. It is easier to read RPM then it is to read 8 bytes and have to figure out the scaling to get RPM. I cover the DBC and the Signal API in this part of my CAN blog. That is CAN specific but XNet shares lots of concepts between CAN and LIN.
Another thing the LDF has which a DBC doesn't, is information about the schedule used. LIN is different than CAN in a few ways and one of them is that data being transmitted is done by a master and slave setup. So if you are the master you will be responsible for the schedule to be used. The master populates the header for these schedules, and the slave(s) respond with the payload data. This is somewhat like a request response system where the master can optionally reply to its own request. This means that the LIN bus is effectively always at 100% bus load. It isn't quite since there are delays between requests but once the schedule has been serviced it starts back over again. The more data to request, the longer it will be to go through the schedule and get all data again.
So what I suspect you can do, is use the XNet API to read the LDF and get scaling information, and schedule information. Then using Troy's API you can be the master or slave and request or respond to data based on the schedule in the LDF. Using XNet LIN hardware would make this easier, but I realize that might not be an option. I've personally never used LIN Vector hardware in LabVIEW.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-30-2019 02:11 AM
Thanks so much Hooovahh. I got the complete understanding of the LDF file from your post.
Now I am stuck at one problem. Is it possible to send a full frame with payload from Master to slave using TroyK's Vector XL Driver - LabVIEW wrappers? If yes, then how to do so?
Please help me out, I am stuck very badly at this juncture.
05-30-2019 11:06 AM
Troy's library has a couple LIN examples, one being a slave, and the other with some kind of simulation interface with the master requesting data that the slave responds to. I'd start with these.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
06-04-2019 09:30 AM
I am using the same LIN Example, but not able to send the full frame from master to slave. In the example I am able to send the header from master and getting response from slave, but not able to send full frame, header with payload from master to slave.
Please help.
06-07-2019 05:43 AM
Can any one help. Need to send full frame from master to slave using the VECTOR LIN DLL. So far I am able to send the header from master and get response from slave.