From memory, On the shaft that holds the X-Wing, I think that there is a cam below the playfield that has a switch that rides against it. I believe that switch determines when the cannon can fire. And I think the cannon can only fire at the drop targets. I'm not sure what else you are trying to shoot at. Or, why it would not shoot during certain modes.
I hope that helps.
Best regards,
Tom