ADDING HARD CYCLE START BUTTON OAK CNC12 <Resolved>

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
Michael
Posts: 12
Joined: Wed Apr 02, 2025 7:40 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: sys id : 0008DC111213-0321241568 control M39 serial A901431
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

ADDING HARD CYCLE START BUTTON OAK CNC12 <Resolved>

Post by Michael »

Hi,
I'm looking for to add "hard button" on my operator panel, this hard-button must be assign to cycle start, cycle stop, and others kind.
What's easier way to achieve this , I use OAK CNC12 mill controller and software. The hard button are presently connected to PLCCAD1616 and I see the input status changing when pressing them. So hardware is ok. Now, programming and assign. Thanks to help.


cncsnw
Community Expert
Posts: 4565
Joined: Wed Mar 24, 2010 5:48 pm

Re: ADDING HARD CYCLE START BUTTON OAK CNC12

Post by cncsnw »

You need to edit those changes into the PLC program.

For example, supposing you have a normally-open button wired to INP17 (the first input on a PLCADD1616 board).

In the definitions section, you would add a name for it:

Code: Select all

RemoteCycleStart_I   IS INP17 ; 1 = pressed  0 = idle
Then, somewhere around line 2350 in JogPanelStage, find the section that reads the various cycle start keys and equivalents:

Code: Select all

IF (CycleStartKey_I || KbCycleStart_M || MpgCycleStart_M || SkinCycleStart_M_SV) THEN (DoCycleStart_SV)
... and edit it to include your new input as yet another cycle start:

Code: Select all

IF (CycleStartKey_I || KbCycleStart_M || MpgCycleStart_M || SkinCycleStart_M_SV || RemoteCycleStart_I) THEN (DoCycleStart_SV)
Save changes; compile the PLC program into mpu.plc; and restart the control.


Michael
Posts: 12
Joined: Wed Apr 02, 2025 7:40 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: sys id : 0008DC111213-0321241568 control M39 serial A901431
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: ADDING HARD CYCLE START BUTTON OAK CNC12

Post by Michael »

Thanks for this informations, It's my first time in this Notepad++ programming world. I find all the line to modify and save, but... stupid questions, how I can "compile" ?


cncsnw
Community Expert
Posts: 4565
Joined: Wed Mar 24, 2010 5:48 pm

Re: ADDING HARD CYCLE START BUTTON OAK CNC12

Post by cncsnw »

Lots of different ways. I just use a command prompt window. Of course, you need to know what a "directory" (also called a "folder") is; and you need to know what the full name is of the PLC program source file you edited.

Given that, you can open a command prompt window (e.g. by typing "CMD" in the search box on the Windows Start menu), then:
1) Change directories so you are in the c:\cncm directory:

Code: Select all

cd  \cncm
2) Compile your PLC program with the "mpucomp" command:

Code: Select all

mpucomp  my-custom-plc-program-name.src  mpu.plc
3) Close the command prompt window:

Code: Select all

exit
Then shut down and restart the control so that the changes take effect.

Alternately, you can probably find instructions somewhere on this forum for configuring Notepad++ so that you can compile the PLC program from within the editor. Maybe the "PC Tuner" does that for you automatically now. Setting it up by hand may prove to be more trouble than it is worth.


Michael
Posts: 12
Joined: Wed Apr 02, 2025 7:40 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: sys id : 0008DC111213-0321241568 control M39 serial A901431
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: ADDING HARD CYCLE START BUTTON OAK CNC12

Post by Michael »

Thanks a lot for your help, I progressed, I find how to compile with notepad++. Saving under name .src and compile to mpu.plc. In the notepad++. F6 and command listed in the TB294 seems to compile. But, the compilation not complete successfully, I got a lot of message about line from 3520 to the end. Please find attached 2 pictures screens showing the line 3520 and the fail to compile. What does I have to do ?
Attachments
MPU PLC COMPILE ISSUE REV 30 04 2025 (2).JPG
MPU PLC COMPILE ISSUE REV 30 04 2025 (1).JPG


cncsnw
Community Expert
Posts: 4565
Joined: Wed Mar 24, 2010 5:48 pm

Re: ADDING HARD CYCLE START BUTTON OAK CNC12

Post by cncsnw »

You appear to have started by editing the previously-compiled "mpu.plc" file.

That will not work, unless you delete everything from line 3519 onwards, and delete the ";- " from the beginning of each of the first 3518 lines.

You would be far better off to locate the source file (the one that has a ".src" extension to begin with, and which was named in the comments in the first few lines of your mpu.plc file). Make a copy of that source file, again with a .src extension; edit it as needed; and compile it.


Michael
Posts: 12
Joined: Wed Apr 02, 2025 7:40 pm
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: sys id : 0008DC111213-0321241568 control M39 serial A901431
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: ADDING HARD CYCLE START BUTTON OAK CNC12

Post by Michael »

Thank you so much, I restart with the genuine .src source file, make my first hard button programming and it run great.
So now, I understand a little bit more how to integrate something else in the source file. And compile.
You help me to progress and be, a bit more confident.


Post Reply