Thanks for that, some great tips there,
There is a logic to my reason for experimenting here -
1 - I was going to buy an Ohmic kit for my table until i realised they will not work on the 30A consumables on my PM45 as the nozzle is not shielded so no ohmic contact to connect with the plate surface.
2 - It was suggested to fudge a contact for the 30A setup by adding a contact or stud, but as the cut height is a mere 0.5mm here this sounds a recipe for pulling the torch off mid-cut.
3 - Then i found a capacitive height sensor - this looked good but only went to 1mm min and would likely not be too happy about sensing near the edge with half the sense ring having no metal below, plus the accuracy was listed at +/-0.5mm so not that good.
4 - I like experimenting

The solenoid was just a suggestion, my favoured device would be a small air cylinder - these can be controlled, damped, etc so no need to ram it in and out, you can also have a nice controlled in-stroke and rapid return easily. Air is on hand nearby so seems an ideal choice, a 50mm stroke ram at 45deg should give clearance to the torch when cutting i think.
My M1100.m1s looks like this now
Dim Switchoffset
Switchoffset = GetOemDRO(1045)
If Switchoffset > 0 Then
ActivateSignal(Output2)
Code "G28.1 Z3.000"
Code "G92 Z 0.000"
DeActivateSignal(Output2)
Code "G00 Z " & Switchoffset
Code "G92 Z 0.000"
While IsMoving()
Wend
Else
MsgBox("Your Z Switch Offset value in MACH needs to be set")
Code “M30”
End If
I think that gets the important bits in the right places and does away with the M-code for relay control.
Is there a code to replace the M30 with?? Or just ignore that one??
Might need a short delay here and there, who knows?
I'm not too worried about sharing code, my post processor is already heavily tailored to my system anyway, if i needed to share i could just send the dxf file.