Fixed bug when starting simulation. In some case PLC status was asked before local runtime was connected.
authorLaurent Bessard
Thu, 03 Oct 2013 22:59:38 +0200
changeset 57 4b838bdedc16
parent 56 a4bc15ac7998
child 58 96741ddb78c0
Fixed bug when starting simulation. In some case PLC status was asked before local runtime was connected.
LPCManager.py
--- a/LPCManager.py	Fri Sep 27 14:06:59 2013 +0200
+++ b/LPCManager.py	Thu Oct 03 22:59:38 2013 +0200
@@ -1006,8 +1006,6 @@
         """
         Method called by user to Simulate PLC
         """
-        self.CurrentMode = SIMULATION_MODE
-        
         uri = "LOCAL://"
         try:
             self._SetConnector(connectors.ConnectorFactory(uri, self))
@@ -1022,6 +1020,8 @@
             self.StopSimulation()
             return False
         
+        self.CurrentMode = SIMULATION_MODE
+        
         buildpath = self._getBuildPath()
         
         # Eventually create build dir