/// <summary> /// load a PLC Program in the Program-Memory /// </summary> public void loadPLC() { if (m_CurPLCState != ePLCState.STOP && m_CurPLCState != ePLCState.INIT) { return; } //m_CurPLCState = ePLCState.STOP; string msg = ""; if (loadPLCProgram(ref m_byaInstrMemory, out msg)) { Console.Clear(); Console.WriteLine("ERROR with Object file:"); Console.WriteLine(msg); Console.ReadKey(); return; } if (m_CurPLCState == ePLCState.STOP) { Console.Clear(); Console.WriteLine("Loading of project done!"); Console.WriteLine(msg); Console.ReadKey(); m_PLCCPU = new PLCCPU(); m_PLCCPU.init( ref m_byaInstrMemory, ref m_byaStackMemory, ref m_byaInputMemory, ref m_byaOutputMemory, ref m_byaMarkerMemory); } }
/// <summary> /// load a PLC Program in the Program-Memory /// </summary> public void loadPLC() { if (m_CurPLCState != ePLCState.STOP && m_CurPLCState != ePLCState.INIT) return; //m_CurPLCState = ePLCState.STOP; string msg = ""; if (loadPLCProgram(ref m_byaInstrMemory, out msg)) { Console.Clear(); Console.WriteLine("ERROR with Object file:"); Console.WriteLine(msg); Console.ReadKey(); return; } if (m_CurPLCState == ePLCState.STOP) { Console.Clear(); Console.WriteLine("Loading of project done!"); Console.WriteLine(msg); Console.ReadKey(); m_PLCCPU = new PLCCPU(); m_PLCCPU.init( ref m_byaInstrMemory, ref m_byaStackMemory, ref m_byaInputMemory, ref m_byaOutputMemory, ref m_byaMarkerMemory); } }