So my mentor asked me too determine how long the whole labview code runs. He said something from ‘the first line to last line’ and something about watchdogs. Im not talking about a timer like a wait counter, like a time that determines how long the whole code runs in the robot main. Thanks
Telop gets called whenever a new packet from the driver station is received, which is 50hz. If your telop code takes longer then that, it will cause you to miss packets. In Periodic tasks, you can define loops that run irrespective of new data from the driver station.
Maybe what you are looking for is to measure how often or how long it takes teleop to run.
To measure how long it takes teleop to run, open up the project folder named support code. In it is the Elapsed Times VI. Drop the VI in your teleop, and open the panel. You can also drop it other locations in the code such as in a periodic loop.
On each call, it look to see what time it is and who is calling. It displays the info from different calls to give you a better idea of how often the teleop is running.
If you want to time a smaller piece of code within one VI, you can place a sequence structure around it and read the millisecond timer before and after, subtract, and either probe or display.
If this isn’t what you were looking for, please be more specific in your question.