Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

reading message from a vector CanCard XL

I made a short aplication in LabWindows/CVI (like a monitor) to read can messages from CanCard XL, messages received from a test ECU. I can read the messages in real time, but this is the only thing that my computer does. I tried to use a thread but the resul was the same. What i need is something like a trigger mechanism, when a can message is detected, read the message and go to sleep, or something like that. My aplication permanently verify if an message is received.
 
Thank you for your help
0 Kudos
Message 1 of 4
(4,221 Views)
What CAN card and version of NI-CAN are you using?  It sounds like your application can read CAN messages from a test ECU, but I'm not sure what is not working correctly for you.  What do you mean by "go to sleep"?  What do you want your application to do?  I'm happy to help, but some clarification would be great.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,208 Views)

I'm using a Vector CanCard XL. When a message is received by the card, i need to read this message and save it to a file. I have done this, but my aplication verify if a message is received all the time. This think blocks my PC.

How can I build something like a trigger ?

I want my functions to be called only when a message is received, not to ask all the time the card for a message.

Thanks for your reply.

0 Kudos
Message 3 of 4
(4,203 Views)
It doesn't sound like you are using any National Instruments CAN products (either hardware or software).  Is that correct?  If so, how are you interfacing with your third-party CAN card in CVI?  Are you making DLL calls?  Or has Vector provided a C-based API you can use in CVI?
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 4
(4,194 Views)