LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Duration of time from one break to another

I have some CAN code that has too much time from Tx to Rx and I want to quantify that. I would like to set a break before the Tx and at the Rx and see what that time is.

I cannot find anything that would not be intrusive into the code that would allow me to do this (I don't want to modify the code I have to do this).

Is this possible?

0 Kudos
Message 1 of 5
(3,314 Views)
I would use GetTickCount() or QueryPerformanceCounter() in conjunction with QueryPerformanceFrequency().
These function calls are provided by the Windows SDK.
Hope this helps, Guenter
0 Kudos
Message 2 of 5
(3,310 Views)

I would like to time these without adding code.

I use a debugger in my embedded code (not using Lab Windows) and I can set two breakpoints, and open a timer, when I hit the first break, I clear the timer, and run, and the timer shows execution time. 

That is what I am looking for; not something in the code, but something a part of Lab Windows debugging to get a time between two break points.

0 Kudos
Message 3 of 5
(3,305 Views)
well, what about using a scope on the CAN bus ? no code at all, not intrusive...
0 Kudos
Message 4 of 5
(3,291 Views)

I was thinking that was a good idea, but the system I'm going to do this with (that is causing me problems) has a CAN with two devices talking with different Arbitration IDs. The one I'm interested in is just a command response with the main board, the main board is constantly communicating with the slave board and there is a lot of CAN traffic on it.

I'm not sure I can use a scope to get this timing, since it is a specific response (matching Arbitration ids) that I'm looking for.

0 Kudos
Message 5 of 5
(3,260 Views)