PLCGenerator.py
changeset 356 f6453b89e7f9
parent 340 5a305b7c6735
child 370 23af12b5a9fb
--- a/PLCGenerator.py	Fri May 22 09:30:04 2009 +0200
+++ b/PLCGenerator.py	Fri May 22 09:38:09 2009 +0200
@@ -615,6 +615,10 @@
                         parts = expression.split("#")
                         if len(parts) > 1:
                             var_type = parts[0]
+                        elif expression.startswith("'"):
+                            var_type = "STRING"
+                        elif expression.startswith('"'):
+                            var_type = "WSTRING"
                     if var_type is not None:
                         if isinstance(instance, (plcopen.fbdObjects_inVariable, plcopen.fbdObjects_inOutVariable)):
                             for connection in self.ExtractRelatedConnections(instance.connectionPointOut):
@@ -654,6 +658,7 @@
                 elif isinstance(instance, plcopen.commonObjects_continuation):
                     name = instance.getname()
                     connector = None
+                    var_type = "ANY"
                     for element in body.getcontentInstances():
                         if isinstance(element, plcopen.commonObjects_connector) and element.getname() == name:
                             if connector is not None: