Raymond van Barneveld remained on course for a Premier League semi-final spot with a hard-fought 7-5 victory over Andy Hamilton in Sheffield.