# HG changeset patch # User laurent # Date 1253019743 -7200 # Node ID 0e389fa5b160b0e9d8781808f6edaf467ff8e3c2 # Parent 0a324a87498170cc720fc430333fef4664597b2c Bug on ST code generating for variables with the same name than POU when POU isn't a function fixed diff -r 0a324a874981 -r 0e389fa5b160 PLCGenerator.py --- a/PLCGenerator.py Tue Sep 15 14:59:33 2009 +0200 +++ b/PLCGenerator.py Tue Sep 15 15:02:23 2009 +0200 @@ -610,7 +610,7 @@ if isinstance(instance, (plcopen.fbdObjects_inVariable, plcopen.fbdObjects_outVariable, plcopen.fbdObjects_inOutVariable)): expression = instance.getexpression() var_type = self.GetVariableType(expression) - if expression == pou.getname(): + if pou.getpouType() == "function" and expression == pou.getname(): returntype_content = pou.interface.getreturnType().getcontent() if returntype_content["name"] == "derived": var_type = returntype_content["value"].getname()