Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading .ldf files through Vector XL Driver - LabVIEW wrappers

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.

0 Kudos
Message 1 of 8
(3,937 Views)

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.

0 Kudos
Message 2 of 8
(3,920 Views)

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.

 

 

0 Kudos
Message 3 of 8
(3,910 Views)

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.

Message 4 of 8
(3,904 Views)

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.

0 Kudos
Message 5 of 8
(3,901 Views)

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.

0 Kudos
Message 6 of 8
(3,893 Views)

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.

0 Kudos
Message 7 of 8
(3,864 Views)

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.

0 Kudos
Message 8 of 8
(3,842 Views)