LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET CVI Questions

Hello,

 

I have a couple of questions about using XNET in CVI.

 

1) Is there a way to get the time stamp of a transmitted frame without having to receive it on another CAN interface?

 

2) Is there a way to generate a callback when a CAN frame arrives instead of having to poll it?  There is one for Serial ports..., but I can't find anything for XNET Read Frames

 

Thanks,

 

Terry Moss

 

0 Kudos
Message 1 of 9
(2,771 Views)

For the first question have you looked into the viability of echo transmit? This would be the easiest way to "receive" without actually having to receive on another CAN interface. 

 

Please review the XNET manual for more information:

http://www.ni.com/pdf/manuals/372840k.pdf#page=222

 

As for your second question, can you describe more of what you are trying to accomplish.

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 2 of 9
(2,739 Views)

The echo transmit sounds interesting. thanks.

 

I'm updating a CAN communication protocol for an automotive ECU.  There is a handshake procedure between my program and the ECU, so I transmit a message, and look for a response(s).

 

Polling the XnetRead works ok, but it seems like it would be more efficient if there was a call back function generated when the CAN interface receives a frame.

 

Thanks for the help...

0 Kudos
Message 3 of 9
(2,732 Views)

Are you using remote frames?

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 4 of 9
(2,720 Views)

I don't know.  What is a remote frame?

0 Kudos
Message 5 of 9
(2,716 Views)

The document concerns its use in LabVIEW but it should be similar in CVI.

http://www.ni.com/example/54565/en/

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 6 of 9
(2,706 Views)

From what I can tell, you still have to poll the status of the received data with xnet-read.

 

A callback function would be a great enhancement to this driver, it works really well for UARTS.

 

Thanks.

0 Kudos
Message 7 of 9
(2,695 Views)

I agree I think it would be a great addition. Since this is a functionality you would like to see you can post in the Idea Exchange which is monitored by NI to see what functionality is wanted so that it can be implemented.

 

Idea Exchange:

https://forums.ni.com/t5/Idea-Exchange/ct-p/ideas

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 8 of 9
(2,680 Views)

done.

0 Kudos
Message 9 of 9
(2,675 Views)