Exemplo n.º 1
0
 def CreateRanges(self):
     
     Ranges={}
     
     df_ranges=pd.read_excel('Ranges.xlsx',sheet_name=self.Model)
     
     for index,row in df_ranges.iterrows():
         
         Ranges[row['Function Name']]=Range(row['Function Name'],row['Primary Unit'],row['Primary Limit Low'],
                                  row['Primary Limit High'],row['Secondary Unit'],row['Secondary Limit Low'],
                                  row['Secondary Limit High'],row['Command'])
         
     return Ranges
Exemplo n.º 2
0
 def CreateRanges(self):
     '''
     This function reads the Ranges.xlsx sheet to populate this class with 
     what its functions, ranges, and the commands to access them are.
     '''
     df_ranges = pd.read_excel('Ranges.xlsx', sheet_name=self.Model)
     Ranges = {}
     for index, row in df_ranges.iterrows():
         Ranges[row['Function Name']] = Range(
             row['Function Name'], row['Primary Unit'],
             row['Primary Limit Low'], row['Primary Limit High'],
             row['Secondary Unit'], row['Secondary Limit Low'],
             row['Secondary Limit High'], row['Command'])
     return Ranges
Exemplo n.º 3
0
    def WriteRange(self, Range, TP):

        if "DC Voltage" in Range.getName():
            self.setDCVoltage(Range)