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()