diff --git a/RTD_8chanels_board.cs b/RTD_8chanels_board.cs
index 8b0ffa6..c12a902 100644
--- a/RTD_8chanels_board.cs
+++ b/RTD_8chanels_board.cs
@@ -1,6 +1,4 @@
-using System;
-using System.Device.Gpio;
-using System.Device.I2c;
+using System.Device.I2c;
namespace Libs_SequentMicrosystems
@@ -46,11 +44,27 @@ namespace Libs_SequentMicrosystems
return val;
}
+ ///
+ /// Get data from all inputs on stack level
+ ///
+ /// Number of level in stack
+ /// Number of decimals numbers of measured resistance
+ /// Measured resistances of all inputs
+ public float[] GetStack(byte stack, byte precision = 2)
+ {
+ float[] chanels = new float[8]; //initialize float array
- //public float[] GetStack(byte stack)
- //{
+ chanels[0] = (float)Math.Round(Get(stack, 1), precision); //write readed value from input to array
+ chanels[1] = (float)Math.Round(Get(stack, 2), precision);
+ chanels[2] = (float)Math.Round(Get(stack, 3), precision);
+ chanels[3] = (float)Math.Round(Get(stack, 4), precision);
+ chanels[4] = (float)Math.Round(Get(stack, 5), precision);
+ chanels[5] = (float)Math.Round(Get(stack, 6), precision);
+ chanels[6] = (float)Math.Round(Get(stack, 7), precision);
+ chanels[7] = (float)Math.Round(Get(stack, 8), precision);
- //}
+ return chanels; //return array
+ }
}