Attachment of a safety system to a wall-climbing robot is very important to guarantee safety and reliable work of the robot. Because the safety system is a wire suspension system made of a roof vehicle which can move to and fro, a winding system installed in the vehicle, and a robot itself, sometimes the safety system will swings and vibrates longitudinally just because of slip, failure of a vacuum system, etc. How to control the swing and vibration of the system is studied in the paper. Using variable-structure control techniques, amplitudes of longitudinal vibration and swing of the suspension system can be reduced obviously. So the safety device with variable-structure control system can be used in inspecting and cleaning robots working in dangerous situations.