PLCControler.py
changeset 1505 5ecb16be9a3c
parent 1502 62eb21aab1fb
child 1508 4c645e6b8c98
equal deleted inserted replaced
1504:d3f97b72c02a 1505:5ecb16be9a3c
  2315             # Get ids already by all the instances in edited element
  2315             # Get ids already by all the instances in edited element
  2316             used_id = dict([(instance.getlocalId(), True) for instance in element.getinstances()])
  2316             used_id = dict([(instance.getlocalId(), True) for instance in element.getinstances()])
  2317             new_id = {}
  2317             new_id = {}
  2318 
  2318 
  2319             try:
  2319             try:
  2320                 instances, error = LoadPouInstances(text.encode("utf-8"), bodytype)
  2320                 instances, error = LoadPouInstances(text, bodytype)
  2321             except:
  2321             except:
  2322                 instances, error = [], ""
  2322                 instances, error = [], ""
  2323             if error is not None or len(instances) == 0:
  2323             if error is not None or len(instances) == 0:
  2324                 return _("Invalid plcopen element(s)!!!")
  2324                 return _("Invalid plcopen element(s)!!!")
  2325 
  2325