In order for the Acorn PLC template to work, we must define all possible inputs/outputs as memory bits so the plc does not fail when we compile it. Think of the memory bits as just “placeholders” for inputs/outputs that are unused. Here’s an example from his report:
Define BackGear as an input using the Wizard and you get...
Since we cannot have two definitions, the Wizard comments out the placeholder memory bit definition for BackGear:
FourthAxisPlusLimitOk IS MEM215 ;&*;
;BackGear IS MEM216 ;&*;
ProbeTripped IS MEM217 ;&*;
And along with removing the placeholder memory bit, we need to comment out where it gets set/reset:
;IF True THEN RST BackGear, SET SpinLowInputDisabled_M ;&*;
IF True THEN SET LubeOk ;&*;
IF True THEN SET SpindleOk ;&*;
This is the process for every single input/output in Acorn. A hint for seeing things that are touched by the Wizard is the ;&*; token at the end of each line.
ok.. we fixed the "backgear" logic in the Acorn Wizard template file. please find attached the revised Acorn PLC source template used by the wizard.
with cnc12 and the wizard closed.. copy this file to the cncm\ wizard \ resources \ template directory
and overwrite the one that is there.
and then start cnc12 and start the wizard and set any input as "backgear" and wire up the switch to that input.
be sure to set the Low range ratio as a negative value.
Thank You Keith for your help and the sharing of knowledge. This information is very helpful in understanding what is going on in the background when using the wizard. I will try this fix today and post the results.
When input 6 is pulled low, the control switches to spindle low gear and the rpm display changes to the low gear scale.(-125) and the VFD signal changes from forward to reverse as it should.
The issue now is:
When input 6 goes high the spindle gear does not change to high. If you use the high gear button on the VCP it changes to the high gear and the display and VFD rotation output changes to forward as it should. Seems like something is missing in the PLC to recognize the state change of input 6 from low to high and then making the changes from low gear to high gear.
whoops..left out logic for the release of the switch!
try this one attached and report back.
and remember once you configure a backgear switch, that switch "takes control" of the range buttons on the VCP...so in essence the spindle gear range buttons on the VCP turn into Indicator lights and are not used to select the range..the switch is used to select the range.