Commit 181d32e7 LN

出入库逻辑

1 个父辈 c1af307d
......@@ -109,6 +109,7 @@ namespace OnlineStore.DUOStore
this.btnStoreStart = new System.Windows.Forms.Button();
this.lblWarnMsg = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label();
this.lblCanOut = new System.Windows.Forms.Label();
this.groupBox4.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
......@@ -1238,6 +1239,7 @@ namespace OnlineStore.DUOStore
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.lblCanOut);
this.groupBox3.Controls.Add(this.lblMoveEquipInfo);
this.groupBox3.Controls.Add(this.btnSotreReset);
this.groupBox3.Controls.Add(this.btnStoreStop);
......@@ -1303,7 +1305,7 @@ namespace OnlineStore.DUOStore
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(407, 14);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(662, 84);
this.lblWarnMsg.Size = new System.Drawing.Size(662, 50);
this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -1318,6 +1320,17 @@ namespace OnlineStore.DUOStore
this.lblThisSta.TabIndex = 216;
this.lblThisSta.Text = "等待启动";
//
// lblCanOut
//
this.lblCanOut.AutoSize = true;
this.lblCanOut.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCanOut.ForeColor = System.Drawing.Color.Green;
this.lblCanOut.Location = new System.Drawing.Point(949, 74);
this.lblCanOut.Name = "lblCanOut";
this.lblCanOut.Size = new System.Drawing.Size(51, 19);
this.lblCanOut.TabIndex = 273;
this.lblCanOut.Text = "可出库";
//
// FrmBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -1442,6 +1455,7 @@ namespace OnlineStore.DUOStore
public System.Windows.Forms.Button btnUpDownP4;
private System.Windows.Forms.Button btnSingleOut;
private System.Windows.Forms.Button btnNgPro;
private System.Windows.Forms.Label lblCanOut;
}
}
......@@ -132,6 +132,7 @@ namespace OnlineStore.DUOStore
lblMoveEquipInfo.Text = "";
// lblMoveEquipInfo.Text = "";
}
lblCanOut.Text = StoreManager.Store.CanOut() ? "可出库" : "不可出库";
//ReadPosistion();
if (BoxBean.runStatus > StoreRunStatus.Wait)
{
......@@ -660,9 +661,9 @@ namespace OnlineStore.DUOStore
private void btnSelTemp_Click(object sender, EventArgs e)
{
// HumitureParam param = BoxBean.humBean.QueryData();
// txtTemp.Text = param.Temperate.ToString();
// txtHum.Text = param.Humidity.ToString();
HumitureParam param = BoxBean.humBean.QueryData();
txtTemp.Text = param.Temperate.ToString();
txtHum.Text = param.Humidity.ToString();
}
internal void DebugStatus(bool isDebug)
......
......@@ -71,13 +71,13 @@ namespace OnlineStore.DUOStore
MessageBox.Show(ex.ToString());
}
}
private void AddForm(string text, Form form)
{
text = text.PadLeft(12, ' ');
TabPage lineTabPage = new TabPage(text);
lineTabPage.AutoScroll = true;
// lineTabPage.Tag = lineBean;
// lineTabPage.Tag = lineBean;
Panel linePan = new Panel();
linePan.Dock = DockStyle.Fill;
linePan.AutoScroll = true;
......
多料仓软件。
有温湿度传感器,不需要吹氮气。
......
......@@ -15,19 +15,15 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public partial class BoxBean : EquipBase
{
private bool IsIntSlvBlock = false;
{
public AutoInoutInfo AutoInout = new AutoInoutInfo();
public string CID = "";
public BOX_Config Config;
public string lastPosId = "";
public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline;
public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>();
public List<string> PositionNumList = new List<string>();
public HumitureBean humBean = null;
private List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>();
public List<string> PositionNumList = new List<string>();
public HumitureBean humBean = null;
public AxisBean UpdownAxis = null;
public AxisBean MiddleAxis = null;
......@@ -94,7 +90,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
public void MoveAxisConfig()
internal void MoveAxisConfig()
{
Config.UpDown_Axis.BreakOnDO = IO_Type.UpdownAxis_Break;
moveAxisList = new List<ConfigMoveAxis>();
......@@ -103,6 +99,8 @@ namespace OnlineStore.DeviceLibrary
moveAxisList.Add(Config.InOut_Axis);
moveAxisList.Add(Config.Comp_Axis);
}
public override bool StartRun(bool isDebug = false)
{
if (!StoreManager.Store.canStart)
......@@ -281,6 +279,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - StartTime;
LogInfo(",停止运行,总运行时间:" + span.ToString());
}
public override void Alarm(AlarmType alarmType, string alarmDetial = "", string alarmMsg = "", MoveType storeMoveType = MoveType.None)
{
base.Alarm(alarmType, alarmDetial, alarmMsg, storeMoveType);
......
......@@ -34,52 +34,54 @@ namespace OnlineStore.DeviceLibrary
lastConTime = DateTime.Now;
try
{
//HumitureController.QueryData();
humBean.HumidityProcess(this);
if (StoreManager.IsConnectServer)
{
SendLineStatus();
}
//出料口状态灯处理
OutDoorLedProcess();
}
catch (Exception ex)
{
LogUtil.error(Name + "定时SendLineStatus出错:" + ex.ToString());
}
finally
{
isInProcess = false;
}
}
if (OutDoorReelType.Equals(1))
{
IOMove(IO_Type.DoorLed_Red, IO_VALUE.LOW, true);
if (IOValue(IO_Type.DoorLed_Green).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.DoorLed_Green, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.DoorLed_Green, IO_VALUE.LOW);
}
}
else if (OutDoorReelType.Equals(2))
private void OutDoorLedProcess()
{
if (OutDoorReelType.Equals(1))
{
IOMove(IO_Type.DoorLed_Red, IO_VALUE.LOW, true);
if (IOValue(IO_Type.DoorLed_Green).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.DoorLed_Green, IO_VALUE.LOW, true);
if (IOValue(IO_Type.DoorLed_Red).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.DoorLed_Red, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.DoorLed_Red, IO_VALUE.LOW);
}
IOMove(IO_Type.DoorLed_Green, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.DoorLed_Green, IO_VALUE.LOW, true);
IOMove(IO_Type.DoorLed_Red, IO_VALUE.LOW, true);
IOMove(IO_Type.DoorLed_Green, IO_VALUE.LOW);
}
}
catch (Exception ex)
else if (OutDoorReelType.Equals(2))
{
LogUtil.error(Name + "定时SendLineStatus出错:" + ex.ToString());
IOMove(IO_Type.DoorLed_Green, IO_VALUE.LOW, true);
if (IOValue(IO_Type.DoorLed_Red).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.DoorLed_Red, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.DoorLed_Red, IO_VALUE.LOW);
}
}
finally
else
{
isInProcess = false;
IOMove(IO_Type.DoorLed_Green, IO_VALUE.LOW, true);
IOMove(IO_Type.DoorLed_Red, IO_VALUE.LOW, true);
}
}
......
......@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
{
public partial class DUOStoreBean : EquipBase
{
public Dictionary<int, BOX_Config> BoxConfigMap { get; set; }
internal Dictionary<int, BOX_Config> BoxConfigMap { get; set; }
public Dictionary<int, BoxBean> BoxMap = new Dictionary<int, BoxBean>();
public Store_Config Config { get; set; }
......@@ -149,11 +149,9 @@ namespace OnlineStore.DeviceLibrary
//停止运动
MoveInfo.EndMove();
runStatus = StoreRunStatus.Reset;
StartResetMove();
foreach (BoxBean equip in BoxMap.Values)
{
if (!equip.alarmType.Equals(AlarmType.None))
......@@ -188,7 +186,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Stop2_Work, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Stop3_Buffer, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Line_Stop4_Out, IO_VALUE.LOW));
}
protected override void ResetProcess()
......@@ -221,7 +218,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LR_03_BatchAxisHome))
{
MoveInfo.NextMoveStep(StoreMoveStep.LR_04_BatchToP1);
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :提升轴到P1点,上下轴到待机点P2");
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :提升轴到P1点["+ Config.BatchAxis_P1 + "],上下轴到待机点P2["+ Config.UpdownAxis_P2 + "]");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P1Speed);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
......@@ -238,10 +235,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LR_05_Hoister_Back))
{
MoveInfo.NextMoveStep(StoreMoveStep.LR_06_TopDown);
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :顶升气缸下降,旋转轴到待机点P1");
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :顶升气缸下降,旋转轴到待机点P1["+ Config.MiddleAxis_P1 + "]");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P2, Config.MiddleAxis_P2Speed);
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P1, Config.MiddleAxis_P1Speed);
}
else if (MoveInfo.IsStep(StoreMoveStep.LR_06_TopDown))
{
......@@ -329,7 +326,7 @@ namespace OnlineStore.DeviceLibrary
DateTime time = DateTime.Now;
bool isNeedAlarmLed = false;
bool isInOut = false;
StoreRunStatus runs = StoreRunStatus.Wait;
bool isReset = false;
foreach (BoxBean box in BoxMap.Values)
{
......@@ -341,14 +338,14 @@ namespace OnlineStore.DeviceLibrary
{
isInOut = true;
}
if (box.runStatus > runs)
if (box.runStatus.Equals(StoreRunStatus.HomeMoving) || box.runStatus.Equals(StoreRunStatus.Reset))
{
runs = box.runStatus;
isReset = true;
}
}
//黄灯
if (runs.Equals(StoreRunStatus.HomeMoving) || runs.Equals(StoreRunStatus.Reset))
//复位过程中黄灯闪烁
if (runStatus.Equals(StoreRunStatus.HomeMoving) || runStatus.Equals(StoreRunStatus.Reset)||isReset )
{
//开机执行中时黄灯闪烁
if (IsDoValue(IO_Type.RunSign_HddLed, IO_VALUE.HIGH))
......@@ -366,11 +363,8 @@ namespace OnlineStore.DeviceLibrary
{
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
}
}
if (alarmType.Equals(AlarmType.None).Equals(false) || isNoAirCheck || isInSuddenDown )
{
isNeedAlarmLed = true;
}
}
//忙碌中,判断是否有移栽在出入库执行,绿灯闪烁
if (isInOut)
{
......@@ -389,6 +383,10 @@ namespace OnlineStore.DeviceLibrary
}
//报警中 ,红灯闪烁
if (alarmType.Equals(AlarmType.None).Equals(false) || isNoAirCheck || isInSuddenDown )
{
isNeedAlarmLed = true;
}
if (isNeedAlarmLed)
{
if (IsDoValue(IO_Type.Alarm_HddLed, IO_VALUE.LOW))
......@@ -420,7 +418,6 @@ namespace OnlineStore.DeviceLibrary
private IO_VALUE preAirValue = IO_VALUE.HIGH;
private void AirCheckProcess()
{
IO_VALUE currAirValue = IOValue(IO_Type.Airpressure_Check);
if (isInSuddenDown)
{
......@@ -540,27 +537,25 @@ namespace OnlineStore.DeviceLibrary
ShowTimeLog("BusyMoveProcess");
}
else if (runStatus.Equals(StoreRunStatus.Runing))
{
{
IOTimeOutProcess();
ShowTimeLog("IOTimeOutProcess");
//判断是否需要处理料架入库
StartInStoreP();
//判断是否需要处理料架入库
StartInStoreP();
}
//检查运动轴报警
if (runStatus > StoreRunStatus.Wait && (!isInSuddenDown) && (!isNoAirCheck))
{
ShowTimeLog("开始检测轴报警");
CheckAxisAlarm(new AxisBean[] { T1_BatchAxis,T2_MiddleAxis,T3_UpdownAxis});
CheckAxisAlarm(new AxisBean[] { T1_BatchAxis, T2_MiddleAxis, T3_UpdownAxis });
ShowTimeLog("轴报警检测完成");
}
if (runStatus.Equals(StoreRunStatus.Runing) || runStatus.Equals(StoreRunStatus.Busy))
{
ShelfOutProcess();
ShowTimeLog("ShelfOutProcess");
}
}
catch (Exception ex)
......
......@@ -75,9 +75,7 @@ namespace OnlineStore.DeviceLibrary
positionIndex = newIndex;
string posid = boxBean.PositionNumList[positionIndex];
InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid);
//param.NeedOutShelf = false;
//param.NeedEnterShelf = false;
InOutParam param = new InOutParam(MoveType.OutStore, "AutoOut", posid,1);
//判断是否需要重置
if (CurrInOutACount >= StoreManager.Config.Box_ResetACount)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!