PLC Lube task <<Answered>>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
tblough
Posts: 118
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

PLC Lube task <<Answered>>

Post by tblough » Thu Nov 09, 2017 6:51 pm

I have parameter 179 set for a direct controlled lube pump. According to the manual and practice, it waits for x amount of cycle time and then runs for x number of seconds. That normally works fine but a lot of my work is "manual mode" using MPG handwheels. What happens is that the lube pump cycle never gets called.

Is it possible for the lube pump PLC task to be fired initially on startup and then every x amount of minutes?

Cheers,

Tom
https://thebloughs.net
Last edited by tblough on Thu Jan 04, 2018 5:46 pm, edited 2 times in total.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

Centroid_Tech
Posts: 154
Joined: Thu Mar 18, 2010 2:24 pm

Re: PLC Lube task

Post by Centroid_Tech » Fri Nov 10, 2017 10:40 am

Sure. Your PLC program will need to be modified for that behavior.

diycncscott
Posts: 639
Joined: Thu Mar 04, 2010 4:03 pm

Re: PLC Lube task

Post by diycncscott » Fri Nov 10, 2017 11:38 am

Probably the simplest way is to enter MDI while doing a "manual" jog with the MPG. MDI mode is considered "running a job" and the timers will act accordingly.

martyscncgarage
Posts: 742
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: none
Location: Mesa, AZ

Re: PLC Lube task

Post by martyscncgarage » Fri Nov 10, 2017 1:23 pm

diycncscott wrote:
Fri Nov 10, 2017 11:38 am
Probably the simplest way is to enter MDI while doing a "manual" jog with the MPG. MDI mode is considered "running a job" and the timers will act accordingly.
Scott, could an Aux button be assigned to cycle the lube pump? In otherwords for X number of seconds activate the output?
I just completed my mill, and I would like to make sure the lube pump is cycling. Manually calling it would be quite handy so I could observe the plunger operate.

Thank you for all you do Scott, you are one sharp multi talented guy.
Marty
"Jack of all trades, master of none!"
Mesa, AZ

diycncscott
Posts: 639
Joined: Thu Mar 04, 2010 4:03 pm

Re: PLC Lube task

Post by diycncscott » Fri Nov 10, 2017 3:18 pm

For the time being, you could assign an output as Flood or Mist, wire your lube pump to that output and then use the flood or mist keys to manually turn the pump on or off. You would also have the ability to use the M7, M8 & M9 to programmaticaly turn on and off the lube pump as well. (though you would lose the timer functionality of the lube pump feature)

It would be relatively simple to add an aux key to run the pump manually and keep the timer(s) for automatic operation but, at this point in time, it would involve hand editing the PLC and recompiling.

With the next release, we will allow custom labeling of the aux keys (around Xmas ho ho ho) and I'll try to keep this kind of thing in mind as well.

Don't forget the ability to force an output on or off in the realtime I/O screen. When not running a job and while at the main screen:

1. Press alt-i to bring up the I/O screen
2. Use the arrow keys to select(put a box around) the output you want to force
3. Press ctrl-alt-f to force the output on (turns green and puts a line under it)
3. Press ctrl-alt-f again to force the output off (turns red and puts a line under it)
3. Press ctrl-alt-f to clear all forcing of the output (removes line underneath it and returns control of the output to PLC)

Don't forget that when an output is forced - the PLC has NO CONTROL over that output until the forcing is cleared.

martyscncgarage
Posts: 742
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: none
Location: Mesa, AZ

Re: PLC Lube task

Post by martyscncgarage » Fri Nov 10, 2017 6:28 pm

diycncscott wrote:
Fri Nov 10, 2017 3:18 pm
For the time being, you could assign an output as Flood or Mist, wire your lube pump to that output and then use the flood or mist keys to manually turn the pump on or off. You would also have the ability to use the M7, M8 & M9 to programmaticaly turn on and off the lube pump as well. (though you would lose the timer functionality of the lube pump feature)

It would be relatively simple to add an aux key to run the pump manually and keep the timer(s) for automatic operation but, at this point in time, it would involve hand editing the PLC and recompiling.

With the next release, we will allow custom labeling of the aux keys (around Xmas ho ho ho) and I'll try to keep this kind of thing in mind as well.

Don't forget the ability to force an output on or off in the realtime I/O screen. When not running a job and while at the main screen:

1. Press alt-i to bring up the I/O screen
2. Use the arrow keys to select(put a box around) the output you want to force
3. Press ctrl-alt-f to force the output on (turns green and puts a line under it)
3. Press ctrl-alt-f again to force the output off (turns red and puts a line under it)
3. Press ctrl-alt-f to clear all forcing of the output (removes line underneath it and returns control of the output to PLC)

