Stocker.cs 12.5 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HHWCS.Model
{
    class Stocker
    {
        private int id;
        private String name;

        #region 堆垛机-->WCS

        /// <summary>
        /// 任务校验 1—任务校验正确;2--任务校验出错
        /// </summary>
        private UInt16 taskValidate;

        /// <summary>
        /// 工作模式 工作模式:1-脱机;2-联机
        /// </summary>
        private UInt16 workModel;

        /// <summary>
        /// 操作模式:1-脱机;2-联机
        /// </summary>
        private UInt16 operationModel;

        /// <summary>
        /// 工作状态 工作状态:0-待机,1-入库,2-出库,3-拣选,4-转 库,5-双重入库,6-回库台位(入库准备),7-召回, 8-急停
        /// </summary>
        private UInt16 workStatus;

        /// <summary>
        /// 1-待机;2-任务执行中;3-任务完成;4-任务中断(出 错)
        /// </summary>
        private UInt16 taskExcuteStatus;

        /// <summary>
        /// 托盘条码数据 1(任务号)
        /// </summary>
        private uint taskNo1;

        /// <summary>
        /// 托盘条码数据 2(任务号)(双托盘时使用)
        /// </summary>
        private uint taskNo2;

        /// <summary>
        /// 当前列
        /// </summary>
        private UInt16 currentColumn;

        /// <summary>
        /// 当前层
        /// </summary>
        private UInt16 currentLayer;

        /// <summary>
        /// 水平测距 单位 1mm
        /// </summary>
        private uint horizontalDistance;

        /// <summary>
        /// 起升测距 单位 1mm
        /// </summary>
        private uint verticalDistance;

        /// <summary>
        /// 1-叉原位时叉上无货,2-叉原位时叉上有货
        /// </summary>
        private UInt16 hasPallet;

        /// <summary>
        /// 0-无超差;1-货物左超差(叉原位时)
        /// </summary>
        private bool leftForkOutWhenInOrigin;

        /// <summary>
        /// 0-无超差;1-货物右超差(叉原位时)
        /// </summary>
        private bool rightForkOutWhenInOrigin;

        /// <summary>
        /// 0-无超限;1-左侧外形超限
        /// </summary>
        private bool leftShape;

        /// <summary>
        /// 0-无超限;1-右侧外形超限
        /// </summary>
        private bool rightShape;

        /// <summary>
        /// 0-无过载;1-过载
        /// </summary>
        private bool overload;

        /// <summary>
        /// 0-无松绳;1-松绳
        /// </summary>
        private bool rope;

        /// <summary>
        /// 0-无报警;1-运行变频器报警
        /// </summary>
        private bool runningUuivertorAlarm;

        /// <summary>
        /// 0-无报警;1-起升变频器报警
        /// </summary>
        private bool raisingUuivertorAlarm;

        /// <summary>
        /// 0-无超时;1-运行超时
        /// </summary>
        private bool runningTimeout;

        /// <summary>
        /// 0-无超时;1-起升超时
        /// </summary>
        private bool raisingTimeout;

        /// <summary>
        /// 0-无超时;1-货叉超时
        /// </summary>
        private bool palletForkTimeout;

        /// <summary>
        /// 0-无超高;1-超高 1(货物高度与送货地址不匹配)
        /// </summary>
        private bool overHeight1;

        /// <summary>
        /// 0-无超高;1-超高 2(货物高度与送货地址不匹配)
        /// </summary>
        private bool overHeight2;

        /// <summary>
        /// 0-无超高;1-超高 3(货物高度与送货地址不匹配)
        /// </summary>
        private bool overHeight3;

        /// <summary>
        /// 0-无超高;1-货物超高
        /// </summary>
        private bool overHeight;

        /// <summary>
        /// 0-无错误;1-水平激光数据错误
        /// </summary>
        private bool horizontalLaserDataError;

        /// <summary>
        /// 0-无错误;1-起升条码数据错误
        /// </summary>
        private bool raisingBarcodeDataError;

        /// <summary>
        /// 0-无故障;1-双重入库 满入
        /// </summary>
        private bool doubleIn;

        /// <summary>
        /// 0-无故障;1-空货位出库 空出
        /// </summary>
        private bool emptyOut;

        /// <summary>
        /// 0-无故障;1-地址错
        /// </summary>
        private bool adressError;

        /// <summary>
        /// 0-无故障;1-主接触器断开 (急停、冲 顶、超速保 护,行走超 限动作)
        /// </summary>
        private bool mainCocontactorInterrupt;

        /// <summary>
        /// 0-无故障;1-水平断路器/制动器跳闸
        /// </summary>
        private bool horizontalBreakerOrBrakeInterrupt;

        /// <summary>
        /// 0-无故障;1-起升断路器/制动器跳闸
        /// </summary>
        private bool raisingBreakerOrBrakeInterrupt;

        /// <summary>
        /// 0-无故障;1-货叉断路器/制动器跳闸
        /// </summary>
        private bool palletForkBreakerOrBrakeInterrupt;

        /// <summary>
        /// 0-无超限,1-水平前端超限(前进终点)
        /// </summary>
        private bool horizontalLeadingendOut;

        /// <summary>
        /// 0-无超限;1-水平后端超限(后退终点)
        /// </summary>
        private bool horizontalTrailingendOut;

        /// <summary>
        /// 0-无超限;1-垂直上端超限(上升终点)
        /// </summary>
        private bool verticalHorizontalLeadingendOut;

        /// <summary>
        /// 0-无超限;1-垂直下端超限(下降终点)
        /// </summary>
        private bool verticalHorizontalTrailingendOut;

        public ushort TaskValidate { get => taskValidate; set => taskValidate = value; }
        public ushort WorkModel { get => workModel; set => workModel = value; }
        public ushort OperationModel { get => operationModel; set => operationModel = value; }
        public ushort WorkStatus { get => workStatus; set => workStatus = value; }
        public uint HorizontalDistance { get => horizontalDistance; set => horizontalDistance = value; }
        public uint VerticalDistance { get => verticalDistance; set => verticalDistance = value; }
        public ushort CurrentColumn { get => currentColumn; set => currentColumn = value; }
        public ushort CurrentLayer { get => currentLayer; set => currentLayer = value; }
        public ushort HasPallet { get => hasPallet; set => hasPallet = value; }
        public bool LeftForkOutWhenInOrigin { get => leftForkOutWhenInOrigin; set => leftForkOutWhenInOrigin = value; }
        public bool RightForkOutWhenInOrigin { get => rightForkOutWhenInOrigin; set => rightForkOutWhenInOrigin = value; }
        public bool LeftShape { get => leftShape; set => leftShape = value; }
        public bool RightShape { get => rightShape; set => rightShape = value; }
        public bool Overload { get => overload; set => overload = value; }
        public bool Rope { get => rope; set => rope = value; }
        public bool RunningUuivertorAlarm { get => runningUuivertorAlarm; set => runningUuivertorAlarm = value; }
        public bool RaisingUuivertorAlarm { get => raisingUuivertorAlarm; set => raisingUuivertorAlarm = value; }
        public bool RunningTimeout { get => runningTimeout; set => runningTimeout = value; }
        public bool RaisingTimeout { get => raisingTimeout; set => raisingTimeout = value; }
        public bool PalletForkTimeout { get => palletForkTimeout; set => palletForkTimeout = value; }
        public bool OverHeight1 { get => overHeight1; set => overHeight1 = value; }
        public bool OverHeight2 { get => overHeight2; set => overHeight2 = value; }
        public bool OverHeight3 { get => overHeight3; set => overHeight3 = value; }
        public bool OverHeight { get => overHeight; set => overHeight = value; }
        public bool HorizontalLaserDataError { get => horizontalLaserDataError; set => horizontalLaserDataError = value; }
        public bool RaisingBarcodeDataError { get => raisingBarcodeDataError; set => raisingBarcodeDataError = value; }
        public bool DoubleIn { get => doubleIn; set => doubleIn = value; }
        public bool EmptyOut { get => emptyOut; set => emptyOut = value; }
        public bool MainCocontactorInterrupt { get => mainCocontactorInterrupt; set => mainCocontactorInterrupt = value; }
        public bool HorizontalBreakerOrBrakeInterrupt { get => horizontalBreakerOrBrakeInterrupt; set => horizontalBreakerOrBrakeInterrupt = value; }
        public bool RaisingBreakerOrBrakeInterrupt { get => raisingBreakerOrBrakeInterrupt; set => raisingBreakerOrBrakeInterrupt = value; }
        public bool PalletForkBreakerOrBrakeInterrupt { get => palletForkBreakerOrBrakeInterrupt; set => palletForkBreakerOrBrakeInterrupt = value; }
        public bool HorizontalLeadingendOut { get => horizontalLeadingendOut; set => horizontalLeadingendOut = value; }
        public bool HorizontalTrailingendOut { get => horizontalTrailingendOut; set => horizontalTrailingendOut = value; }
        public bool VerticalHorizontalLeadingendOut { get => verticalHorizontalLeadingendOut; set => verticalHorizontalLeadingendOut = value; }
        public bool VerticalHorizontalTrailingendOut { get => verticalHorizontalTrailingendOut; set => verticalHorizontalTrailingendOut = value; }
        public ushort TaskExcuteStatus { get => taskExcuteStatus; set => taskExcuteStatus = value; }
        public uint TaskNo1 { get => taskNo1; set => taskNo1 = value; }
        public uint TaskNo2 { get => taskNo2; set => taskNo2 = value; }


        #endregion

        #region WCS-->堆垛机

        private UInt16 taskFlag;

        /// <summary>
        /// 任务标志:0-无任务,1-人库,2-出库,3-拣选,4- 转库,5-双重入库,6-回库台位(入库准备,召回), 7-送货高度不匹配;9-清任务(须带托盘号)
        /// 任务完成时清除
        /// </summary>
        public UInt16 WCSTaskFlag
        {
            get { return taskFlag; }
            set { taskFlag = value; }
        }

        private UInt16 stop;

        /// <summary>
        /// 0-无任务,1-急停
        /// </summary>
        public UInt16 WCSStop
        {
            get { return stop; }
            set { stop = value; }
        }

        private UInt16 fromRow;

        /// <summary>
        /// 取货地址 排(1-N)
        /// </summary>
        public UInt16 WCSFromRow
        {
            get { return fromRow; }
            set { fromRow = value; }
        }

        private UInt16 fromLayer;

        /// <summary>
        /// 取货地址:层(1-最高层)
        /// </summary>
        public UInt16 WCSFromLayer
        {
            get { return fromLayer; }
            set { fromLayer = value; }
        }

        private UInt16 fromColumn;

        /// <summary>
        /// 取货地址列(0-最远列)
        /// </summary>
        public UInt16 WCSFromColumn
        {
            get { return fromColumn; }
            set { fromColumn = value; }
        }

        private UInt16 toRow;

        /// <summary>
        /// 放货地址 排(1-N)
        /// </summary>
        public UInt16 WCSToRow
        {
            get { return toRow; }
            set { toRow = value; }
        }

        private UInt16 toLayer;

        /// <summary>
        /// 放货地址:层(1-最高层)
        /// </summary>
        public UInt16 WCSToLayer
        {
            get { return toLayer; }
            set { toLayer = value; }
        }

        private UInt16 toColumn;

        /// <summary>
        /// 放货地址列(0-最远列)
        /// </summary>
        public UInt16 WCSToColumn
        {
            get { return toColumn; }
            set { toColumn = value; }
        }

        private uint taskNo;

        /// <summary>
        /// 托盘条码数据(即任务号)
        /// </summary>
        public uint WCSTaskNo
        {
            get { return taskNo; }
            set { taskNo = value; }
        }

        private UInt16 validateCode;

        /// <summary>
        /// DB100.DBB0-- DB100.DBB11 字节异或值	校验码
        /// </summary>
        public UInt16 WCSValidateCode
        {
            get { return validateCode; }
            set { validateCode = value; }
        }

        public bool AdressError { get => adressError; set => adressError = value; }

        #endregion

    }
}