LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Kvaser CAN bus Interface Serial num

Solved!
Go to solution

Hi Rolf , 

 

if both devices are connected at a same time , i am getting the 1st device EAN and serial number only . Not getting the 2nd device EAN and serial number .

 

How to get the both units (device )EAN and Serial number Simultaneously or in parallel thread something like this  . This is my simple question within you

 

i tried by canGetHandleData() function but i am getting a error of Invalid Handle -1 . 

 

0 Kudos
Message 11 of 14
(699 Views)

You forgot to attach your code (use save for previous if you are in LabVIEW 2020 or newer). I have no idea why you want to get this information simultaneously. The principle is to get the total number of channels, loop through each of them and query for each the SN, EAN and onboard channel number and go from there. Nothing simultaneous or parallel or whatever is needed.

Rolf Kalbermatter
My Blog
0 Kudos
Message 12 of 14
(694 Views)

Hi Rofl ,

 

Spoiler
The principle is to get the total number of channels, loop through each of them and query for each the SN, EAN and onboard channel number and go from there.

how to Loop through each of channel and query EAN , SN of it . 

 

I have LLB file provided by kvaser . using "kvCanGet8ByteChannelData.vi" am getting the UPC and SN 

 

Can you please provide  me any example vi or snippet based on your Way of your approach and Query for each channel?

 

 

0 Kudos
Message 13 of 14
(673 Views)

channelCount = canGetNumberOfChannels();

for (i = 0; i < channelCount; i++)

{

      canGet8BytChannelData(i, CARD_UPC_NUMBER, eanCode);

      canGet8ByteChannelData(i, CARD_SERIAL_NUMBER, serial);

      canGet4ByteChannelData(i, CHANNEL_NUMBER_ON_BOARD, channeNumber);

}

 

These three items per available channel identify the channel fully.

Rolf Kalbermatter
My Blog
0 Kudos
Message 14 of 14
(666 Views)