The present invention relates to a safety system for use in protection functions, which system prevents that an error in one control circuit do not result in a function failure by using supervising functions comprising at least two sensors connected to a monitoring unit which receives and processes information about a position of a machine from both sensors and compares the results with stored values and a number of input conditions for the monitoring unit, whereby said sensors comprise means for generating data with respect to a position of a machine movement and said monitoring unit comprises means, which with respect to the result of the comparison is arranged to stop a machine movement if conditions for a stop are fulfilled. The monitoring unit is arranged to compare values from said sensors and when detecting deviating value from either one of sensors detecting a functional error with the sensors.