Custom Input names and functions

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
kman1967
Posts: 46
Joined: Wed Feb 16, 2022 2:09 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Custom Input names and functions

Post by kman1967 »

In the Wizard when configuring inputs there is a custom section. Is there a tech note or instructions on how to add custom names and functions?
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Custom Input names and functions

Post by cnckeith »

canned i/o names and functions can be added to the wizard. you'll have to learn how to program Centroid's PLC language if you want to do more than just rename an existing input or output name in the Wizard.

please tell us what you are trying to accomplish so we can give good advice.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
kman1967
Posts: 46
Joined: Wed Feb 16, 2022 2:09 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Custom Input names and functions

Post by kman1967 »

Right now I would just like to add custom names.
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Custom Input names and functions

Post by cnckeith »

kman1967 wrote: Wed May 31, 2023 3:49 pm Right now I would just like to add custom names.
ok, please give an example
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
kman1967
Posts: 46
Joined: Wed Feb 16, 2022 2:09 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Custom Input names and functions

Post by kman1967 »

Turn on an input when a vision system detects something wrong with an operation
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Custom Input names and functions

Post by cnckeith »

kman1967 wrote: Wed May 31, 2023 8:20 pm Turn on an input when a vision system detects something wrong with an operation
and what would you like CNC12 to do when that input closes?

and if i knew more about the system/machine..would be really helpful.
http://centroidcncforum.com/viewtopic.php?f=60&t=1043
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Custom Input names and functions

Post by cncsnw »

Since he already said he did not need custom PLC logic, presumably he is going to test in in CNC codes with M100/M101 or IF[#500xx].

The only reason to have the input defined in the PLC program at all, is for the documentation benefit, and so that the name will appear on the Alt-i screen and in PLC Detective.

The simplest way to do it is simply to edit it into your PLC program source. Leave the input unassigned in the Acorn Wizard, then add your input definition just outside the "#wizardregion" block of input definitions. E.g:

Code: Select all

; DO NOT MODIFY
; #wizardregion Inputs
EStopOk                   IS INP1
SpindleOk                 IS INP2
VFDZeroSpeed              IS INP3
;...
ToolIsUnclamped           IS INP41
ToolUnclampButton         IS INP42
; #endregion

; Inputs not defined in the Wizard
DustFootIsUp              IS INP38
ToolIsClamped             IS INP40
Of course, if you do a fresh install of a new version of Acorn CNC12, you will have to take steps to merge your custom definitions into the new standard PLC program.

Another alternative is to edit your C:\cncm\resources\wizard\default\plc\functions.xml file, to create one or more new "PlcFunction" blocks describing the tokens you want to create. Then you should be able to access them interactively in the Wizard, and drag them onto inputs or outputs as needed.

In that case, if you install a new version of Acorn CNC12, you will have to take steps to merge your custom definitions into the new functions.xml file.
cnckeith
Posts: 7166
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Custom Input names and functions

Post by cnckeith »

thanks, i just wanted more details before i go off and do a big write up guessing at the goal that may not be applicable. as often i find that jumping to conclusions about editing the PLC program is completely unnecessary when you find out specifically what the user is trying to accomplish. :D
i still don't know what the heck the goal is. so i could theorize and provide how to advice on that but, i like better to understand and discuss the practical application/function that is desired and provide solutions to those specifics. :o
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
Post Reply