Commit 14cf1502 刘韬

1.入料失败只重试3次

2.出料抓料失败后直接手动扔ng把, 打出来的标签会抛弃掉
3.限制了出料顶升每次升幅的最大值,防止一升过头
1 个父辈 fa81c6e7
......@@ -110,16 +110,16 @@ namespace OnlineStore.AutoCountClient
try
{
if (equipBase.runStatus.Equals(RobotRunStatus.Wait))
{
bool result = equipBase.StartRun();
if (result)
{
FormStatus(true);
bool result = equipBase.StartRun();
if (result)
{
FormStatus(true);
}
}
}
else
{
equipBase.Reset();
else
{
equipBase.Reset();
}
}
catch (Exception ex)
......
......@@ -24,6 +24,9 @@ namespace OnlineStore.AutoCountClient
{
private bool IsLoad = false;
private OutputEquip equipBean;
public event resetButtonClickdelegate resetButtonClick;
public delegate void resetButtonClickdelegate();
internal FrmOutputEquip(OutputEquip moveEquip)
{
equipBase = moveEquip;
......@@ -326,6 +329,7 @@ namespace OnlineStore.AutoCountClient
private void btnStart_Click(object sender, EventArgs e)
{
StartDebug(btnStart);
resetButtonClick?.Invoke();
}
private void btnStop_Click(object sender, EventArgs e)
{
......@@ -829,6 +833,7 @@ namespace OnlineStore.AutoCountClient
if (equipBase.runStatus > (RobotRunStatus.Wait))
{
equipBean.MoveReset();
resetButtonClick?.Invoke();
}
}
......
......@@ -56,10 +56,18 @@ namespace OnlineStore.AutoCountClient
FrmOutputEquip frm2 = new FrmOutputEquip(robot.outputEquip);
AddForm(" " + robot.outputEquip.Name + " ", frm2);
frm2.resetButtonClick += Frm2_resetButtonClick;
robot.XrayBean.GetImageEvent += EquipBean_GetImageEvent;
}
private void Frm2_resetButtonClick()
{
robot.XrayBean.MoveStop = true;
robot.inputEquip.MoveStop = true;
}
private void AddForm(string text, Form form)
{
text = text.PadLeft(10, ' ');
......@@ -495,6 +503,10 @@ namespace OnlineStore.AutoCountClient
robot.XrayBean.MoveStop = true;
lblXrayWork.Text = "图像平板失效,请及时处理。";
lblXrayWork.Visible = true;
robot.XrayBean.Alarm(AlarmType.SuddenStop);
}
else {
lblXrayWork.Text = "警告:点料过程中,请勿开门";
}
......
......@@ -26,6 +26,8 @@ PRO,0,取料升降轴取料点P2_右侧,UpdownAxis_P2_R,204000,,,,,
PRO,0,取料升降轴XRay入库放料点P3,UpdownAxis_P3,324990,,,,,
PRO,0,取料升降轴工位放料点P4_高,UpdownAxis_P4_H,187900,,,,,
PRO,0,取料升降轴工位放料点P4_低,UpdownAxis_P4_L,512090,,,,,
PRO,0,取料升降轴回放点P5_左侧,UpdownAxis_P5_L,199740,,,,,
PRO,0,取料升降轴回放点P5_右侧,UpdownAxis_P5_R,199740,,,,,
,,,,,,,,,
PRO,0,取料升降轴P1速度,UpdownAxis_P1Speed,1550,,,,,
PRO,0,取料升降轴P2速度,UpdownAxis_P2Speed,1550,,,,,
......
......@@ -20,8 +20,8 @@ namespace OnlineStore.DeviceLibrary
private string CameraName = "";
private string AgvName = "";
private string RfidIP = "";
private int BatchAxisP1 = 0;
private int BatchAxisP3 = 0;
public int BatchAxisP1 = 0;
public int BatchAxisP3 = 0;
private InputEquip Robot
{
get { return RobotManager.robot.inputEquip; }
......
......@@ -443,7 +443,7 @@ namespace OnlineStore.DeviceLibrary
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
if (!first)
{
{
//如果不是第一次取盘,则每次最多上升16mm
targetP3 = StartMovePosition+Robot.Config.Height_ChangeValue*60;
if (targetP3 > BatchAxisP3)
......
......@@ -85,14 +85,13 @@ namespace OnlineStore.DeviceLibrary
private void IW04_InoutToP2()
{
//MoveInfo.NextMoveStep(StepEnum.IW04_InoutToP2);
WorkLog("取料: 进出轴前进到P2",0);
InOutAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Inout_P2(Config), Config.InoutAxis_P2Speed);
WorkLog("取料: 进出轴前进到P2 ,升降轴下降到P2");
MoveInfo.NextMoveStep(StepEnum.IW05_UpdownToP2);
WorkLog("取料: 升降轴下降到P2", 1);
InOutAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Inout_P2(Config), Config.InoutAxis_P2Speed);
UpdownAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Updown_P2(Config), Config.UpdownAxis_P2Speed);
}
private Task GetTargetPTask = null;
//private Task GetTargetPTask = null;
int getretry = 0;
protected override void WorkingProcess()
{
if (MoveInfo.IsInWait)
......@@ -116,12 +115,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IW03_MiddleToP2))
{
IW04_InoutToP2();
}
else if (MoveInfo.IsStep(StepEnum.IW04_InoutToP2))
else if (MoveInfo.IsStep(StepEnum.IW04_ReTry))
{
//MoveInfo.NextMoveStep(StepEnum.IW05_UpdownToP2);
//WorkLog("取料: 升降轴下降到P2",1);
//UpdownAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Updown_P2(Config), Config.UpdownAxis_P2Speed);
//CylinderMove(MoveInfo,IO_Type.Clamping_Work, IO_Type.Clamping_Relax);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
else if (MoveInfo.IsStep(StepEnum.IW05_UpdownToP2))
{
......@@ -150,24 +150,37 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(StepEnum.IW07_UpdownToP1))
{
MoveInfo.NextMoveStep(StepEnum.IW08_WaitAxisCheck);
WorkLog("取料: 等待伺服检测信号消失");
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_7, IO_VALUE.HIGH));
string it = IO_Type.R_AxisTrayCheck;
if (MoveInfo.MoveParam.InPosType.Equals(1))
it = IO_Type.L_AxisTrayCheck;
if (IOValue(it).Equals(IO_VALUE.LOW))
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.L_AxisTrayCheck, IO_VALUE.LOW));
//
getretry = 0;
MoveInfo.NextMoveStep(StepEnum.IW08_WaitAxisCheck);
}
else
else if (getretry>3){
WorkLog("取料: 重试失败");
MoveInfo.NextMoveStep(StepEnum.IW08_WaitAxisCheck);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(it, IO_VALUE.LOW));
}
else if (MoveInfo.IsTimeOut(4))
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.R_AxisTrayCheck, IO_VALUE.LOW));
getretry++;
MoveInfo.NextMoveStep(StepEnum.IW50_InOutToP2);
WorkLog("取料: 开始复位 第"+ getretry+"次");
var b = LeftBatchMove;
if (MoveInfo.MoveParam.InPosType.Equals(2))
b = RightBatchMove;
int xpos = b.BatchAxis.GetAclPosition() - Config.Height_ChangeValue * 50;
if (xpos < b.BatchAxisP1)
xpos = b.BatchAxisP1;
b.BatchAxis.AbsMove(MoveInfo, xpos, Config.BatchAxis_P3Speed);
}
}
else if (MoveInfo.IsStep(StepEnum.IW08_WaitAxisCheck))
{
//MoveInfo.NextMoveStep(StepEnum.IW09_InoutToP1);
//MoveInfo.NextMoveStep(StepEnum.IW10_SaveSize);
MoveInfo.NextMoveStep(StepEnum.IW11_GetTargetPosition);
if (MoveInfo.MoveParam.InPosType.Equals(1))
......@@ -203,63 +216,14 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(StepEnum.IW10_SaveSize))
{
//GetTargetPTask = null;
WorkLog(" IW10_SaveSize");
MoveInfo.NextMoveStep(StepEnum.IW11_GetTargetPosition);
return;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
if (String.IsNullOrEmpty(MoveInfo.MoveParam.WareCode))
{
MoveInfo.MoveParam.IsNgReel = true;
MoveInfo.MoveParam.NgMsg = "无有效条码";
MoveInfo.MoveParam.TargetPosType = 1;
WorkLog(" 无有效条码,从XRay放到NG箱:" + MoveInfo.MoveParam.ToStr(), 1);
string outF = "无有效条码NG.";
RobotManager.robot.sQLite.Insert(MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PlateW, MoveInfo.MoveParam.PlateH, 0, outF);
}
else if (SServerManager.CanConnect())
{
GetTargetPTask = Task.Factory.StartNew(delegate
{
int needPosition = 0;
string msg = SServerManager.Get_VMICheckRLC(Name, MoveInfo.MoveParam.WareCode, out needPosition);
if (needPosition >= 1 && needPosition <= 3)
{
MoveInfo.MoveParam.TargetPosType = needPosition;
WorkLog(" 【" + MoveInfo.MoveParam.WareCode + "】通过接口获取目标位置:" + needPosition, 1);
//if (needPosition>1)
// RobotManager.robot.sQLite.Insert(MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PlateW, MoveInfo.MoveParam.PlateH, 0, msg);
}
// else if (!msg.Equals("") || needPosition.Equals(0))
else
{
WorkLog(" 【" + MoveInfo.MoveParam.WareCode + "】获取是否测值失败:" + msg, 1);
MoveInfo.MoveParam.TargetPosType = 1;
MoveInfo.MoveParam.IsNgReel = true;
MoveInfo.MoveParam.NgMsg = msg;
RobotManager.robot.sQLite.Insert(MoveInfo.MoveParam.WareCode, MoveInfo.MoveParam.PlateW, MoveInfo.MoveParam.PlateH, 0, msg);
}
});
}
else
{
if (MoveInfo.MoveParam.TargetPosType.Equals(0))
{
if (DefautTargetP > 0)
{
MoveInfo.MoveParam.TargetPosType = DefautTargetP;
}
}
WorkLog(" 根据条码获取目标位置:" + MoveInfo.MoveParam.ToStr(), 1);
}
}
#endregion
else if (MoveInfo.IsStep(StepEnum.IW11_GetTargetPosition))
{
WorkLog(" IW11_GetTargetPosition");
WorkLog(" IW11_GetTargetPosition, TrayCheck_7=" + IOValue(IO_Type.TrayCheck_7));
if (MoveInfo.MoveParam.TargetPosType.Equals(0))
{
WorkLog(" TargetPosType:0");
......@@ -399,9 +363,8 @@ namespace OnlineStore.DeviceLibrary
//可下合并
//MoveInfo.NextMoveStep(StepEnum.IW42_InoutToP1);
MoveInfo.NextMoveStep(StepEnum.IW43_UpdownToP1);
WorkLog("放料完成:进出轴返回P1");
WorkLog("放料完成:进出轴返回P1,升降轴返回P1");
InOutAxis.AbsMove(MoveInfo, Config.InoutAxis_P1, Config.InoutAxis_P1Speed);
WorkLog("放料完成:升降轴返回P1");
UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P1, Config.UpdownAxis_P1Speed);
}
else if (MoveInfo.IsStep(StepEnum.IW42_InoutToP1))
......@@ -425,6 +388,42 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove();
}
else if (MoveInfo.IsStep(StepEnum.IW50_InOutToP2))
{
MoveInfo.NextMoveStep(StepEnum.IW51_Clamping_Relax);
WorkLog("取料: 复位 进出轴上下轴到P2");
InOutAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Inout_P2(Config), Config.InoutAxis_P2Speed);
UpdownAxis.AbsMove(MoveInfo, MoveInfo.MoveParam.Get_Updown_P5(Config), Config.UpdownAxis_P2Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
else if (MoveInfo.IsStep(StepEnum.IW51_Clamping_Relax))
{
MoveInfo.NextMoveStep(StepEnum.IW52_InOutToP1);
WorkLog("取料: 复位 气缸放松,UpdownAxisPos=" + UpdownAxis.GetAclPosition());
CylinderMove(MoveInfo, IO_Type.Clamping_Work, IO_Type.Clamping_Relax);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
else if (MoveInfo.IsStep(StepEnum.IW52_InOutToP1))
{
WorkLog("取料: 复位 升降轴到待机点P1,进出轴返回P1");
MoveInfo.NextMoveStep(StepEnum.IW53_ResetFinish);
UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P1, Config.UpdownAxis_P1Speed);
InOutAxis.AbsMove(MoveInfo, Config.InoutAxis_P1, Config.InoutAxis_P1Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (MoveInfo.MoveParam.InPosType.Equals(1))
{
LeftBatchMove.MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove);
}
else
{
RightBatchMove.MoveInfo.NextMoveStep(StepEnum.IB07_AxisUpMove);
}
}
else if (MoveInfo.IsStep(StepEnum.IW53_ResetFinish))
{
WorkLog("放料复位完成");
MoveInfo.EndMove();
}
}
public int GetWidth()
......
......@@ -152,6 +152,8 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StepEnum.OMR01_MoveZHome);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
WorkLog("取料夹爪气缸释放");
CylinderMove(MoveInfo, IO_Type.TakeT_Clamping_Work, IO_Type.TakeT_Clamping_Relax);
WorkLog("取料Z轴原点返回");
MoveZAxis.HomeMove(MoveInfo);
}
......
......@@ -212,13 +212,19 @@ namespace OnlineStore.DeviceLibrary
{
ShelfMoveInfo.NextMoveStep(StepEnum.OS_19_BatchAxisToP3);
ShelfWorkLog("批量轴匀速到P3点,清空出料信息=0");
BatchAxisToP3(ShelfMoveInfo);
BatchAxisToP3(ShelfMoveInfo,true);
OutReelHeight = 0;
OutReelCount = 0;
}
else if (ShelfMoveInfo.IsStep(StepEnum.OS_19_BatchAxisToP3))
{
ShelfMoveInfo.NextMoveStep(StepEnum.OS_20_ShelfReady);
if (IOValue(IO_Type.O_WLine_TrayCheck_OverHead).Equals(IO_VALUE.HIGH))
{
ShelfWorkLog("批量提升过头重新下降");
BatchAxis.SuddenStop();
BatchAxisToP1(ShelfMoveInfo);
}
ShelfMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
ShelfWorkLog("料串准备完成");
}
......@@ -250,12 +256,36 @@ namespace OnlineStore.DeviceLibrary
}
else if (ShelfMoveInfo.IsStep(StepEnum.OS_23_TrayOK))
{
ShelfMoveInfo.NextMoveStep(StepEnum.OS_24_BatchToP3);
ShelfWorkLog("批量轴匀速到P3或信号亮,O_WLine_TrayCheck=" + IOValue(IO_Type.O_WLine_TrayCheck).ToString()); ;
BatchAxisToP3(ShelfMoveInfo);
if (IOValue(IO_Type.O_WLine_TrayCheck_OverHead).Equals(IO_VALUE.HIGH))
{
ShelfWorkLog("批量提升过头重新下降");
ShelfMoveInfo.NextMoveStep(StepEnum.OS_24_BatchToP3);
BatchAxisToP1(ShelfMoveInfo);
}
else
{
ShelfMoveInfo.NextMoveStep(StepEnum.OS_24_BatchToP3);
ShelfWorkLog("批量轴匀速到P3或信号亮,O_WLine_TrayCheck=" + IOValue(IO_Type.O_WLine_TrayCheck).ToString()); ;
BatchAxisToP3(ShelfMoveInfo);
}
if (!SecMoveInfo.MoveType.Equals(RobotMoveType.None)
&& SecMoveInfo.MoveParam != null
&& MoveInfo.MoveParam != null
&& SecMoveInfo.MoveParam.WareCode != MoveInfo.MoveParam.WareCode)
{
ShelfWorkLog("标签错位,放弃当前标签");
SecMoveInfo.NextMoveStep(StepEnum.OL20_LableCancel);
}
}
else if (ShelfMoveInfo.IsStep(StepEnum.OS_24_BatchToP3))
{
if (IOValue(IO_Type.O_WLine_TrayCheck_OverHead).Equals(IO_VALUE.HIGH))
{
BatchAxis.SuddenStop();
ShelfMoveInfo.NextMoveStep(StepEnum.OS_23_TrayOK);
ShelfWorkLog("批量提升运动过度");
return;
}
if (RobotManager.UseLabel)
{
ShelfMoveInfo.NextMoveStep(StepEnum.OS_25_WaitLabel);
......@@ -395,20 +425,45 @@ namespace OnlineStore.DeviceLibrary
}
private int StartMovePosition = 0;
private void BatchAxisToP3(RobotMoveInfo moveInfo)
private void BatchAxisToP3(RobotMoveInfo moveInfo,bool isFirst=false)
{
int targetP3 = Config.BatchAxisP3;
int targetSpeed = Config.BatchAxis_P3Speed;
moveInfo.TimeOutSeconds = 200;
moveInfo.CanWhileCount = 0;
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
if (!isFirst)
{
targetP3 = StartMovePosition+Config.Height_ChangeValue * 40;
if (targetP3 > Config.BatchAxisP3) {
targetP3 = Config.BatchAxisP3;
}
}
moveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(BatchAxis.Config, targetP3, targetSpeed));
BatchAxis.Config.TargetPosition = targetP3;
BatchAxis.AbsMove(null, targetP3, targetSpeed);
//开始检测信号
BatchAxis.BatchAxisStartCheck(IO_Type.O_WLine_TrayCheck,IO_VALUE.HIGH);
}
private void BatchAxisToP1(RobotMoveInfo moveInfo)
{
int targetP3 = Config.BatchAxisP2;
int targetSpeed = Config.BatchAxis_P2Speed;
moveInfo.TimeOutSeconds = 200;
moveInfo.CanWhileCount = 0;
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
moveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(BatchAxis.Config, targetP3, targetSpeed));
BatchAxis.Config.TargetPosition = targetP3;
BatchAxis.AbsMove(null, targetP3, targetSpeed);
//开始检测信号
BatchAxis.BatchAxisStartCheck(IO_Type.O_WLine_TrayCheck_OverHead, IO_VALUE.LOW);
}
#endregion
#region AGV
......
......@@ -60,7 +60,9 @@ namespace OnlineStore.DeviceLibrary
}
/// <summary>
/// 图像平板报错
/// </summary>
public bool carerayImageError = false;
private void XRayLoad()
{
......@@ -170,6 +172,7 @@ namespace OnlineStore.DeviceLibrary
{
//TimerMaxSeconds = 10;
SetWarnMsg("");
carerayImageError = false;
alarmType = AlarmType.None;
isInSuddenDown = false;
isNoAirCheck = false;
......
......@@ -494,30 +494,38 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
int Get48bImageErrorCount = 0;
public string CapImage()
{
try
{
string lastData = DateTime.Now.ToString("yyyy-MM-dd");
ConfigAppSettings.SaveValue(Setting_Init.XRay_Data, lastData);
if (ConfigAppSettings.GetValue(Setting_Init.XRay_Data)!= lastData)
{
ConfigAppSettings.SaveValue(Setting_Init.XRay_Data, lastData);
}
ClearFilePath();
//取图失败关掉重开。
bool imgResult = carerayImage.GetImage();
bool imgResult = carerayImage.GetImage(5,3000);
if (!imgResult)
{
bool closeR = carerayImage.Close();
if (closeR)
if (!closeR)
LogUtil.error(Name + "carerayImage.GetImage 获取图片失败 = " + imgResult + ", carerayImage.Close 失败");
Thread.Sleep(500);
bool openR = carerayImage.Open();
Thread.Sleep(500);
if (openR)
{
bool openR = carerayImage.Open();
LogUtil.error(Name + "carerayImage.GetImage 获取图片失败 = " + imgResult + ", carerayImage.Close 成功 ,重新打开并获取图片");
imgResult = carerayImage.GetImage();
imgResult = carerayImage.GetImage(5, 3000);
LogUtil.error(Name + "carerayImage.GetImage 第2次获取图片 = " + imgResult + "");
}
else
{
LogUtil.error(Name + "carerayImage.GetImage 获取图片失败 = " + imgResult + ", carerayImage.Close 失败");
else {
LogUtil.error(Name + "carerayImage.Open 第2次open = " + openR + "");
}
}
carerayImageError = !imgResult;
......@@ -528,7 +536,7 @@ namespace OnlineStore.DeviceLibrary
Bitmap bmp = carerayImage.Get48bImage();
if (bmp != null)
{
Get48bImageErrorCount = 0;
lastFileName = Work_ReelInfo.GetImgName();
string fileP = path1_tif + @"\" + lastFileName;
bmp.Save(fileP, System.Drawing.Imaging.ImageFormat.Png);
......@@ -552,6 +560,9 @@ namespace OnlineStore.DeviceLibrary
WorkLog("点料:获取X射线图形,获取图片失败,carerayImage.Get48bImage()=null");
LogUtil.error(Name + " 获取图片失败,carerayImage.Get48bImage()=null");
lastFileName = "";
Get48bImageErrorCount++;
if (Get48bImageErrorCount>3)
carerayImageError = true;
}
}
else
......@@ -570,7 +581,6 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(" xRay.Stop()失败:" + result);
}
}
}
catch (Exception ex)
......@@ -580,7 +590,6 @@ namespace OnlineStore.DeviceLibrary
return lastFileName;
}
private void ClearFilePath()
{
try
......
......@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
if (!findRightCode && !nosave)
if (!findRightCode || !nosave)
{
SaveImageToFile(deviceName, cameraName, ho_Image);
}
......
......@@ -100,7 +100,7 @@ namespace OnlineStore.DeviceLibrary
Config.TargetPosition = 0;
LogUtil.info(AxisName + "speed[" + Config.TargetSpeed + "]开始原点返回");
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(Config, true));
ACServerManager.HomeMove(Config.DeviceName, (short)Config.GetAxisValue(), Config.HomeHighSpeed);
ACServerManager.HomeMove(Config.DeviceName, Config.GetAxisValue(), Config.HomeHighSpeed);
}
public void AbsMove(RobotMoveInfo MoveInfo, int targetPosition, int targetSpeed)
......@@ -141,6 +141,12 @@ namespace OnlineStore.DeviceLibrary
ACServerManager.AbsMove(axis.DeviceName, axis.GetAxisValue(), targetPosition, targetSpeed);
MoveInfo.CanWhileCount--;
}
else if (MoveInfo.CanWhileCount == -1) {
msg = " " + MoveInfo.MoveStep + MoveInfo.Name + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount
+ "],误差过大,配置为忽略";
LogUtil.error(msg, MoveInfo.ErrorLogType);
return true;
}
else
{
msg = " " + MoveInfo.MoveStep + MoveInfo.Name + axis.DisplayStr + ",目标位置[" + targetPosition + "]当前位置[" + outCount
......@@ -214,16 +220,20 @@ namespace OnlineStore.DeviceLibrary
ACServerManager.AbsMove(Config.DeviceName, Config.GetAxisValue(), targetPos, (int)targetSpeed);
}
public void SuddenStop(bool needCheck = false )
public void SuddenStop(bool needCheck = false)
{
if (needCheck)
{
if(ACServerManager.GetBusyStatus(Config.DeviceName, Config.GetAxisValue()).Equals(0))
if (ACServerManager.GetBusyStatus(Config.DeviceName, Config.GetAxisValue()).Equals(0))
{
return;
}
}
ACServerManager.SuddenStop(Config.DeviceName, Config.GetAxisValue());
if (ACServerManager.GetBusyStatus(Config.DeviceName, Config.GetAxisValue()).Equals(1))
{
LogUtil.info(Config.DisplayStr + " 停止失败");
}
}
......
......@@ -109,9 +109,9 @@ namespace OnlineStore.DeviceLibrary
IW03_MiddleToP2,
/// <summary>
/// 入料模块取放料:进出轴前进到P2
/// 入料模块取放料:重试
/// </summary>
IW04_InoutToP2,
IW04_ReTry,
/// <summary>
/// 入料模块取放料:升降轴下降到P2
/// </summary>
......@@ -195,6 +195,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
IW44_MiddleToP2,
/// <summary>
/// 放料完成:旋转轴直接返回P2
/// </summary>
IW50_InOutToP2,
IW51_Clamping_Relax,
IW52_InOutToP1,
IW53_ResetFinish,
#endregion
#region 入料模块批量轴开始复位 1500 开始
......@@ -576,6 +583,7 @@ namespace OnlineStore.DeviceLibrary
/// 取料: 取料气缸夹紧
/// </summary>
OT08_Clamping_Work,
OT08_2_Wait_Out_TrayCheck,
/// <summary>
/// 取料: 取料Z轴返回P1
/// </summary>
......@@ -745,6 +753,8 @@ namespace OnlineStore.DeviceLibrary
/// 贴标: XYR返回待机点P1
/// </summary>
OL19_XYRBackToP2,
OL20_LableCancel,
OL21_LableCancel2,
#endregion
#region 出料模块料串处理 3701 开始
......
......@@ -62,6 +62,8 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 可以循环运动的次数(轴卡运动才需要)
/// 0 = 不循环
/// -1 = 不检查运动是否到位
/// </summary>
internal int CanWhileCount = 0;
......
......@@ -116,6 +116,17 @@ namespace OnlineStore.DeviceLibrary
return config.UpdownAxis_P2_R;
}
}
public int Get_Updown_P5(InputEquip_Config config)
{
if (InPosType.Equals(1))
{
return config.UpdownAxis_P5_L;
}
else
{
return config.UpdownAxis_P5_R;
}
}
public int Get_Updown_PutP(InputEquip_Config config)
{
if (TargetPosType.Equals(1))
......
......@@ -269,9 +269,9 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string NGCylinder_Back = "NGCylinder_Back";
/// <summary>
/// DI,3,NG料料盘检测,NG_TrayCheck,9,PRO_AOI_IP_4,X60,,,,,,,,,,
/// DI,3,提升机构高度过头,NG_TrayCheck,9,PRO_AOI_IP_4,X60,,,,,,,,,,
/// </summary>
public static string NG_TrayCheck = "NG_TrayCheck";
public static string O_WLine_TrayCheck_OverHead = "O_WLine_TrayCheck_OverHead";
/// <summary>
/// DI,3,贴标气缸前进端,PasteCode_Forward,10,PRO_AOI_IP_4,X61,,,,,,,,,,
/// </summary>
......
......@@ -132,6 +132,16 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("UpdownAxis_P2_R")]
public int UpdownAxis_P2_R { get; set; }
/// <summary>
/// PRO,0,取料升降轴取料点P2_左侧,UpdownAxis_P2_L,281000,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P5_L")]
public int UpdownAxis_P5_L { get; set; }
/// <summary>
/// PRO,0,取料升降轴取料点P2_右侧,UpdownAxis_P2_R,281000,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P5_R")]
public int UpdownAxis_P5_R { get; set; }
/// <summary>
/// PRO,0,取料升降轴料串上方P3取料/放料位置,UpdownAxis_P3,20000,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P3", true)]
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!