Function Block MEDIA_SEEK

The function block MEDIA_SEEK calculates the position of the track based on the runtime. In addition, the position can be set.

Input SET_POS

The input defines a position from 0 to 255. When the value is changed, the output SEEK is set with a pulse after the time of PT_DELAY has elapsed.

This input can be fed back by a function block VISUVAR with the value from the output POS.

Input SET_TIME

The input synchronizes the calculated time with the interface.

Input DURATION

Defines the total runtime in T# of the track for calculating the position POS.

Input PLAY

If the input is true, the track is played and the calculation is continuously continued. If the input is false, the position is calculated immediately and the continuous calculation is stopped.

Input SET

The input sets SET_TIME directly, even if the number does not change.

Input PT_DELAY

The input defines the time T# of the delay for setting the SEEK output.

Output POS

The output defines the position of the track from 0 to 255 based on the runtime DURATION. The output is recalculated at an interval of one second.

Output TIME

The output returns the current playback time in T#.

Output SEEK

The output is set for one cycle to the new position after PT_DELAY has elapsed when fast-forwarding a track. Otherwise, the output is equal to NULL.

Output ET

The output counts up when POS was changed. For one cycle, ET equals PT_DELAY when setting the output SEEK.

Example