PLCGenerator.py
changeset 408 0e389fa5b160
parent 391 07447ee3538e
child 483 779a519f78f2
--- 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()