Fixed sequel of 5f79b194fa63 'SVGHMI: filter out temporary variables created while generating ST code out of FBD.'. Some ref to temporary variables are still not using the _TMP_ prefix. They are quite hard to find, so to be continued... svghmi
authorEdouard Tisserant
Thu, 05 Sep 2019 08:35:33 +0200
branchsvghmi
changeset 2769 b20c94352074
parent 2768 31785529a657
child 2770 41fc23fd21c4
Fixed sequel of 5f79b194fa63 'SVGHMI: filter out temporary variables created while generating ST code out of FBD.'. Some ref to temporary variables are still not using the _TMP_ prefix. They are quite hard to find, so to be continued...
PLCGenerator.py
--- a/PLCGenerator.py	Tue Sep 03 12:17:33 2019 +0200
+++ b/PLCGenerator.py	Thu Sep 05 08:35:33 2019 +0200
@@ -935,7 +935,7 @@
             if invar.getformalParameter() == "EN":
                 if len(invar.getconnectionPointIn().getconnections()) > 0:
                     if blk.getinstanceName() is None:
-                        var_name = "%s%d_ENO" % (blk.gettypeName(), blk.getlocalId())
+                        var_name = "_TMP_%s%d_ENO" % (blk.gettypeName(), blk.getlocalId())
                     else:
                         var_name = "%s.ENO" % blk.getinstanceName()
                     return var_name