Bug on ST code generating for variables with the same name than POU when POU isn't a function fixed
--- 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()