I wired my Feed hold to the front panel of my lathe and configured it to work in the wizard. I have since written/rewritten a Custom ATC turret script.
How do I change controller to recognize both the hard button, and the VCP and Wireless MPG for the feed hold and tool check without going into the wizard?
I tried going to the CNC12 Parameters .pdf but the link seems to be broke.
Re: Feed hold parameter?
Posted: Tue May 26, 2020 9:55 pm
by cncsnw
You modify your PLC program source, so that whatever input you wired the button to is named "FeedHold2", and whatever memory definition "FeedHold2" is parked on, is commented out. Then you recompile your PLC program.
Re: Feed hold parameter?
Posted: Tue May 26, 2020 11:51 pm
by frijoli
cncsnw wrote: ↑Tue May 26, 2020 9:55 pm
You modify your PLC program source, so that whatever input you wired the button to is named "FeedHold2", and whatever memory definition "FeedHold2" is parked on, is commented out. Then you recompile your PLC program.
Not sure I followed that. Just comment out Feedhold2 ?
Re: Feed hold parameter?
Posted: Wed May 27, 2020 12:28 am
by cncsnw
If you look through a few sample Acorn PLC programs, you will see how the Wizard works.
All of the possible features that might be wired to physical inputs and outputs, or might not (depending on your choices in the Wizard) are defined on memory bits. Logic in the main stage of the PLC program generally RSTs (and in a few cases, where appropriate, SETs) the memory bits for features that are not actually in use. When you tell the Wizard that you want to use a feature, then it puts a definition for that named feature on one of the physical input or output locations (e.g. INP1 - INP8 or OUT1 - OUT8) and comments out the corresponding memory definition.
So, if you were to use the Wizard to say that you wanted a second Feed Hold button wired to INP3, then the Wizard would insert:
In any event, whether you actually have a second feed hold button wired in and assigned, or whether you just have the default memory definition, there is logic later that says:
IF (FeedHoldKey || KbFeedHold_M || SkinFeedHold_M || MpgFeedHold_M || FeedHold2) THEN (FeedHoldPD)
IF FeedHoldPD || ActivateFeedHold_M ||
(FinalFeedOverride_W < P146Value_W && !OnAtPowerUp_M)
THEN SET FeedHoldLED
So, the bit named "FeedHold2" is tested as a possible contributor to setting the Feed Hold condition, whether it is INP3 or MEM273 (or anything else).
So, if you cannot use the Wizard because you have a specialized PLC program, you can still "activate" an external feed hold button just by choosing an input, adding the appropriate input assignment, and removing the preexisting memory bit assignment.