示例#1
0
        async Task RequestOffLine(ToolModeChangeRequest request) {
			try {
                foreach (var port in request.LoadPorts)
                    await EAP.SendAsync(new SecsMessage(3, 23, "ChangeAccessMode",
                        Item.L(
                            Item.A(),
                            Item.U1(0),
                            Item.L(
                                Item.U1(GetPortNo(port.Id))))));
            }catch{}
            try{
                await EAP.SendAsync(EAP.SecsMessages[1, 15, "RequestOffLine"]);
			} catch{
			}
		}
示例#2
0
 async Task RequestOffline(ToolModeChangeRequest request) {
     try {
         foreach (var port in request.LoadPorts)
             await EAP.SendAsync(new SecsMessage(3, 23, "ChangeAccessMode",
                 Item.L(
                     Item.A("ChangeAccess"),
                     Item.A(GetPortNo(port.Id).ToString()),
                     Item.L(
                         Item.L(
                             Item.A("AccessMode"),
                             Item.B(0))))));
     }catch{}
     try{
         await EAP.SendAsync(EAP.SecsMessages[1, 19, "RequestOffline"]);
     } catch { }
 }
示例#3
0
 async Task HandleTCS(ToolModeChangeRequest tx)
 {
     if (tx.Mode == ControlMode.Online)
     {
         await CommunicationTest();
         await RequestOnline();
         await QueryControlState();
         await DefineLink();
         await QueryAndChangeAccessMode(tx.LoadPorts);
         await Task.Delay(2000);
         await QueryPortState();
     }
     else {
         await RequestOffLine(tx);
     }
 }