Code for FZ control