using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BPASmartClient.DosingSystem
{
///
/// PLC 到上位机数据
///
public class PlcToComputer
{
public PlcToComputer()
{
for (int i = 0; i < cylinderFlagBitStatus.Length; i++)
{
cylinderFlagBitStatus[i] = new CylinderFlagBitStatus();
}
}
///
/// 心跳
///
public bool Heartbeat { get; set; }
///
/// 接收配方完成
///
public bool ResComplete { get; set; }
///
/// 系统启动或停止状态
///
public bool SystemStartOrStop { get; set; }
///
/// 手自动状态
///
public bool HandOrAuto { get; set; }
///
/// 桶位置反馈
///
public short[] LocationFeedback { get; set; } = new short[32];
///
/// 桶是否允许配料
///
public bool[] IsAllowIngredients { get; set; } = new bool[32];
///
/// 报警信息
///
public bool[] ArrayInfo { get; set; } = new bool[32];
///
/// 本地急停
///
public bool LocalEStop { get; set; }
///
/// 远程急停
///
public bool RemoteEStop { get; set; }
///
/// 上桶工位检测
///
public bool OnDetection { get; set; }
///
/// 下桶工位检测
///
public bool UnderDetection { get; set; }
///
/// 上桶工位气缸检测
///
public CylinderFlagBitStatus OnCylinderDetection { get; set; } = new CylinderFlagBitStatus();
///
/// 下桶工位气缸检测
///
public CylinderFlagBitStatus UnderCylinderDetection { get; set; } = new CylinderFlagBitStatus();
///
/// 工位光电检测
///
public bool[] StationDetection { get; set; } = new bool[32];
///
/// 气缸状态信号
///
public CylinderFlagBitStatus[] cylinderFlagBitStatus { get; set; } = new CylinderFlagBitStatus[32];
}
///
/// 气缸到位检测类
///
public class CylinderFlagBitStatus
{
///
/// 气缸原点信号
///
public bool HomeSignal { get; set; }
///
/// 气缸到位信号
///
public bool InPlaceSignal { get; set; }
}
}