System for detecting at least one mechanical locking position of a drill string in a soil drilling machine; said machine comprising: - a mast; - a rotary which is mounted so as to slide along said mast; - a winch around which a flexible pulling member is able to be wound; - a drill string which is capable of being caused to rotate by said rotary, which crosses said rotary, and which hangs from said flexible pulling means; said drill string comprises at least one pair of kelly rods (20A, 20B; 20B, 20C) which are axially slidable inside one another so as to be moved to at least one mutual mechanical locking position, in which said drill string is at least partially supported by said rotary and said at least one pair of kelly rods (20A, 20B; 20B, 20C) is designed to move from a decoupled condition, in which a transmission of a downward thrust between said kelly rods (20A, 20B; 20B, 20C) is prevented and a mutual sliding is allowed, to a coupled condition, in which a transmission of a downward thrust between said kelly rods (20A, 20B; 20B, 20C) is allowed substantially without mutual sliding; the movement from said decoupled condition to said coupled condition occurring when said rotary causes said drill string to rotate in a drilling rotation direction; said system comprising: - sensor means for detecting first data indicating the position assumed by the top of the drill string and second data indicating the position assumed by the bottom of said drill string; - a control unit which is configured to calculate the estimated length of said drill string based on said data and to compare said estimated length with at least one reference length value, wherein said at least one pair of kelly rods (20A, 20B; 20B, 20C) is in said at least one mechanical locking position; and - signaling means which are configured to signal when said estimated length corresponds to said at least one reference length value. - a mast; - a rotary which is mounted so as to slide along said mast; - a winch around which a flexible pulling member is able to be wound; - a drill string which is capable of being caused to rotate by said rotary, which crosses said rotary, and which hangs from said flexible pulling means; said drill string comprises at least one pair of kelly rods (20A, 20B; 20B, 20C) which are axially slidable inside one another so as to be moved to at least one mutual mechanical locking position, in which said drill string is at least partially supported by said rotary and said at least one pair of kelly rods (20A, 20B; 20B, 20C) is designed to move from a decoupled condition, in which a transmission of a downward thrust between said kelly rods (20A, 20B; 20B, 20C) is prevented and a mutual sliding is allowed, to a coupled condition, in which a transmission of a downward thrust between said kelly rods (20A, 20B; 20B, 20C) is allowed substantially without mutual sliding; the movement from said decoupled condition to said coupled condition occurring when said rotary causes said drill string to rotate in a drilling rotation direction; - sensor means for detecting first data indicating the position assumed by the top of the drill string and second data indicating the position assumed by the bottom of said drill string; - a control unit which is configured to calculate the estimated length of said drill string based on said data and to compare said estimated length with at least one reference length value, wherein said at least one pair of kelly rods (20A, 20B; 20B, 20C) is in said at least one mechanical locking position; and - signaling means which are configured to signal when said estimated length corresponds to said at least one reference length value.