aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/ADS1220_Internal_Temperature_Sensor_PT100.cs
blob: 6c9d3de2bd51d93f005b84c9e96b0d2138b0405b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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<StubTempSensorResponse>("StubTempSensorRequest" ,0x100 | Sensor );
	
	stubManager.WriteLine("ADS120  - Internal Temperature Sensor: ");
	
	stubManager.Write(response.TemperatureCMultBy100);
	
	stubManager.Write(" °C  \t");
	
}