Ejemplo n.º 1
0
        /// <summary>
        /// 查询产品槽位信息
        /// </summary>
        /// <param name="trayType">空tray类别</param>
        /// <param name="slot">槽位</param>
        /// <returns></returns>
        public ProductSLotInfo ProductInfo(EnumTrayType enumTrayType, int slot)
        {
            var product = this.ProductSlotInfos.Where(p => p.SLOT_TY == (int)enumTrayType && p.SLOT_SITE == slot).FirstOrDefault();

            //TODO:测试用
            product = product == null ? new ProductSLotInfo() : product;
            return(product);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 开灯,拉带trayType,slot无效
 /// </summary>
 /// <param name="kangShiDaLightController"></param>
 /// <param name="threadName">线程名称</param>
 /// <param name="process">工序位置</param>
 /// <param name="slot">槽位,0代表空盘</param>
 private void SetLightBox(ATL_MC.KangShiDaLightController.KangShiDaLightController kangShiDaLightController, string threadName, EnumProcess process, EnumTrayType trayType, int slot = 0)
 {
     //先开灯
     PolicyTypeA.Execute(() =>
     {
         if (process == EnumProcess.MoveIn)
         {
             //拉带开灯
             if (1 == kangShiDaLightController.SetLightBox(GetProductParam <int>(p => p.MoveInLight_1), GetProductParam <int>(p => p.MoveInLight_2)))
             {
                 throw new Exception($"{threadName}:开灯失败");
             }
             SYS_IBG_LOG(DEBUGL1MSG, 0, 0, $"{threadName}:{process.ToString()}工序,开灯成功");
         }
         else
         {
             //tray盘开灯
             if (1 == kangShiDaLightController.SetLightBox(
                     GetProductParam <int>(p => p.ProductInfo(trayType, slot).Brightness_1),
                     GetProductParam <int>(p => p.ProductInfo(trayType, slot).Brightness_2),
                     GetProductParam <int>(p => p.ProductInfo(trayType, slot).Brightness_3),
                     GetProductParam <int>(p => p.ProductInfo(trayType, slot).Brightness_4)
                     ))
             {
                 throw new Exception($"{threadName}:{process.ToString()}工序,{slot}槽位开灯失败");
             }
             SYS_IBG_LOG(DEBUGL1MSG, 0, 0, $"{threadName}:{process.ToString()}工序,{slot}槽位开灯成功");
         }
     });
 }