Hi All
Let me first say to all beginners MAKE SURE YOU READ THE CYPRESS ENABLE AND MACH3 PROGRAMMERS REFERENCE PDF'S CAREFULLY!!!!!!
After going back and reading these for the millionth time I found I had made a few mistakes mainly "IsActive(OUTPUT1)" instead of "IsOutputActive(OUTPUT1)"
and "IsActive(OEMTrigger1)" instead of "IsActive(OEMTrig1)" Silly dumb monkey

Anyway here is the code that actually works
Sub main()
'i=i+1
'message "Macro Running #"&i
If GetOEMLED(851) And GetVar(1) = 0 Then 'check enable6 is active and variable UserDRO(1000) is not active
DoOEMButton(1001)
ActivateSignal(OUTPUT1)
'Sleep (6000) 'Do button Feed Hold (pause motion on machine)
End If
If IsOutputActive(OUTPUT1) And IsActive(OEMTRIG1) Then 'check output1 and oemtrigger1 (RTG) are active
DoOEMButton(1000)
SetVar(1,200) 'Set cycle start when they are active
'Set variable UserDRO(1000) to 1 or high
End If
If IsOutputActive(OUTPUT1) And Not IsActive(OEMTRIG1) And GetVar(1) = 200 Then
DoOEMButton(1001)
End If
If Not GetOEMLED(851) Then
DeActivateSignal(OUTPUT1)
End If
'If IsActive(OUTPUT1) And (GetUserDRO(1000) = 1) And Not IsActive(OEMTRIG1) Then 'check output1 is true and variable userdro(1000) is 1 and OEMTrigger1 is False
'DoOEMButton(1001) 'press feed hold button if RTG Drops away
'GoTo flameout 'proceed to flameout routine
'End If
End Sub
It doesn't do exactly what I want but it is a start so will keep you all posted!