The primary function of Pacinian corpuscles is to detect rapid changes in mechanical pressure and vibration. When the corpuscle is deformed by an external stimulus, the mechanical pressure is converted into an electrical signal by the nerve ending. This signal is then transmitted to the central nervous system, where it is interpreted as a sensation of pressure or vibration.