Creating a cycle timer via Polyscope
An example of how to create a cycle timer via polyscope.
Examples are valid for:
CB2 Software version: 1.8.16941
CB3 Software version: 3.3 and under
Note that older or newer software versions may behave differently.
These examples can be used for both CB2 and for CB3.
This programming technique will allow you to create an accurate cycle time for any program, see screen shot below:
The variable ‘timer’ in the BeforeStart is just to initialize the timer at time zero, it is then referenced again in the thread where it starts from 8ms (milliseconds) and will count until the program is haulted.
The 8ms (.008) is added to the timer because that is the cycle time for the proccesor of the robot so by adding this time it gives the presise time it took the program to run without effects of the robots OS.
The ‘MoveJ’ consists of three arbitrary waypoints to show a cycle time for this example, customers program would replace that portion, inside the rectangular box.
To get a single cycle time, the program should end with a ‘Halt’ or the check box for “Program loops forever” should be unchecked so that the timer displays one cycle time instead of continually running.