I have my preheat and cut solenoids working very well in place of the flood and mist. (see previous thread viewtopic.php?f=60&t=1354)
The m code works great in auto mode and the keyboard works great in manual. But now I want to be complicated and develop a hybrid mode. I would like to be able to manually operate them at the start of the cut and have the m code shut them off at the end. I tried creating new macros and mapping the function keys to the outputs hopping that I would avoid the inherent limitations of the coolant keys. I successfully mapped the keys to the outputs, but there were two problems. One is that I prefer the toggling of the coolant buttons one button both on and off. When I used an AUX key I needed to use separate keys for on and off. The other problem is that the AUX keys did not function while the program was active. I assume that both of these problems are because I have no idea what I am doing.
So what I am asking is it more feasible to allow simultaneous manual and auto control of the coolant function or to enable manual control of an AUX key during the running cycle?
I tried playing around in the PLC code a bit, hoping to remove the restrictions between auto and manual but it's over my head. This is the area I was experimenting in.
Code: Select all
;--Coolant Functions ;--Toggle auto coolant mode IF CoolAutoManKey || KbTogCoolAutoMan_M || SkinCoolAutoMan_M THEN (CoolantAutoManualPD) IF (!CoolAutoModeLED && CoolantAutoManualPD) || OnAtPowerUp_M THEN SET CoolAutoModeLED IF (CoolAutoModeLED && CoolantAutoManualPD) THEN RST CoolAutoModeLED ;--Report coolant mode to CNC12 IF CoolAutoModeLED THEN (SelectCoolAutoMan) ;--Display coolant mode message ;changing to auto coolant mode ;2050 Auto Coolant Selected 2 + 50*256 IF (!CoolAutoModeLED && CoolantAutoManualPD && AllowKbInput_M) THEN InfoMsg_W = AUTO_COOL_MSG ;changing to manual coolant mode ;2051 Manual Coolant Selected 2 + 51*256 IF (CoolAutoModeLED && CoolantAutoManualPD && AllowKbInput_M) THEN InfoMsg_W = MAN_COOL_MSG ;--Flood coolant on/off ; ; Toggle on/off or off/on if: ; In manual mode and a toggle key was pressed ; Turn on if: ; In auto mode and have M8 ; Turn off if: ; Any fault or error ; In auto mode and don't have M8 ; Doing tool check (?) IF CoolFloodKey || KbFloodOnOff_M || SkinCoolFlood_M THEN (CoolantFloodPD) IF ((Flood ^ (!CoolAutoModeLED && CoolantFloodPD)) || CoolAutoModeLED && M8) && !(SV_STOP || CoolAutoModeLED && !M8 || ErrorFlag_M || DoToolCheck) THEN (Flood), (CoolFloodLED), (SelectCoolantFlood) ;--Mist coolant on/off IF (CoolMistKey || KbMistOnOff_M || SkinCoolMist_M) THEN (CoolantMistPD) IF ((Mist ^ (!CoolAutoModeLED && CoolantMistPD)) || CoolAutoModeLED && M7) && !(SV_STOP || CoolAutoModeLED && !M7 || ErrorFlag_M || DoToolCheck) THEN (Mist), (CoolMistLED), (SelectCoolantMist)