PCB mill probe function

Hi All,
I have a PCB mill which uses an Arduino with the Atmel 328F Nano to control it with the Grbl program.
(A Woodpecker CNC mill).
Everything works as should with the exception of the Z-axis Probe function.
Everything I can find states that analog pin 5 controls it, checking the Atmel 328F chip pin 28 shows it is connected to the output header pins marked A5 and it is held high with the internal resistor and goes low when I short the two (A5 and Gnd). But if I run a move command for the Z-axis, shorting the pins has no effect which kinda crimps my plans regarding setting the zero or auto leveling.
Any help appreciated

Do you think that it might help if we saw the code ?
Does the code read the state of A5 ?

This is more a question for a GRBL forum than for an Arduino forum.

Maybe the answer is in the Wiki: Home · gnea/grbl Wiki · GitHub

Of particular interest might be the "Wiring Limit Switches" section of the Wiki: Wiring Limit Switches · gnea/grbl Wiki · GitHub

It looks like the Z-Axis limit switches go on Pin 12, not Pin A5.

Thanks,
Yeah that is using the uno board, the one I have is a custom job with a nano chip. I have since been able to get the probe pins working using other software so it would seem my problem lies in the Grbl program. So I will see what I can get from the grbl ng.
Cheers ..... Mike B

The gcode for grbl probing is like: G38.2 Z-2 F10, where G38.2 is move probe and stop in contact, Z-2 is how far to probe (probing past causes an error), F10 is the probing feed rate. Just moving the Z axis and closing the probe switch will do nothing.