LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vxlapi: LIN Error with setup channel as Master Mode

Hello Mr. Troy K

 

I am trying to stablish LIN communication using a Vector VN1630A, I also downloaded the Vector LabVIEW wrappers "XL LV2018 v3 Hooovahh Edit FD and 64 Bit", then I put the Vector XL library on the same folder as my labiew project, following at the Vector XL driver manual, the sequence to follow would be: 1. OpenDriver, 2. GetChannelMask, 3. OpenPort, 4. LinSetChannelParams, etc.

The error that I am getting is at the LinSetChannelParams:

Error 1097 occurred at SubVI in LIN Test.vi

Possible reason(s):

LabVIEW: (Hex 0x449) An exception occurred within the external code called by a Call Library Function Node. The exception might have corrupted the LabVIEW memory. Save any work to a new location and restart LabVIEW.

 

What I am trying to do is to setup the LIN node as a master node and although I was able to open the Port of the VN1630A I cannot setup the LIN node, below is an image of the labview code.

I would appreciate any suggestion or comments, thank you!

 

Eder C.

 

Download All
0 Kudos
Message 1 of 6
(1,833 Views)

Despite my name being part of that download, I never actually used LIN hardware with the XL Wrapper drivers.  Troy imported the DLL into LabVIEW providing wrappers for all the DLL calls.  I then had some Vector CAN hardware to test and develop parts of the code, particularly the 64 bit, and CAN-FD functions.  So I've never actually had access to Vector LIN hardware, and was never able to test out the LIN functions.  I am familiar with LIN but only from my experience with XNet hardware.

 

Since the drivers are wrapping the Vector DLL, you might find some helpful hints in what is wrong looking at the documentation from Vector on the XL Drivers.  I found the PDF online here.  Sorry.

0 Kudos
Message 2 of 6
(1,819 Views)

Thank you Hooovahh, I am trying to figure out what is wrong using the documentation you pointed out, will let you know what I find.

 

Best Regards,

Eder

0 Kudos
Message 3 of 6
(1,792 Views)

"Error 1097 An exception occurred within the external code called by a Call Library Function Node" means there is something wrong with the dll call.

 

I'm guessing it has something to do with the 64 versions of the wrappers.  The LIN functions may have never been checked or adapted properly for 64 bit dll calls. It's usually the Port and/or AccessMask inputs to the dll that cause it.

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 4 of 6
(1,767 Views)

Thanks for the feedback TroyK, can I make it work by modifying the dll file or .h file?

 

Best Regards,

Eder 

0 Kudos
Message 5 of 6
(1,748 Views)

@Eder22 wrote: ...can I make it work by modifying the dll file or .h file?

No, you can't modify the dll and the header file is not used by LabVIEW except while using the import shared library wizard (and it wouldn't make any difference if you modified it, the dll memory allocation is the problem).

 

To get your code working you need to make sure the dll "call library function" parameter datatypes match what the dll expects for the function calls.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 6 of 6
(1,715 Views)