LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access Vector(CAN) API from Labview

Hi All,

 

I want to use the Vector Hardware(CANcaseXL) from Labview without using Vector Software. For that Vector provides their API Dll called "vxlapi.dll" it is giving error to access that dll. any have done this before or any  documents available for this. Please provide valuable inputs.

 

 

Thanks in Advance

 

 

Regards,

Kalanga

0 Kudos
Message 1 of 16
(13,580 Views)

Hi Kalanga,

 

AFAIK Vector also provides LabVIEW driver for their CAN interfaces. Have you tried them? (Should be a bunch of VIs with some documentation attached...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(13,579 Views)

Vector provides CAN drivers for LabVIEW, in which they use the dll you have mentioned, did you try them?

 

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 3 of 16
(13,575 Views)

And, last time I checked, you need a LabVIEW license in the CANcaseXL dongle to be able to run it with LabVIEW.

0 Kudos
Message 4 of 16
(13,567 Views)

I realize this is an old thread but anyone searching might like to know...

 

You do NOT need to use the Vector licensed drivers to use the Vector XL series hardware.

You can call the vxlapi.dll directly without any license.

 

Errors calling the dll come from not defining the function prototype correctly.

 

Here is a link to a wrapper library I have uploaded to the forum:

http://forums.ni.com/t5/LabVIEW/CANCASEXL-not-able-to-open-port-for-vxlapi-dll/m-p/2174504#M699254

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 5 of 16
(13,292 Views)

FYI: I've uploaded my wrapper library to an NI Community document so it can be updated.

 

https://decibel.ni.com/content/docs/DOC-30180

 

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

Hi Troy, the wrappers are a fantastic work, congratulations !

 

I've done a loopback in a CANcaseXL linking channel 1 and 2. 

 

I connected channel 1 to CAN Receive Example.vi and

 

I connected channel 2  to Transmit Example.vi

 

CAN Receive Example.vi is working perfectly but in most of times

 

that Transmit Example.vi does, the message received in CAN Receive Example.vi

 

is ID=00000000 Data=0000000000000000 DLC=00 and the red led Err of the reading channel 1

 

flashes. Have you seen this happen before ?

 

Thank You

 

Henrique

0 Kudos
Message 7 of 16
(12,614 Views)

Hi Henrique,

The "Transmit Example.vi" by default is set for 250KBd and Extended ID.

The "CAN Receive Example.vi" needs to be changed to match those parameters.

 

The link between the two CAN channels also needs a 120R terminating resistor (It needs it in my setup).

 

I just tested it here, once all these conditions are correct it works properly.

 

You may need to stop and start the receive example if it has had too many unhandled errors or the bus has gone into "BUSOFF" mode to protect the tranceivers from unsuitable bus conditions.

 

After a lot of experimenting changing channels and so on it is sometimes necessary to unplug and replug the CANcaseXL to fully reset 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 8 of 16
(12,601 Views)

Does anyone know if I can use this (specifcally the "CAN Receive Example.VI" ) with the VN1610? I do not see the VN1610 as part of the hardware type drop down?

 

 

0 Kudos
Message 9 of 16
(12,465 Views)

I have no sure but, when I analyzed the code, I realized that VN16xx don't works with this code

 

Thanks

 

Henrique 

0 Kudos
Message 10 of 16
(12,429 Views)