|
@@ -1434,14 +1434,47 @@ namespace MECF.Framework.RT.ModuleLibrary.SystemModules
|
|
|
jobID = paras[0].ToString();
|
|
|
return _auto.StopJob(jobID);
|
|
|
case "LOAD":
|
|
|
- portID = int.Parse(paras[0].ToString());
|
|
|
- lp = Modules[ModuleHelper.GetVCEModule(portID)] as VceModuleBase;
|
|
|
- if (lp != null)
|
|
|
+ object[] ports=(object[])paras[0];
|
|
|
+ if(ports.Length==0)
|
|
|
{
|
|
|
- return lp.CheckToPostMessage(VceMSG.SafeLoad);
|
|
|
+ reason = "LoadPort array is empty";
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ string cassteCount = paras[1].ToString();
|
|
|
+ if(cassteCount=="1")
|
|
|
+ {
|
|
|
+ string strPort=ports[0].ToString();
|
|
|
+ bool result=SingleLoadPortLoad(strPort);
|
|
|
+ if(!result)
|
|
|
+ {
|
|
|
+ reason = $"Loadport {strPort} is not exist";
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //数量为2,仅来了一个LoadPort,直接回复true,不执行Load动作
|
|
|
+ if(ports.Length==1)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ for(int i=0;i<ports.Length;i++)
|
|
|
+ {
|
|
|
+ string str=ports[i].ToString();
|
|
|
+ bool result = SingleLoadPortLoad(str);
|
|
|
+ if(result)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reason = $"LoadPort is not exist";
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- reason = $"Not Find LP{portID}";
|
|
|
return false;
|
|
|
|
|
|
case "UNLOAD":
|
|
@@ -1493,6 +1526,24 @@ namespace MECF.Framework.RT.ModuleLibrary.SystemModules
|
|
|
return true;
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ /// Loadport load
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="str"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private bool SingleLoadPortLoad(string str)
|
|
|
+ {
|
|
|
+ int portID = int.Parse(str);
|
|
|
+ VceModuleBase lp = Modules[ModuleHelper.GetVCEModule(portID)] as VceModuleBase;
|
|
|
+ if (lp != null)
|
|
|
+ {
|
|
|
+ return lp.CheckToPostMessage(VceMSG.SafeLoad);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// 解析Module数组
|
|
|
/// </summary>
|
|
|
/// <param name="param"></param>
|