Work function of magnesium using CASTEP

I want to find the work function of Magesium using CASTEP in Materials Studio 4.3

The Materials Studio CASTEP Online Help

http://www.tcm.phy.cam.ac.uk/castep/documentation/WebHelp/CASTEP.html?page=Html%2FtskCastepSetWorkfunction.htm

website shows some steps on setting up a work function calculation.

I tried following those steps, but was not able to get the output. Also I have no idea on the settings to be used for the procedure.

Please provide me the steps(procedure) to find the work function of Magnesium or any similar tutorial.

Thanks