Commit f0258eab LN

光栅功能

1 个父辈 15bb28c2
......@@ -85,6 +85,8 @@
this.启用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lblXrayWork = new System.Windows.Forms.Label();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.启用光栅信号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panWork.SuspendLayout();
......@@ -491,7 +493,9 @@
this.toolStripSeparator15,
this.aGVCancelStateToolStripMenuItem,
this.toolStripSeparator13,
this.启用蜂鸣器ToolStripMenuItem});
this.启用蜂鸣器ToolStripMenuItem,
this.toolStripSeparator12,
this.启用光栅信号ToolStripMenuItem});
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(86, 25);
this.toolStripMenuItem4.Text = "运行参数";
......@@ -552,6 +556,18 @@
this.lblXrayWork.Text = "警告:点料过程中,请勿开门";
this.lblXrayWork.Visible = false;
//
// 启用光栅信号ToolStripMenuItem
//
this.启用光栅信号ToolStripMenuItem.Name = "启用光栅信号ToolStripMenuItem";
this.启用光栅信号ToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
this.启用光栅信号ToolStripMenuItem.Text = "启用光栅信号";
this.启用光栅信号ToolStripMenuItem.Click += new System.EventHandler(this.启用光栅信号ToolStripMenuItem_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(210, 6);
//
// FrmRobotMain
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -643,6 +659,8 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator17;
private System.Windows.Forms.ToolStripMenuItem 元器件库ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
private System.Windows.Forms.ToolStripMenuItem 启用光栅信号ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
}
}
......@@ -112,7 +112,22 @@ namespace OnlineStore.AutoCountClient
{
开机自动启动ToolStripMenuItem.Text = "开机自动启动";
}
if (RobotManager.UseBuzzer)
{
启用蜂鸣器ToolStripMenuItem.Text = gouStr + " 启用蜂鸣器";
}
else
{
启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
}
if (RobotManager.GratingSignal)
{
启用光栅信号ToolStripMenuItem.Text = gouStr + "启用光栅信号";
}
else
{
启用光栅信号ToolStripMenuItem.Text = "启用光栅信号";
}
CSVBomManager.LoadAllCom();
LoadStoreData();
......@@ -902,12 +917,37 @@ namespace OnlineStore.AutoCountClient
FrmLearning frm = new FrmLearning();
frm.ImagePath = folder;
frm.ShowDialog();
}
}
}
private void 元器件库ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmComponentList frm = new FrmComponentList();
frm.ShowDialog();
}
private void 启用光栅信号ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
bool result = !启用光栅信号ToolStripMenuItem.Text.Contains(gouStr);
if (result.Equals(RobotManager.GratingSignal))
{
return;
}
RobotManager.GratingSignal = result;
ConfigAppSettings.SaveValue(Setting_Init.GratingSignal, (RobotManager.GratingSignal ? 1 : 0));
if (result)
{
启用光栅信号ToolStripMenuItem.Text = gouStr + " 启用光栅信号";
}
else
{
启用光栅信号ToolStripMenuItem.Text = "启用光栅信号";
}
LogUtil.info(Name + " 点击:" + 启用光栅信号ToolStripMenuItem.Text);
}
}
}
......@@ -101,4 +101,10 @@ IO_Type.TakeCode_Back, IO_Type.TakeCode_Forward
20200817
增加学习界面。
吸盘放标签时等待3秒再离开。
未找到配置暂时不NG.
\ No newline at end of file
未找到配置暂时不NG.
20200911
增加光栅功能,料串进出时屏蔽光栅功能。
光栅功能打开时,收到光栅信号急停。
增加光栅功能开关。
\ No newline at end of file
......@@ -452,8 +452,8 @@ namespace OnlineStore.DeviceLibrary
#region AGV 处理
private bool ProcessShelfOut = false;
private bool ProcessShelfEnter = false;
internal bool ProcessShelfOut = false;
internal bool ProcessShelfEnter = false;
internal void AgvReady(string nodeId, string rfid)
{
if (string.IsNullOrEmpty(rfid))
......
......@@ -272,6 +272,7 @@ namespace OnlineStore.DeviceLibrary
{
CheckAxisAlarm();
}
GratingSignalProcess();
}
......
......@@ -390,5 +390,32 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 光栅处理
private void GratingSignalProcess()
{
if (runStatus <= RobotRunStatus.Wait)
{
return;
}
if (!RobotManager.GratingSignal)
{
return;
}
if (LeftBatchMove.ProcessShelfOut || LeftBatchMove.ProcessShelfEnter || RightBatchMove.ProcessShelfOut || RightBatchMove.ProcessShelfEnter)
{
return;
}
if (IOValue(IO_Type.LineIn_GratingSignal).Equals(IO_VALUE.LOW))
{
LogUtil.error(Name+ "未检测到上料线体光栅信号,报警急停");
SetWarnMsg("未检测到上料线体光栅信号,报警急停");
Alarm(AlarmType.SuddenStop);
}
}
#endregion
}
}
......@@ -482,6 +482,7 @@ namespace OnlineStore.DeviceLibrary
{
CheckAxisAlarm();
}
GratingSignalProcess();
}
internal override void StopMove()
......
......@@ -438,7 +438,7 @@ namespace OnlineStore.DeviceLibrary
if (!result)
{
WarnMsg = logName + "等待O_ELine_InCheck检测到料架 超时";
WarnMsg = logName + "等待 O_ELine_InCheck检测到料架 超时";
LogUtil.error(WarnMsg);
LogUtil.error (logName + " 等待 O_ELine_InCheck=High 超时, 等待 5000 后停止 O_ELine_Run");
}
......@@ -543,5 +543,41 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
#region 光栅处理
private void GratingSignalProcess()
{
if (runStatus <= RobotRunStatus.Wait)
{
return;
}
if (!RobotManager.GratingSignal)
{
return;
}
if (ProcessShelfEnter)
{
}
else if (IOValue(IO_Type.O_ELine_GratingSignal).Equals(IO_VALUE.LOW))
{
LogUtil.error (Name + "未检测到入空料串线体光栅信号,报警急停");
SetWarnMsg("未检测到入空料串线体光栅信号,报警急停");
Alarm(AlarmType.SuddenStop);
}
if (ProcessShelfOut)
{
}
else if (IOValue(IO_Type.O_OLine_GratingSignal).Equals(IO_VALUE.LOW))
{
LogUtil.error(Name + "未检测到出料串线体光栅信号,报警急停");
SetWarnMsg("未检测到出料串线体光栅信号,报警急停");
Alarm(AlarmType.SuddenStop);
}
}
#endregion
}
}
......@@ -316,9 +316,16 @@ namespace OnlineStore.DeviceLibrary
{
if ((!MoveInfo.MoveType.Equals(RobotMoveType.Reset)) && (!MoveInfo.MoveType.Equals(RobotMoveType.RHome)))
{
if (LockOnCanMove() && (!isInSuddenDown) && (!isNoAirCheck))
if (MoveInfo.MoveType.Equals(RobotMoveType.Working) && MoveInfo.MoveStep >= StepEnum.XW16_EndCount)
{
IOMove(IO_Type.X_Lock_On, IO_VALUE.HIGH);
}
else
{
if (LockOnCanMove() && (!isInSuddenDown) && (!isNoAirCheck))
{
IOMove(IO_Type.X_Lock_On, IO_VALUE.HIGH);
}
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!