A suction cup 222 on the end of a piston 221 of a mechanical CPR device can be automatically attached to a patients torso. The mechanical CPR device can extend the piston until a first position at which the suction cup comes into contact with the patient torso. The piston can be further extended to cause air to be forced out from an area between the suction cup and the patients torso until a first threshold is reached. The piston can be retracted until the suction cup is at the first position. The piston can be further retracted from the first position until a second threshold is exceeded. The piston can then be extended to a second point at which the second threshold is no longer exceeded.