using System; using System.Text; using System.Linq; using System.Drawing; using System.Diagnostics; using System.Windows.Forms; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Tango.PMR.Stubs; using Tango.Stubs.UI; public void OnExecute(StubManager stubManager) { // Request ---- // UInt32 : Address // UInt32 : Value // Response ---- // String : Status // UInt32 : StatusWord //stubManager.Run("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0xFFFF); // turn ON all the heaters /* int Zone = 4; const Int32 SSR = 5; const Int32 SSR_REG = 0x40; int PT100 = 4; */ //---------------------------------- ///* int Zone = 3; const Int32 SSR = 6; const Int32 SSR_REG = 0x20; const Int32 PT100 = 3; //*/ //---------------------------------- /* int Zone = 2; const Int32 SSR = 7; const Int32 SSR_REG = 0x10; const Int32 PT100 = 2; */ //------------------------------------- /* int Zone = 1; const Int32 SSR = 8; const Int32 SSR_REG = 0x08; const Int32 PT100 = 1; */ //------------------------------------- //stubManager.Run("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, SSR_REG); // turn ON the heater for (int i = 0; i < 15; i++) { //stubManager.Run("StubTempSensorRequest" ,1); //measer the teperature //stubManager.Run("StubTempSensorRequest" ,2); //measer the teperature //stubManager.Run("StubTempSensorRequest" ,3); //measer the teperature //stubManager.Run("StubTempSensorRequest" ,4); //measer the teperature //stubManager.Run("StubTempSensorRequest" ,5); //measer the teperature // Request ---- // UInt32 : STempSensorID // Response ---- // UInt32 : TempSensorID // UInt32 : TemperatureCMultBy100 var response = stubManager.Run("StubTempSensorRequest" ,PT100); //measer the teperature stubManager.Write(response.TemperatureCMultBy100); stubManager.Write("\n\n"); Thread.Sleep(1500); //stubManager.Run("StubTempSensorRequest" ,PT100_1); //measer the teperature //Thread.Sleep(1500); } stubManager.Run("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0x0000); // turn OFF all the heaters /* for (int i = 0; i < 100; i++) { stubManager.Run("StubTempSensorRequest" ,PT100);//measer the teperature Thread.Sleep(1500); } */ }