Commit 3d8c9bd3 LN

紧急出库修改

1 个父辈 34140148
......@@ -411,7 +411,7 @@ namespace OnlineStore.AssemblyLine
int speed = equipBean.Config.UpdownAxis_P2Speed;
LogUtil.info("点击【移栽位置P2】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(position, speed);
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......@@ -444,7 +444,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP1);
int speed = equipBean.Config.UpdownAxis_P1Speed;
LogUtil.info("点击【移栽升降轴待机位置P1:】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(position, speed);
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
private void btnSave_Click(object sender, EventArgs e)
......@@ -490,19 +490,19 @@ namespace OnlineStore.AssemblyLine
private void btnBP1_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtBp1);
equipBean.BatchAxis.AbsMove(position, equipBean.Config.BatchAxis_P1Speed);
equipBean.BatchAxis.AbsMove(null, position, equipBean.Config.BatchAxis_P1Speed);
}
private void btnBP2_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtBP2);
equipBean.BatchAxis.AbsMove(position, equipBean.Config.BatchAxis_P2Speed);
equipBean.BatchAxis.AbsMove(null, position, equipBean.Config.BatchAxis_P2Speed);
}
private void btnBP3_Click(object sender, EventArgs e)
{
int position = FormUtil.GetIntValue(txtBP3);
equipBean.BatchAxis.AbsMove(position, equipBean.Config.BatchAxis_P3Speed);
equipBean.BatchAxis.AbsMove(null, position, equipBean.Config.BatchAxis_P3Speed);
}
private void btnBSave_Click(object sender, EventArgs e)
......@@ -539,7 +539,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtUpdownP3);
int speed = equipBean.Config.UpdownAxis_P3Speed;
LogUtil.info("点击【移栽升降轴取料位置P3:】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(position, speed);
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
......
......@@ -395,7 +395,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP2);
int speed = equipBean.Config.UpdownAxis_P2Speed;
LogUtil.info("点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(position, speed);
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......@@ -435,7 +435,7 @@ namespace OnlineStore.AssemblyLine
int speed = equipBean.Config.UpdownAxis_P1Speed;
LogUtil.info("点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(position, speed);
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......@@ -460,7 +460,7 @@ namespace OnlineStore.AssemblyLine
int speed = equipBean.Config.UpdownAxis_P3Speed;
LogUtil.info("点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(position, speed);
equipBean.UpdownAxis.AbsMove(null, position, speed);
}
......
......@@ -363,7 +363,7 @@ namespace OnlineStore.AssemblyLine
{
int speed = equipBean.Config.UpdownAxis_P3Speed;
LogUtil.info("点击【出料皮带线位置P3】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBase.UpdownAxis.AbsMove(position, speed);
equipBase.UpdownAxis.AbsMove(null, position, speed);
}
}
private void btnMoveto_Click(object sender, EventArgs e)
......@@ -373,7 +373,7 @@ namespace OnlineStore.AssemblyLine
{
int speed = equipBean.Config.UpdownAxis_P2Speed;
LogUtil.info("点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBase.UpdownAxis.AbsMove(position, speed);
equipBase.UpdownAxis.AbsMove(null, position, speed);
}
}
private void btnMoveToP1_Click(object sender, EventArgs e)
......@@ -383,7 +383,7 @@ namespace OnlineStore.AssemblyLine
{
int speed = equipBean.Config.UpdownAxis_P1Speed;
LogUtil.info("点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】");
equipBase.UpdownAxis.AbsMove(position, speed);
equipBase.UpdownAxis.AbsMove(null, position, speed);
}
}
private void cmbSizeList_SelectedIndexChanged(object sender, EventArgs e)
......
......@@ -540,7 +540,7 @@ namespace OnlineStore.DeviceLibrary
msg += "runStatus:".PadRight(tLength, ' ') + runStatus + "\n";
msg += "lineStatus:".PadRight(tLength, ' ') + lineStatus + "\n";
msg += "MoveType:".PadRight(tLength, ' ') + MoveInfo.MoveType+"\n";
msg += "MoveStep:".PadRight(tLength, ' ') + MoveInfo.MoveStep + "\n";
msg += "MoveStep:".PadRight(tLength, ' ') + MoveInfo.SLog + "\n";
msg += "SMoveType:".PadRight(tLength, ' ') + SecondMoveInfo.MoveType + "\n";
msg += "SMoveStep:".PadRight(tLength, ' ') + SecondMoveInfo.MoveStep + "";
return msg;
......
......@@ -96,19 +96,25 @@ namespace OnlineStore.DeviceLibrary
}
private void StartReset()
{
{
if (OutStoreHeight > 0)
{
LogInfo("复位前,清理出库高度:" + OutStoreHeight);
}
OutStoreHeight = -1;
BatchAxisStopCheck();
ResetClearData();
lineStatus = LineStatus.ResetMove;
IOMove(IO_Type.SL_HddLed, IO_VALUE.HIGH);
MoveInfo.NextMoveStep(LineMoveStep.FR_00_LineRun);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":开始复位,放料顶升下降, 所有阻挡上升,链条先转动3秒钟");
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":开始复位,放料顶升下降, 所有阻挡上升,链条先转动3秒钟或等待定位工位有料架");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
//CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
//阻挡上升
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.HIGH);
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
if (Config.SidesWayNum <= 0)
{
......@@ -126,7 +132,8 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Location_Check, IO_VALUE.HIGH));
MoveInfo.OneWaitCanEndStep = true;
isInPro = false;
}
//复位时,应该先提升伺服回原点,然后提升伺服下降到P2点,放开定位气缸,顶升气缸下降,提升伺服在上升到P1点。
......@@ -150,7 +157,9 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_Line_Run, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW));
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
if (Config.SidesWayNum <= 0)
......@@ -218,9 +227,18 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.FR_08_MoveCylinder_Slack:
if (MoveCylineCanTakeOrGive())
{
MoveInfo.NextMoveStep(LineMoveStep.FR_09_MoveCylinder_Give);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 上料横移气缸放料端SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
if (Config.IsCanOut.Equals(1))
{
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 上料横移气缸取料端SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
}
else
{
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 上料横移气缸放料端SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
}
}
else
{
......@@ -271,12 +289,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public override void StopRun()
{
runStatus = LineRunStatus.Wait;
lineStatus = LineStatus.StoreOnline;
if (mainTimer != null)
{
mainTimer.Enabled = false;
}
StopMove();
runStatus = LineRunStatus.Wait;
}
......@@ -633,7 +653,7 @@ namespace OnlineStore.DeviceLibrary
ProcessShelfEnter = true;
//进料阻挡下降,缓冲阻挡上升
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.HIGH);
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
// IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
//转动线体
IOMove(IO_Type.SL_Line_Run, IO_VALUE.HIGH);
......
......@@ -930,7 +930,7 @@ namespace OnlineStore.DeviceLibrary
msg += "runStatus: "+ runStatus + "\n";
msg += "lineStatus: "+ lineStatus + "\n";
msg += "MoveType: " + MoveInfo.MoveType + "\n";
msg += "MoveStep: " + MoveInfo.MoveStep + "\n";
msg += "MoveStep: " + MoveInfo.SLog + "\n";
msg += "SW41_Move: "+ SW41_MoveInfo.MoveType + " "+ SW41_MoveInfo.MoveStep + "\n";
msg += "SW23_Move: " + SW23_MoveInfo.MoveType + " " + SW23_MoveInfo.MoveStep + "\n";
return msg;
......
......@@ -110,7 +110,7 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("InOutTimerProcess出错:" + ex.ToString());
LogUtil.error("InOutTimerProcess出错:" + ex.StackTrace);
}
isInprocess = false;
......@@ -663,7 +663,7 @@ namespace OnlineStore.DeviceLibrary
FeedingEquip equip = FeedingEquipMap[deviceId];
if (equip.runStatus >= LineRunStatus.Runing)
{
if (equip.NeedCurrTray())
if (equip.CurrTrayIsNeed(false ))
{
return true;
}
......
......@@ -114,10 +114,17 @@ namespace OnlineStore.DeviceLibrary
/// 松下伺服电机运动
/// </summary>
public void AbsMove(LineMoveInfo MoveInfo, int targetPosition, int targetSpeed)
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(Config, targetPosition, targetSpeed));
Config.TargetPosition = targetPosition;
ACServerManager.AbsMove(Config.DeviceName, Config.GetAxisValue(), targetPosition, targetSpeed);
{
if (MoveInfo == null)
{
AbsMove(targetPosition, targetSpeed);
}
else
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(Config, targetPosition, targetSpeed));
Config.TargetPosition = targetPosition;
ACServerManager.AbsMove(Config.DeviceName, Config.GetAxisValue(), targetPosition, targetSpeed);
}
}
/// <summary>
......@@ -143,12 +150,13 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(axis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount +
"],误差过大,重新开始运动,剩余[" + MoveInfo.CanWhileCount + "]次");
ACServerManager.SuddenStop(axis.DeviceName, axis.GetAxisValue());
ACServerManager.AbsMove(axis.DeviceName, axis.GetAxisValue(), targetPosition, targetSpeed);
MoveInfo.CanWhileCount--;
}
else
{
msg = " storeMoveStep=" + MoveInfo.MoveStep + axis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount
msg = " storeMoveStep=" + MoveInfo.SLog + axis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount
+ "],误差过大,需要报警";
LogUtil.error(msg,1034);
}
......@@ -177,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
msg = " storeMoveStep=" + MoveInfo.MoveStep + axis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警";
msg = " storeMoveStep=" + MoveInfo.SLog + axis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警";
LogUtil.error(msg);
}
}
......@@ -192,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 绝对运动至点,不等待结果
/// </summary>
public void AbsMove(int targetPos, double targetSpeed)
private void AbsMove(int targetPos, double targetSpeed)
{
if (targetPos.Equals(-1))
{
......
......@@ -43,24 +43,24 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 物品二维码信息
/// </summary>
public string WareCode { get; set; }
public string WareCode = "";
/// <summary>
/// 位置坐标名(对应配置表的位置)
/// </summary>
public string PosId { get; set; }
public string PosId = "";
/// <summary>
/// 托盘号
/// </summary>
public int TrayNumber { get; set; }
public int TrayNumber = -1;
/// <summary>
/// 料盘高度
/// </summary>
public int PlateH { get; set; }
public int PlateH = 0;
/// <summary>
/// 料盘宽度
/// </summary>
public int PlateW { get; set; }
public int PlateW = 0;
public string ToStr()
{
......
......@@ -384,7 +384,10 @@ namespace OnlineStore.DeviceLibrary
/// 等待当前的出入库结束
/// </summary>
MO_200_WaitInoutParam=3200,
/// <summary>
/// 等待紧急出料结束
/// </summary>
MO_201_WaitOutEnd=3201,
#endregion
......@@ -706,8 +709,10 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 入料装置出料处理,12000开始
/// <summary>
/// 出库流程:提升伺服到P2
/// </summary>
FO_00_BatchAxisToP2=12000,
/// <summary>
/// 出料流程:升降盘定位气缸后退
/// </summary>
......
......@@ -49,32 +49,32 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 夹具编码值(1-32?)
/// </summary>
public int TrayCode { get; set; }
public int TrayCode = -1;
/// <summary>
/// 是否有料盘,true=有料盘
/// </summary>
public bool IsFull { get; set; }
public bool IsFull = false;
/// <summary>
/// 出库还是入库(有料盘时才有此操作)0=无操作,1=入库,2=出库
/// </summary>
public int InOrOutStore { get; set; }
public int InOrOutStore = 0;
/// <summary>
/// 物品二维码信息
/// </summary>
public string WareCode { get; set; }
public string WareCode = "";
/// <summary>
/// 位置名(对应配置表的位置)
/// </summary>
public string PosId { get; set; }
public string PosId = "";
/// <summary>
/// 料盘高度
/// </summary>
public int PlateH { get; set; }
public int PlateH = 0;
/// <summary>
/// 料盘宽度
/// </summary>
public int PlateW { get; set; }
public int PlateW = 0;
/// <summary>
/// 入库失败料盘,未扫到码或获取库位号失败
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!