PLCGenerator.py
changeset 1614 f8f05f849831
parent 1603 18279f12a6be
child 1626 0779c1b18c01
equal deleted inserted replaced
1613:41ca586da9dc 1614:f8f05f849831
   391                        ("(", ())]
   391                        ("(", ())]
   392             args = []
   392             args = []
   393             single = task.getsingle()
   393             single = task.getsingle()
   394             # Single argument if exists
   394             # Single argument if exists
   395             if single is not None:
   395             if single is not None:
       
   396                 if len(single) == 0:
       
   397                     msg = _("Source signal has to be defined for single task '{a1}' in resource '{a2}.{a3}'.").\
       
   398                           format(a1 = task.getname(), a2 = config_name, a3 = resource.getname())
       
   399                     raise PLCGenException, msg
       
   400 
   396                 if single[0]=='[' and single[-1]==']' :
   401                 if single[0]=='[' and single[-1]==']' :
   397                     SNGLKW = "MULTI"
   402                     SNGLKW = "MULTI"
   398                 else:
   403                 else:
   399                     SNGLKW = "SINGLE"
   404                     SNGLKW = "SINGLE"
   400                 resrce += [(SNGLKW + " := ", ()),
   405                 resrce += [(SNGLKW + " := ", ()),