Commit 6c12ac94 LN

1

1 个父辈 9baff2b0
...@@ -137,11 +137,6 @@ namespace OnlineStore.ACPackingStore ...@@ -137,11 +137,6 @@ namespace OnlineStore.ACPackingStore
{ {
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)
{ {
...@@ -224,11 +219,6 @@ namespace OnlineStore.ACPackingStore ...@@ -224,11 +219,6 @@ namespace OnlineStore.ACPackingStore
{ {
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);
}
} }
} }
...@@ -46,7 +46,7 @@ namespace OnlineStore.ACPackingStore ...@@ -46,7 +46,7 @@ namespace OnlineStore.ACPackingStore
this.Close(); this.Close();
return; return;
} }
this.groupBox3.Text ="设备["+ BoxBean.CID+"]状态"; this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this.Text = BoxBean.Name; this.Text = BoxBean.Name;
//txtSpeed.Text = BoxBean.Config.CompressAxis_EndSpeed.ToString(); //txtSpeed.Text = BoxBean.Config.CompressAxis_EndSpeed.ToString();
cmbAxisList.DataSource = new List<ConfigMoveAxis>(BoxBean.moveAxisList); cmbAxisList.DataSource = new List<ConfigMoveAxis>(BoxBean.moveAxisList);
...@@ -167,15 +167,13 @@ namespace OnlineStore.ACPackingStore ...@@ -167,15 +167,13 @@ namespace OnlineStore.ACPackingStore
//判断私服是否打开、 //判断私服是否打开、
if (ACServerManager.ServerOnStatus(portName, SlvAddr)) if (ACServerManager.ServerOnStatus(portName, SlvAddr))
{ {
lblServerOn.Text = "伺服ON"; txtServoStatue.Text = "✔";
int lOutPulse = ACServerManager.GetTargetPosition(portName, SlvAddr);
lblOutPulse.Text = string.Format("{0:d}", lOutPulse);
int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr); int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr);
lblCountPulse.Text = string.Format("{0:d}", lCountPulse); lblCountPulse.Text = string.Format("{0:d}", lCountPulse);
} }
else else
{ {
lblServerOn.Text = "伺服OFF"; txtServoStatue.Text = "✘";
} }
} }
} }
...@@ -295,11 +293,11 @@ namespace OnlineStore.ACPackingStore ...@@ -295,11 +293,11 @@ namespace OnlineStore.ACPackingStore
//判断私服是否打开、 //判断私服是否打开、
if (ACServerManager.ServerOnStatus(portName, SlvAddr)) if (ACServerManager.ServerOnStatus(portName, SlvAddr))
{ {
lblServerOn.Text = "伺服ON"; txtServoStatue.Text = "✔";
} }
else else
{ {
lblServerOn.Text = "伺服OFF"; txtServoStatue.Text = "✘";
} }
string deviceName = GetPortName(); string deviceName = GetPortName();
if (ACServerManager.ServerOnStatus(BoxBean.Config.Middle_Axis.DeviceName, BoxBean.Config.Middle_Axis.GetAxisValue())) if (ACServerManager.ServerOnStatus(BoxBean.Config.Middle_Axis.DeviceName, BoxBean.Config.Middle_Axis.GetAxisValue()))
...@@ -313,7 +311,6 @@ namespace OnlineStore.ACPackingStore ...@@ -313,7 +311,6 @@ namespace OnlineStore.ACPackingStore
txtMiddleTarget.Text = BoxBean.Config.Middle_Axis.TargetPosition.ToString(); txtMiddleTarget.Text = BoxBean.Config.Middle_Axis.TargetPosition.ToString();
if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr)) if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr))
{ {
lblOutPulse.Text = lblOutPulse1.Text;
lblCountPulse.Text = lblCountPulse1.Text; lblCountPulse.Text = lblCountPulse1.Text;
} }
} }
...@@ -328,7 +325,6 @@ namespace OnlineStore.ACPackingStore ...@@ -328,7 +325,6 @@ namespace OnlineStore.ACPackingStore
txtInoutTarget.Text = BoxBean.Config.InOut_Axis.TargetPosition.ToString(); txtInoutTarget.Text = BoxBean.Config.InOut_Axis.TargetPosition.ToString();
if (BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr)) if (BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
lblOutPulse.Text = lblOutPulse2.Text;
lblCountPulse.Text = lblCountPulse2.Text; lblCountPulse.Text = lblCountPulse2.Text;
} }
} }
...@@ -342,7 +338,6 @@ namespace OnlineStore.ACPackingStore ...@@ -342,7 +338,6 @@ namespace OnlineStore.ACPackingStore
txtUpdownTarget.Text = BoxBean.Config.UpDown_Axis.TargetPosition.ToString(); txtUpdownTarget.Text = BoxBean.Config.UpDown_Axis.TargetPosition.ToString();
if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr)) if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr))
{ {
lblOutPulse.Text = lblOutPulse3.Text;
lblCountPulse.Text = lblCountPulse3.Text; lblCountPulse.Text = lblCountPulse3.Text;
} }
} }
...@@ -462,12 +457,7 @@ namespace OnlineStore.ACPackingStore ...@@ -462,12 +457,7 @@ namespace OnlineStore.ACPackingStore
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")"); // MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return; // return;
//} //}
if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (BoxBean.InOutAxisCanMove().Equals(false))) if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
if (!InOutIsIsP1()) if (!InOutIsIsP1())
{ {
...@@ -483,12 +473,7 @@ namespace OnlineStore.ACPackingStore ...@@ -483,12 +473,7 @@ namespace OnlineStore.ACPackingStore
string portName = txtAxisDeviceName.Text; string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue); short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
int speed = FormUtil.GetIntValue(txtASpeed); int speed = FormUtil.GetIntValue(txtASpeed);
if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (BoxBean.InOutAxisCanMove().Equals(false))) if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
if (!InOutIsIsP1()) if (!InOutIsIsP1())
{ {
...@@ -514,12 +499,7 @@ namespace OnlineStore.ACPackingStore ...@@ -514,12 +499,7 @@ namespace OnlineStore.ACPackingStore
// return; // return;
//} //}
if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (BoxBean.InOutAxisCanMove().Equals(false))) if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
if (!InOutIsIsP1()) if (!InOutIsIsP1())
{ {
...@@ -591,7 +571,7 @@ namespace OnlineStore.ACPackingStore ...@@ -591,7 +571,7 @@ namespace OnlineStore.ACPackingStore
bool result = CSVPositionReader<ACBoxPosition>.SavePostion(positionConfigFile, ktkPosition); bool result = CSVPositionReader<ACBoxPosition>.SavePostion(positionConfigFile, ktkPosition);
if (!result) if (!result)
{ {
MessageBox.Show("库位【"+selectPositionNum+ "】保存失败!"); MessageBox.Show("库位【" + selectPositionNum + "】保存失败!");
} }
//料仓固定位置保存 //料仓固定位置保存
bool needUpdate = false; bool needUpdate = false;
...@@ -753,33 +733,19 @@ namespace OnlineStore.ACPackingStore ...@@ -753,33 +733,19 @@ namespace OnlineStore.ACPackingStore
private void btnInOutP1_Click(object sender, EventArgs e) private void btnInOutP1_Click(object sender, EventArgs e)
{ {
if (BoxBean.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int value = FormUtil.GetIntValue(txtInOutP1); int value = FormUtil.GetIntValue(txtInOutP1);
AxisABSMove(BoxBean.Config.InOut_Axis, value, BoxBean.Config.InOutAxis_P1_Speed); AxisABSMove(BoxBean.Config.InOut_Axis, value, BoxBean.Config.InOutAxis_P1_Speed);
} }
private void btnInOutP3_Click(object sender, EventArgs e) private void btnInOutP3_Click(object sender, EventArgs e)
{ {
if (BoxBean.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int value = FormUtil.GetIntValue(txtInOutP3); int value = FormUtil.GetIntValue(txtInOutP3);
AxisABSMove(BoxBean.Config.InOut_Axis, value, BoxBean.Config.InOutAxis_P3_Speed); AxisABSMove(BoxBean.Config.InOut_Axis, value, BoxBean.Config.InOutAxis_P3_Speed);
} }
private void btnInOutP2_Click(object sender, EventArgs e) private void btnInOutP2_Click(object sender, EventArgs e)
{ {
if (BoxBean.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
int value = FormUtil.GetIntValue(txtInOutP2); int value = FormUtil.GetIntValue(txtInOutP2);
AxisABSMove(BoxBean.Config.InOut_Axis, value, BoxBean.Config.InOutAxis_P2_Speed); AxisABSMove(BoxBean.Config.InOut_Axis, value, BoxBean.Config.InOutAxis_P2_Speed);
} }
...@@ -936,8 +902,6 @@ namespace OnlineStore.ACPackingStore ...@@ -936,8 +902,6 @@ namespace OnlineStore.ACPackingStore
this.btnInOutP3.ForeColor = System.Drawing.Color.Green; this.btnInOutP3.ForeColor = System.Drawing.Color.Green;
this.btnMiddleP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); this.btnMiddleP1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.btnMiddleP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192))))); this.btnMiddleP2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
} }
private int GetSlaveAddr() private int GetSlaveAddr()
...@@ -953,12 +917,7 @@ namespace OnlineStore.ACPackingStore ...@@ -953,12 +917,7 @@ namespace OnlineStore.ACPackingStore
{ {
string portName = txtAxisDeviceName.Text; string portName = txtAxisDeviceName.Text;
short SlvAddr = FormUtil.GetShortValue(txtAxisValue); short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
if (BoxBean.Config.InOut_Axis.IsSameAxis(portName, SlvAddr) && (BoxBean.InOutAxisCanMove().Equals(false))) if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else if (BoxBean.Config.Middle_Axis.IsSameAxis(portName, SlvAddr) || BoxBean.Config.UpDown_Axis.IsSameAxis(portName, SlvAddr))
{ {
if (!InOutIsIsP1()) if (!InOutIsIsP1())
{ {
...@@ -978,8 +937,15 @@ namespace OnlineStore.ACPackingStore ...@@ -978,8 +937,15 @@ namespace OnlineStore.ACPackingStore
private void btnGetAlarm_Click(object sender, EventArgs e) private void btnGetAlarm_Click(object sender, EventArgs e)
{ {
int value = ACServerManager.GetAlarmStatus(GetPortName(), GetSlaveAddr()); string PortName = txtAxisDeviceName.Text;
this.txtAlarmStatus.Text = value.ToString(); short SlvAddr = FormUtil.GetShortValue(txtAxisValue);
txtServoStatue.Text = ACServerManager.ServerOnStatus(PortName, SlvAddr) ? "✔" : "✘";
this.txtAlarmStatus.Text = ACServerManager.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = ACServerManager.GetBusyStatus(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = ACServerManager.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = ACServerManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
} }
private void button1_Click_1(object sender, EventArgs e) private void button1_Click_1(object sender, EventArgs e)
...@@ -1149,10 +1115,8 @@ namespace OnlineStore.ACPackingStore ...@@ -1149,10 +1115,8 @@ namespace OnlineStore.ACPackingStore
ioIP = BoxBean.Config.DIList[IO_Type.TrayCheck_Fixture].DeviceName; ioIP = BoxBean.Config.DIList[IO_Type.TrayCheck_Fixture].DeviceName;
ioIndex = BoxBean.Config.DIList[IO_Type.TrayCheck_Fixture].GetIOAddr(); ioIndex = BoxBean.Config.DIList[IO_Type.TrayCheck_Fixture].GetIOAddr();
} }
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex,Text); FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex, Text);
frm.ShowDialog(); frm.ShowDialog();
} }
private void btnReadLimit1_Click(object sender, EventArgs e) private void btnReadLimit1_Click(object sender, EventArgs e)
......
...@@ -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,7 +517,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -528,7 +517,7 @@ 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
{ {
...@@ -536,41 +525,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -536,41 +525,6 @@ namespace OnlineStore.DeviceLibrary
} }
} }
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!