PLC Preventing MPG Movement <<Answered>>
Posted: Tue Dec 05, 2017 3:24 pm
I have a 3-axis mill where the quill can be disconnected from the ballscrew and used manually. The PLC program has code in it to prevent jog moves on the 3rd axis when the ballscrew is disconnected:
The problem is that the MPG is still active and can cause problems by moving the Z axis ballscrew while it is disconnected. I need to disable the MPG in the same manner. I have tried modifying the MPG section below but it does not disable Z mpg movement when the axis is supposed to be disconnected:
Can a PLC guru provide me some direction on how to inhibit MPG movement on Axis 3 when the quill is disconnected?
Thanks,
Tom
Code: Select all
IF (Ax3PlusJogKey || KbJogAx3Plus_M) &&
!(IncrContLED && FinalFeedOverride_W == 0) THEN (DoAx3PlusJog)
IF (Ax3MinusJogKey || KbJogAx3Minus_M) && !Ax3MinusJogDisabled_M &&
!(IncrContLED && FinalFeedOverride_W == 0) THEN (DoAx3MinusJog)
IF (Ax4PlusJogKey || KbJogAx4Plus_M) &&
!(IncrContLED && FinalFeedOverride_W == 0) THEN (DoAx4PlusJog)
IF (Ax4MinusJogKey || KbJogAx4Minus_M) &&
!(IncrContLED && FinalFeedOverride_W == 0) THEN (DoAx4MinusJog)
;------ Unclamped-Quill Jog Inhibit -------------
; If operator tries to jog the Z axis or use Tool Check, but
; the quill ballnut is not clamped, then display a warning
; message and suppress the jog or tool check attempt.
IF (DoAx3PlusJog || DoAx3MinusJog || (DoToolCheck && !SV_JOB_IN_PROGRESS)) &&
!(QuillBallnutClamped ^ InvQuillClampSwitch_M)
THEN RST DoAx3PlusJog,
RST DoAx3MinusJog,
RST DoToolCheck,
InfoMsg_W = Z_DISCONNECT_ERR
Code: Select all
;--MPG 1 Enable
; modified to inhibit movement if quill unclamped - RTB 11/5/2017
;IF MPG_AXIS_1 || MPG_AXIS_2 || MPG_AXIS_3 || MPG_AXIS_4 ||
; MPG_AXIS_5 || MPG_AXIS_6 || MPG_AXIS_7 || MPG_AXIS_8
IF MPG_AXIS_1 || MPG_AXIS_2 || (MPG_AXIS_3 && (QuillBallnutClamped ^ InvQuillClampSwitch_M)) ||
MPG_AXIS_4 || MPG_AXIS_5 || MPG_AXIS_6 || MPG_AXIS_7 || MPG_AXIS_8
THEN (SV_MPG_1_ENABLED)
Thanks,
Tom