etherlab/EthercatCIA402Slave.py
changeset 2362 6d31ef14f396
parent 2360 2a3d022a7dac
child 2363 9c7da6ff6a34
equal deleted inserted replaced
2361:5d6ce74f7835 2362:6d31ef14f396
   157                     for name_frmt, iec_type, var_name_frmt, location_frmt in
   157                     for name_frmt, iec_type, var_name_frmt, location_frmt in
   158                         [("%s Network Position", "UINT", "%s_pos", "%%IW%s"),
   158                         [("%s Network Position", "UINT", "%s_pos", "%%IW%s"),
   159                          ("%s Axis Ref", "AXIS_REF", "%s", "%%IW%s.402")]]
   159                          ("%s Axis Ref", "AXIS_REF", "%s", "%%IW%s.402")]]
   160         children.extend(self.CTNParent.GetDeviceLocationTree(
   160         children.extend(self.CTNParent.GetDeviceLocationTree(
   161                             self.GetSlavePos(), current_location, axis_name))
   161                             self.GetSlavePos(), current_location, axis_name))
   162         return  {"name": axis_name,
   162         return {
   163                  "type": LOCATION_CONFNODE,
   163             "name": axis_name,
   164                  "location": self.GetFullIEC_Channel(),
   164             "type": LOCATION_CONFNODE,
   165                  "children": children,
   165             "location": self.GetFullIEC_Channel(),
       
   166             "children": children,
   166         }
   167         }
   167 
   168 
   168     def CTNGlobalInstances(self):
   169     def CTNGlobalInstances(self):
   169         current_location = self.GetCurrentLocation()
   170         current_location = self.GetCurrentLocation()
   170         return [("%s_%s" % (block_infos["blocktype"],
   171         return [("%s_%s" % (block_infos["blocktype"],