NEWS
2.6 Live+Install image
There are no translations available.

Announcing a new Live+Install DVD image for installing LinuxCNC 2.6 on Debian Wheezy. Instructions here.

 
LinuxCNC 2.6.2 Released
There are no translations available.

Bug fix see the change log.

 
LinuxCNC 2.6.1 Released
There are no translations available.

Bug fix see the change log.

 

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Way Oiler Example

Way Oiler Example 04 Mai 2011 06:39 #9584

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5847
  • Thank you received: 240
  • Karma: 157
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.
# 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
Attachments:
Last Edit: 04 Mai 2011 07:49 by BigJohnT.
The administrator has disabled public write access.

Re:Way Oiler Example 04 Mai 2011 07:03 #9585

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5847
  • Thank you received: 240
  • Karma: 157
This shows the symbol window where you can change the names.



John
Last Edit: 04 Mai 2011 07:04 by BigJohnT.
The administrator has disabled public write access.

Re:Way Oiler Example 04 Mai 2011 07:26 #9587

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5847
  • Thank you received: 240
  • Karma: 157
This screen shot shows the machine in motion and TM2 timing down. The red part of the rung indicates that part is true.



John
Last Edit: 04 Mai 2011 07:27 by BigJohnT.
The administrator has disabled public write access.

Re:Way Oiler Example 04 Mai 2011 07:30 #9588

  • BigJohnT
  • BigJohnT's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 5847
  • Thank you received: 240
  • Karma: 157
This screen shot shows the oiler output on as TM3 has not timed out yet. Notice that both timers get started at the same time and have the same count.



John
Last Edit: 04 Mai 2011 07:30 by BigJohnT.
The administrator has disabled public write access.
The following user(s) said Thank You: jlviloria

Re:Way Oiler Example 18 Nov 2012 16:54 #26766

  • jlviloria
  • jlviloria's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 369
  • Thank you received: 6
  • Karma: 0
John.

works perfect on my lathe cincinnati! thank you very much.

Jorge.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 1.354 seconds
Powered by Kunena Forum
© 2014 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.