Commit 823a4b52 刘韬

启用温湿度控制

1 个父辈 45597119
......@@ -212,7 +212,7 @@ namespace OnlineStore.Common
using (var wc = new MyWebClient(timeOut))
{
if (string.IsNullOrEmpty(wc.Headers["Content-Type"]))
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
wc.Encoding = encoding;
result = wc.UploadString(url, "POST", paramData);
......
......@@ -12,6 +12,8 @@ AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,20000,150000,150000,2000,10000,20000,
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,0,,,,,,,,,,,,
PRO,0,两次吹气间隔(分钟),BlowAir_Interval,0,,,,,,,,,,,,
PRO,0,每次吹气的时间(分钟),BlowAir_Time,0,,,,,,,,,,,,
PRO,0,设备出入库次数多少次时,会自动重置操作,Box_ResetCount,200,,,,,,,,,,,,
PRO,0,抽屉层数,Drawer_Rows,15,,,,,,,,,,,,
PRO,0,抽屉列数,Drawer_Columns,6,,,,,,,,,,,,
......

public class DoorInfo
{
public DoorInfo()
public DoorInfo(doorIndexE _doorIndex)
{
doorIndex = doorIndexE.LeftIn;
doorType = DoorTypeE.BOTH;
doorIndex = _doorIndex;
status = doorStatusE.free;
hasContainer = false;
hSerial = "";
}
public string doorType;
public doorIndexE doorIndex;
public doorStatusE status;
public bool hasContainer;
......@@ -16,11 +18,11 @@ public class DoorInfo
}
public enum doorIndexE
{
LeftIn = 2,
LeftOut = 1,
//LeftIn = 2,
//LeftOut = 1,
RightIn = 4,
RightOut = 3,
XLR_1 = 4,
XLR_2 = 3,
}
public enum doorStatusE
......@@ -45,4 +47,10 @@ public enum doorStatusE
/// 满料串需要取走
/// </summary>
fullBoxNeedLeave = 5
}
public class DoorTypeE
{
public const string IN = "IN";
public const string OUT = "OUT";
public const string BOTH = "BOTH";
}
\ No newline at end of file
......@@ -17,6 +17,7 @@ namespace OnlineStore.DeviceLibrary
{
this.Name = deviceName;
this.PortName = port;
HumitureController.Init(this.PortName);
}
public HumitureParam QueryData()
......@@ -103,7 +104,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "当前最大湿度:" + currMaxHumidity.ToString() + ",开始吹气湿度:" + startBlowHumidity + ",当前不在吹气中,且间隔超过" + box.Config.BlowAir_Interval + "分钟,开始吹气!");
IsInBlowing = true;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.HIGH);
StoreManager.XLRStore.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH);
LastBeginBlowTime = DateTime.Now;
LastEndBlowTime = DateTime.Now;
}
......@@ -113,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(Name + "当前最大湿度:" + currMaxHumidity.ToString() + ",停止吹气湿度:" + stopBlowHumidity + ",停止吹气!");
IsInBlowing = false;
// box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
StoreManager.XLRStore.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW);
LastEndBlowTime = DateTime.Now;
}
if (IsInBlowing)
......@@ -125,7 +126,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "已经吹气" + span.TotalMinutes + "分钟,超过配置的吹气时间" + box.Config.BlowAir_Time + "分钟,停止吹气!");
IsInBlowing = false;
//Thread.Sleep(100);
// box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
StoreManager.XLRStore.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW);
LastEndBlowTime = DateTime.Now;
}
}
......@@ -140,7 +141,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "当前温度【" + param.Temperate + "】超过最高温度【" + Max_Temperature + "】,开始报警!");
needAlarm = true;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
StoreManager.XLRStore.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW);
}
else if (temp < Max_Temperature)
{
......@@ -149,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + "不在吹气中,且当前温度【" + param.Temperate + "】低于【" + Max_Temperature + "】,关闭报警!");
TempOrHumidityIsAlarm = false;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
StoreManager.XLRStore.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW);
}
}
else
......
......@@ -44,6 +44,8 @@ namespace OnlineStore.DeviceLibrary
if (sb.openPort())
{
serialBeanMap.Add(port, sb);
var ht = HumitureController.QueryData(port);
LogUtil.info(LogName + "串口" + port + "打开成功!温度:"+ ht.Temperate+",湿度:"+ht.Humidity);
return true;
}
else
......
......@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
public DeviceMoveInfo MoveInfo;
public string WarnMsg = "";
public BatchMoveConfig Config = null;
public DoorInfo doorInfo = new DoorInfo();
public DoorInfo doorInfo;
private InputEquip Robot
{
get { return StoreManager.XLRStore.inputEquip; }
......@@ -34,6 +34,7 @@ namespace OnlineStore.DeviceLibrary
string ioAdd = "_A";
if (ShelfType.Equals(1))
{
doorInfo = new DoorInfo(doorIndexE.XLR_1);
ioAdd = "_A";
Name = "A料口 ";
Config.BatchAxisP1 = config.BatchAxisP1_A;
......@@ -46,6 +47,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
doorInfo = new DoorInfo(doorIndexE.XLR_2);
ioAdd = "_B";
Name = "B料口 ";
Config.BatchAxisP1 = config.BatchAxisP1_B;
......@@ -116,8 +118,7 @@ namespace OnlineStore.DeviceLibrary
if (StoreManager.checkWatch(shelfWatch, 10000, true))
{
doorInfo.doorIndex = ShelfType == 1 ? doorIndexE.LeftIn : doorIndexE.RightIn;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
doorInfo.status = doorStatusE.needBox;
doorInfo.hasContainer = false;
WorkLog($"无料串,:通知agv来送料串 ShelfType:{ShelfType},{doorInfo.doorIndex},hasContainer:{doorInfo.hasContainer}");
......@@ -134,7 +135,6 @@ namespace OnlineStore.DeviceLibrary
{
shelfWatch.Stop();
doorInfo.doorIndex = ShelfType == 1 ? doorIndexE.LeftIn : doorIndexE.RightIn;
doorInfo.status = doorStatusE.free;
doorInfo.hasContainer = false;
//AgvClient.SetToNone(Config.AgvName);
......
......@@ -52,7 +52,6 @@ namespace OnlineStore.DeviceLibrary
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + Config.AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
doorInfo.doorIndex = ShelfType == 1 ? doorIndexE.LeftOut : doorIndexE.RightOut;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
doorInfo.status = doorStatusE.fullBoxNeedLeave;
doorInfo.hasContainer = false;
......@@ -322,7 +321,6 @@ namespace OnlineStore.DeviceLibrary
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
doorInfo.doorIndex = ShelfType == 1 ? doorIndexE.LeftOut : doorIndexE.RightOut;
//doorInfo.hSerial = MoveInfo.MoveParam.hSerial;
doorInfo.status = doorStatusE.fullBoxNeedLeave;
doorInfo.hasContainer = false;
......@@ -675,7 +673,6 @@ namespace OnlineStore.DeviceLibrary
//bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
//WorkLog("送出出库料串 :通知agv来取料串,等待料串离开Config.AgvName:" + Config.AgvName + ",CurrShelfId:" + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
doorInfo.doorIndex = ShelfType == 1 ? doorIndexE.LeftOut : doorIndexE.RightOut;
doorInfo.hSerial = MoveInfo.MoveParam.PosInfo.hSerial;
doorInfo.status = doorStatusE.fullBoxNeedLeave;
doorInfo.hasContainer = true;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!