Exemplo n.º 1
0
controller_board.set_switching_mode(2)

file_content += "*** A (B) to C/A (D/B) path ***\r\n\r\n"
switches_board.u1_set_rf1()
switches_board.u2_set_rf2()
path_test()

file_content += "*** C (D) to A/C (B/D) path ***\r\n\r\n"
switches_board.u1_set_rf2()
switches_board.u2_set_rf1()
path_test()

####################################################################################################
#
# End of test routine
#
####################################################################################################

# Writes the content of the file

output_file = open(file_name, "w")
output_file.write(file_content)
output_file.close()
sys.stdout.write("Test was completed sucessfully.\n\n")

# Terminates all connections to external hardware

controller_board.close_connection()
vna.close_connection()
switches_board.close_connection()
Exemplo n.º 2
0
    temperature=round(temperature,2)
    if (temperature<temp_min or temperature>temp_max):
        fail=1
    if (fail==1):
        temp_test="Temperature Measurement         --> FAILED"
    elif (fail==0):
        temp_test="Temperature Measurement         --> Ok"
else:
    temp_test="Temperature Measurement         --> Not Performed"

sw_version="RFFE Software Version: " +str(rffe.get_software_version())

#Print the test result in the txt file
test_result=([current_time],[att_sweep_resultA],[att_sweep_resultB],[rf_sw_result],[freq_resp_resultA],[freq_resp_resultB],[return_loss_resultA],[return_loss_resultB],[xtalk_resp_resultA],[xtalk_resp_resultB],[lin_resultA],[lin_resultB],[temp_test])
test_lib.list_to_file(0,test_result,datapath_save + serial_number + "_result.txt")

#print metadata with the correct filename
shutil.copy2(metadata_path,datapath_save+serial_number+"_metadata.txt")

#print test result values with the correct filename
test_result_values=([current_time],[sw_version],[att_sweep_resultA],[step_sizeA],[att_sweep_resultB],[step_sizeB],[rf_sw_result],[s21_sw_result],[freq_resp_resultA],[freq_resp_resultB],[s21_freq_resp],[return_loss_resultA],[return_loss_resultB],[s11_freq_resp],[lin_resultA],[pow_sweep_resultA],[lin_resultB],[pow_sweep_resultB],[xtalk_resp_resultA],[xtalk_resp_resultB],[xtalk_result],[temp_test],[temperature])
test_lib.list_to_file(0,test_result_values,datapath_save + serial_number + "_result_values.txt")

print("Test finished!")

##Close ethernet connection
vna.close_connection()
rffe.close_connection()
rfsw.close_connection()
sgen.close_connection()
Exemplo n.º 3
0
    RFFE_CONTROLLER_BOARD_IP = '10.2.117.' + str(rffe_numb)
    try:
        rffe = RFFEControllerBoard(RFFE_CONTROLLER_BOARD_IP)
    except (socket.error):
        sys.stdout.write(
            "Unable to reach the RF front-end controller board with the IP: " +
            RFFE_CONTROLLER_BOARD_IP + " through the network. " +
            "Skipping it...\n")
        continue

    #Attenuators test
    for att in attenuation_values:
        rffe.set_attenuator_value(att)
        read_att = rffe.get_attenuator_value()
        if not read_att == att:
            print("Board " + RFFE_CONTROLLER_BOARD_IP +
                  " failed in attenuator test! " + "It should return att = " +
                  str(att) + " but got att = " + read_att)
    print("Board " + RFFE_CONTROLLER_BOARD_IP + " passed attenuator test! ")

    #Temperature reading test
    tmp1 = rffe.get_temp1()
    tmp2 = rffe.get_temp2()
    print("Temperature -> 1: " + str(tmp1) + ", 2: " + str(tmp2))

    #Test Reset
    #rffe.reset()

    #Close connection
    rffe.close_connection()
Exemplo n.º 4
0
switches_board.u1_set_rf1()
switches_board.u2_set_rf2()
path_test()

file_content += "*** C (D) to A/C (B/D) path ***\r\n\r\n"
switches_board.u1_set_rf2()
switches_board.u2_set_rf1()
path_test()


####################################################################################################
#
# End of test routine
#
####################################################################################################


# Writes the content of the file

output_file = open(file_name, "w")
output_file.write(file_content)
output_file.close()
sys.stdout.write("Test was completed sucessfully.\n\n")


# Terminates all connections to external hardware

controller_board.close_connection()
vna.close_connection()
switches_board.close_connection()