Finally, to scan across a small area of the sample, rapid left right bending of the piezo is combined with a slow charging and discharging of the front and back contacts. This causes the tube to bend slowly back to front as the cantilever is swept rapidly side to side.
The same circuit that drives the bending (and hence scanning) electrodes also controls position of the beam on the right computer monitor of the SPM. The intensity of that beam is then scaled by the voltage on the bottom electrode of the piezo (which, as explained above, records the height of the sample).