ZStackToolTM - Software for Acquisition of Z-Stacks of Images
ZStackTool controls two programs: LiftTool and Canon Remote Capture. LiftTool runs in the background and provides communications with the motor controller of the Focus Drive with Integrated Controller and optionally with the joystick. Remote Capture is used to set camera parameters and specify destination for image files. During Z-stack acquisition ZStackTool commands LiftTool to move the focus drive by a given step, waits for completion, commands Remote Capture to grab an image, and waits for specified amount of time for image transfer.
Download ZStackTool.zip as Visual Basic source code. Of course, other programs and other cameras could be used to capture Z-stacks of images. The source code can serve as an example.