def setUp(self):
     self.ca = ChannelAccess(default_timeout=30,
                             device_prefix=DEVICE_PREFIX)
     self.ca_np = ChannelAccess(
         default_timeout=30)  # no device name prefix in PV
     self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
     self.ca.assert_that_pv_exists("CR0:BOARD_ID")
 def setUp(self):
     self._ioc = IOCRegister.get_running("refl")
     self.ca = ChannelAccess(default_timeout=30,
                             device_prefix=DEVICE_PREFIX)
     self.ca_galil = ChannelAccess(default_timeout=30, device_prefix="MOT")
     self.ca_cs = ChannelAccess(default_timeout=30, device_prefix="CS")
     self.ca_no_prefix = ChannelAccess()
     self.ca_cs.set_pv_value("MOT:STOP:ALL", 1)
     self.ca_cs.assert_that_pv_is("MOT:MOVING", 0, timeout=60)
     self.ca.set_pv_value("BL:MODE:SP", "NR")
     self.ca.set_pv_value("PARAM:S1:SP", 0)
     self.ca.set_pv_value("PARAM:S3:SP", 0)
     self.ca.set_pv_value("PARAM:SMANGLE:SP", 0)
     self.ca.set_pv_value("PARAM:SMOFFSET:SP", 0)
     self.ca.set_pv_value("PARAM:SMINBEAM:SP", "OUT")
     self.ca.set_pv_value("PARAM:THETA:SP", 0)
     self.ca.set_pv_value("PARAM:DET_POS:SP", 0)
     self.ca.set_pv_value("PARAM:DET_ANG:SP", 0)
     self.ca.set_pv_value("PARAM:DET_LONG:SP", 0)
     self.ca.set_pv_value("PARAM:S3INBEAM:SP", "IN")
     self.ca.set_pv_value("PARAM:CHOICE:SP", "MTR0205")
     self.ca_galil.set_pv_value("MTR0207", 0)
     self.ca.set_pv_value("PARAM:NOTINMODE:SP", 0)
     self.ca.set_pv_value("BL:MODE:SP", "NR")
     self.ca.set_pv_value("BL:MOVE", 1)
     self.ca_galil.assert_that_pv_is("MTR0105", 0.0)
     self.ca_cs.assert_that_pv_is("MOT:MOVING", 0, timeout=60)
 def setUp(self):
     self._ioc = IOCRegister.get_running("GALIL_01")
     ca_mot = ChannelAccess()
     ca_mot.assert_that_pv_exists("MOT:MTR0103", timeout=30)
     ca_mot.assert_setting_setpoint_sets_readback(DEFAULT_MOTOR_RESOLUTION,
                                                  set_point_pv="MOT:MTR0103.MRES", readback_pv="MOT:MTR0103.MRES", )
     self.ca = ChannelAccess(device_prefix=PREFIX)
     self.ca.assert_that_pv_exists("VEL:SP", timeout=30)
Exemple #4
0
 def setUp(self):
     self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
     self.ca = ChannelAccess(device_prefix=DEVICE_PREFIX)
     self.ca.assert_that_pv_exists("DISABLE", timeout=30)
     self.write_offset(0)
     self.ca.set_pv_value("RANGE", 1.0, sleep_after_set=0.0)
     self.write_simulated_field_values(ZERO_FIELD)
     self.write_simulated_alarm_level(self.ca.Alarms.NONE)
     self.ca.process_pv("TAKEDATA")
    def setUp(self):
        self._ioc = IOCRegister.get_running(IOC_PREFIX)
        self.ca = ChannelAccess(default_timeout=20)
        self.values = ["SIMPLE:VALUE1:SP", "SIMPLE:VALUE2:SP"]

        for pv in self.values:
            self.ca.assert_that_pv_exists(pv)

        self.reset_values_to_zero()
Exemple #6
0
    def setUp(self):
        self._ioc = IOCRegister.get_running(IOC_PREFIX)
        self.ca = ChannelAccess(default_timeout=20)

        for pv in [SIMPLE_VALUE_ONE, SIMPLE_VALUE_TWO]:
            self.ca.assert_that_pv_exists(pv)

        self.set_safe_values()
        self.ca.set_pv_value(MONITORING_ON_PV, "No")
        self.ca.assert_that_pv_is(MONITORING_ON_PV, "No")
