예제 #1
0
 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey("_focus", "FOCUS_ENABLE", default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey("_focus_time", "FOCUS_TIME", default=DEFAULT_FOCUS_TIME)
     self._addConfigKey("_dual", "DUAL_ENABLE", default=DEFAULT_DUAL_ENABLE)
     self._addConfigKey("_dual_time", "DUAL_TIME", default=DEFAULT_DUAL_TIME)
예제 #2
0
 def shutdown(self):
     Logger().trace("ClaussAxis.shutdown()")
     self.stop()
     if self._config["PARK_ENABLE"]:
         self._hardware.drive(float(self._config["PARK_POSITION"]), self.__getSpeed())
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
예제 #3
0
 def configure(self):
     AbstractAxisPlugin.configure(self)
     AbstractHardwarePlugin.configure(self)
     if self._config['OVERWRITE_ENCODER_FULL_CIRCLE']:
         self._hardware.overwriteEncoderFullCircle(self._config['ENCODER_FULL_CIRCLE'])
     else:
         self._hardware.useFirmwareEncoderFullCircle()
예제 #4
0
 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_focus', 'FOCUS_ENABLE', default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey('_focus_time', 'FOCUS_TIME', default=DEFAULT_FOCUS_TIME)
     self._addConfigKey('_dual', 'DUAL_ENABLE' , default=DEFAULT_DUAL_ENABLE)
     self._addConfigKey('_dual_time', 'DUAL_TIME', default=DEFAULT_DUAL_TIME)
예제 #5
0
 def _defineConfig(self):
     Logger().trace("UrsaMinorBt2Shutter._defineConfig()")
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_focus', 'FOCUS_ENABLE', default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey('_focusPulse', 'FOCUS_PULSE_WIDTH', default=DEFAULT_FOCUS_PULSE_WIDTH)
     self._addConfigKey('_maintainFocus', 'FOCUS_MAINTAIN', default=DEFAULT_FOCUS_MAINTAIN)
예제 #6
0
    def establishConnection(self):  # Move to hardware?
        """ Establish the connection.

        The SIN-11 device used to control the Pixorb axis needs to be
        initialised before any command can be sent to the axis controllers.
        """
        AbstractHardwarePlugin.establishConnection(self)
        Logger().trace("AbstractPixOrbHardware.establishConnection()")
        if not AbstractPixOrbHardware.__initSIN11:
            try:
                answer = ""
                self._driver.empty()

                # Ask the SIN-11 to scan online controllers
                self._driver.write('&')  # Add '\n' if ethernet driver?
                self._driver.setTimeout(SIN11_INIT_TIMEOUT)  # Sin-11 takes several seconds to answer
                c = ''
                while c != '\r':
                    c = self._driver.read(1)
                    if c in ('#', '?'):
                        self._driver.read(2)  # Read last CRLF
                        Logger().debug("AbstractPixOrbHardware.establishConnection(): SIN-11 '&' answer=%s" % answer)
                        raise HardwareError("Can't init SIN-11")
                    else:
                        answer += c
                answer = answer.strip()  # Remove final CRLF
                Logger().debug("AbstractPixOrbHardware.establishConnection(): SIN-11 '&' answer=%s" % answer)
                AbstractPixOrbHardware.__initSIN11 = True
                self._driver.setTimeout(ConfigManager().getFloat('Plugins/HARDWARE_COM_TIMEOUT'))
            except:
                self._connected = False
                raise
예제 #7
0
 def shutdown(self):
     Logger().trace("ClaussAxis.shutdown()")
     self.stop()
     if self._config['PARK_ENABLE']:
         self._hardware.drive(float(self._config['PARK_POSITION']),
                              self.__getSpeed())
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
예제 #8
0
    def shutdown(self):
        Logger().trace("MerlinOrionAxis.shutdown()")
        self.stop()
        AbstractHardwarePlugin.shutdown(self)
        AbstractAxisPlugin.shutdown(self)

        # Disconnect Spy update signal
        self.disconnect(Spy(), QtCore.SIGNAL("update"), self.__onPositionUpdate)
예제 #9
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_alternateDrive', 'ALTERNATE_DRIVE', default=DEFAULT_ALTERNATE_DRIVE)
     self._addConfigKey('_alternateDrive', 'ALTERNATE_DRIVE_ANGLE', default=DEFAULT_ALTERNATE_DRIVE_ANGLE)
     self._addConfigKey('_inertiaAngle', 'INERTIA_ANGLE', default=DEFAULT_INERTIA_ANGLE)
     self._addConfigKey('_overwriteEncoderFullCircle', 'OVERWRITE_ENCODER_FULL_CIRCLE', default=DEFAULT_OVERWRITE_ENCODER_FULL_CIRCLE)
     self._addConfigKey('_encoderFullCircle', 'ENCODER_FULL_CIRCLE', default=DEFAULT_ENCODER_FULL_CIRCLE)
예제 #10
0
 def _init(self):
     Logger().trace("MerlinOrionAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = MerlinOrionHardware()
     self.__run = False
     self.__driveEvent = threading.Event()
     self.__setPoint = None
     self.__currentPos = None
예제 #11
0
    def init(self):
        Logger().trace("MerlinOrionAxis.init()")
        self._hardware.setAxis(AXIS_TABLE[self.capacity]),
        AbstractHardwarePlugin.init(self)
        if self._config['OVERWRITE_ENCODER_FULL_CIRCLE']:
            self._hardware.overwriteEncoderFullCircle(self._config['ENCODER_FULL_CIRCLE'])

        # Connect Spy update signal
        self.connect(Spy(), QtCore.SIGNAL("update"), self.__onPositionUpdate, QtCore.Qt.BlockingQueuedConnection)
예제 #12
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speed', 'SPEED', default=DEFAULT_SPEED[self.capacity])
     self._addConfigKey('_acceleration', 'ACCEL', default=DEFAULT_ACCEL[self.capacity])
     self._addConfigKey('_channel', 'CHANNEL', default=DEFAULT_CHANNEL[self.capacity])
     self._addConfigKey('_direction', 'DIRECTION', default=DEFAULT_DIRECTION[self.capacity])
     self._addConfigKey('_angle1ms', 'ANGLE_1MS', default=DEFAULT_ANGLE_1MS[self.capacity])
     self._addConfigKey('_neutralPos', 'NEUTRAL_POSITION', default=DEFAULT_NEUTRAL_POSITION[self.capacity])
     self._addConfigKey('_additionalDelay', 'ADDITIONAL_DELAY', default=DEFAULT_ADDITIONAL_DELAY)
예제 #13
0
 def _defineConfig(self):
     Logger().trace("UrsaMinorUsbShutter._defineConfig()")
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_triggerLine',
                        'TRIGGER_LINE',
                        default=DEFAULT_TRIGGER_LINE)
     self._addConfigKey('_triggerLineInverted',
                        'TRIGGER_LINE_INVERTED',
                        default=DEFAULT_TRIGGER_LINE_INVERTED)
예제 #14
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey("_speedSlow", "SPEED_SLOW", default=DEFAULT_SPEED_SLOW)
     self._addConfigKey("_speedNormal", "SPEED_NORMAL", default=DEFAULT_SPEED_NORMAL)
     self._addConfigKey("_speedFast", "SPEED_FAST", default=DEFAULT_SPEED_FAST)
     self._addConfigKey("_parkPosition", "PARK_POSITION", default=DEFAULT_PARK_POSITION)
     if self.capacity == "yawAxis":
         self._addConfigKey("_parkEnable", "PARK_ENABLE", default=False)
     else:
         self._addConfigKey("_parkEnable", "PARK_ENABLE", default=True)
예제 #15
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speedSlow', 'SPEED_SLOW', default=DEFAULT_SPEED_SLOW)
     self._addConfigKey('_speedNormal', 'SPEED_NORMAL', default=DEFAULT_SPEED_NORMAL)
     self._addConfigKey('_speedFast', 'SPEED_FAST', default=DEFAULT_SPEED_FAST)
     self._addConfigKey('_parkPosition', 'PARK_POSITION', default=DEFAULT_PARK_POSITION)
     if self.capacity == 'yawAxis':
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=False)
     else:
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=True)
예제 #16
0
 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_channel',
                        'CHANNEL',
                        default=DEFAULT_CHANNEL[self.capacity])
     self._addConfigKey('_shutterOn',
                        'SHUTTER_ON',
                        default=DEFAULT_SHUTTER_ON)
     self._addConfigKey('_shutterOff',
                        'SHUTTER_OFF',
                        default=DEFAULT_SHUTTER_OFF)
