I do Index homing in my drives, they are Allen Bradley but I suspect they will work the same way as your Teco drives. I will explain how mine work, I send a signal to the drives to start homing and off they go seeking the home switch, the switch is seen and the motors instantly reverse and seek out the Index pulse, once that is seen then the drives will move a user preset distance and then stop and that is the axis homed. The drive now sends out a signal saying it has homed and Mach sets that as home position. In fact there are quite a few different ways my drives can be configured for homing but that is how I have mine configured.
To do this in Mach I have just altered the VB in the Ref All button, I use ModBUS via my PLC to activate the output and read the input but you could use normal I/O from a parallel port, problem however with that is your drives I/O may be like mine and 24V so you would also have to convert that to the 5v of the parallel port.
The VB I have in my Ref All button is very simple and is as follows. (below is for my lathe, my mill is similar but I have the Y axis also)
DoOemButton (240) 'De-Reference All axis
Sleep(10)
If GetOemLED (809) Then 'Check that Ref Z LED is RED
Do
Call SetModOutput (21,1) 'Activate ModOutPut 20
If GetInput(19) Then Exit Do 'Loop until ModInPut 18 is seen
Sleep (10)
Loop
End If
Call SetModOutPut (21,0) 'DeActivate ModOutPut 20
DoOemButton (1024) 'Set Z axis Home
If GetOemLED (807) Then
Do
Call SetModOutPut (20,1)
If GetInput(18) Then Exit Do
Sleep (10)
Loop
End If
Call SetModOutPut (20,0)
DoOemButton (1022)
Hood