Way Oiler Lube Pump Example
04 May 2011 13:39 - 04 Dec 2017 11:43 #9584
by BigJohnT
Way Oiler Lube Pump Example was created by BigJohnT
This is the Way Oiler for my Hardinge. I use classicladder to give me a time on and time off for my pump. It is a pneumatic type of pump where you apply pressure for so many seconds to depress the piston then take the pressure off and the piston is moved by the spring to pump a squirt of oil. So anytime there is motion I start the oiling timer. This saves on excess oil being used like the old control did.
This is the code in my hal file.
The ladder.
moving is classicladder.0.floatin-00
Oiler is classicladder.0.out-07
Names can be changed in the Symbol window
Because classicladder converts floats to s32 I had to multiply the motion.current-velocity by some big number as it is reported as 0-1 to get the compare to see the motion.
www.linuxcnc.org/docview/html/ladder_classic_ladder.html#r1_8
Timer 2 preset is 300 and timer 3 preset is 10.
The logic in pseudo-code is:
1 If moving > 0 the the comparison is true.
2 If timer 2 output is on the N/C contact is open and is false after the N/C contact.
2 If timer 2 output is off the N/C contact is closed and is true up to that point.
3 If timer 2 input is true start timer 2.
4 If timer 2 output is on turn on bit 12
lower branch
5 If a rising edge (just turned on) has been detected from bit 12 pulse timer 3 input for one scan.
6 If timer 3 input is on start timer 3
7 If timer 3 output is on turn on the oiler.
John
This is the code in my hal file.
# Way Oiler
setp mult2.2.in0 1000
net mult-vel mult2.2.in1 <= motion.current-vel
net in-motion classicladder.0.floatin-00 <= mult2.2.out
net oil-on hm2_5i20.0.gpio.045.out <= classicladder.0.out-07
The ladder.
moving is classicladder.0.floatin-00
Oiler is classicladder.0.out-07
Names can be changed in the Symbol window
Because classicladder converts floats to s32 I had to multiply the motion.current-velocity by some big number as it is reported as 0-1 to get the compare to see the motion.
www.linuxcnc.org/docview/html/ladder_classic_ladder.html#r1_8
Timer 2 preset is 300 and timer 3 preset is 10.
The logic in pseudo-code is:
1 If moving > 0 the the comparison is true.
2 If timer 2 output is on the N/C contact is open and is false after the N/C contact.
2 If timer 2 output is off the N/C contact is closed and is true up to that point.
3 If timer 2 input is true start timer 2.
4 If timer 2 output is on turn on bit 12
lower branch
5 If a rising edge (just turned on) has been detected from bit 12 pulse timer 3 input for one scan.
6 If timer 3 input is on start timer 3
7 If timer 3 output is on turn on the oiler.
John
Last edit: 04 Dec 2017 11:43 by BigJohnT.
The following user(s) said Thank You: virencq
Please Log in or Create an account to join the conversation.
04 May 2011 14:03 - 04 Dec 2017 11:40 #9585
by BigJohnT
Replied by BigJohnT on topic Re:Way Oiler Example
Last edit: 04 Dec 2017 11:40 by BigJohnT.
Please Log in or Create an account to join the conversation.
04 May 2011 14:26 - 04 Dec 2017 11:40 #9587
by BigJohnT
Replied by BigJohnT on topic Re:Way Oiler Example
Last edit: 04 Dec 2017 11:40 by BigJohnT.
Please Log in or Create an account to join the conversation.
04 May 2011 14:30 - 04 Dec 2017 11:41 #9588
by BigJohnT
Replied by BigJohnT on topic Re:Way Oiler Example
Last edit: 04 Dec 2017 11:41 by BigJohnT.
The following user(s) said Thank You: jlviloria
Please Log in or Create an account to join the conversation.
19 Nov 2012 00:54 #26766
by jlviloria
Replied by jlviloria on topic Re:Way Oiler Example
John.
works perfect on my lathe cincinnati! thank you very much.
Jorge.
works perfect on my lathe cincinnati! thank you very much.
Jorge.
Please Log in or Create an account to join the conversation.
Time to create page: 0.234 seconds