예제 #17
0
 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_focus',
                        'FOCUS_ENABLE',
                        default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey('_focus_time',
                        'FOCUS_TIME',
                        default=DEFAULT_FOCUS_TIME)
     self._addConfigKey('_dual', 'DUAL_ENABLE', default=DEFAULT_DUAL_ENABLE)
     self._addConfigKey('_dual_time',
                        'DUAL_TIME',
                        default=DEFAULT_DUAL_TIME)
예제 #18
0
 def _defineConfig(self):
     Logger().trace("UrsaMinorBt2Shutter._defineConfig()")
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_focus',
                        'FOCUS_ENABLE',
                        default=DEFAULT_FOCUS_ENABLE)
     self._addConfigKey('_focusPulse',
                        'FOCUS_PULSE_WIDTH',
                        default=DEFAULT_FOCUS_PULSE_WIDTH)
     self._addConfigKey('_maintainFocus',
                        'FOCUS_MAINTAIN',
                        default=DEFAULT_FOCUS_MAINTAIN)
예제 #19
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speedSlow',
                        'SPEED_SLOW',
                        default=DEFAULT_SPEED_SLOW)
     self._addConfigKey('_speedNormal',
                        'SPEED_NORMAL',
                        default=DEFAULT_SPEED_NORMAL)
     self._addConfigKey('_speedFast',
                        'SPEED_FAST',
                        default=DEFAULT_SPEED_FAST)
     self._addConfigKey('_parkPosition',
                        'PARK_POSITION',
                        default=DEFAULT_PARK_POSITION)
     if self.capacity == 'yawAxis':
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=False)
     else:
         self._addConfigKey('_parkEnable', 'PARK_ENABLE', default=True)
