We have developed a distance modulated protocol for scanning ion conductance microscopy to provide a robust and reliable distance control mechanism for imaging contracting cells. The technique can measure rapid changes in cell height from 10 nm to several micrometers, with millisecond time resolution. This has been demonstrated on the extreme case of a contracting cardiac myocyte. By combining this method with laser confocal microscopy, it was possible to simultaneously measure the nanometric motion of the cardiac myocyte, and the local calcium concentration just under the cell membrane. Despite large cellular movement, simultaneous tracking of the changes in cell height and measurement of the intracellular Ca2+ near the cell surface is possible while retaining the cell functionality.