using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Tool.Model
{
public class HmiPoint
{
///
/// DInt 供料电机速度
///
public static readonly string feeding_motor_speed = "feeding_motor_speed";
public static UInt32 GetFeedingMotorSpeed => GetValue(feeding_motor_speed);
///
/// DInt 层合电机速度
///
public static readonly string Laminated_motor_speed = "Laminated_motor_speed";
public static UInt32 GetLaminatedMotorSpeed => GetValue(Laminated_motor_speed);
///
/// DInt 毛毡带电机速度
///
public static readonly string Felt_belt_motor_speed = "Felt_belt_motor_speed";
public static UInt32 GetFeltBeltMotorSpeed => GetValue(Felt_belt_motor_speed);
///
/// DInt 收料电机1速度
///
public static readonly string Receiving_Electric_motor_speed = "Receiving_Electric_motor_speed";
public static UInt32 GeReceivingMotorSpeed => GetValue(Receiving_Electric_motor_speed);
///
/// 层合生产数量
///
public static readonly string Product_counter2 = "Product_counter2";
public static UInt32 GetProduct_counter2 => GetValue(Product_counter2);
///
/// 裁切1生产数量
///
public static readonly string CQ_Chip1_counter = "CQ_Chip1_counter";
public static UInt32 GetCQ_Chip1_counter => GetValue(CQ_Chip1_counter);
///
/// 裁切2生产数量
///
public static readonly string CQ_Chip2_counter = "CQ_Chip2_counter";
public static UInt32 GetCQ_Chip2_counter => GetValue(CQ_Chip2_counter);
///
/// 裁刀1温度
///
public static readonly string QDWD1SS = "QDWD1SS";
public static UInt32 GetQDWD1SS => GetValue(QDWD1SS);
///
/// 裁刀1温度
///
public static readonly string QDWD2SS = "QDWD2SS";
public static UInt32 GetQDWD2SS => GetValue(QDWD2SS);
///
/// 设备内部温度
///
public static readonly string SWSS = "SWSS";
public static UInt32 GetSWSS => GetValue(SWSS);
private static UInt32 GetValue(string key)
{
var plc = PlcConnect.Instance;
var result = plc.ReadUInt32(key);
return result.IsSuccess ? result.Content : (uint)0;
}
public static string[] GetValue()
{
List ls = new List
{
feeding_motor_speed,
Laminated_motor_speed,
Felt_belt_motor_speed,
Receiving_Electric_motor_speed,
};
return ls.ToArray();
}
}
}