Don't forget that when an output is forced - the PLC has NO CONTROL over that output until the forcing is cleared.
Thank you Scott! Perfect, using the diagnostic screen works for me.
A follow up question. So can a macro be created to turn on (and off) an output?
Marty
"Jack of all trades, master of none!"
Mesa, AZ

tblough
Posts: 118
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

Re: PLC Lube task

Post by tblough » Sun Nov 12, 2017 3:14 pm

I'll probably end up modifying the PCL program so the lube task fires first thing at startup. I wanted to automate this so that I did not have to rely on other users to remember to actively do something. My experience with that is it never gets done.

Tom
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

tblough
Posts: 118
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

Re: PLC Lube task

Post by tblough » Tue Dec 05, 2017 1:16 pm

So I've decided based on the how my machine is used, I want the lube task to run regardless of if the machine is executing a program or not. Here's how I've modified the OAK PLC program to accomplish this:

Code: Select all

;=============================================================================
                        LubeUsePLCTimersStage
;=============================================================================
;
; METHOD 2 (SS != 0) For lube pumps that do not have internal timers.
;
;  When using this method P179 should be set so the lube turns on
;  every MMM minutes for SS seconds.
;
;  Example 1.
;    To set the lube pump power to come on for 5 seconds
;    every 10 minutes, set P179 =  1005.
;                                 MMMSS
;  Example 2.
;    To set the lube pump power to come on for 30 seconds
;    every 2 hours, set P179 = 12030
;                              MMMSS
;
; This method will accumulate time while a program is running until
; it reaches MMM minutes, at which time it will apply power
; for SS seconds (unless E-stop is engaged) and then start over. It is
; possible with frequent use of E-stop that a lube cycle is cut short.
;

;IF SV_PROGRAM_RUNNING  THEN LubeM_T = LubeM_W, SET LubeM_T
;IF !SV_PROGRAM_RUNNING THEN (StopRunningPD)
;IF StopRunningPD THEN LubeAccumTime_W = LubeAccumTime_W + LubeM_T, RST LubeM_T
;IF LubeM_T || (LubeAccumTime_W + LubeM_T > LubeM_W)
;  THEN SET Lube, LubeS_T = LubeS_W, SET LubeS_T, RST LubeM_T, LubeAccumTime_W = 0
;IF LubeS_T || SV_STOP THEN RST Lube, RST LubeS_T

; Modified above standard behavior to turn off lube only when e-stop pressed.
; This will cause the lube task to run even when the mill us being used manually
; and no programs are being exectuted.

IF EstopOk  THEN LubeM_T = LubeM_W, SET LubeM_T
IF !EstopOk THEN (StopRunningPD)
IF StopRunningPD THEN LubeAccumTime_W = LubeAccumTime_W + LubeM_T, RST LubeM_T
IF LubeM_T || (LubeAccumTime_W + LubeM_T > LubeM_W)
  THEN SET Lube, LubeS_T = LubeS_W, SET LubeS_T, RST LubeM_T, LubeAccumTime_W = 0
IF LubeS_T THEN RST Lube, RST LubeS_T


Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

tblough
Posts: 118
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

Re: *SOLVED* - PLC Lube task

Post by tblough » Mon Dec 25, 2017 1:17 am

One final change to the lube task. I added the OnAtPowerUp check to fire the lube task when the control is first started and then every MMM minutes for SS seconds, stopping only when eStop is pressed.

Code: Select all

; Modified the standard behavior to turn off lube only when e-stop pressed.
; This will cause the lube task to run even when the machine is being used manually
; and no programs are being exectuted.  Added OnAtPowerUp to fire lube pump whenever
; control is started.  This should maintain lubrication even if machine is turned
; on and off for short jobs.

IF EstopOk  THEN LubeM_T = LubeM_W, SET LubeM_T
IF !EstopOk THEN (StopRunningPD)
IF StopRunningPD THEN LubeAccumTime_W = LubeAccumTime_W + LubeM_T, RST LubeM_T
IF LubeM_T || (LubeAccumTime_W + LubeM_T > LubeM_W) || OnAtPowerUp_M
  THEN SET Lube, LubeS_T = LubeS_W, SET LubeS_T, RST LubeM_T, LubeAccumTime_W = 0
IF LubeS_T THEN RST Lube, RST LubeS_T
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

Post Reply

Who is online

Users browsing this forum: RayL and 4 guests