Update gauge/LiveProd data retrieving

This commit is contained in:
Samuele Locatelli
2020-07-02 15:09:22 +02:00
parent 5d9fc60626
commit 28c6cfac99
3 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -8,19 +8,19 @@ namespace CMS_CORE_Library.Models
#region Thermo models
/// <summary>
/// Represents thermo gauge data
/// Represents thermo LIVE prod data (gauge, time adv...)
/// </summary>
public class GaugeModel
public class LiveProdDataModel
{
public uint TimeAdv { get; set; } = 0;
public int Power { get; set; } = 0;
public int Vacuum { get; set; } = 0;
public int Air { get; set; } = 0;
public double TimeAdv { get; set; } = 0;
public double Power { get; set; } = 0;
public double Vacuum { get; set; } = 0;
public double Air { get; set; } = 0;
public override bool Equals(object obj)
{
// Object is not a GaugeModel instance
if (!(obj is GaugeModel item))
if (!(obj is LiveProdDataModel item))
return false;
if (TimeAdv != item.TimeAdv)
+1 -1
View File
@@ -728,7 +728,7 @@ namespace CMS_CORE_Library
/// <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
/// </summary>
/// <param name="gaugeData">Reference to the value of the gauge data</param>
public abstract CmsError PLC_RGaugeData(ref ThermoModels.GaugeModel gaugeData);
public abstract CmsError PLC_RGaugeData(ref ThermoModels.LiveProdDataModel gaugeData);
/// <summary>
/// Get current Production Info data
/// </summary>
+2 -2
View File
@@ -2198,7 +2198,7 @@ namespace CMS_CORE_Library.S7Net
/// </summary>
/// <param name="gaugeData"></param>
/// <returns></returns>
public override CmsError PLC_RGaugeData(ref ThermoModels.GaugeModel gaugeData)
public override CmsError PLC_RGaugeData(ref ThermoModels.LiveProdDataModel gaugeData)
{
List<int> Values = new List<int>();
CmsError libraryError = MEM_RWIntegerList(R, 1, MACHINE_GAUGE_DATA.MemType, MACHINE_GAUGE_DATA.Address, MACHINE_GAUGE_DATA.SubAddress, MACHINE_GAUGE_DATA.Size / 4, ref Values);
@@ -2206,7 +2206,7 @@ namespace CMS_CORE_Library.S7Net
if (libraryError.IsError())
return libraryError;
gaugeData = new ThermoModels.GaugeModel()
gaugeData = new ThermoModels.LiveProdDataModel()
{
TimeAdv = Convert.ToUInt32(Values[0]),
Power = Values[1],