I made the change to my lube.py file, and the custom.hal file. After fussing with permissions, the system says the file does not exist. I am attaching those files to this email. When you have a moment, please critique tem & suggest corrections.
--J. Ray Mitchell Jr. [email protected] (818)324-7573 "Much of the social history of the Western world, over the past three decades, has been a history of replacing what worked with what sounded good." -- Thomas Sowell On Wed, Aug 27, 2025 at 1:53 AM andy pugh <[email protected]> wrote: > On Wed, 27 Aug 2025 at 05:47, jrmitchellj <[email protected]> wrote: > > > Is there updated python files for the M6 manual tool change routines? > > Assuming that the files are in your config directory, the first thing > to work out is whether they are standard files, or some that were > modified for your system. > > What is the path and filename of the offending file? What does the > error report say, > > It's likely to be pretty easy to update the syntax, it's probably > nothing more than adding brackets to a print statement. > > There is a utility called 2to3 that will convert, but that is likely > to be overkill. > > -- > atp > "A motorcycle is a bicycle with a pandemonium attachment and is > designed for the especial use of mechanical geniuses, daredevils and > lunatics." > — George Fitch, Atlanta Constitution Newspaper, 1912 > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users >
#!/usr/bin/python3
import linuxcnc, hal, time
lube = hal.component("lube")
lube.newpin("fault", hal.HAL_BIT, hal.HAL_OUT)
lube.newpin("run", hal.HAL_BIT, hal.HAL_OUT)
lube.newpin("delay", hal.HAL_BIT, hal.HAL_OUT)
lube.newpin("machine_status", hal.HAL_BIT, hal.HAL_IN)
lube.newpin("spindle_status", hal.HAL_BIT, hal.HAL_IN)
lube.newpin("pressuresw_floatsw", hal.HAL_BIT, hal.HAL_IN)
lube.newpin("reset", hal.HAL_BIT, hal.HAL_IN)
lube.ready()
#initialize variables
lube['run'], lube['fault'] = 0, 0
try:
while 1:
time.sleep(0.5)
lube['delay'] = 0
#1. machine needs to be on
#2. spindle needs to be running like in a g-code program
#3. there should be no pump faults
if(lube['machine_status'] and lube['spindle_status'] and not lube['fault']):
lube['run'] = 1;
time.sleep(10) #run pump for 10s
if(lube['pressuresw_floatsw']):
time.sleep(50) #continue running pump for an additional 50s
lube['run'] = 0;
lube['delay'] = 1; #show that pump is resting
time.sleep(720) #let the pump rest for 720s (12 min)
else:
lube['run'] = 0; #shut off pump immediately
lube['fault'] = 1; #there is a fault if input 14 becomes active (fluid low or a big leak somewhere)
#gives user to ability to reset the fault after fluid was filled or leak was fixed
if(lube['reset']):
lube['fault'] = 0;
lube['reset'] = 0; #reset the reset!
except KeyboardInterrupt:
raise SystemExit
custom.hal
Description: Binary data
_______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
