I got it!!!!!!!!! It was all about that pin 13 mixup. Pin 13 is for the A limit and pin 15 is for E Stop. Of course having disabled the A axis to try and get it all working made it look like the E Stop was working, but it was actually giving the A axis over travel signal. So I have switched the pins in the input signals and now it all works.
BUT, I haven't messed with the script in the 'all home' button, and when activated all 3 axes move together. How do I change this to the default of 1st Z then Y then X. I don't want to crash cutters.
I have attached the latest xml, if that helps.