T-n-T: Value change detector

The problem

It is required to determine the fact and magnitude of the change in value.

The solution

The solution (diagram).

At each cycle of the diagram execution, the difference is determined between the values of the network “input data” on the previous one, saved using the “Buffer” block, and the current pass. When the input data changes, their difference is determined, which is stored using trigger D into the “difference / delta” network, and the “change” network takes the value “1” in one pass of the diagram, indicating the presence of changes in the input data.