LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

We are reading less data than we expected from a USB TO CAN device from IXXAT

Hello to All Labview users.

I am facing a problem with the USB to Can Device from IXXAT which i would try to describe as better as i can.

We have a PCB which we communicate with it through Can Bus.12 signals (analog and digital signals) are coming to the Can bus output so with the use of the USB to Can connector we should be able to read those 12 signals.I have build a labview software to initiliaze and read through Can bus according to the datasheet.

We have set the Operating Mode to 11 bit frames (that means we should able to read up to 12 signals or not?), CAN Baudrate to 125 kBd, BTR0 0X03 BTR1 0X1C,CAN Number 0.Everything is ok we run our program,there is no error while running the program and reading the can message but the problem is that we are reading up to 8 data not 12 data!!!So for some reason we are losing some data.How is this possible?There is a problem with the labview software we have build?

Any suugestion-ideas please how to solve this problem?If can someone provide a code solution for this problem it would greatfull because we need to start doing EMC test on this PCB and we want to monitor those 12 signals.

I am sending you the program we are using named Read through Can Bus,the labview drivers we have in the rar file named Ixxat labview drivers and also the datasheet of the usb to can device named vci_341_c-api-manual_1.5.

0 Kudos
Message 1 of 4
(2,722 Views)

Hello gstathatos,

 

I am not familiar with this particular driver from IXXAT. However, it looks to me like it is reading whatever CAN messages are coming in on the CAN bus, and returning them as an array of 8 bytes (with associated arbitration ID and timestamp). You will need to interpret these CAN messages based on the device that is generating them. Most likely each single message is associated with one device sending a CAN message. In order to read all 12 of your signals, you will need to read 12 separate can messages.

Colden
0 Kudos
Message 2 of 4
(2,692 Views)

Hi Colden,

 

Thanks for your reply.

Ok let's assume you are right,i don't understand how can i do what you proposing?I have to leave my Vi as it is?I can use the drivers i have or i have to build new?Can you please provide a code solution it would help me understand more.

0 Kudos
Message 3 of 4
(2,690 Views)

You need to understand the CAN protocol.  A Google search for "introduction to controller area network" will turn up many resources.  The CAN protocol allows a maximum of 8 bytes in a packet.  The "11 bit" refers to the length of the arbitration field, not the data field, and has nothing to do with the number of signals.  You need to find out how your device packages the data and interpret it appropriately.

0 Kudos
Message 4 of 4
(2,682 Views)