Hi,
I am working on a cnc plasma machine controlled by mach3. All motors are leadshine closed loop.
If the drives go into error, I want the machine to stop all motion until that error is fixed.
I wired the fault output of the drives to 4 different inputs. In ports & pins I configured them as input #1 to #4.
Can anyone help me on how to generate different errors for different drives, and to block all motion until the error is fixed.
Should this be done in the macropump? And what would the code look like?
I should tell that I have no experience with VB scripts yet, and only little with mach3 so far.
EDIT:
Would it look something like this:
It's not doing exactly what I want it to do though, but I don't want you guys get the feeling I'm not trying anything myself.If Not IsEStop() And IsActive(INPUT1) Then
DoOemButton(1021)
Message "ERROR: X-axis drive fault (master rail axis)"
End If
If Not IsEStop() And IsActive(INPUT2) Then
DoOemButton(1021)
Message "ERROR: XX-axis drive fault (slave rail axis)"
End If
If Not IsEStop() And IsActive(INPUT3) Then
DoOemButton(1021)
Message "ERROR: Y-axis drive fault (transverse axis)"
End If
If Not IsEStop() And IsActive(INPUT4) Then
DoOemButton(1021)
Message "ERROR: Z-axis drive fault (torch height axis)"
End If
What I want it that only when the system is not in e-stop mode, and the input is high, then the message should come and the machine should go back into e-stop.
If the system is already in e-stop, I want nothing to happen. What I see with this code is that when I play it once, I see a message "EStop Button Pressed. Then when I play again the E-stop is removed and then my previous error message is shown.
So apparently the e-stop message is always on top of other messages. How can I display my error message and let the machine stop everything, as if it was on E-stop.
I don't want to make a separate DRO for the error message, if that is even possible...
Regards,
Sascha