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; public void OnExecute(StubManager stubManager) { //need embedded version > 20-02-2019 //MIXCHIP_TEMP = 0 //DYEINGH_TEMP1 = 1 //DYEINGH_TEMP2 = 2 //DYEINGH_TEMP3 = 3 //DYEINGH_TEMP4 = 4 //DYEINGH_TEMP5 = 5 //DRYER_TEMP1 = 6 //DRYER_TEMP2 = 7 //DRYER_TEMP3 = 8 //AN_ENCLOSURETEMP1 = 9 //AN_ENCLOSURETEMP2 = 10 //AN_ENCLOSURETEMP3 = 11 const Int32 Sensor = 2 ;//0-11 //Pay attention - We are changing the ADS setup - it will be updated only after the second call. - So run the stub twice !!!!!!!!!!!!!!! var response = stubManager.Run("StubTempSensorRequest" ,0x100 | Sensor ); stubManager.WriteLine("ADS120 - Internal Temperature Sensor: "); stubManager.Write(response.TemperatureCMultBy100); stubManager.Write(" °C \t"); }