using MesWork;
using System;

namespace DC_A95
{
    public class PLC_W
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="partCode"></param>
        /// <param name="palletNo"></param>
        /// <returns></returns>
        public static void Write_LineSetAlarm(string opCode, int errCode)
        {
            //112 发动机上线报警代码
            //34  发动机上线报警标志
            MesWorkForm.WritePLC_IF(112, opCode, errCode);
            MesWorkForm.WritePLC_IF(34, opCode,true);
        }


    }


    /// <summary>
    /// 
    /// </summary>
    public enum Type_AlarmOnline 
    {
        /// <summary>
        /// 0-无错误
        /// </summary>
        Err_Not = 0,
        /// <summary>
        /// 1-PLC逻辑错误，未申请上线
        /// </summary>
        Err_PLC_Logic = 1,
        /// <summary>
        /// 2-没有可用订单
        /// </summary>
        Err_NoOrder = 2,
        /// <summary>
        /// 3-扫描缸体码为空或格式错误
        /// </summary>
        Err_PartCode_Illegal = 3,
        /// <summary>
        /// 4-缸体机型与生产机型不匹配
        /// </summary>
        Err_Sort = 4,
        /// <summary>
        /// 5-AMS写入信息与RFID信息验证不一致
        /// </summary>
        Err_RW_Diff = 5,
        /// <summary>
        /// 255-未知错误
        /// </summary>
        Undefined = 255,



    }

}
