Show/Hide Toolbars

Presse universelle MecaMotion par 

"Stopwatch" instruction

This instruction is used to measure a time during the execution of the part-program.

The time measured is accurate to two thousandths of a second.

It is possible to integrate up to 5 stopwatches into a part-program. These are numbered according to the position of the instruction that starts the stopwatch in the program, so stopwatch n°1 is the one that is placed at the top of the program, the stopwatch placed at the bottom will be n°2 etc.

The feedback variable of this stopwatch corresponds to the time that elapsed between the start and stop of the stopwatch. This time is returned in TIME format (in [ms]).

The reset function stops the stopwatch and resets its value.

Use of the instruction

To use the stopwatch instruction, you must first declare a variable of type "TIME" to be able to view the time value (see figure 1). You can activate the visualization using the "visualize" lunettes button on the main menu.

ChronometreAffectationVariableTime english

Figure 1: Declaration of the stopwatch feedback variable

Then, you must place the instruction in the part-program where you want to start, stop and reset the stopwatch.

You must also, in the variable line, select the "TIME" return variable created previously.

ChronometreStartStopReset english

Figure 2: Using the stopwatch instruction

Below is a list of the instruction's input and output parameters:

Parameter name


Type of data

Default value






Start, stop or reset the stopwatch value

Variable [ms]




Elapsed time

Table 1: List of instruction parameters

Warning, if no stop or reset is programmed, the chronometer value will continue to increase until its value reaches 2,000,000,000,000 ms.

Example of use:

In this example, we want to measure over several cycles of a program, the time required to achieve an absolute positioning of 2.5mm.

ChronomètreUtilisationPP2 english

Figure 3: Using the stopwatch instruction