From 8c8a68df710d568f5f2b358c1e8c4b4799547d0b Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期五, 31 十月 2025 15:24:34 +0800
Subject: [PATCH] 安全门,出入库
---
代码管理/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs | 76 ++++++++++++++++++++++++++++++++++---
1 files changed, 69 insertions(+), 7 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs"
index 7413c8b..f8adeee 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/GetDeviceAddress.cs"
@@ -225,7 +225,7 @@
}
/// <summary>
- /// 鍒ゆ柇3涓畨鍏ㄩ棬鐘舵��
+ /// 鍒ゆ柇3涓珯鍙�
/// </summary>
public static bool AQMStatus(List<AGVStation> aGVStatList)
{
@@ -253,6 +253,7 @@
}
public static List<string> StationareaList = new List<string>() { "RGV111", "RGV116", "RGV110", "RGV112", "RGV114", "RGV115","RGV118" };
+ public static List<string> InStationareaList = new List<string>() { "RGV101", "RGV103", "RGV105", "RGV108", "RGV109", "RGV104","RGV107" };
public static bool OutbounMotherChildCartbool(string DeviceChildCode)
{
@@ -283,18 +284,79 @@
/// </summary>
public static bool OutRGVStatice()
{
- bool rgvbool=false;
+ bool rgvbool=true;
foreach (string AGVStation in StationareaList)
{
IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation);
- if (device == null) return false;
+ if (device == null) continue;
SpeStackerCrane Commonstacker = (SpeStackerCrane)device;
DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RgvCraneAutoStatus" && x.DeviceProParamType == "RgvCraneAutoStatus");
int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress);
- if (RGVState == 0)
+ if (RGVState == 1)
{
- rgvbool= true;
+ return false;
+ }
+ }
+ return rgvbool;
+ }
+
+ public static bool InRGVStatice()
+ {
+ bool rgvbool = true;
+ foreach (string AGVStation in InStationareaList)
+ {
+ IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation);
+ if (device == null) continue;
+ SpeStackerCrane Commonstacker = (SpeStackerCrane)device;
+
+ DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RgvCraneAutoStatus" && x.DeviceProParamType == "RgvCraneAutoStatus");
+ int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress);
+ if (RGVState == 1)
+ {
+ return false;
+ }
+ }
+ return rgvbool;
+ }
+
+ /// <summary>
+ /// 鍑哄簱锛岃鍙朢GV鏄惁涓虹┖闂�
+ /// </summary>
+ /// <returns></returns>
+ public static bool OutRGVRGVStepprocess()
+ {
+ bool rgvbool = true;
+ foreach (string AGVStation in StationareaList)
+ {
+ IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation);
+ if (device == null) continue;
+ SpeStackerCrane Commonstacker = (SpeStackerCrane)device;
+
+ DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RGVStepprocess" && x.DeviceProParamType == "RGVStepprocess");
+ int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress);
+ if (RGVState != 0)
+ {
+ return false;
+ }
+ }
+ return rgvbool;
+ }
+
+ public static bool InRGVRGVStepprocess()
+ {
+ bool rgvbool = true;
+ foreach (string AGVStation in InStationareaList)
+ {
+ IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == AGVStation);
+ if (device == null) continue;
+ SpeStackerCrane Commonstacker = (SpeStackerCrane)device;
+
+ DeviceProDTO? deviceProDTO = Commonstacker.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == AGVStation && x.DeviceProParamName == "RGVStepprocess" && x.DeviceProParamType == "RGVStepprocess");
+ int RGVState = GetDeviceAddress.RGVGetLine(Commonstacker, deviceProDTO.DeviceProAddress);
+ if (RGVState != 0)
+ {
+ return false;
}
}
return rgvbool;
@@ -304,11 +366,11 @@
{
try
{
- IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == DeviceCode);
+ IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "HCJ2000");
if (device == null) return false;
CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
DeviceProDTO? deviceProDTO = commonConveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == DeviceCode && x.DeviceProParamName == WriteType && x.DeviceProParamType == "DeviceCommand");
- return commonConveyorLine.Communicator.Write<short>(deviceProDTO.DeviceProDataBlock, (short)Writevalue);
+ return commonConveyorLine.Communicator.Write<short>(deviceProDTO.DeviceProAddress, (short)Writevalue);
}
catch (Exception)
{
--
Gitblit v1.9.3