PLC Preventing MPG Movement <<Answered>>

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
tblough
Posts: 3072
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

PLC Preventing MPG Movement <<Answered>>

Post by tblough »

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:

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

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:

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)
Can a PLC guru provide me some direction on how to inhibit MPG movement on Axis 3 when the quill is disconnected?

Thanks,


Tom
Last edited by tblough on Thu Jan 04, 2018 5:48 pm, edited 2 times in total.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
Centroid_Tech
Posts: 286
Joined: Thu Mar 18, 2010 2:24 pm

Re: PLC Preventing MPG Movement

Post by Centroid_Tech »

Tom,

Not exactly sure what this logic "QuillBallnutClamped ^ InvQuillClampSwitch_M" is for but as long as you have an input that tells the control when the quill is in manual mode, let's call it ManualQuill then all you need is the following logic.

IF MPG_AXIS_1 || MPG_AXIS_2 || (MPG_AXIS_3 && !ManualQuill) ||
MPG_AXIS_4 || MPG_AXIS_5 || MPG_AXIS_6 || MPG_AXIS_7 || MPG_AXIS_8
THEN (SV_MPG_1_ENABLED)

If you don't have a physical switch then you can do it by setting a memory bit, ManualQuill_M, or even using an AUX button. You just need to make sure that the memory bit gets reset whenever you are in 3-axis mode.
When requesting support, please ALWAYS post a current report. Find out how to take a report from your Acorn, CNC11 or CNC10 system here: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

If your question is PLC, Macro or program related, please also post a copy of the program or macro as well.

Without the above information we may not be able to help and/or reply until the required information is posted..
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: PLC Preventing MPG Movement

Post by cncsnw »

That looks like the allin1dc-basic-elrod.src program, which works with Dwayne's quick disconnect.

There is a micro switch which, if adjusted correctly, will open when the block is unclamped from the ballnut. The switch is probably on INP13, but might be on INP7 or a different one.

InvQuillClampSwitch_M is bit 13 of Parameter 178 (+8192), which should be set only if the switch functions backwards (closed when unclamped).

The proposed PLC logic should work just fine. If it is not working, check the Alt-i diagnostic page to see whether the QuillBallnutClamped input changes correctly when the ballnut is unclamped and clamped.
tblough
Posts: 3072
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: PLC Preventing MPG Movement

Post by tblough »

Thanks CNCSW - your post put me on the right track. I really thought the code should be working and it turns out it does. My quill switch was adjusted right on the edge so that every other time it would not register the quill unclamp. I just happened to test my modified PLC program on one of those times causing much head banging and hence the post. Switch is now adjusted correctly and life is good.

You are correct that this is one of Dwayne's Z drives. I've contacted him a few times in the past about this problem with no luck. Just happens that I'm working on the PLC code for my Hardinge lathe conversion so I thought I'd try and tackle a few things on the mill PLC that have been bothering me as a learning experience.

If anyone else runs into this problem, the MPG 1 Enable code above does correctly work.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
Post Reply