Reprogramming output relays

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

Moderator: cnckeith

Post Reply
benscale160
Posts: 24
Joined: Fri Apr 13, 2018 8:29 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Reprogramming output relays

Post by benscale160 »

I would like to reprogram one of the unused relays on my all in 1 DC to control a motor cooling fan. I would like it to turn on when an m3 or m4 is commanded and off when an m5 is commanded. I'm guessing it would probably involve changing some parameters.

Is there a resource that I can reference?

Thanks.
cncsnw
Posts: 1892
Joined: Wed Mar 24, 2010 5:48 pm

Re: Reprogramming output relays

Post by cncsnw »

If by "parameters" you mean values on the Machine Parameters pages, then no: none of them need to be changed.

Generally that would be done with changes to the PLC program, and optionally to the M function macros.

I am guessing that you would also want the spindle fan to run if you start the spindle using manual spindle control mode (from the jog panel, VCP or wireless MPG) as well as in a program with M3 or M4.

In that case, you would choose an unused output relay; give it the name you want; delete any PLC logic that relates to any previous (unneeded) function of that output; and add a line or two to control it the way you want.

As a hypothetical example, suppose you are using a copy of "Centroid-Standard-Mill-ALLIN1DC-r6.src". You will see that all nine relay outputs are assigned to some function or another, but perhaps you decide that you don't need a PLC-controlled worklight output, and so you can reassign OUT6.

In the definitions section of the PLC program, replace:

Code: Select all

WorkLightOut_O                  IS OUT6  ;SPST Type
with:

Code: Select all

SpindleCoolingFan_O           IS OUT6
Locate the code in MainStage that controlled the worklight output:

Code: Select all

;--Worklight
IF (Aux7Key_I || SkinAux7_M_SV || KbAux7Key_M)  THEN (Aux7PD_PD)
IF (Aux7PD_PD ^ Aux7LED_O) || OnAtPowerUp_M THEN (Aux7LED_O)
IF Aux7LED_O THEN (WorkLightOut_O)
... and delete it.

Then you could either add to MainStage, in place of the deleted code, a line that reads:

Code: Select all

IF  SpindleEnableOut_O THEN (SpindleCoolingFan_O)
Or you could go up into JogPanelStage, locate the code which reads:

Code: Select all

IF (SpindleEnableOut_O || SpinStart_M ) && !SpinStop_M
  THEN (SpindleEnableOut_O)
and modify it so it reads:

Code: Select all

IF (SpindleEnableOut_O || SpinStart_M ) && !SpinStop_M
  THEN (SpindleEnableOut_O), (SpindleCoolingFan_O)
Then recompile your PLC program, directing the output to a file named "mpu.plc", and restart.

To answer your question: yes, there is a PLC programming manual. There is also a series of videos on the subject.
cncsnw
Posts: 1892
Joined: Wed Mar 24, 2010 5:48 pm

Re: Reprogramming output relays

Post by cncsnw »

See:
https://www.centroidcnc.com/centroid_di ... manual.pdf
and:


Be aware that if you know what a text file is and you are comfortable typing commands in a command prompt window, then configuring Notepad++ to compile from within the editor is about the least important thing you can spend your time on.
Post Reply