Commit c0f53016 LN

1

1 个父辈 d8c07ab2
......@@ -64,17 +64,17 @@ namespace OnlineStore.Common
public static MyConfig<int> CameraScan_QRCodeCount = 3;
[MyConfigComment("二维码扫码超时毫秒")]
public static MyConfig<int> CameraScan_CodeTimeOut = 3000;
public static MyConfig<bool> Runtime_IsPutReel;
public static MyConfig<string> Runtime_StartPosID;
public static MyConfig<string> Runtime_TargetPosID;
public static MyConfig<string> Runtime_WareCode;
public static MyConfig<int> Runtime_PlateW;
public static MyConfig<int> Runtime_PlateH;
public static MyConfig<string> Runtime_PlateInFix;
public static MyConfig<bool> Runtime_IsNg;
public static MyConfig<string> Runtime_NgMsg;
public static MyConfig<bool> R_IsPutReel;
public static MyConfig<string> R_WareCode;
public static MyConfig<string> R_StartPosID;
public static MyConfig<string> R_TargetPosID;
public static MyConfig<string> R_TargetOutShelf;
public static MyConfig<string> R_TargetLoc;
public static MyConfig<int> R_PlateW;
public static MyConfig<int> R_PlateH;
public static MyConfig<bool> R_IsNg;
public static MyConfig<string> R_NgMsg;
}
}
......@@ -37,7 +37,7 @@ namespace OnlineStore.DeviceLibrary.IO
return HCBoardManager.OpenCard();
}
}
return true;
return false;
}
public IO_VALUE GetDIValue(string deviceName, byte slaveID, ushort index)
......
......@@ -367,43 +367,27 @@ namespace DeviceLibrary
var TrayCheck_Fixture = IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH);
if (TrayCheck_Fixture)
{
//ResetMoveInfo.log($"回原时检测到又滞留物料:TrayCheck_Fixture={TrayCheck_Fixture}");
//StoreMoveInfo.MoveParam.TargetPos = Setting_Init.Runtime_PosID;
//StoreMoveInfo.MoveParam.PlateH = Setting_Init.Runtime_PlateH;
//StoreMoveInfo.MoveParam.PlateW = Setting_Init.Runtime_PlateW;
//StoreMoveInfo.MoveParam.WareCode = Setting_Init.Runtime_WareCode;
//StoreMoveInfo.MoveParam.IsNg = Setting_Init.Runtime_IsNg;
//StoreMoveInfo.MoveParam.NgMsg = Setting_Init.Runtime_NgMsg;
//if (Setting_Init.Runtime_IsInStore)
//{
// ResetMoveInfo.log("入库物料:" + StoreMoveInfo.MoveParam.ToStr());
// if (TrayCheck_Fixture)
// StoreMoveInfo.MoveParam.ReelOnFixture = true;
// StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02);
//}
//else if (TrayCheck_Fixture)
//{
// ResetMoveInfo.log("出库物料在料叉上:" + StoreMoveInfo.MoveParam.ToStr());
// StoreMoveInfo.MoveParam.ReelOnFixture = true;
// StoreMoveInfo.NextMoveStep(MoveStep.StoreOut10);
//}
//else
//{
// ResetMoveInfo.log("出库物料在门口:" + StoreMoveInfo.MoveParam.ToStr());
// StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT);
//}
}
//else if (!string.IsNullOrEmpty(Setting_Init.Runtime_PlateInFix.Val)) {
// var ac = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.TargetPos);
// var dc = CSVPositionReader<ACStorePosition>.GetPositon(Setting_Init.Runtime_PlateInFix);
// boxTransport.Start(new BoxStorePosition(Config, dc, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, ac, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
// ResetMoveInfo.log($"开始转运料盘:{Setting_Init.Runtime_PlateInFix}=>{StoreMoveInfo.MoveParam.TargetPos}");
// StoreMoveInfo.NextMoveStep(MoveStep.StoreOut11);
//}
//else
ResetMoveInfo.log($"回原时检测到又滞留物料:TrayCheck_Fixture={TrayCheck_Fixture}");
if (Setting_Init.R_IsPutReel)
{
StoreMoveInfo.MoveParam = new ReelParam(Setting_Init.R_WareCode, Setting_Init.R_PlateW, Setting_Init.R_PlateH, Setting_Init.R_StartPosID, Setting_Init.R_TargetPosID,
Setting_Init.R_IsNg, Setting_Init.R_NgMsg);
StoreMoveInfo.MoveParam.TargetLoc = Setting_Init.R_TargetLoc;
StoreMoveInfo.MoveParam.TargetOutShelf = Setting_Init.R_TargetOutShelf;
StoreMoveInfo.MoveParam.ReelOnFixture = true;
StoreMoveInfo.NewMove(MoveStep.PutReel01_Ready);
StoreMoveInfo.log("回原时检测到又滞留物料,设置料已在料叉,重新放料:" + StoreMoveInfo.MoveParam.ToStr()+",重新开始放料");
}
else
{
ResetMoveInfo.log("出库物料在料叉上:" + StoreMoveInfo.MoveParam.ToStr()+",未找到料盘信息,请手动处理料盘");
//StoreMoveInfo.MoveParam.ReelOnFixture = true;
//StoreMoveInfo.NextMoveStep(MoveStep.StoreOut10);
}
}
else
{
StoreMoveInfo.NewMove(MoveStep.Wait);
}
......
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
namespace DeviceLibrary
......@@ -104,13 +105,28 @@ namespace DeviceLibrary
////放料:放料全部结束
//PutReel05_End,
case MoveStep.PutReel01_Ready:
ACStorePosition startP = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.StartPos);
ACStorePosition targetP = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.TargetPos);
bool result = boxTransport.Start(new BoxStorePosition(Config, startP, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, targetP, StoreMoveInfo.MoveParam), StoreMoveType.PutReel, true);
if (result)
if (StoreMoveInfo.MoveParam.ReelOnFixture)
{
ACStorePosition targetP = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.TargetPos);
bool result = boxTransport.Start(null, new BoxStorePosition(Config, targetP, StoreMoveInfo.MoveParam), StoreMoveType.PutReel, true);
if (result)
{
StoreMoveInfo.NewMove(MoveStep.PutReel02_StartM);
StoreMoveInfo.log("开始放料(料已在叉子上),保存运行信息:" + StoreMoveInfo.MoveParam.ToStr());
SaveRMoveInfo(StoreMoveInfo.MoveParam);
}
}
else
{
StoreMoveInfo.NewMove(MoveStep.PutReel02_StartM);
StoreMoveInfo.log("开始放料:" + StoreMoveInfo.MoveParam.ToStr());
ACStorePosition startP = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.StartPos);
ACStorePosition targetP = CSVPositionReader<ACStorePosition>.GetPositon(StoreMoveInfo.MoveParam.TargetPos);
bool result = boxTransport.Start(new BoxStorePosition(Config, startP, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, targetP, StoreMoveInfo.MoveParam), StoreMoveType.PutReel, true);
if (result)
{
StoreMoveInfo.NewMove(MoveStep.PutReel02_StartM);
StoreMoveInfo.log("开始放料,保存运行信息:" + StoreMoveInfo.MoveParam.ToStr());
SaveRMoveInfo(StoreMoveInfo.MoveParam);
}
}
break;
case MoveStep.PutReel02_StartM:
......@@ -132,7 +148,7 @@ namespace DeviceLibrary
if (boxTransport.IsPutOnOut || boxTransport.IsComplateOrFree)
{
StoreMoveInfo.NewMove(MoveStep.PutReel04_PutReelEnd);
StoreMoveInfo.log("放料完成:" + StoreMoveInfo.MoveParam.ToStr());
StoreMoveInfo.log("放料完成,清空运行信息:" + StoreMoveInfo.MoveParam.ToStr());
//TODO 通知服务器
if (StoreMoveInfo.MoveParam.IsNg)
......@@ -148,6 +164,7 @@ namespace DeviceLibrary
ShelfTaskInfo taskInfo = HttpServer.ShelfFinish(bean.CurrShelf.realRFID, StoreMoveInfo.MoveParam.WareCode, StoreMoveInfo.MoveParam.TargetLoc);
bean.PutReelOk(taskInfo);
}
ClearRMoveInfo();
}
break;
case MoveStep.PutReel04_PutReelEnd:
......@@ -184,5 +201,23 @@ namespace DeviceLibrary
return state;
}
private void SaveRMoveInfo(ReelParam param)
{
Setting_Init.R_IsPutReel = true;
Setting_Init.R_IsNg = param.IsNg;
Setting_Init.R_WareCode = param.WareCode;
Setting_Init.R_PlateH = param.PlateH;
Setting_Init.R_PlateW = param.PlateW;
Setting_Init.R_StartPosID = param.StartPos;
Setting_Init.R_TargetLoc = param.TargetLoc;
Setting_Init.R_TargetOutShelf = param.TargetOutShelf;
Setting_Init.R_TargetPosID = param.TargetPos;
LogUtil.info("SaveRMoveInfo : " + param.ToStr());
}
private void ClearRMoveInfo()
{
Setting_Init.R_IsPutReel = false;
LogUtil.info("ClearRMoveInfo :Setting_Init.R_IsPutReel = false");
}
}
}
\ No newline at end of file
......@@ -31,87 +31,7 @@ namespace DeviceLibrary
H16_HomeReset,
HEND_HomeReset,
//StringLoad_01,
//StringLoad_01a,
//StringLoad_02,
//StringLoad_02a,
//StringLoad_02b,
//StringLoad_03,
//StringLoad_04,
//StringLoad_05,
//StringLoad_06,
//StringLoad_07,
//StringReadyGet,
//StringReelGet,
//StringReelGetFail,
//StringReelGetFail_02,
//StringReadyPut,
//StringReelPut,
//StringReelPut_01,
//StringReelPut_02,
//StringReelPut_03,
//StringReelPut_04,
//StringOut_01,
//StringOut_02,
//StringOut_03,
//StringOut_Released,
//StringOut_05,
//StringOut_06,
//StringOut_07,
//ReelClamp_01,
//ReelClamp_02,
//ReelClamp_03,
//ReelClamp_04,
//ReelClamp_05,
//ReelClamp_WaitGaugeHeight,
//ReelClamp_GetHeight,
//ReelClamp_06,
//ReelClamp_07,
//ReelClamp_08,
//ReelClamp_09,
//ReelClamp_10,
//ReelClamp_11,
//InWaitServerCallback,
//WaitInStore,
//ReelTaked,
//NGOUT_00,
//NGOUT_01,
//NGOUT_02,
//NGOUT_03,
//NGOUT_04,
//NGOUT_05,
//NGOUT_06,
//NGOUT_07,
//NGOUT_08,
//NGOUT_09,
//NGOUT_10,
//NGOUT_11,
//SingleIn,
//SingleIn_01,
//SingleIn_02,
//SingleInReady,
//SingleInRun,
//SingleInRun_01,
//SingleInRun_02,
//SingleInRun_03,
//SingleInRun_04,
//SingleInRun_05,
//OutBoxPutOn,
//Out01,
//Out02,
//Out03,
//Out04,
//Out05,
//Out06,
//Out07,
//Out08,
//Out09,
//Out10,
//Out11,
//OutReset,
//放料,准备放料
PutReel01_Ready,
......
......@@ -361,10 +361,10 @@ namespace TheMachine
}
SetMsg(lm);
if (!RobotManage.isRunning)
{
this.BeginInvoke((EventHandler)delegate { btn_run_Click(this, EventArgs.Empty); });
}
//if (!RobotManage.isRunning)
//{
// this.BeginInvoke((EventHandler)delegate { btn_run_Click(this, EventArgs.Empty); });
//}
}
private void MainMachine_ButtenEvent(object sender, ErrInfo e)
......
......@@ -97,11 +97,12 @@ namespace TheMachine
this.cylinderButton7.IO_LOW = "";
this.cylinderButton7.Location = new System.Drawing.Point(566, 155);
this.cylinderButton7.Name = "cylinderButton7";
this.cylinderButton7.Size = new System.Drawing.Size(224, 45);
this.cylinderButton7.Size = new System.Drawing.Size(126, 35);
this.cylinderButton7.TabIndex = 1;
this.cylinderButton7.Tag = "not";
this.cylinderButton7.Text = "Camera_Led";
this.cylinderButton7.UseVisualStyleBackColor = false;
this.cylinderButton7.Click += new System.EventHandler(this.cylinderButton7_Click);
//
// ioControl1
//
......
......@@ -94,5 +94,10 @@ namespace TheMachine
IOManager.IOMove($"U{u.Value}_Location_Down", IO_VALUE.LOW);
LogUtil.info($"手动点击 U{u.Value} 定位停止");
}
private void cylinderButton7_Click(object sender, EventArgs e)
{
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!