240 lines
5.4 KiB
C#
240 lines
5.4 KiB
C#
using CleanMachine.Model.BAS;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CleanMachineHMI
|
|
{
|
|
public class Device
|
|
{
|
|
|
|
|
|
public int SysRuningTime
|
|
{
|
|
get
|
|
{
|
|
return (int)PlcOperationHelper.Instance.ReadPlcItem(nameof(SysRuningTime), PlcItemTypeDesc.D);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 毛刷1状态
|
|
/// </summary>
|
|
public bool Hairbrush1Selection
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(Hairbrush1Selection), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// 毛刷2状态
|
|
/// </summary>
|
|
public bool Hairbrush2Selection
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(Hairbrush2Selection), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// 毛刷3状态
|
|
/// </summary>
|
|
public bool Hairbrush3Selection
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(Hairbrush3Selection), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// 静电棒状态
|
|
/// </summary>
|
|
public bool StaticbarsSel
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(StaticbarsSel), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 当前计数
|
|
/// </summary>
|
|
public int NozzleNum
|
|
{
|
|
get
|
|
{
|
|
return (int)PlcOperationHelper.Instance.ReadPlcItem(nameof(NozzleNum), PlcItemTypeDesc.D);
|
|
}
|
|
set
|
|
{
|
|
|
|
PlcOperationHelper.Instance.WritePlcItem(nameof(NozzleNum), value.ToString(), PlcItemTypeDesc.D);
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 班次计数
|
|
/// </summary>
|
|
public int ShiftCount
|
|
{
|
|
get
|
|
{
|
|
return (int)PlcOperationHelper.Instance.ReadPlcItem(nameof(ShiftCount), PlcItemTypeDesc.D);
|
|
}
|
|
set
|
|
{
|
|
|
|
PlcOperationHelper.Instance.WritePlcItem(nameof(ShiftCount), value.ToString(), PlcItemTypeDesc.D);
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///打印完成 托盘保存完成
|
|
/// </summary>
|
|
|
|
public bool PrintFinish
|
|
{
|
|
set
|
|
{
|
|
PlcOperationHelper.Instance.WritePlcItem(nameof(PrintFinish), value.ToString(), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M))
|
|
// && !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
|
|
|
/// <summary>
|
|
/// 系统是否运行
|
|
/// </summary>
|
|
|
|
|
|
|
|
public bool NextStop
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(NextStop), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
set
|
|
{
|
|
PlcOperationHelper.Instance.WritePlcItem(nameof(NextStop), value.ToString(), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool StopSys
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(StopSys), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
set
|
|
{
|
|
PlcOperationHelper.Instance.WritePlcItem(nameof(StopSys), value.ToString(), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
|
|
}
|
|
/// <summary>
|
|
/// 手动还是自动
|
|
/// </summary>
|
|
public bool ManualOrAuto
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(ManualOrAuto), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 运行状态
|
|
/// </summary>
|
|
public bool CleanMacRunStatusNew
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(CleanMacRunStatusNew), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 满料信号
|
|
/// </summary>
|
|
public bool FinishWorkingPallet
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(FinishWorkingPallet), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 满料方式
|
|
/// </summary>
|
|
public bool FullPalletMode
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(FullPalletMode), PlcItemTypeDesc.M);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 满料数量
|
|
/// </summary>
|
|
public int WorkedFullPalletNum
|
|
{
|
|
get
|
|
{
|
|
return (int)PlcOperationHelper.Instance.ReadPlcItem(nameof(WorkedFullPalletNum), PlcItemTypeDesc.D);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 是否强制满料
|
|
/// </summary>
|
|
public bool ForceFullPallet
|
|
{
|
|
get
|
|
{
|
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(ForceFullPallet), PlcItemTypeDesc.M);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|