PLC Program Help splitting Mist and Clamp functions (Answered)
Posted: Wed Dec 26, 2018 6:43 pm
Working on modifying my PLC program (v6 for CNC12 AllIn1DC) for the new mill and I'm trying to split the mist coolant and rotary table clamp functions. I have mist on OUT4 and clamp on OUT9.
I'm not sure how to handle the rotary table clamped feedback signal which is on INP8 or how to handle the M11 unclamp command.
Code: Select all
.
.
.
RotaryTableHome IS INP8 ;RTB 12/28 - DoorClosed IS INP8
RotaryTableClamped IS INP13 ;RTB 12/28 - SpinLowRange IS INP13
;spare RTB 12/28 SpinMedRange IS INP14
;spare RTB 12/28 SpinHighRange IS INP15
;spare IS INP16
.
.
.
Mist IS OUT4 ;RTB 12/26 - MistOrClamp IS OUT4 ;SPST Type Can be configured for Mist or Clamp
InverterResetOut IS OUT5 ;SPST Type
WorkLightOut IS OUT6 ;SPST Type
SpindleEnableOut IS OUT7 ;SPST Type
SpindleDirectionOut IS OUT8 ;SPDT Type
RotaryTableClamp IS OUT9 ;RTB 12/26 - ZBrakeRelease IS OUT9 ;SPDT Type
.
.
.
;RTB 12/26 split mist coolant (out4) from clamp (out9)
;;--Mist coolant on/off
;IF !ClampEnabled_M && (CoolMistKey || KbMistOnOff_M) THEN (CoolantMistPD)
;IF (ClampEnabled_M && M10) || (!ClampEnabled_M && (((Mist ^ (!CoolAutoModeLED && CoolantMistPD))
; || CoolAutoModeLED && M7)
; && !(SV_STOP ||
; CoolAutoModeLED && !M7 ||
; ErrorFlag_M ||
; DoToolCheck)))
; THEN (Mist), (CoolMistLED), (SelectCoolantMist)
;
;IF ClampEnabled_M THEN RST CoolMistLED, RST SelectCoolantMist
;--Mist coolant on/off
IF CoolMistKey || KbMistOnOff_M THEN (CoolantMistPD)
IF ((Mist ^ (!CoolAutoModeLED && CoolantMistPD))
|| CoolAutoModeLED && M7)
&& !(SV_STOP ||
CoolAutoModeLED && !M7 ||
ErrorFlag_M ||
DoToolCheck)
THEN (Mist), (CoolMistLED), (SelectCoolantMist)
; Rotary Table Clamp on/off
IF (ClampEnabled_M && M10) THEN (Clamp)
.
.
.