OneShot('Expression')

Arguments

'Expression'

Signal to be monitored for changes.

Description

This function returns the result TRUE, if the current value of 'Expression' is not equal to the previous one. It returns the result FALSE, if the current measured value is equal to the previous one. The function also supports text signals.

Therefore, the function can be used to detect changes in the value of analog signals and edges of digital signals.

Application example

Use as a reset signal when calculating strip length using the integral function

INT (IF([tracking_ID] = 0, 0,[speed] ), OneShot([tracking_ID]))

If the tracking ID is zero, nothing is integrated (0). If the tracking ID is not equal to zero, the speed [speed] is integrated. If the tracking ID changes at the beginning of a new strip (tracked part), OneShot generates a pulse (TRUE for one cycle) which is used to reset the integral and thus the length value to zero.

The figure shows the example in the expression builder.