示例#1
0
    M.Write(Client, WF12H_Tag, WF12H_Write_Value) #Write the calculated value to each window frame
    M.Write(Client, WF13H_Tag, WF13H_Write_Value)
    
    RFBM_Collection = M.Read(Client, Target_Tag, Average = True, count = count, sleep_time = sleep) #Read the Target tag count times and average
    
    Full_Data_Set.append([M.Read(Client, WF12H_Tag), M.Read(Client, WF13H_Tag), M.Read(Client, WF12V_Tag), M.Read(Client, WF13V_Tag), RFBM_Collection]) #Append all data to the current list
    
    if dBm_to_Watts(RFBM_Collection)/dBm_to_Watts(Start_Power) < Threshold_Percent*0.01: #Check to see that we are above our Threshold
        break

#############################
### Back to Center
#############################

#This function will walk us back to the start positions without taking data
M.Ramp_Two(Client, WF12H_Tag, WF13H_Tag, Magnet_1_Stop = WF12H_Start, Magnet_2_Stop = WF13H_Start, Resolution = Right_Steps)

#############################
### To the left
#############################

#Repeat the following loop with same logic with the difference being in the write value calculation
Full_Data_Set.append([M.Read(Client, WF12H_Tag),
                     M.Read(Client, WF13H_Tag),
                     M.Read(Client, WF12V_Tag),
                     M.Read(Client, WF13V_Tag),
                     M.Read(Client, Target_Tag, Average = True, count = count, sleep_time = sleep)])

for Left_Steps in range(1, Read_Steps + 1):
    if H_Broken == True:
        break
        M.Read(Client, WF7H_Tag),
        M.Read(Client, WF6V_Tag),
        M.Read(Client, WF7V_Tag), Target_1_Collection, Target_2_Collection
    ])

    if abs(Target_1_Collection + Target_2_Collection) < abs(
            Threshold_Percent * Start_Current * .01):
        break

#############################
### Back to Center
#############################

M.Ramp_Two(Client,
           WF6H_Tag,
           WF7H_Tag,
           Magnet_1_Stop=WF6H_Start,
           Magnet_2_Stop=WF7H_Start,
           Resolution=Right_Steps)

#############################
### To the left
#############################

Full_Data_Set.append([
    M.Read(Client, WF6H_Tag),
    M.Read(Client, WF7H_Tag),
    M.Read(Client, WF6V_Tag),
    M.Read(Client, WF7V_Tag),
    M.Read(Client, Target_Tag, Average=True, count=count, sleep_time=sleep),
    M.Read(Client, Target_Tag_2, Average=True, count=count, sleep_time=sleep)
])
示例#3
0
    
    Target_1_Collection = M.Read(Client, Target_Tag, Average = True, count = count, sleep_time = sleep) #Averaging the collection at these points for each dump
    Target_2_Collection = M.Read(Client, Target_Tag_2, Average = True, count = count, sleep_time = sleep) 
    
    Full_Data_Set.append([M.Read(Client, WF6H_Tag), M.Read(Client, WF7H_Tag), M.Read(Client, WF6V_Tag), M.Read(Client, WF7V_Tag), Target_1_Collection, Target_2_Collection, M.Read(Client, EC_Tag)]) #Adding all the data from this point to the array
    
    if abs(Target_1_Collection + Target_2_Collection) < abs(Threshold_Percent*Start_Current*.01): #Checking our threshold
        break

#############################
### Back to Center
#############################

print("Moving to center")

M.Ramp_Two(Client, WF6H_Tag, WF7H_Tag, Magnet_1_Stop = WF6H_Start, Magnet_2_Stop = WF7H_Start, Resolution = Right_Steps) #Moves back to the start in the same # of steps taken

#############################
### To the left
#############################

#####
# --------------- This is the same loop as above with flipped signs for the calculations
#####
print("Left Displacement")

Full_Data_Set.append([M.Read(Client, WF6H_Tag),
                     M.Read(Client, WF7H_Tag),
                     M.Read(Client, WF6V_Tag),
                     M.Read(Client, WF7V_Tag),
                     M.Read(Client, Target_Tag, Average = True, count = count, sleep_time = sleep),
示例#4
0
        print("H:{:.2f} | {:.3f} | {:.3f} | {:.3f}".format(
            X_Disp, Target_1_Collection + Target_2_Collection,
            WF6H_Write_Value, WF7H_Write_Value))

        if abs(Target_1_Collection + Target_2_Collection) < abs(
                Threshold_Percent * Start_Current * .01):
            break

    #############################
    ### Back to Center
    #############################

    M.Ramp_Two(Client,
               WF6H_Tag,
               WF7H_Tag,
               Magnet_1_Stop=WF6H_Start,
               Magnet_2_Stop=WF7H_Start,
               Resolution=Right_Steps)

    #############################
    ### To the left
    #############################

    Full_Data_Set.append([
        M.Read(Client, WF6H_Tag),
        M.Read(Client, WF7H_Tag),
        M.Read(Client, WF6V_Tag),
        M.Read(Client, WF7V_Tag),
        M.Read(Client, Target_Tag, Average=True, count=count,
               sleep_time=sleep),
        M.Read(Client,