07-19-2011 01:58 AM
Hi,
I am trying to create LabVIEW code for vxlapi.dll. But was not successful in opening the port.
Harware details:
I did follow the LabVIEW coding according to the state flow for CAN defined in the description document.
What was successful: xlopendriver(),xlgetapplconfig(),xlsetapplconfig(),xlgetchannelIndex(),xlgetchannelmask().
Inputs:
Inputs for xlopenport():
Output: porthandle value -1. And labview error 1097.
One more query I had: phwtype,phwIndex and phwchannel were defined as signed integers in xlgetapplconfig , whereas the same parameters are defined as unsigned in getchannelIndex function. Could you tell me why two different data types.
And also could anyone tell me where I am going wrong I opening the port.
Thank you and Regards,
Surya
07-19-2011 03:33 AM
Just to make something clear, CANcaseXL is NOT a National Instruments product, it's made by Vector ( vector.com ).
So any question about the dll will properly not be able to be answered here in this forum.
Also just one question, do you have a CANcaseXL with a license for LabVIEW ?
To be able to work with CANcaseXL in LabVIEW, you need a special license in the CANcaseXL.
07-24-2011 10:52 PM
yes, I do have a licensed cancaseXL.
Thank you for the suggestion. I am taking vector's help in solving this issue.
Surya.
07-25-2011 12:59 AM
Hmm, the input description doesn't match the xlOpenPort() funciton at all but would be in terms of naming ok for xlGetAppConfig() and xlSetAppConfig() however in terms of parameter setup only for xlSetAppConfig() .
You do not describe how you have setup the parameters for xlOpenPort(). You do have there quite a few parameters which are defined as passed by reference (pointer) and that would of course have to be setup correctly in the Call Library Node.
05-17-2012 10:29 PM
Hi,
I'm having hard time to get work with initial communication functions. Did you get resolve those initial communication issues (xlOpenDriver, xlGetChannelMask & xlOpenPort)...? Please share with your inputs.
Thanks
10-02-2012 08:27 PM - edited 10-02-2012 08:31 PM
You do not need to have a licensed Vector CAN product to use it in LabVIEW. You can call the vxlapi.dll directly.
It's just tricky to import the dll functions from the .h file because LabVIEW doesn't like the way it is defined and there are a couple of structs that LabVIEW struggles with.
I have not included the Vector Driver Library description document or dll. You can download it from here:
https://www.vector.com/vi_downloadcenter_en.html
Under "Products" select "CAN Driver Library" and under "Categories" select "Drivers & Firmware" then "Show results"
All wrappers are in the attached zip file with a basic example too.
The my_vxlapi.dll is a wrapper around the GetDriverConfig function because the XLdriverConfig struct cannot be used by a LabVIEW Call Library Function directly.
01-08-2013 06:28 AM
Hi
I am also facing the same issue with "vxlapi.dll" in LabVIEW. The xlOpenPort() function returns porthandle as -1 and error code 1097.
Could you please help me if you were able to find the root cause of this issue
Thanks in Advance
Sujith Rajan
01-13-2013 03:46 PM
Error 1097 is a LabVIEW error code not a vxlapi.dll error code.
Did you define the call library function node yourself or use the one from the library I attached above?
It seems that the function parameters you have defined may be incorrect and that is likely why calling the function is corrupting LabVIEW memory.
Error 1097 ... LabVIEW: 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.
02-11-2013 11:13 PM
I am facing issue with xlActivateChannel.vi. The function call returns me the following error code
112
XL_ERR_INVALID_ACCESS The user made a call to a port specifying channel(s) for which he had not declared access at opening of the port.
Any idea, why this could be happening??
Thanks
Sujith
02-11-2013 11:35 PM
There are quite a number of reasons why this could be happening.
CAN or LIN? Is another application using the hardware? Did you properly close any references you had to the hardware in previous runs?
Did you provide the appropriate access mask for the channels you wish to activate?
Perhaps if you attached your VI it would be easier to give a more specific answer.