You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CaiQie/Tool/Model/HmiPoint.cs

113 lines
3.1 KiB
C#

3 months ago
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
{
/// <summary>
/// DInt 供料电机速度
/// </summary>
public static readonly string feeding_motor_speed = "feeding_motor_speed";
3 months ago
public static UInt32 GetFeedingMotorSpeed => GetValue(feeding_motor_speed);
3 months ago
/// <summary>
/// DInt 层合电机速度
/// </summary>
public static readonly string Laminated_motor_speed = "Laminated_motor_speed";
3 months ago
public static UInt32 GetLaminatedMotorSpeed => GetValue(Laminated_motor_speed);
3 months ago
/// <summary>
/// DInt 毛毡带电机速度
/// </summary>
public static readonly string Felt_belt_motor_speed = "Felt_belt_motor_speed";
3 months ago
public static UInt32 GetFeltBeltMotorSpeed => GetValue(Felt_belt_motor_speed);
3 months ago
/// <summary>
/// DInt 收料电机1速度
/// </summary>
3 months ago
public static readonly string Receiving_Electric_motor_speed = "Receiving_Electric_motor_speed";
public static UInt32 GeReceivingMotorSpeed => GetValue(Receiving_Electric_motor_speed);
/// <summary>
/// 层合生产数量
/// </summary>
public static readonly string Product_counter2 = "Product_counter2";
public static UInt32 GetProduct_counter2 => GetValue(Product_counter2);
/// <summary>
/// 裁切1生产数量
/// </summary>
public static readonly string CQ_Chip1_counter = "CQ_Chip1_counter";
3 months ago
3 months ago
public static UInt32 GetCQ_Chip1_counter => GetValue(CQ_Chip1_counter);
3 months ago
/// <summary>
3 months ago
/// 裁切2生产数量
3 months ago
/// </summary>
3 months ago
public static readonly string CQ_Chip2_counter = "CQ_Chip2_counter";
public static UInt32 GetCQ_Chip2_counter => GetValue(CQ_Chip2_counter);
3 months ago
3 months ago
/// <summary>
/// 裁刀1温度
/// </summary>
public static readonly string QDWD1SS = "QDWD1SS";
public static UInt32 GetQDWD1SS => GetValue(QDWD1SS);
/// <summary>
/// 裁刀1温度
/// </summary>
public static readonly string QDWD2SS = "QDWD2SS";
public static UInt32 GetQDWD2SS => GetValue(QDWD2SS);
/// <summary>
/// 设备内部温度
/// </summary>
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;
}
3 months ago
public static string[] GetValue()
{
List<string> ls = new List<string>
{
feeding_motor_speed,
Laminated_motor_speed,
Felt_belt_motor_speed,
3 months ago
Receiving_Electric_motor_speed,
3 months ago
};
return ls.ToArray();
}
}
}