etherlab/EtherCATManagementEditor.py
changeset 2361 5d6ce74f7835
parent 2360 2a3d022a7dac
child 2363 9c7da6ff6a34
equal deleted inserted replaced
2360:2a3d022a7dac 2361:5d6ce74f7835
  1465         # data default setting
  1465         # data default setting
  1466         if self.Controler.CommonMethod.RegData == "":
  1466         if self.Controler.CommonMethod.RegData == "":
  1467             self.CompactViewCheckbox.Disable()
  1467             self.CompactViewCheckbox.Disable()
  1468             for index in range(4):
  1468             for index in range(4):
  1469                 self.RegisterNotebook.RegPage[index].MainTable.SetValue(self, 0, index*512, (index+1)*512)
  1469                 self.RegisterNotebook.RegPage[index].MainTable.SetValue(self, 0, index*512, (index+1)*512)
  1470         else: # If data was saved,
  1470         else:  # If data was saved,
  1471             self.BasicSetData()
  1471             self.BasicSetData()
  1472             self.ParseData()
  1472             self.ParseData()
  1473             for index in range(4):
  1473             for index in range(4):
  1474                 self.RegisterNotebook.RegPage[index].MainTable.SetValue(self, self.RegMonitorData, index*512, (index+1)*512)
  1474                 self.RegisterNotebook.RegPage[index].MainTable.SetValue(self, self.RegMonitorData, index*512, (index+1)*512)
  1475 
  1475 
  1559                         if property in register.attributes.keys():
  1559                         if property in register.attributes.keys():
  1560                             if type == "type":
  1560                             if type == "type":
  1561                                 if register.attributes[property].value == value:
  1561                                 if register.attributes[property].value == value:
  1562                                     self.GetRegisterInfo(reg_info_tree, register)
  1562                                     self.GetRegisterInfo(reg_info_tree, register)
  1563                                     break
  1563                                     break
  1564                             else: # type == "number"
  1564                             else:  # type == "number"
  1565                                 if register.attributes[property].value < value:
  1565                                 if register.attributes[property].value < value:
  1566                                     self.GetRegisterInfo(reg_info_tree, register)
  1566                                     self.GetRegisterInfo(reg_info_tree, register)
  1567                                     break
  1567                                     break
  1568                         else:
  1568                         else:
  1569                             self.GetRegisterInfo(reg_info_tree, register)
  1569                             self.GetRegisterInfo(reg_info_tree, register)
  1606                             if property in detail.attributes.keys():
  1606                             if property in detail.attributes.keys():
  1607                                 if type == "type":
  1607                                 if type == "type":
  1608                                     if detail.attributes[property].value == value:
  1608                                     if detail.attributes[property].value == value:
  1609                                         self.GetRegisterDetailInfo(reg_info_tree, reg_index, detail)
  1609                                         self.GetRegisterDetailInfo(reg_info_tree, reg_index, detail)
  1610                                         break
  1610                                         break
  1611                                 else: # type == "number"
  1611                                 else:  # type == "number"
  1612                                     if detail.attributes[property].value < value:
  1612                                     if detail.attributes[property].value < value:
  1613                                         self.GetRegisterDetailInfo(reg_info_tree, reg_index, detail)
  1613                                         self.GetRegisterDetailInfo(reg_info_tree, reg_index, detail)
  1614                                         break
  1614                                         break
  1615                             else:
  1615                             else:
  1616                                 self.GetRegisterDetailInfo(reg_info_tree, reg_index, detail)
  1616                                 self.GetRegisterDetailInfo(reg_info_tree, reg_index, detail)
  1703                     else:
  1703                     else:
  1704                         char_data = char_data + "."
  1704                         char_data = char_data + "."
  1705                 row_data.append(char_data)
  1705                 row_data.append(char_data)
  1706 
  1706 
  1707                 self.RegMonitorData.append(row_data)
  1707                 self.RegMonitorData.append(row_data)
  1708                 reg_word = "" # initialize regWord
  1708                 reg_word = ""  # initialize regWord
  1709                 row_data = []
  1709                 row_data = []
  1710 
  1710 
  1711     def OnReloadButton(self, event):
  1711     def OnReloadButton(self, event):
  1712         """
  1712         """
  1713         Handle the click event of the 'Reload' button.
  1713         Handle the click event of the 'Reload' button.