Commit eb4607b5 张东亮

温湿度逻辑更改

1 个父辈 f897fcb7
......@@ -1201,9 +1201,17 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
IB06_WaitTime,
/// <summary>
/// 料串入料:上料轴开始速上升到P2点,等待检测到料盘
/// 料串入料:上料轴开始速上升到P2点,等待检测到料盘
/// </summary>
IB07_AxisUpMove,
IB07_1_AxisUpMove,
/// <summary>
/// 上料轴下降一定高度
/// </summary>
IB07_2_AxisUpMove,
/// <summary>
/// 上料轴开始慢速上升到P2点,等待检测到料盘
/// </summary>
IB07_3_AxisUpMove,
/// <summary>
/// 料串入料:扫码点可用,批量轴上升到扫码点
/// </summary>
......
......@@ -126,7 +126,7 @@ namespace OnlineStore.DeviceLibrary
{
if (IOManager.IOValue(IO_Type.Air_OpenValve, 1).Equals(IO_VALUE.HIGH) || IOManager.IOValue(IO_Type.LeftDoor_Limit, 2).Equals(IO_VALUE.LOW) || IOManager.IOValue(IO_Type.RightDoor_Limit, 2).Equals(IO_VALUE.LOW) || IOManager.IOValue(IO_Type.BackDoor_Limit, 2).Equals(IO_VALUE.LOW))
{
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW,1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH,1);
return;
}
try
......@@ -141,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
float startBlowHumidity = Max_Humidity - StartBlowValue;
float stopBlowHumidity = Max_Humidity - StopBlowValue;
IsInBlowing= IOManager.DOValue(IO_Type.Nitrogen_OpenValve,1).Equals(IO_VALUE.HIGH);
IsInBlowing= IOManager.DOValue(IO_Type.Nitrogen_OpenValve,1).Equals(IO_VALUE.LOW);
//判断是否需要吹气
if (startBlowHumidity > 0 && startBlowHumidity < currMaxHumidity && IsInBlowing.Equals(false))
{
......@@ -152,7 +152,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("当前最大湿度:" + currMaxHumidity.ToString() + ",开始吹气湿度:" + startBlowHumidity + ",当前不在吹气中,且间隔超过" + box.Config.BlowAir_Interval + "分钟,开始吹气!");
IsInBlowing = true;
//Thread.Sleep(100);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH, 1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW, 1);
LastBeginBlowTime = DateTime.Now;
LastEndBlowTime = DateTime.Now;
}
......@@ -162,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info("当前最大湿度:" + currMaxHumidity.ToString() + ",停止吹气湿度:" + stopBlowHumidity + ",停止吹气!");
IsInBlowing = false;
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW, 1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH, 1);
LastEndBlowTime = DateTime.Now;
}
if (IsInBlowing)
......@@ -174,7 +174,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("已经吹气" + span.TotalMinutes + "分钟,超过配置的吹气时间" + box.Config.BlowAir_Time + "分钟,停止吹气!");
IsInBlowing = false;
//Thread.Sleep(100);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW, 1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH, 1);
LastEndBlowTime = DateTime.Now;
}
}
......@@ -197,7 +197,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("不在吹气中,且当前温度【" + curMinTemp + "】低于【" + Max_Temperature + "】,关闭报警!");
TempOrHumidityIsAlarm = false;
//Thread.Sleep(100);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW, 1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH, 1);
}
}
else
......
......@@ -358,6 +358,21 @@ namespace OnlineStore.DeviceLibrary
LastMoveIsTest = IsTest;
LogUtil.info(Name + " BatchAxisToP2 目标P2: " + targetP2 + "(" + targetSpeed + ")");
}
public void BatchAxisDown()
{
int targetP1 = Config.BatchAxisP1;
int targetSpeed = Robot.Config.BatchAxis_P3Speed / 2;
{
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(BatchAxis.Config, targetP1, targetSpeed));
}
BatchAxis.Config.TargetPosition = targetP1;
BatchAxis.AbsMove(null, targetP1, targetSpeed);
//开始检测信号
BatchAxis.BatchAxisStartCheck(Config.IO_ReelCheck, IO_VALUE.LOW);
LogUtil.info(Name + " 向P1点运行,直到料盘检测信号灭: " + targetP1 + "(" + targetSpeed + ")");
}
#endregion
private DateTime preCheckAxisTime = DateTime.Now;
......
......@@ -121,11 +121,11 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(Config.IO_LineEnd_Check, IO_VALUE.HIGH));
}
private void IB07_AxisUpMove()
private void IB07_3_AxisUpMove()
{
MoveInfo.ShelfNoTray = false;
AgvClient.SetToNone(Config.AgvName);
MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove);
MoveInfo.NextMoveStep(StepEnum.IB07_3_AxisUpMove);
doorInfo.status = doorStatusE.inStore;
doorInfo.hasContainer = true;
WorkLog("料串入料 :上料轴开始慢速上升到P2点,等待检测到料盘");
......@@ -133,7 +133,7 @@ namespace OnlineStore.DeviceLibrary
LastCodeList = new List<string>();
//NextCodeList = new List<string>();
MoveInfo.ShelfNoTray = false;
BatchAxisToP2(true);
BatchAxisToP2();
}
protected void InstoreProcess()
{
......@@ -202,7 +202,8 @@ namespace OnlineStore.DeviceLibrary
//}
//else
{
IB07_AxisUpMove();
MoveInfo.NextMoveStep(StepEnum.IB07_1_AxisUpMove);
BatchAxisToP2(true);
}
}
......@@ -214,12 +215,19 @@ namespace OnlineStore.DeviceLibrary
WorkLog(" 未检测到料串,链条停止转动,入料结束");
}
}
else if (MoveInfo.IsStep(StepEnum.IB07_1_AxisUpMove))
{
MoveInfo.NextMoveStep(StepEnum.IB07_2_AxisUpMove);
BatchAxisDown();
}
else if (MoveInfo.IsStep(StepEnum.IB07_2_AxisUpMove))
{
IB07_3_AxisUpMove();
}
#endregion
#region 检测到托盘,扫码,取料并放入托盘
else if (MoveInfo.IsStep(StepEnum.IB07_AxisUpMove))
else if (MoveInfo.IsStep(StepEnum.IB07_3_AxisUpMove))
{
CheckHasTray();
}
......@@ -481,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
int chaz = Math.Abs(currP - Config.BatchAxisP2);
if (chaz > BatchAxis.Config.CanErrorCountMax)
{
MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove);
MoveInfo.NextMoveStep(StepEnum.IB07_3_AxisUpMove);
WorkLog("料串入料 :CheckHasTray:上料轴开始慢速上升到P2点,等待检测到料盘。currP" + currP.ToString());
MoveInfo.ShelfNoTray = false;
BatchAxisToP2();
......@@ -803,7 +811,7 @@ namespace OnlineStore.DeviceLibrary
SendOutShelfLeave("料串出满需离开(信号到位)");
}
}
else if (MoveInfo.IsStep(StepEnum.IB07_AxisUpMove))
else if (MoveInfo.IsStep(StepEnum.IB07_3_AxisUpMove))
{
SendOutShelfLeave("料串出满需离开");
}
......
......@@ -397,7 +397,7 @@ namespace OnlineStore.LoadCSVLibrary
public static string CameraLed = "CameraLed";
/// <summary>
/// DO,1,氮气阀门打开,Nitrogen_OpenValve,11,HC,Y11,,,,,,,,,,,,
/// DO,1,氮气阀门关闭,Nitrogen_OpenValve,11,HC,Y11,,,,,,,,,,,,
/// </summary>
public static string Nitrogen_OpenValve = "Nitrogen_OpenValve";
......
......@@ -42,7 +42,7 @@ namespace OnlineStore.XLRStore
private void timer1_Tick(object sender, EventArgs e)
{
IOManager.IOMove(IO_Type.Air_OpenValve, IO_VALUE.HIGH,1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW,1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH,1);
var dd= HumitureBean.GetMinOxygenV();
var nitrogen = 100- dd;
......@@ -63,7 +63,7 @@ namespace OnlineStore.XLRStore
LogUtil.info("请求打开舱门开始");
IOManager.IOMove(IO_Type.Air_OpenValve, IO_VALUE.HIGH, 1);
Thread.Sleep(1000);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.LOW, 1);
IOManager.IOMove(IO_Type.Nitrogen_OpenValve, IO_VALUE.HIGH, 1);
timer1.Start();
}
......
......@@ -69,6 +69,8 @@
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.解锁舱门ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.a料口重置料串ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.b料口重置料串ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.清空日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
......@@ -91,6 +93,7 @@
this.lbldiancifa = new System.Windows.Forms.Label();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
......@@ -417,7 +420,10 @@
// 设置TToolStripMenuItem
//
this.设置TToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.a料口重置料串ToolStripMenuItem,
this.toolStripSeparator6,
this.b料口重置料串ToolStripMenuItem,
this.toolStripSeparator12,
this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7,
this.托盘初始化ToolStripMenuItem,
......@@ -432,51 +438,65 @@
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(215, 6);
this.toolStripSeparator6.Size = new System.Drawing.Size(229, 6);
this.toolStripSeparator6.Visible = false;
//
// 二维码学习ToolStripMenuItem
//
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(218, 32);
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(232, 32);
this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(215, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(229, 6);
//
// 托盘初始化ToolStripMenuItem
//
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(218, 32);
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(232, 32);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
//
// toolStripSeparator16
//
this.toolStripSeparator16.Name = "toolStripSeparator16";
this.toolStripSeparator16.Size = new System.Drawing.Size(215, 6);
this.toolStripSeparator16.Size = new System.Drawing.Size(229, 6);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(218, 32);
this.toolStripMenuItem3.Size = new System.Drawing.Size(232, 32);
this.toolStripMenuItem3.Text = "脆盘料号配置";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(215, 6);
this.toolStripSeparator9.Size = new System.Drawing.Size(229, 6);
//
// 解锁舱门ToolStripMenuItem
//
this.解锁舱门ToolStripMenuItem.Name = "解锁舱门ToolStripMenuItem";
this.解锁舱门ToolStripMenuItem.Size = new System.Drawing.Size(218, 32);
this.解锁舱门ToolStripMenuItem.Size = new System.Drawing.Size(232, 32);
this.解锁舱门ToolStripMenuItem.Text = "解锁舱门";
this.解锁舱门ToolStripMenuItem.Click += new System.EventHandler(this.解锁舱门ToolStripMenuItem_Click);
//
// a料口重置料串ToolStripMenuItem
//
this.a料口重置料串ToolStripMenuItem.Name = "a料口重置料串ToolStripMenuItem";
this.a料口重置料串ToolStripMenuItem.Size = new System.Drawing.Size(232, 32);
this.a料口重置料串ToolStripMenuItem.Text = "A料口重置料串";
this.a料口重置料串ToolStripMenuItem.Click += new System.EventHandler(this.a料口重置料串ToolStripMenuItem_Click);
//
// b料口重置料串ToolStripMenuItem
//
this.b料口重置料串ToolStripMenuItem.Name = "b料口重置料串ToolStripMenuItem";
this.b料口重置料串ToolStripMenuItem.Size = new System.Drawing.Size(232, 32);
this.b料口重置料串ToolStripMenuItem.Text = "B料口重置料串";
this.b料口重置料串ToolStripMenuItem.Click += new System.EventHandler(this.b料口重置料串ToolStripMenuItem_Click);
//
// 帮助ToolStripMenuItem
//
this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
......@@ -672,6 +692,11 @@
this.lblStatus.Size = new System.Drawing.Size(69, 20);
this.lblStatus.Text = "等待启动";
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(229, 6);
//
// FrmXLRStore
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -771,6 +796,9 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.Label lblWarnMsg;
private System.Windows.Forms.Label lbldiancifa;
private System.Windows.Forms.ToolStripMenuItem a料口重置料串ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem b料口重置料串ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!