Commit 80340cc5 刘韬

1

1 个父辈 0f64825a
此文件类型无法预览
......@@ -151,6 +151,7 @@ namespace OnlineStore.ACSingleStore
this.开启DEBUGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label_currentinfo = new System.Windows.Forms.Label();
this.contextMenuStrip1.SuspendLayout();
this.tabControl2.SuspendLayout();
this.tabPage4.SuspendLayout();
......@@ -562,6 +563,7 @@ namespace OnlineStore.ACSingleStore
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.label_currentinfo);
this.groupBox3.Controls.Add(this.flowLayoutPanel1);
this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Controls.Add(this.lblThisSta);
......@@ -1610,6 +1612,15 @@ namespace OnlineStore.ACSingleStore
this.清理日志ToolStripMenuItem.Text = "清理日志";
this.清理日志ToolStripMenuItem.Click += new System.EventHandler(this.清理日志ToolStripMenuItem_Click);
//
// label_currentinfo
//
this.label_currentinfo.AutoSize = true;
this.label_currentinfo.Location = new System.Drawing.Point(411, 35);
this.label_currentinfo.Name = "label_currentinfo";
this.label_currentinfo.Size = new System.Drawing.Size(36, 20);
this.label_currentinfo.TabIndex = 274;
this.label_currentinfo.Text = "info";
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -1788,6 +1799,7 @@ namespace OnlineStore.ACSingleStore
private System.Windows.Forms.TabPage tabPage9;
private System.Windows.Forms.CheckBox chbTH;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label_currentinfo;
}
}
......@@ -228,6 +228,12 @@ namespace OnlineStore.ACSingleStore
richTextBox1.Visible = false ;
tabControl1.TabPages.Remove(tabPage3);
}
label_currentinfo.Visible = false;
if (CodeManager.IsServerAccess())
{
label_currentinfo.Visible = true;
StoreManager.Store.plateinfochange += Store_plateinfochange;
}
// this.tabControl1.TabPages.Remove(tabPage3);
// groupCode.Visible = false;
......@@ -236,6 +242,13 @@ namespace OnlineStore.ACSingleStore
}
private void Store_plateinfochange(object sender, string e)
{
this.Invoke((EventHandler<string>)delegate(object o,string ee) {
label_currentinfo.Text = ee;
},null,e);
}
private void ResourceCulture_LanguageReload(object sender, EventArgs e)
{
this.Invoke((EventHandler)delegate{
......
......@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 20634728ddb0fddadec7768fc343bd50fb8385d8")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 0f64825aab27a7a50fb6d1a79d844b0f7b265c80")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -51,6 +51,9 @@ namespace OnlineStore.DeviceLibrary
private System.Timers.Timer serverConnectTimer = new System.Timers.Timer();
private System.Timers.Timer IoCheckTimer = new System.Timers.Timer();
private int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
public AC_SA_BoxBean(AC_SA_Config config)
{
string msg = "{\"cid\":\"Tower-5\",\"seq\":879,\"op\":1,\"data\":{\"code\":\"=7x8=78.22610.5BLDL-017425|WG1121C4M-2105|4000|M780174250521XG83|MURATA##\",\"boxId\":\"1\",\"doorReelSignal\":\"1\"},\"status\":1,\"msg\":null,\"msgEn\":\"\",\"msgCode\":\"\",\"msgParam\":null,\"boxStatus\":{\"1\":{\"boxId\":1,\"status\":1,\"data\":{},\"msg\":\"\",\"temperature\":\"22.6\",\"humidity\":\"56.1\",\"posId\":null}},\"alarmList\":[],\"time\":1619505231653,\"lastSaveTime\":1619505231653,\"code\":\"=7x8=78.22610.5BLDL-017425|WG1121C4M-2105|4000|M780174250521XG83|MURATA##\",\"doorReelSingnal\":\"1\",\"online\":true,\"codeBoxId\":\"1\",\"posId\":null}"; Operation op = JsonHelper.DeserializeJsonToObject<Operation>(msg);
......@@ -1169,10 +1172,15 @@ namespace OnlineStore.DeviceLibrary
if (StoreMove.MoveType.Equals(StoreMoveType.None) && alarmType.Equals(StoreAlarmType.None))
{
IO_VALUE checkIO = IOManager.IOValue(IO_Type.TrayCheck_Door);
int height = GetHeight();
var IsServerAccess = CodeManager.IsServerAccess();
int height = 0;
if (!IsServerAccess)
height=GetHeight();
//判断料门口是否有料
//光栅不遮挡时才扫码
if ((checkIO.Equals(IO_VALUE.HIGH)) &&IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)&& height > 0 )
if ((checkIO.Equals(IO_VALUE.HIGH)) &&IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)&& (height > 0 || IsServerAccess) )
{
if (!CanStartCode() || IsDebug || InStoreFail)// || IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
......@@ -1200,7 +1208,7 @@ namespace OnlineStore.DeviceLibrary
Task.Run(() =>
{
List<string> codelist;
var IsServerAccess = CodeManager.IsServerAccess();
LogUtil.info(StoreName + "IsServerAccess=" + IsServerAccess);
if (IsServerAccess)
{
......@@ -1563,6 +1571,7 @@ namespace OnlineStore.DeviceLibrary
LOGGER.Error(StoreName + ex.ToString());
}
}
public event EventHandler<string> plateinfochange;
private void ReviceInStoreProcess(string message, Operation resultOperation)
{
Dictionary<string, string> data = resultOperation.data;
......@@ -1602,7 +1611,7 @@ namespace OnlineStore.DeviceLibrary
{
ClearInoutFail();
InOutStoreParam param = new InOutStoreParam(message, posId, plateH, plateW, 0);
plateinfochange?.Invoke(null,$"[{plateW}x{plateH}-{posId}]");
StartInStoreMove(param);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(LOGGER, StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
......@@ -1728,6 +1737,8 @@ namespace OnlineStore.DeviceLibrary
}
public int GetHeight()
{
if (!CodeManager.IsServerAccess())
return 0;
if (Config.Default_TrayWidth.Equals(Width_7))
{
return GetSmallHeight();
......
......@@ -665,11 +665,20 @@ namespace OnlineStore.DeviceLibrary
HIKCamera.Current.CameraGrabOne(HIKCamera.Current.GetFixtureStateFilename(StoreMove.MoveParam, StoreMove.MoveType, FixtureState.Out));
fixturestates = IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH);
var fixposid = $"fix#{StoreMove.MoveParam.PlagtW}";
var fixposition = CSVPositionReader<ACStorePosition>.GetPositon(fixposid);
OutStoreLog($"出库 获取修正库位置{fixposid}={fixposition}");
if (fixposition != null)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckFix);
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点), ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckFix)
{
......@@ -779,7 +788,6 @@ namespace OnlineStore.DeviceLibrary
else if (StoreMove.MoveStep == StoreMoveStep.SO_09_LocationCylinder_Down)
{
SO_091_WaitNoTray();
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_091_WaitNoTray)
{
......@@ -796,6 +804,7 @@ namespace OnlineStore.DeviceLibrary
{
HIKCamera.Current.CameraGrabOne(HIKCamera.Current.GetFixtureStateFilename(StoreMove.MoveParam, StoreMove.MoveType, FixtureState.DoorIn));
OutStoreLog($"出库:SO_11 放下物品,升降轴至P8(进料口出料缓冲点){moveP.UpDown_P8},压紧轴到P1{moveP.ComPress_P1} ");
SetWarnMsg("");
StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
......@@ -911,12 +920,28 @@ namespace OnlineStore.DeviceLibrary
}
private void SO_091_WaitNoTray()
{
if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor();
}
else if (StoreMove.TimeOutSeconds > 30) {
if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH))
{
SetWarnMsg(ResourceControl.MoveTimeOut, StoreMove.MoveStep + "", IO_Type.TrayCheck_Door.ToString() + "=LOW", StoreMove.TimeOutSeconds.ToString()); //1085
LogUtil.error(LOGGER, WarnObj.WarnMsg, 100);
}
else if(IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW))
{
SetWarnMsg(ResourceControl.MoveTimeOut, StoreMove.MoveStep + "", IO_Type.SafetyLightCurtains.ToString()+"=HIGH", StoreMove.TimeOutSeconds.ToString()); //1085
LogUtil.error(LOGGER, WarnObj.WarnMsg, 100);
}
}
}
private void OutStoreEnd()
{
TimeSpan span = DateTime.Now - startOutStoreTime;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!