Function description

This function enables a free-running counter, which can be used for run time measurement of sections and application programs.

EN and ENO can be configured as additional parameters.

Run time determination of a section

Determine the run time of a section:

Step

Action

1

Place one FREERUN function at the start of the section and one at the end.

2

Use the execution sequence to ensure that the FREERUN function at the start of the section is executed first and the one at the end of the section is executed last.

3

Calculate the delta of the two values obtained.

Delta displays the run time of the section in microseconds.

Run time determination of a program

Determine the run time of a program:

Step

Action

1

Place a FREERUN function at the start of the first section of the program and one at the end of the last section.

2

Use the execution sequence to ensure that the FREERUN function at the start of the first section is executed first and the one at the end of the section is executed last.

3

Calculate the delta of the two values obtained.

This delta displays the run time of the program in microseconds.

Representation in FBD

Representation:

Representation in LD

Representation:

Representation in IL

Representation:

FREERUN
ST MeasuredTime

Representation in ST

Representation:

MeasuredTime := FREERUN () ;

Parameter description

Description of the output parameter:

Parameter

Data type

Meaning

MeasuredTime

DINT

Shows the time measured since the program started in microseconds.