Exemple #7
0
 def setUp(self):
     self._ioc = IOCRegister.get_running("GALIL_01")
     self.ca = ChannelAccess()
     self.ca.assert_that_pv_exists("MOT:MTR0101", timeout=30)
     for jaw in range(1, self.get_num_of_jaws() + 1):
         self.ca.assert_that_pv_exists(UNDERLYING_GAP_SP.format(jaw, "V"),
                                       timeout=30)
         self.ca.assert_that_pv_exists(UNDERLYING_GAP_SP.format(jaw, "H"),
                                       timeout=30)
     self.ca.assert_that_pv_exists(self.get_sample_pv() +
                                   ":{}GAP:SP".format("V"),
                                   timeout=30)
    def setUp(self):
        self.setup_jaws()
        self._ioc = IOCRegister.get_running("jaws")
        self.ca = ChannelAccess(default_timeout=30)
        for mtr in self.UNDERLYING_MTRS.values():
            self.ca.set_pv_value("{}.DISP".format(mtr), 0)
            self.ca.set_pv_value("{}.VMAX".format(mtr), 100)
            self.ca.set_pv_value("{}.VELO".format(mtr), 100)

        self.ca.set_pv_value("{}:ABLE:SP".format(JAWS_BASE_PV), 0)
        self.ca.set_pv_value("{}:LOCK:SP".format(JAWS_BASE_PV), 0)

        self.ca.set_pv_value("MOT:JAWS1:HGAP:SP", 0)
        self.ca.set_pv_value("MOT:JAWS1:VGAP:SP", 0)
    def setUp(self):
        self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
        self.assertIsNotNone(self._ioc)

        self.ca = ChannelAccess(device_prefix=DEVICE_PREFIX, default_timeout=3)

        self.ca.assert_that_pv_exists("VAL")
        self.ca.assert_that_pv_exists("VAL:SP")

        self.ca.assert_that_pv_is_number("STAB:IS_STABLE.E", TOLERANCE)

        # Need to do this to ensure buffer is properly up before starting any tests
        self.ca.assert_that_pv_exists("STAB:_VAL_BUFF")
        while int(self.ca.get_pv_value("STAB:_VAL_BUFF.NUSE")) < NUMBER_OF_SAMPLES:
            self.ca.process_pv("VAL")

        self.ca.set_pv_value("VAL.SIMS", 0)
def get_running_lewis_and_ioc(emulator_name=None, ioc_name=None):
    """
    Assert that the emulator and ioc have been started if needed.

    :param emulator_name: the name of the lewis emulator; None for don't check the emulator
    :param ioc_name: the name of the IOC
    :return: lewis launcher and ioc launcher tuple
    :rtype: (LewisLauncher, IocLauncher)
    """
    lewis = EmulatorRegister.get_running(emulator_name)
    ioc = IOCRegister.get_running(ioc_name)

    if ioc is None and (lewis is None and emulator_name is not None):
        raise AssertionError(
            "Emulator ({}) and IOC ({}) are not running".format(
                emulator_name, ioc_name))
    if ioc is None:
        raise AssertionError("IOC ({}) is not running".format(ioc_name))
    if lewis is None and emulator_name is not None:
        raise AssertionError(
            "Emulator ({}) is not running".format(emulator_name))

    return lewis, ioc
Exemple #11
0
    def setUp(self):
        self._ioc = IOCRegister.get_running("SAMPOS")

        self.ca = ChannelAccess(20, device_prefix=DEVICE_PREFIX)
        self.ca.assert_that_pv_exists("DISABLE", timeout=30)
 def setUp(self):
     self._ioc = IOCRegister.get_running("GALIL_01")
     self.ca = ChannelAccess(default_timeout=30)
     self.ca.assert_that_pv_exists(MOTOR, timeout=60)
     self.ca.assert_that_pv_exists(CLOSESTSHUTTER)
     self.ca.assert_that_pv_exists(CLOSEAPERTURE)
 def setUp(self):
     self._ioc = IOCRegister.get_running("FINS_01")
     self.ca = ChannelAccess(device_prefix=ioc_prefix)
    def setUp(self):
        self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
        self.assertIsNotNone(self._ioc)

        self.ca = ChannelAccess(device_prefix=None, default_timeout=20)
 def setUp(self):
     self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
     self.ca = ChannelAccess(20, device_prefix=DEVICE_PREFIX)
Exemple #16
0
 def setUp(self):
     self.ca = ChannelAccess(default_timeout=30,
                             device_prefix=DEVICE_PREFIX)
     self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
     self.ca.assert_that_pv_exists("DIRBASE")
     self._set_ramp_status(False)
Exemple #17
0
 def setUp(self):
     self._ioc = IOCRegister.get_running("LSI")
     self.ca = ChannelAccess(default_timeout=30,
                             device_prefix=DEVICE_PREFIX)
    def setUp(self):
        self._ioc = IOCRegister.get_running("gem_jaws")
        self.ca = ChannelAccess(default_timeout=30)

        [self.ca.assert_that_pv_exists(mot) for mot in all_motors]
Exemple #19
0
 def setUp(self):
     self._ioc = IOCRegister.get_running(DEVICE_PREFIX)
     # Comp mode is on a slow 10s read. Needs a longer timeout than default
     self.ca = ChannelAccess(device_prefix=DEVICE_PREFIX, default_timeout=30)
     self.ca.assert_that_pv_exists(self.COMP_MODE_PV)
 def setUp(self):
     self._ioc = IOCRegister.get_running("GALIL_01")
     self.ca = ChannelAccess(default_timeout=30)
     self.ca.assert_that_pv_exists("MOT:CHOPLIFT:STATUS", timeout=60)
Exemple #21
0
 def setUp(self):
     self._ioc = IOCRegister.get_running("refl")
     self.ca = ChannelAccess(default_timeout=30,
                             device_prefix=DEVICE_PREFIX)
     self.ca_galil = ChannelAccess(default_timeout=30, device_prefix="MOT")
     self.ca_galil.assert_that_pv_is("MTR0104", 0.0)