LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LIN control application

Hello,


Is there anybody who have experienced and developed LabView LIN control applications. If so, please share a simple example. I am using a Vector CANcardXL and there is no example on their CD.

Thank you in advance.
0 Kudos
Message 1 of 23
(8,997 Views)

Hello,

I want to create a LIN application using a Vector CANcaseXL. There is an API (vxlapi.dll) for almost all of the Vector devices, but it doesn't work properly. Did you try this API? I could send you a documentation.

Markus

0 Kudos
Message 2 of 23
(8,827 Views)

Hi Oriana and Markus,

With LabVIEW and your 3rd party Hardware, you have 2 options.  You can communication directly to the dll file (provided with the HW driver) in LabVIEW with the Call Library Function Node or you can use ActiveX, provided your HW driver provides and ActiveX interface.

I hope this help!  Let us know if you have any questions!

Chris R.
Applications Engineer
National Instruments

Message Edited by Chris_R. on 05-19-2006 02:38 PM

Chris R.
Applications Engineer
National Instruments
Message 3 of 23
(8,816 Views)

Hi Oriana and Markus

I nead to work out some function call for the vector CanCase XL. Is any of you started out something. I would really appreciate if you could share any VI for initializing the driver or calling the LIN function. I'll post everything as soon as i get it working.

 

0 Kudos
Message 4 of 23
(8,771 Views)
Hi Electro_gab,

In between I got to know that the Vector API only works with LabVIEW 8 because it uses 64Bit integer. I only have LabVIEW 7.
I tried to use the API in Visual Basic with Visual Studio and there it works.
Now I'm waiting for LabVIEW 8 so I can try if the function calls I made in Visual Basic also work there.

If I have any results i'll post it.

Markus
0 Kudos
Message 5 of 23
(8,764 Views)
Hello,

my LabVIEW 8 has arrived and now it works, but only with the .NET dll. The secret is, that you can't call the C dll directly from LabVIEW. Therefore you have to write some middleware, or buy it from Vector.
I suggest you to download the new API version at http://www.vector-worldwide.com/downloads/drivers/xl_lib57.zip and use the .NET dll. I could send you some VIs for opening and closing the driver and sending/receiving some frames. I am using a CANcaseXl and the VIs are in German, but I hope you can get the idea behind of it.

An important thing to do in the vector settings, is the assignment of programs and channels. The VIs I made call the API using "LabView" as program string. In the Vector settings you have to create a program entry with this name. Then you have to assing the LIN channel you are using to this program entry.

Bye,
Markus

Message Edited by mauererma on 07-28-2006 05:03 PM

0 Kudos
Message 6 of 23
(8,722 Views)

Wow, you got it working? I wrote a wrapper dll for the c library but i still can't get the init access over my lin port (XLopenport). I lost a lot of time trying to use the xldriver working as is. With the wrapper, I'm in the progress of getting it done.

I'd really like to see your .net VI version.

 I posted my VI's and Wrapper, altough it is not completed yet, you can test some of the driver function.

 

0 Kudos
Message 7 of 23
(8,702 Views)
Sorry, forgot the attachement
0 Kudos
Message 8 of 23
(8,701 Views)
Thank you. I'll try your Wrapper as soon as possible.

Here are my .NET VIs

Since you have to initalize the slave tasks bevore activating the channel, I have done this in the OpenDriver.vi. This means the master sends on ID 8,12,13 and 14 and receives on the rest of the IDs.

Perhaps you have to tell constructor nodes where they can find the vxlapi_NET20.dll

If you have any Questions you can also mail me. My address ist markus@mauererma.com

Ciao,
Markus

Message Edited by mauererma on 07-31-2006 02:06 PM

0 Kudos
Message 9 of 23
(8,694 Views)

Oriana 
    I also had difficulty using the Vector CANBoardXL with the vxlapi.dll drivers when dealing with LIN and the technical support at Vector was of no help.  The LabView drivers they provided were only useful with the older bus independent functional calls (ncd*) and not the latest XL functions (xl*) required for the LIN specific functional calls so I created my own LabView library.  I was successful in creating the LabView wrappers to all the functions necessary for my LIN application with the exception of the xlLinSetChannelParameters where I needed to create my own DLL wrapper to handle the XLlinStatPar structure. Let me know if you need more info.

Todd - Digalog Systems Inc.

0 Kudos
Message 10 of 23
(8,674 Views)