Пример #1
0
    def test_linear_sweep(self):
        chan_command = "DE CH1, '{voltage_name}','{current_name}',1,1"
        func_command = "VR1,1,5,1,0.01"
        voltage_name = random_id(CurrentVoltage.VOLTAGE) 
        current_name = random_id(CurrentVoltage.CURRENT)
        chan_command = chan_command.format(voltage_name = voltage_name, 
                current_name = current_name)
        sweep_smu = SMUSweep(1, SourceMode.VOLTAGE, SourceType.VOLTAGE, 1, 5, 1, 0.01, SweepType.LINEAR, voltage_name,
                             current_name)

        self.assertEqual(chan_command, sweep_smu._get_chan_cmd())
        self.assertEqual(func_command, sweep_smu._get_var1_cmd())
Пример #2
0
    def test_list_sweep(self):
        chan_command = "DE CH2, '{voltage_name}','{current_name}',1,1"
        func_command = "SS VL2,1,0.01,1,5,2,1,3,2,3,4,2"
        voltage_name = random_id(CurrentVoltage.VOLTAGE) 
        current_name = random_id(CurrentVoltage.CURRENT)
        chan_command = chan_command.format(voltage_name = voltage_name, 
                current_name = current_name)

        sweep_values = [1,5,2,1,3,2,3,4,2] # List of values to sweep
        compliance = 0.01 # Compliance

        list_smu = SMUList(2, SourceMode.VOLTAGE, SourceType.VOLTAGE, sweep_values, compliance, SlaveMaster.MASTER,
                           voltage_name, current_name)
        self.assertEqual(chan_command, list_smu._get_chan_cmd())
        self.assertEqual(func_command, list_smu._get_sweep_cmd())
Пример #3
0
    def test_constant(self):
        chan_command = "DE CH2,'{voltage_name}','{current_name}',2,3"
        func_command = "SS IC2,0.1,0.04"

        current_name = random_id(CurrentVoltage.CURRENT)
        voltage_name = random_id(CurrentVoltage.VOLTAGE)

        chan_command = chan_command.format(voltage_name = voltage_name,
                current_name = current_name)

        ch = 2
        output = 0.1
        compliance = 0.04

        constant_smu = SMUConstant(ch, SourceMode.CURRENT, SourceType.CURRENT, output, compliance, voltage_name,
                                   current_name)

        self.assertEqual(chan_command, constant_smu._get_chan_cmd())
        self.assertEqual(func_command, constant_smu._get_const_cmd())
Пример #4
0
    def test_step_sweep(self):
        chan_command = "DE CH{ch_number},'{volt_name}','{curr_name}',2,2"
        func_command = "SS IP {start},{step},{steps},{compliance}"

        ch_number = 3
        curr_name = random_id(CurrentVoltage.CURRENT)
        volt_name = random_id(CurrentVoltage.VOLTAGE)
        start = 0.01
        step = 0.02
        steps = 15
        compliance = 0.01

        chan_command = chan_command.format(ch_number=ch_number, curr_name=curr_name, volt_name=volt_name)
        func_command = func_command.format(ch_number=ch_number, start=start, step=step, steps=steps, compliance=compliance)

        step_smu = SMUStep(ch_number, SourceMode.CURRENT, SourceType.CURRENT, start, step, steps, compliance, volt_name,
                           curr_name)
        
        self.assertEqual(chan_command, step_smu._get_chan_cmd())
        self.assertEqual(func_command, step_smu._get_var2_cmd())