Might be a good idea to display the value of .IRBUTTON on a terminal or LCD to see what is going on.