04-20-2010 07:24 PM
XNET defines a type called nxTimestamp_t (in CVI) yet I don't see anything in the API about getting a current timestamp in this format. If I'd like to measure the interval between two CAN messages, the intuitive way I see to do this is to call a function that would return an nxTimestamp_t, yet there doesn't seem to be one. Did I miss something?
04-21-2010 05:08 AM
If you want to measure the time between to frames you can simply use the timestamp you get when reading the frame.
The timestamp you are referring to can be optained from the XNET card using the Read function. This timestamp represents the actual timer value of the card's local timer. You can use this function to see how fast your card drifts.
Best regards,
04-21-2010 09:38 AM
04-21-2010
03:30 PM
- last edited on
12-13-2024
05:54 PM
by
Content Cleaner
You can set your Write frame to occur at a certain time in the future. Check out #7 of the Incompatible Code section of this DevZone. Notice that you need NI-XNET 1.1 for this capability.
Using this method, you can send your frame at a known time, then compare it to the timestamp included with the frame you read.
Hope this helps.
Regards.
04-21-2010 03:36 PM
04-22-2010 03:18 AM
You can read the current timestamp using nxReadState, check the XNET hardware and Software manual for details.
Best Regards,
04-22-2010 11:19 AM
AndreasS wrote:You can read the current timestamp using nxReadState, check the XNET hardware and Software manual for details.
Best Regards,
Ah, perfect, that's what I was looking for, but I couldn't find anything about it when searching for nxTimestamp. Thanks!