01-11-2019 10:23 AM
Hi All,
I am using a PXI chassis with an PXIe-8840 embedded controller and PXIe-8510 card as my XNET hardware
I have a CAN frame which is sent over the CAN bus, it is then converted to an Ethernet packet using some serializer logic inside my DUT. I can connect to my Ethernet connection and see the serialized frame, but I need to be able to calculate the time it takes for the CAN frame to be tx'd over the bus until it is received by the Ethernet connection on the other side.
I have done this before with CAN to CAN where I used the trigger lines to sync the XNET devices all together and get a T0 to run my measurements off.
So my question is now, is there any Ethernet card that I could find for my PXI Chassis that would accept a Trigger as a sync the same as the XNET cards do? That way I would be able to accurately calculate the tx time since the XNET device and the Ethernet Card would be in sync.
Thanks for any help/ideas in advance!
02-01-2019 12:19 AM
Anyone have any input/help on this topic??
02-01-2019 11:08 AM - last edited on 01-11-2024 02:34 PM by migration-bot
Hello,
NI's PXI Ethernet Modules can be viewed here:
https://www.ni.com/en-us/shop/category/gpib-serial-and-ethernet.html?productId=139226
However, I am not sure if those will work for your application. What path is the CAN frame taking once it gets to the DUT? Does it go through a CAN bus and then get converted to Ethernet?
Anson K
National Instruments
02-01-2019 01:25 PM
Hi Anson,
Basically I have a CAN frame which is sent over the XNET CAN bus to our DUT, it is then converted to an Ethernet packet by the DUT and transferred out as a UDP packet. Currently I read this Ethernet frame in Labview via the PXI controller. However I need a more deterministic approach to this which does not involve the overhead of windows to read the Ethernet packet.
It is easy to read the latency of CAN to CAN using the hardware timestamps provided by the XNET CAN frame, however when I leave the XNET world and try to read an Ethernet frame via LabVIEW running a windows OS the timestamps cannot be trusted anymore.
So do you know of any solution that allows me to read the timestamp of a received UDP packet which is in sync with the XNET timestamp in my PXI chassis?
Thanks
02-01-2019 02:53 PM - edited 02-01-2019 02:54 PM
The attached picture of my setup might help explain things better.
02-01-2019 04:38 PM
Although my expertise lies on the XNET side of things, I think the PXI-6683 might be able to provide an accurate timestamp for the Ethernet traffic. Assuming the PXI-6683 can detect and timestamp normal Ethernet traffic, it has multiple options for trigger import/export that work well with any XNET hardware.
02-01-2019 05:04 PM
Thanks for your reply Jeff,
Is there any way to find out if the PXI-6683 will allow me to timestamp an incoming UDP packet? If so this is exactly what I need. I cant imagine I am the first to have this problem?
Thanks
02-01-2019 05:05 PM
You might want to look into winpcap. It provides a low level packet API, with a timestamp provided by the operating system.
02-04-2019 12:05 PM
Hi JGruenberg,
Unfortunately I don't think Winpcap would work in my situation since that timestamp would still be relative to windows system time and completely out of sync with my XNET timestamps/clock. I wish the PXI 6683H could timestamp incoming packets, I cant believe this is so hard or hasnt been done before but still haven't found a solution.
02-04-2019 12:35 PM
I agree that your use case seems like it should be relatively straightforward to implement. Unfortunately it is looking to be a bigger challenge than I expected.
I found this forum post which ask a very similar question. It seems the PXI-6683 isn't capable of time-stamping arbitrary Ethernet packets. It seems the suggested work-around is to obtain a network interface device that transmits a trigger signal when it receives a UDP packet. The trigger signal can then be used by XNET hardware to generate a timestamp frame.