예제 #20
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speed',
                        'SPEED',
                        default=DEFAULT_SPEED[self.capacity])
     self._addConfigKey('_acceleration',
                        'ACCEL',
                        default=DEFAULT_ACCEL[self.capacity])
     self._addConfigKey('_channel',
                        'CHANNEL',
                        default=DEFAULT_CHANNEL[self.capacity])
     self._addConfigKey('_direction',
                        'DIRECTION',
                        default=DEFAULT_DIRECTION[self.capacity])
     self._addConfigKey('_angle1ms',
                        'ANGLE_1MS',
                        default=DEFAULT_ANGLE_1MS[self.capacity])
     self._addConfigKey('_neutralPos',
                        'NEUTRAL_POSITION',
                        default=DEFAULT_NEUTRAL_POSITION[self.capacity])
     self._addConfigKey('_additionalDelay',
                        'ADDITIONAL_DELAY',
                        default=DEFAULT_ADDITIONAL_DELAY)
예제 #21
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
예제 #22
0
 def _init(self):
     Logger().trace("OwlShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = OwlHardware()
예제 #23
0
 def _init(self):
     Logger().trace("OwlAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = OwlHardware()
예제 #24
0
 def _init(self):
     Logger().trace("ClaussShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = ClaussHardware()
예제 #25
0
 def shutdown(self):
     Logger().trace("OwlAxis.shutdown()")
     self.stop()
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
예제 #26
0
 def _defineConfig(self):
     Logger().trace("UrsaMinorUsbShutter._defineConfig()")
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
     self._addConfigKey('_triggerLine', 'TRIGGER_LINE', default=DEFAULT_TRIGGER_LINE)
     self._addConfigKey('_triggerLineInverted', 'TRIGGER_LINE_INVERTED', default=DEFAULT_TRIGGER_LINE_INVERTED)
예제 #27
0
 def init(self):
     AbstractHardwarePlugin.init(self)
     self.configure()
예제 #28
0
 def shutdown(self):
     Logger().trace("PanoduinoAxis.shutdown()")
     self.stop()
     self._hardware.shutdown()
     AbstractHardwarePlugin.shutdown(self)
     AbstractAxisPlugin.shutdown(self)
예제 #29
0
 def _init(self):
     Logger().trace("PanoduinoShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = PololuMicroMaestroHardware()
예제 #30
0
 def init(self):
     Logger().trace("PanoduinoShutter.init()")
     self._hardware.setAxis(self._config['CHANNEL']),
     AbstractHardwarePlugin.init(self)
예제 #31
0
 def init(self):
     Logger().trace("PanoduinoAxis.init()")
     AbstractHardwarePlugin.init(self)
     self.configure()
     self._hardware.setTarget(self._config['NEUTRAL_POSITION'])
예제 #32
0
 def init(self):
     Logger().trace("ClaussAxis.init()")
     self._hardware.setAxis(AXIS_TABLE[self.capacity]),
     AbstractHardwarePlugin.init(self)
예제 #33
0
 def init(self):
     Logger().trace("MerlinOrionShutter.init()")
     self._hardware.setAxis(AXIS_TABLE[self.capacity]),
     AbstractHardwarePlugin.init(self)
     ShutterPlugin.init(self)
예제 #34
0
 def _init(self):
     Logger().trace("MerlinOrionShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = MerlinOrionHardware()
예제 #35
0
 def init(self):
     Logger().trace("OwlAxis.init()")
     self._hardware.setAxis(AXIS_TABLE[self.capacity]),
     AbstractHardwarePlugin.init(self)
예제 #36
0
 def _init(self):
     Logger().trace("ClaussAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = ClaussHardware()
예제 #37
0
 def __init__(self, *args, **kwargs):
     AbstractHardwarePlugin.__init__(self, *args, **kwargs)  # Only 1?
     AbstractAxisPlugin.__init__(self, *args, **kwargs)
     QtCore.QThread.__init__(self)
예제 #38
0
 def init(self):
     Logger().trace("PanoduinoShutter.init()")
     self._hardware.setAxis(self._config['CHANNEL']),
     AbstractHardwarePlugin.init(self)
예제 #39
0
 def _init(self):
     Logger().trace("UrsaMinorUsbShutter._init()")
     AbstractHardwarePlugin._init(self)
     ShutterPlugin._init(self)
     self._hardware = UrsaMinorUsbHardware()
예제 #40
0
 def shutdown(self):
     Logger().trace("PanoduinoShutter.shutdown()")
     self._triggerOffShutter()
     self._hardware.shutdown()
     AbstractHardwarePlugin.shutdown(self)
     ShutterPlugin.shutdown(self)
예제 #41
0
 def shutdown(self):
     Logger().trace("PanoduinoShutter.shutdown()")
     self._triggerOffShutter()
     self._hardware.shutdown()
     AbstractHardwarePlugin.shutdown(self)
     ShutterPlugin.shutdown(self)
예제 #42
0
 def shutdown(self):
     Logger().trace("ClaussShutter.shutdown()")
     self._triggerOffShutter()
     AbstractHardwarePlugin.shutdown(self)
     ShutterPlugin.shutdown(self)
예제 #43
0
 def __init__(self, *args, **kwargs):
     """
     """
     AbstractHardwarePlugin.__init__(self, *args, **kwargs)
     ShutterPlugin.__init__(self, *args, **kwargs)
예제 #44
0
 def _defineConfig(self):
     AbstractAxisPlugin._defineConfig(self)
     AbstractHardwarePlugin._defineConfig(self)
     self._addConfigKey('_speedIndex', 'SPEED_INDEX', default=DEFAULT_SPEED_INDEX)
     self._addConfigKey('_axisWithBreak', 'AXIS_WITH_BREAK', default=DEFAULT_AXIS_WITH_BREAK)
     self._addConfigKey('_axisAccuracy', 'AXIS_ACCURACY', default=DEFAULT_AXIS_ACCURACY)
예제 #45
0
 def _defineConfig(self):
     AbstractHardwarePlugin._defineConfig(self)
     ShutterPlugin._defineConfig(self)
예제 #46
0
 def init(self):
     Logger().trace("PixOrbAxis.init()")
     self._hardware.setAxis(AXIS_TABLE[self.capacity])
     #self._hardware.setBreakAxis(BREAK_TABLE[self.capacity])
     AbstractHardwarePlugin.init(self)
     self.configure()
예제 #47
0
 def shutdown(self):
     Logger().trace("MerlinOrionShutter.shutdown()")
     self._triggerOffShutter()
     AbstractHardwarePlugin.shutdown(self)
     ShutterPlugin.shutdown(self)
예제 #48
0
 def _init(self):
     Logger().trace("PanoduinoAxis._init()")
     AbstractHardwarePlugin._init(self)
     AbstractAxisPlugin._init(self)
     self._hardware = PololuMicroMaestroHardware()