Пример #1
0
    def __init__(self,
                 name,
                 mc,
                 step_pin,
                 dir_pin,
                 invert_dir=False,
                 log=None):
        Axis.__init__(self, name, log=log)
        #self.mc = mc
        self.usbio = mc.usbio
        if self.usbio.serial is None:
            raise Exception("USBIO missing serial")
        self.step_pin = step_pin
        self.dir_pin = dir_pin
        self.invert_dir = invert_dir

        # Set a known output state
        # Unknown state to force set
        self.is_forward = None
        self.forward()

        self.usbio.set_gpio(self.step_pin, True)

        self.step_delay_s = None
        #self.step_delay_s = 0.001
        #self.step_delay_s = 5

        # Total number of steps
        self.net = 0

        self._stop = threading.Event()
        self._estop = threading.Event()
Пример #2
0
    def __init__(self, name, mc, step_pin, dir_pin, invert_dir=False, log=None):
        Axis.__init__(self, name, log=log)
        # self.mc = mc
        self.usbio = mc.usbio
        if self.usbio.serial is None:
            raise Exception("USBIO missing serial")
        self.step_pin = step_pin
        self.dir_pin = dir_pin
        self.invert_dir = invert_dir

        # Set a known output state
        # Unknown state to force set
        self.is_forward = None
        self.forward()

        self.usbio.set_gpio(self.step_pin, True)

        self.step_delay_s = None
        # self.step_delay_s = 0.001
        # self.step_delay_s = 5

        # Total number of steps
        self.net = 0

        self._stop = threading.Event()
        self._estop = threading.Event()
Пример #3
0
    def __init__(self, name, indexer, config=None):
        Axis.__init__(self, name, steps_per_um=config['cnc']['steps_per_um'])
        self.indexer = indexer
        if self.indexer.serial is None:
            raise Exception("Indexer missing serial")
        self.movement_notify = lambda: None

        # Ensure stopped
        self.indexer.step(self.name, 0)

        self._stop = threading.Event()
        self._estop = threading.Event()
Пример #4
0
 def __init__(self, name, indexer, config=None):
     Axis.__init__(self, name, steps_per_um=config['cnc']['steps_per_um'])
     self.indexer = indexer
     if self.indexer.serial is None:
         raise Exception("Indexer missing serial")
     self.movement_notify = lambda: None
     
     # Ensure stopped
     self.indexer.step(self.name, 0)
     
     self._stop = threading.Event()
     self._estop = threading.Event()
Пример #5
0
 def __init__(self, name='dummy', log=None):
     Axis.__init__(self, name, log=log)
     self.net = 0
Пример #6
0
 def __init__(self, name = 'dummy', log=None):
     Axis.__init__(self, name, log=log)
     self.net = 0
 def __init__(self, g, axis_letter="A"):
     Axis.__init__(self, g, axis_letter)
     if axis_letter == "B":
         self.actual_high_lim *= 2
         self.actual_low_lim *= 2