02-21-2018 10:17 AM
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
02-22-2018 04:04 PM
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.
02-23-2018 05:53 AM
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...
02-26-2018 07:58 AM
Are you using remote frames?
02-26-2018 08:15 AM
I don't know. What is a remote frame?
02-27-2018 03:14 PM
The document concerns its use in LabVIEW but it should be similar in CVI.
http://www.ni.com/example/54565/en/
02-28-2018 06:56 AM
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.
03-01-2018 09:24 AM
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
03-01-2018 12:37 PM
done.