Place derailleur on the smallest cog.
Adjust barrel adjust to half way position.
Slacken off cable with nut/allen bolt on derailleur. Whilst cable is loose, use pliers to pull cable tight(without pulling the derailleur)
Change upto middle gears on cass. Check for smooth up and down shifting- adjust barrel to fine tune shifts.
Once gear shifts are smooth move to set end stops High/Low. Put chain on biggest cog, check Low stop. Then chain on smallest cog, check High stop