Help neaded - homming

Hello,
I am new user of UCCNC and therefore I nead some litle help
My controler electronics requires folowing to work ok:
-while homming, before start of homming procedure I nead to set one output pin high. This output is high whole time during homming of axes. After homming is finished, output goes again low (sopsouse it can be easely made with macro - please an example of it)
-for security reason, I nead to implement pull of (backing of) from limit switches after hitting the limit switch while homming (lets say 2mm back from actual homme position and from this new point is working / absolute 0 for CNC system).
Do anyone have example codes how to do this?
Thank you.
BR
I am new user of UCCNC and therefore I nead some litle help

My controler electronics requires folowing to work ok:
-while homming, before start of homming procedure I nead to set one output pin high. This output is high whole time during homming of axes. After homming is finished, output goes again low (sopsouse it can be easely made with macro - please an example of it)
-for security reason, I nead to implement pull of (backing of) from limit switches after hitting the limit switch while homming (lets say 2mm back from actual homme position and from this new point is working / absolute 0 for CNC system).
Do anyone have example codes how to do this?
Thank you.
BR