Example #1
0
def set_range(_range):
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        device.set_range(_range)


#def get_updated_values():
#    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
#        mode = device.get_mode()
#        #ps_voltage = device.get_ps()
#        range = device.get_range()
#    return mode, range # ps_voltage)
Example #2
0
def device_action(args):
    with SIMPS() as device:
        if (args.action == 'ps') and (args.enable == True):
            device.enable_ps()
        elif (args.action == 'ps') and (args.disable == True):
            device.disable_ps()
        elif (args.action == 'fg') and (args.enable == True):
            device.enable_fg()
        elif (args.action == 'fg') and (args.disable == True):
            device.disable_fg()
        elif (args.action == 'measurement') and (args.range != None):
            device.set_range(args.range)
        elif (args.action == 'measurement') and (args.get_range == True):
            print('The SIMPS ATE device is in measurement range %i.' %
                  device.get_range())
        elif (args.action == 'debug') and (args.validate_communications
                                           == True):
            device.validate_communications()
        elif (args.action == 'mode'):
            print('The SIMPS ATE device is operating in the %s mode.' %
                  device.get_mode())
        elif (args.action == 'ps') and (args.set_voltage != None):
            device.set_ps(args.set_voltage)
        elif (args.action == 'program'):
            device.program(args.ps_voltage, args.frequency, args.waveform,
                           args.range)
        elif (args.action == 'measurement') and (args.take_measurement
                                                 == True):
            fg_measurements, dut_measurements, ps_voltage = device.measurement(
            )
            print('\n----- Current power supply voltage: %r' % ps_voltage)
            print('\n----- DUT measurements:')
            for i in range(MEASUREMENT_SAMPLES * MEASUREMENT_PERIODS):
                print('\t%i: %r' % (i, round(dut_measurements[i], 4)))
            print('\n----- Function generator measurements:')
            for i in range(MEASUREMENT_SAMPLES * MEASUREMENT_PERIODS):
                print('\t%i: %r' % (i, round(fg_measurements[i], 4)))
Example #3
0
def set_ps(ps_voltage):
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        device.set_ps(ps_voltage)
Example #4
0
def get_range():
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        range = device.get_range()
    return range
Example #5
0
def enable_fg():
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        device.enable_fg()
Example #6
0
def disable_ps():
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        device.disable_ps()
Example #7
0
def start_measurement():
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        fg_measurements, dut_measurements, ps_voltage = device.measurement()
    return (fg_measurements, dut_measurements, ps_voltage)
Example #8
0
def program(ps_voltage, frequency, waveform_table, _range):
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        device.program(ps_voltage, frequency, waveform_table, _range)
Example #9
0
def get_mode():
    with SIMPS(connect_timeout=CONNECT_TIMEOUT) as device:
        mode = device.get_mode()
    return mode