Commit 6c12ac94 LN

1

1 个父辈 9baff2b0
...@@ -136,12 +136,7 @@ namespace OnlineStore.ACPackingStore ...@@ -136,12 +136,7 @@ namespace OnlineStore.ACPackingStore
private void btnInOutMove_MouseDown(object sender, MouseEventArgs e) private void btnInOutMove_MouseDown(object sender, MouseEventArgs e)
{ {
if (this.btnInOutMove.BackColor .Equals(System.Drawing.SystemColors.Control)) if (this.btnInOutMove.BackColor .Equals(System.Drawing.SystemColors.Control))
{ {
if (boxBean.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int speed = FormUtil.GetIntValue(txtInOutSpeed); int speed = FormUtil.GetIntValue(txtInOutSpeed);
if (speed <= 0) if (speed <= 0)
{ {
...@@ -223,12 +218,7 @@ namespace OnlineStore.ACPackingStore ...@@ -223,12 +218,7 @@ namespace OnlineStore.ACPackingStore
private void btnInOutMovej_MouseDown(object sender, MouseEventArgs e) private void btnInOutMovej_MouseDown(object sender, MouseEventArgs e)
{ {
if (btnInOutMovej.BackColor.Equals(System.Drawing.SystemColors.Control)) if (btnInOutMovej.BackColor.Equals(System.Drawing.SystemColors.Control))
{ {
if (boxBean.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int speed = FormUtil.GetIntValue(txtInOutSpeed); int speed = FormUtil.GetIntValue(txtInOutSpeed);
if (speed <= 0) if (speed <= 0)
{ {
...@@ -350,5 +340,40 @@ namespace OnlineStore.ACPackingStore ...@@ -350,5 +340,40 @@ namespace OnlineStore.ACPackingStore
txtInOutPosition.Text = inoutPosition.ToString(); txtInOutPosition.Text = inoutPosition.ToString();
} }
} }
private void trackBar1_ValueChanged(object sender, EventArgs e)
{
int value = trackBar1.Value;
lblSpeed.Text = "点动速度=" + (value / 10f) + "倍目标速度";
ACServerManager.ClearSpeed();
txtMiddleSpeed.Text = (middle.TargetSpeed * value / 10).ToString();
txtInOutSpeed.Text = (inout.TargetSpeed * value / 10).ToString();
txtUpDownSpeed.Text = (updown.TargetSpeed * value / 10).ToString();
txtComSpeed.Text = (comp.TargetSpeed * value / 10).ToString();
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
}
private void btnMCopy_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(txtMiddlePosition.Text, true);
}
private void btnUCopy_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(txtUpdownPosition.Text, true);
}
private void btnICopy_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(txtInOutPosition.Text, true);
}
private void btnCCopy_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(txtComPosition.Text, true);
}
} }
} }
...@@ -441,53 +441,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -441,53 +441,43 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(CodeMsg); LogUtil.error(CodeMsg);
} }
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition); MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition);
InOutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 "); InOutStoreLog("出库:SO_08 走到料架位置,旋转轴至P101,升降轴至P102, ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed);
//打开舱门
//OpenDoorAndWait();
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_07_LocationCylinder_Up) else if (MoveInfo.MoveStep == StoreMoveStep.SO_07_LocationCylinder_Up)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition); MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition);
InOutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点) "); InOutStoreLog("出库:SO_08 走到料架位置,旋转轴至P101,升降轴至P102, ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_08_ToDoorPosition) else if (MoveInfo.MoveStep == StoreMoveStep.SO_08_ToShelfPosition)
{ {
//SO_10_DeviceToDoorPro();
MoveInfo.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray); MoveInfo.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor();
} }
//此处需要等待移栽没有工作,才能把盘放入出料口 //此处需要等待移栽没有工作,才能把盘放入出料口
else if (MoveInfo.MoveStep == StoreMoveStep.SO_09_LocationCylinder_Down) else if (MoveInfo.MoveStep == StoreMoveStep.SO_09_LocationCylinder_Down)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray); MoveInfo.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
InOutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor();
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_091_WaitNoTray) else if (MoveInfo.MoveStep == StoreMoveStep.SO_091_WaitNoTray)
{ {
SO_10_DeviceToDoorPro(); MoveInfo.NextMoveStep(StoreMoveStep.SO_10_DeviceToShelf);
InOutStoreLog("出库:SO_10 叉子进出料口,进出轴至P101");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_DeviceToDoor) else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_DeviceToShelf)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare); MoveInfo.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
InOutStoreLog("出库:SO_11 放下物品,升降轴至P8(进料口出料缓冲点) "); InOutStoreLog("出库:SO_11 放下物品,压紧轴到P1,升降轴至P101 ");
//NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DevicePutWare) else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DevicePutWare)
{ {
...@@ -500,27 +490,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -500,27 +490,26 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.SO_13_GoBack); MoveInfo.NextMoveStep(StoreMoveStep.SO_13_GoBack);
InOutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"); InOutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor();
//发送消息给流水线 //发送消息给流水线
SendOutStoreEnd(MoveInfo); // SendOutStoreEnd(MoveInfo);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_13_GoBack) else if (MoveInfo.MoveStep == StoreMoveStep.SO_13_GoBack)
{ {
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds); // int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
if (OutStoreWaitSeconds <= 0) // if (OutStoreWaitSeconds <= 0)
{ // {
OutStoreWaitSeconds = 600; // OutStoreWaitSeconds = 600;
} // }
int ms = OutStoreWaitSeconds * 1000; // int ms = OutStoreWaitSeconds * 1000;
MoveInfo.NextMoveStep(StoreMoveStep.SO_14_WaitTake); // MoveInfo.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
InOutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒"); // InOutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(ms)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(ms));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); // // StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
MoveInfo.OneWaitCanEndStep = true; // MoveInfo.OneWaitCanEndStep = true;
} //}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_14_WaitTake) //else if (MoveInfo.MoveStep == StoreMoveStep.SO_14_WaitTake)
{ //{
TimeSpan span = DateTime.Now - startOutStoreTime; TimeSpan span = DateTime.Now - startOutStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
...@@ -528,49 +517,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -528,49 +517,14 @@ namespace OnlineStore.DeviceLibrary
LogInfo(" 【" + posId + "】 整个出库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!"); LogInfo(" 【" + posId + "】 整个出库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove(); MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
AutoInout.InOutEndProcess(this,StoreMoveType.OutStore); AutoInout.InOutEndProcess(this, StoreMoveType.OutStore);
} }
else else
{ {
LogUtil.error(Name + " 出库处理,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!"); LogUtil.error(Name + " 出库处理,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!");
} }
} }
private void SendOutStoreEnd(StoreMoveInfo storeMove)
{
//int hasTray = (int)IOValue(IO_Type.TrayCheck_Door);
//int ss = (int)storeStatus;
//if (IsDebug)
//{
// ss = (int)StoreStatus.Debugging;
//}
//StoreSendBean store = new StoreSendBean(Config.Id, Config.CID, (int)storeStatus, (int)storeRunStatus, hasTray, (int)alarmType);
//store.PosId = MoveInfo.MoveParam.PositionNum;
//store.PlateH = MoveInfo.MoveParam.PlateH;
//store.PlateW = MoveInfo.MoveParam.PlateW;
//LineConnect.OutStoreEnd(store);
}
private void SO_10_DeviceToDoorPro()
{
LineMoveP moveP = MoveInfo.MoveParam.MoveP;
MoveInfo.NextMoveStep(StoreMoveStep.SO_10_DeviceToDoor);
InOutStoreLog("出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1;
}
public bool InOutAxisCanMove()
{
//if (IOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
// && IOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW)
// && IOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH)
// && IOValue(IO_Type.LocationCylinder2_Up).Equals(IO_VALUE.LOW))
//{
// return true;
//}
return false;
}
#endregion #endregion
......
...@@ -205,14 +205,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -205,14 +205,14 @@ namespace OnlineStore.DeviceLibrary
SO_06_BagDeviceBack =10106, SO_06_BagDeviceBack =10106,
/// <summary> /// <summary>
/// 料仓出库,定位气缸伸出(有压紧轴的不需要此步骤),,定位气缸伸出 Y103-1/PCI5O1-83) Y103-2/PCI5O1-90) Y103-3/PCI5O1-95) 伸出到位 /// 料仓出库,定位气缸伸出(有压紧轴的不需要此步骤
/// </summary> /// </summary>
SO_07_LocationCylinder_Up =10107, SO_07_LocationCylinder_Up =10107,
/// <summary> /// <summary>
/// 料仓出库,,所有设备运行到门,,轴1( 转盘) 至P1( 待机点)轴2( 上下) 至P2( 进料口出料前点) /// 料仓出库,走到料架位置,旋转轴至P101,升降轴至P102,
/// </summary> /// </summary>
SO_08_ToDoorPosition =10108, SO_08_ToShelfPosition = 10108,
/// <summary> /// <summary>
/// 料仓出库,定位气缸退回(有压紧轴的不需要此步骤),,定位气缸退回(Y104-1/PCI5O1-84) (Y104-2/PCI5O1-91) (Y104-2/PCI5O1-96) 退回到位 /// 料仓出库,定位气缸退回(有压紧轴的不需要此步骤),,定位气缸退回(Y104-1/PCI5O1-84) (Y104-2/PCI5O1-91) (Y104-2/PCI5O1-96) 退回到位
...@@ -224,13 +224,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -224,13 +224,13 @@ namespace OnlineStore.DeviceLibrary
SO_091_WaitNoTray =10115, SO_091_WaitNoTray =10115,
/// <summary> /// <summary>
/// 料仓出库,,叉子进出料口,,轴3( 叉子) 至P2( 进料口取料点) /// 料仓出库,叉子到料架,进出轴至P101
/// /// </summary> /// /// </summary>
SO_10_DeviceToDoor =10110, SO_10_DeviceToShelf = 10110,
/// <summary> /// <summary>
/// 料仓出库,,把物品放下,,轴2( 上下) 至P8( 进料口出料缓冲点)轴4( 压紧) 至P1( 待机点) /// 料仓出库,,把物品放下,压紧轴到P1,升降轴至P101
/// </summary> /// </summary>
SO_11_DevicePutWare =10111, SO_11_DevicePutWare = 10111,
/// <summary> /// <summary>
/// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点) /// 料仓出库,,叉子从出料口返回,,轴3( 叉子) 动作至P1( 待机点)
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!