LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Connecting to multiple KVASER - Leaf Light HS at once....

Solved!
Go to solution

I am trying to connect 2 Kvaser (USB) dongles to my computer using LabVIEW simultaneously...

They are connected to the computer with a USB Hub but that shouldn't make any difference.

 

I have: CANKing CAN bus monitor program and the Kvaser SDK and their LabVIEW library also - all installed.

 

When I run CANKing, the program can detect both USB devices and also the 2 virtual channels - 4 in all.

 

When I call the CanGetNumberOfChannels.vi the value returned is 3 - but should be 4.

 

I am assuming that the CANKing program uses the same API calls.

 

Any ideas, why the second device is not recognised??

 

0 Kudos
Message 1 of 5
(3,690 Views)

Hi Sammy,

 

If you use the devices one at a time, does the CanGetNumberOfChannels.vi return the proper value?

 

Best,

Jeff S.
National Instruments
0 Kudos
Message 2 of 5
(3,659 Views)
Solution
Accepted by topic author sammy346

I have seen this behaviour before, it is nearly impossible to cleanly unload the Kvaser dll when it is misbehaving.  Re-starting LabVIEW may help.  If the Kvaser hardware configuration tool shows 4 channels, then the CanGetNumberOfChannels dll call should reflect this.  It is not a good idea to add or remove a device with the driver loaded.

All the best,

Michael.

0 Kudos
Message 3 of 5
(3,652 Views)

Yes,

 

I was playing around with it further again yesterday and just calling a dll directly without using the VI (which is basically the same thing).

 

Results have been inconsistent although I was able to get the dll to recognise four channels at one point.

 

 

0 Kudos
Message 4 of 5
(3,644 Views)

Just came across your question here.  An answer to your question is on our website at:

 

http://www.kvaser.com/en/support/faq/270-labview.html

 

As the FAQ at the link states, the problem arises due to when the DLL is unloaded.

0 Kudos
Message 5 of 5
(3,595 Views)