Here is a "Puller Macro", it assumes that you have constant pressure to feed your stock forward. You would put this macro right before the M30.
it also assumes that your stop plate has a push in trigger switch or some other way to tell the stock has made contact with the stop. You would set the Stop at a certain X, Z position (that would obviously be out of the tool path). You will need to open the Macro in the VB scripter and set the X, Z position for your stop. It will also use OUTPUT5 and 6 (hopefully outputs that you arnt currently using, if you are you will need to change these, make sure to enable them in ports and pins under outputs, and set what port pin you want them to activate, same for the Input. I will use INPUT4 for your Stop Switch). You may have to adjust the pause times as well they are in seconds.
here is the Macro, open up VB scripter and paste it in, do a save as M800 for instance.
Sub Main()
'M800.m1s Bar Stock Feeder
'OUTPUT5 is open collet, OUTPUT6 is close collet, INPUT4 Barstop signal
Dim StopPositionX, StopPositionZ
StopPositionX=4 'Stop location in X axis in machine coordinates
StopPositionZ=4 'Stop location in Z axis in machine coordinates
Code "M5" 'Stop Spindle
Code "G0 G53 X" & StopPositionX & " Z" & StopPositionZ
While IsMoving()
Wend
ActivateSignal(OUTPUT5) 'Open collet
Code "G4 p2" '2 second pause give stock time to move forward
While IsMoving() 'Give more or less seconds depending feed forward time
Wend 'I didnt use a wait for or a while statement so not to tie you your processor.
If Not(IsActive(INPUT4)) Then
Message("------Stock did not move forward, check stock feed, abort feed op.")
Exit Sub
End If
ActivateSignal(OUTPUT6) 'Close collet
Code "G4 p1" '1 second pause gives collet time to clamp
While IsMoving() 'Give more or less seconds depending on closure time.
Wend
End Sub
'Let me know how it works out
'Scott