Program to control pellet delivery