Sample controller