Patent ID: 8347555

Claim:
A safety fence, comprising: a door unit; a locking unit mounted on the door unit to detachably lock the door unit; a switching mechanism mounted on the door unit and connected with the locking unit to lock and unlock the locking unit; and a positioning and restoring unit mounted on the door unit to position the door unit when the door unit is movable from an original position to a predetermined position and to restore the door unit to the original position when the door unit is not disposed at the predetermined position; wherein the door unit includes: a first rail; a second rail spaced from the first rail; and a door having a first end pivotally connected with the first rail and a second end detachably locked onto the second rail by the switching mechanism and the locking unit; the locking unit is mounted between the second rail and the door; the switching mechanism is mounted between the second rail and the door; the positioning and restoring unit is mounted between the first rail and the door; the locking unit includes: a retaining member mounted on a lower end of the door; and a locking member movably mounted on a lower end of the second rail and detachably locked onto the retaining member; the switching mechanism includes: a first housing mounted on an upper end of the second rail; a limit track mounted on the first housing; a second housing movably mounted on an upper end of the door; a positioning shaft mounted on the second housing to move in concert with the second housing and detachably limited in the limit track; a link pivotally mounted on the second rail and having an upper end provided with a driven arm and a lower end provided with a drive arm connected with the locking member to move the locking member relative to the retaining member; a first magnet movably mounted on the first housing and connected with the driven arm of the link to move the driven arm of the link; a second magnet secured on the second housing and repelling the first magnet to move the first magnet; a stop sleeve fixed on the upper end of the door and disposed in the second housing; a return spring biased between the stop sleeve and the second housing to push the second housing toward the first housing; a control handle pivotally mounted on the second housing and having a first end provided with a locking hook detachably locked onto the stop sleeve and a second end provided with a pressing portion; and a press spring mounted on the second housing and biased between the locking hook of the control handle and the second housing to push the locking hook of the control handle toward the stop sleeve.