| | |
| | | return webResponse.OK(); |
| | | } |
| | | |
| | | public WebResponseContent WriteRGVmokuai(SaveModel saveModel) |
| | | { |
| | | WebResponseContent webResponse = new WebResponseContent(); |
| | | string DeviceName = saveModel.DelKeys[0].ToString(); //å·¥ä½ç±»å |
| | | string DBType = saveModel.DelKeys[1].ToString(); //设å¤åç§° |
| | | short WriteRGVvalue = short.Parse(saveModel.DelKeys[2].ToString()); //åå
¥å¼ |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == DeviceName); |
| | | SpeStackerCrane Commonstacker = (SpeStackerCrane)device; |
| | | switch (DBType) |
| | | { |
| | | case "1": // 工使¨¡å¼ï¼0æå¨ã1èªå¨ï¼ |
| | | //è·åå®ä¾ |
| | | DeviceProDTO? RGV_DWorkingmode = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_DWorkingmode", "DeviceCommand"); //ä»»å¡ç±»å |
| | | //ç¬¬ä¸æ¥åå
¥ä»»å¡ |
| | | RgvSetLine(Commonstacker, RGV_DWorkingmode.DeviceProAddress, WriteRGVvalue); |
| | | break; |
| | | case "2": //å¤ä½æä½ï¼0ä¸å¤ä½ã1å¤ä½ï¼ |
| | | DeviceProDTO? RGV_Resetoperation = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_Resetoperation", "DeviceCommand"); //ä»»å¡ç±»å |
| | | //ç¬¬ä¸æ¥åå
¥ä»»å¡ |
| | | RgvSetLine(Commonstacker, RGV_Resetoperation.DeviceProAddress, WriteRGVvalue); |
| | | break; |
| | | case "3": //ä»»å¡ç¡®è®¤å®æï¼0ä¸ç¡®å®ï¼1ç¡®å®ï¼ |
| | | DeviceProDTO? RGV_taskcomplete = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_taskcomplete", "RGV_taskcomplete"); //ä»»å¡ç±»å |
| | | //ç¬¬ä¸æ¥åå
¥ä»»å¡ |
| | | RgvSetLine(Commonstacker, RGV_taskcomplete.DeviceProAddress, WriteRGVvalue); |
| | | break; |
| | | case "4": //ä»»å¡ç±»å(4æ¸
é¤) |
| | | DeviceProDTO? RGV_RGVtasktypet = GetRGVDeviceProDTO(Commonstacker, DeviceName, "RGV_RGVtasktypet", "DeviceCommand"); //ä»»å¡ç±»å |
| | | //ç¬¬ä¸æ¥åå
¥ä»»å¡ |
| | | RgvSetLine(Commonstacker, RGV_RGVtasktypet.DeviceProAddress, WriteRGVvalue); |
| | | break; |
| | | } |
| | | return webResponse.OK(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå¨ç§»å¨RGV |
| | | /// </summary> |