示例#1
0
from machinekit import rtapi as rt
from machinekit import hal
from machinekit import config as c

from fdm.config import velocity_extrusion as ve
from fdm.config import base
from fdm.config import storage
from fdm.config import motion
import cramps as hardware

# initialize the RTAPI command client
rt.init_RTAPI()
# loads the ini file passed by linuxcnc
c.load_ini(os.environ['INI_FILE_NAME'])

motion.setup_motion('lineardeltakins')
hardware.init_hardware()
storage.init_storage('storage.ini')

# reading functions
hardware.hardware_read()
hal.addf('motion-command-handler', 'servo-thread')
hal.addf('motion-controller', 'servo-thread')

numFans = c.find('FDM', 'NUM_FANS')
numExtruders = c.find('FDM', 'NUM_EXTRUDERS')
numLights = c.find('FDM', 'NUM_LIGHTS')
hasHbp = c.find('FDM', 'HAS_HBP')

# Axis-of-motion Specific Configs (not the GUI)
ve.velocity_extrusion(extruders=numExtruders, thread='servo-thread')
示例#2
0
from machinekit import rtapi as rt
from machinekit import hal
from machinekit import config as c

from fdm.config import velocity_extrusion as ve
from fdm.config import base
from fdm.config import storage
from fdm.config import motion
import cramps as hardware

# initialize the RTAPI command client
rt.init_RTAPI()
# loads the ini file passed by linuxcnc
c.load_ini(os.environ['INI_FILE_NAME'])

motion.setup_motion()
hardware.init_hardware()
storage.init_storage('storage.ini')

# reading functions
hardware.hardware_read()
hal.addf('motion-command-handler', 'servo-thread')
hal.addf('motion-controller', 'servo-thread')

numFans = c.find('FDM', 'NUM_FANS')
numExtruders = c.find('FDM', 'NUM_EXTRUDERS')
numLights = c.find('FDM', 'NUM_LIGHTS')
hasHbp = c.find('FDM', 'HAS_HBP')

# Axis-of-motion Specific Configs (not the GUI)
ve.velocity_extrusion(extruders=numExtruders, thread='servo-thread')
示例#3
0
# initialize the RTAPI command client
rt.init_RTAPI()
# loads the ini file passed by linuxcnc
c.load_ini(os.environ['INI_FILE_NAME'])

#for name, value in c.items("AXIS"):
#    print("AXIS %s is %s"%(name,value))
#    for i in range(c.find("TRAJ","AXES")):
#        sec="AXIS_%s"%i
#        if not c.has_section(sec):
#            c.add_section(sec)
#        c.set(sec,name,value)
#c.save_changes()
# hal.Pin('ini.%s.%s'%(i,"max_velocity")).set(value)

motion.setup_motion("lineardeltakins")
hardware.init_hardware()
storage.init_storage('storage.ini')

# Gantry component for Z Axis
#base.init_gantry(axisIndex=2)

# reading functions
hardware.hardware_read()
#base.gantry_read(gantryAxis=2, thread='servo-thread')

numFans = 0  #c.find('FDM', 'NUM_FANS')
numExtruders = 1  # c.find('FDM', 'NUM_EXTRUDERS')
numLights = 0  #c.find('FDM', 'NUM_LIGHTS')
withAbp = 1  #c.find('FDM', 'ABP', False)
示例#4
0
from fdm.config import velocity_extrusion as ve
from fdm.config import base
from fdm.config import storage
from fdm.config import motion
import piphat as hardware
# initialize the RTAPI command client
logging.debug("starting rtapi")
rt.init_RTAPI()
logging.debug("rtapi should be started")
#logging.debug('rt now is %r' %(dir(rt)))
# loads the ini file passed by linuxcnc
#logging.debug('os environment  is %r' %os.environ)
c.load_ini(os.environ['INI_FILE_NAME'])

logging.debug("starting motion")
motion.setup_motion()
logging.debug("motion should be started")
hardware.init_hardware()
logging.debug("done init")
storage.init_storage('storage.ini')

# reading functions
hw = True
if hw:
    hardware.hardware_read()
hal.addf('motion-command-handler', 'servo-thread')
hal.addf('motion-controller', 'servo-thread')

numFans = c.find('FDM', 'NUM_FANS')
numExtruders = c.find('FDM', 'NUM_EXTRUDERS')
numLights = c.find('FDM', 'NUM_LIGHTS')
示例#5
0
from machinekit import hal
from machinekit import config as c

from fdm.config import velocity_extrusion as ve
from fdm.config import base
from fdm.config import storage
from fdm.config import motion
import cramps as hardware
import delta as lineardelta

# initialize the RTAPI command client
rt.init_RTAPI()
# loads the ini file passed by linuxcnc
c.load_ini(os.environ['INI_FILE_NAME'])

motion.setup_motion(kinematics='lineardeltakins')
lineardelta.setup_linearDeltaKins(c)

hardware.init_hardware()
storage.init_storage('storage.ini')

# reading functions
hardware.hardware_read()
hal.addf('motion-command-handler', 'servo-thread')
hal.addf('motion-controller', 'servo-thread')

numFans = c.find('FDM', 'NUM_FANS')
numExtruders = c.find('FDM', 'NUM_EXTRUDERS')
numLights = c.find('FDM', 'NUM_LIGHTS')

# Axis-of-motion Specific Configs (not the GUI)
示例#6
0
from machinekit import hal
from machinekit import config as c

from fdm.config import velocity_extrusion as ve
from fdm.config import base
from fdm.config import storage
from fdm.config import motion
import cramps as hardware
import delta as lineardelta

# initialize the RTAPI command client
rt.init_RTAPI()
# loads the ini file passed by linuxcnc
c.load_ini(os.environ['INI_FILE_NAME'])

motion.setup_motion(kinematics='lineardeltakins')
lineardelta.setup_linearDeltaKins(c)

hardware.init_hardware()
storage.init_storage('storage.ini')

# reading functions
hardware.hardware_read()
hal.addf('motion-command-handler', 'servo-thread')
hal.addf('motion-controller', 'servo-thread')

numFans = c.find('FDM', 'NUM_FANS')
numExtruders = c.find('FDM', 'NUM_EXTRUDERS')
numLights = c.find('FDM', 'NUM_LIGHTS')

# Axis-of-motion Specific Configs (not the GUI)
示例#7
0
from machinekit import rtapi as rt
from machinekit import hal
from machinekit import config as c

from fdm.config import base
from fdm.config import storage
from fdm.config import motion
import bebopr as hardware
import rc_servo as servo

# initialize the RTAPI command client
rt.init_RTAPI()
# loads the ini file passed by linuxcnc
c.load_ini(os.environ['INI_FILE_NAME'])

motion.setup_motion(kinematics='itripodkins')
hal.Pin('itripodkins.Bx').set(c.find('MACHINE', 'TRIPOD_BX'))
hal.Pin('itripodkins.Cx').set(c.find('MACHINE', 'TRIPOD_CX'))
hal.Pin('itripodkins.Cy').set(c.find('MACHINE', 'TRIPOD_CY'))

hardware.init_hardware()
storage.init_storage('storage.ini')

# reading functions
hardware.hardware_read()
hal.addf('motion-command-handler', 'servo-thread')
hal.addf('motion-controller', 'servo-thread')
# Axis-of-motion Specific Configs (not the GUI)
# XYZ axes
for i in range(3):
    base.setup_stepper(section='AXIS_%i' % i,