Thanks dennis and BJD1613, i have already wired the enum to a case structure. It does the job, but with a slight delay as a result of the location i put the case structure in (at the begining of the main program, which runs in a while loop, if it's at the end it waits until the next iteration of the while loop to interupt the running of the program). I will have to modify it and try the event structure and run the main program in one of the event structures. Thanks for your help, and hope you have had some coffee today BJD1613.