Oke, haven't been waiting but have been trying myself as well.
This is what I came up with so far, and it seems to be working.
I placed this in the Macropump...
If the error output of the drive triggers one of the inputs, and the machine is not in e-stop already, then OemButton( 1021 (e-stop) is activated and the machine goes to e-stop.'================================================= =
' Check Alarm outputs of drives, generate e-stop
'================================================= =
If IsActive (INPUT1) And Not IsEstop() Then
DoOemButton(1021)
Sleep 500
Message "Error X-axis (Master rail) drive fault"
Sleep 500
End If
If IsActive (INPUT2) And Not IsEstop() Then
DoOemButton(1021)
Sleep 500
Message "Error XX-axis (Slave rail) drive fault"
Sleep 500
End If
If IsActive (INPUT3) And Not IsEstop() Then
DoOemButton(1021)
Sleep 500
Message "Error Y-axis (Transverse) drive fault"
Sleep 500
End If
If IsActive (INPUT4) And Not IsEstop() Then
DoOemButton(1021)
Sleep 500
Message "Error Z-axis (Torch height) drive fault"
Sleep 500
Else
End If
After 500ms the message will overwrite the e-stop message on the status line, and the real error is visible.
Still have a minor problem, when the machine goes to e-stop like this, it is like if it is trying to get itself out of e-stop.
I head the other motors trying to engage every second or 2.
Is there a way how to prevent this?
For those interested, I also edited the homing routine to automatically enable the softlimits if they are not already enabled.
'================================================= ======
'Homing routine
'================================================= ======
'Home the machine
Message "PLEASE WAIT: MACHINE IS REFERENCING"
DoOEMButton(1024) 'Z-axis
DoOEMButton(1023) 'Y-axis
DoOEMButton(1022) 'X-Axis
While IsMoving()
Sleep 100
Wend
'Move the machine away from homing switch
Code "G0 F3000"
Code "G1 F3000"
Code "G91"
Code "G1 X10 Y-10"
Code "G90"
While IsMoving()
Sleep 100
Wend
'Check softlimits enabled, if not enable them
If Not GetOemLED(23) Then
DoOemButton(1029)
Message "Homing completed, Software limits enabled."
Else
Message "Homing completed."
End If
Sleep 1000
Message ""