Commit 594bfa0e LN

颜色调整。轴调试界面调整。

1 个父辈 1538b02e
......@@ -175,6 +175,8 @@ namespace OnlineStore.Common
public static MyConfig<bool> Enable_HideSingleReelIn = false;
[MyConfigComment("启用隐藏旋转轴测试按钮,=true隐藏")]
public static MyConfig<bool> Enable_HideAxisTestBtn = true;
[MyConfigComment("启用隐藏颜色测试按钮,=true隐藏")]
public static MyConfig<bool> Enable_HideColorTestBtn = true;
[MyConfigComment("启用上传监控图像给SMF")]
public static MyConfig<bool> Enable_UploadVideo = false;
......@@ -248,6 +250,8 @@ namespace OnlineStore.Common
public static MyConfig<int> Device_WeightSensor_MaxValue =10000;
}
public enum InOut_Roller_Mode
{
......
......@@ -49,7 +49,7 @@ namespace DeviceLibrary
LogUtil.error("LED灯初始化成功");
rgbLedInitOk = true;
ledRgbTimer = new System.Threading.Timer(new TimerCallback(RgbLedProcess), null, 0, 1000);
GC.KeepAlive(ledtimer);
GC.KeepAlive(ledRgbTimer);
msg = "";
return true;
}
......@@ -65,24 +65,44 @@ namespace DeviceLibrary
lastColor = "";
lastS = "";
}
public void ShowColor(Color color)
public void ShowColor(Color color, string lastState)
{
try
{
if (rGB_Controller == null || (!rgbLedInitOk))
{
return;
}
if (lastColor != "" && lastColor.Equals(color.Name.ToString()))
{
return;
}
lastS = lastState;
//rGB_Controller.CloseLed();
rGB_Controller.ShowColor(color);
lastColor = color.Name.ToString();
LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
}
catch (Exception ex) { LogUtil.error("ShowColror " + color + ", " + lastState + "出错:" + ex.ToString()); }
}
public void ShowYellowLight()
{
if (lastColor.Equals("yellowL"))
{
return;
}
lastColor = "yellowL";
//rGB_Controller.CloseLed();
rGB_Controller.ShowYellowLight();
}
public void ShowGreenLight()
{
if (lastColor.Equals("greenL"))
{
return;
}
lastColor = "greenL";
//rGB_Controller.CloseLed();
rGB_Controller.ShowGreenLight();
......@@ -134,7 +154,7 @@ namespace DeviceLibrary
{
scanCode = true;
}
if (h != null && h.Value && UserPause)
if (h != null && h.Value )
{
waitTake = true;
}
......@@ -143,21 +163,25 @@ namespace DeviceLibrary
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW) || isInSuddenDown)
{
//红色: 急停,
ShowColor(Color.Red);
lastS = "suddenStop";
ShowColor(Color.Red, "suddenStop");
}
else if (runStatus == RunStatus.Stop)
{
if (Setting_Init.Enable_HideColorTestBtn)
{
//未启动 黑色
ShowColor(Color.Black);
lastS = "stop";
ShowColor(Color.Black, "stop");
}
else
{
}
}
else if (scanCode)
{
//蓝色: 扫码检测
ShowColor(Color.Blue);
lastS = "scanCode";
ShowColor(Color.Blue, "scanCode");
}
//出入库 绿闪 黄闪
else if (inOut)
......@@ -177,34 +201,31 @@ namespace DeviceLibrary
//暂停等待料盘拿走
//白色: 等待用户响应(等待取走盘等),
//蓝色: 扫码检测
ShowColor(Color.White);
lastS = "waitTask";
ShowColor(Color.White, "waitTask");
}
else if (hasAlarm)
{
//紫色: 异常,
ShowColor(Color.Purple);
lastS = "hasAlarm";
ShowColor(Color.Purple, "hasAlarm");
} //温度超限
else if (IsTHoutRange())
{
//紫色: 异常,
ShowColor(Color.Purple);
lastS = "IsTHoutRange";
}
//温度超限30分钟
else if (IsTHoutRangeOver30m())
{
//紫色: 异常,
ShowColor(Color.Purple);
lastS = "IsTHoutRangeOver30m";
}
//else if (IsTHoutRange())
//{
// //紫色: 异常,
// ShowColor(Color.Purple);
// lastS = "IsTHoutRange";
//}
////温度超限30分钟
//else if (IsTHoutRangeOver30m())
//{
// //紫色: 异常,
// ShowColor(Color.Purple);
// lastS = "IsTHoutRangeOver30m";
//}
else
{
//待机 蓝绿
ShowColor(Color.FromArgb(0, 128, 128));
lastS = "waiting";
ShowColor(Color.FromArgb(0, 128, 128), "waiting");
}
}
}
......
......@@ -4,6 +4,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
......@@ -355,7 +356,7 @@ namespace DeviceLibrary
IOMove(IO_Type.LineRun, IO_VALUE.LOW);
IOMove(IO_Type.LineRev, IO_VALUE.LOW);
LedProcess(null);
RgbLedProcess("");
CloseRgbLed();
SoundsController.StopPlay();
LogUtil.info("开始停止系统3.");
}
......@@ -562,13 +563,16 @@ namespace DeviceLibrary
if (h.Value)
{
Msg.add(crc.GetString(L.x29_higt_has_reel, "系统启动检测到有无信息料盘,等待取走单料口料盘"), MsgLevel.alarm);
ShowColor(Color.White, "waitTask");
if (Setting_Init.CamTestReel_Ability)
{
//ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
//ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (Setting_Init.Enable_SingleDoor_ManualClose)
{
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
}
else
{
RobotManage.UserPause($"系统启动检测到有无信息料盘,等待取走单料口料盘");
......
......@@ -300,20 +300,25 @@ namespace DeviceLibrary
if (h.Value)
{
Msg.add(crc.GetString(L.please_take_ngdoor_reel, "等待取走单料口料盘"), MsgLevel.alarm);
ShowColor(Color.White, "waitTask");
if (Setting_Init.CamTestReel_Ability)
{
//ClampMoveInfo.LastSetpTime = DateTime.Now;
//ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (Setting_Init.Enable_SingleDoor_ManualClose)
{
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
}
else
{
if (!Setting_Init.CamTestReel_Ability)
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_04);
{
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
}
}
else
{
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_04);
......@@ -463,6 +468,7 @@ namespace DeviceLibrary
public void ScanCode()
{
ClampMoveInfo.log("开始扫码");
ShowColor(Color.Blue, "scanCode");
//RightMoveInfo.OneWaitCanEndStep = true;
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitScanCode());
//RightMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
......
......@@ -31,6 +31,7 @@ namespace TheMachine
{
this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.btnChangeColor = new System.Windows.Forms.Button();
this.btnGree = new System.Windows.Forms.Button();
this.btnYellow = new System.Windows.Forms.Button();
......@@ -43,7 +44,6 @@ namespace TheMachine
this.configControl1 = new TheMachine.ConfigControl();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.button1 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
......@@ -67,9 +67,19 @@ namespace TheMachine
this.panel1.Size = new System.Drawing.Size(1234, 924);
this.panel1.TabIndex = 2;
//
// button1
//
this.button1.Location = new System.Drawing.Point(211, 578);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(155, 31);
this.button1.TabIndex = 20;
this.button1.Text = "停止";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnChangeColor
//
this.btnChangeColor.Location = new System.Drawing.Point(25, 567);
this.btnChangeColor.Location = new System.Drawing.Point(211, 541);
this.btnChangeColor.Name = "btnChangeColor";
this.btnChangeColor.Size = new System.Drawing.Size(155, 31);
this.btnChangeColor.TabIndex = 19;
......@@ -79,7 +89,7 @@ namespace TheMachine
//
// btnGree
//
this.btnGree.Location = new System.Drawing.Point(25, 530);
this.btnGree.Location = new System.Drawing.Point(25, 578);
this.btnGree.Name = "btnGree";
this.btnGree.Size = new System.Drawing.Size(155, 31);
this.btnGree.TabIndex = 18;
......@@ -89,7 +99,7 @@ namespace TheMachine
//
// btnYellow
//
this.btnYellow.Location = new System.Drawing.Point(25, 493);
this.btnYellow.Location = new System.Drawing.Point(25, 541);
this.btnYellow.Name = "btnYellow";
this.btnYellow.Size = new System.Drawing.Size(155, 31);
this.btnYellow.TabIndex = 17;
......@@ -100,7 +110,7 @@ namespace TheMachine
// lblLed
//
this.lblLed.AutoSize = true;
this.lblLed.Location = new System.Drawing.Point(23, 460);
this.lblLed.Location = new System.Drawing.Point(23, 508);
this.lblLed.Name = "lblLed";
this.lblLed.Size = new System.Drawing.Size(41, 12);
this.lblLed.TabIndex = 16;
......@@ -109,7 +119,7 @@ namespace TheMachine
// lblOkValue
//
this.lblOkValue.AutoSize = true;
this.lblOkValue.Location = new System.Drawing.Point(23, 434);
this.lblOkValue.Location = new System.Drawing.Point(23, 482);
this.lblOkValue.Name = "lblOkValue";
this.lblOkValue.Size = new System.Drawing.Size(65, 12);
this.lblOkValue.TabIndex = 15;
......@@ -118,7 +128,7 @@ namespace TheMachine
// lblSensor
//
this.lblSensor.AutoSize = true;
this.lblSensor.Location = new System.Drawing.Point(23, 408);
this.lblSensor.Location = new System.Drawing.Point(23, 456);
this.lblSensor.Name = "lblSensor";
this.lblSensor.Size = new System.Drawing.Size(65, 12);
this.lblSensor.TabIndex = 14;
......@@ -126,7 +136,7 @@ namespace TheMachine
//
// btnAxisRStop
//
this.btnAxisRStop.Location = new System.Drawing.Point(397, 447);
this.btnAxisRStop.Location = new System.Drawing.Point(397, 495);
this.btnAxisRStop.Name = "btnAxisRStop";
this.btnAxisRStop.Size = new System.Drawing.Size(155, 31);
this.btnAxisRStop.TabIndex = 13;
......@@ -136,7 +146,7 @@ namespace TheMachine
//
// btnAxisRTest
//
this.btnAxisRTest.Location = new System.Drawing.Point(397, 405);
this.btnAxisRTest.Location = new System.Drawing.Point(397, 453);
this.btnAxisRTest.Name = "btnAxisRTest";
this.btnAxisRTest.Size = new System.Drawing.Size(155, 31);
this.btnAxisRTest.TabIndex = 12;
......@@ -148,7 +158,7 @@ namespace TheMachine
//
this.axisMoveControl1.Location = new System.Drawing.Point(3, 3);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(559, 400);
this.axisMoveControl1.Size = new System.Drawing.Size(559, 444);
this.axisMoveControl1.TabIndex = 0;
this.axisMoveControl1.Tag = "not";
//
......@@ -166,16 +176,6 @@ namespace TheMachine
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// button1
//
this.button1.Location = new System.Drawing.Point(25, 604);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(155, 31);
this.button1.TabIndex = 20;
this.button1.Text = "停止";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// AxisControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......
......@@ -27,20 +27,22 @@ namespace TheMachine
lblLed.Text = "";
lblOkValue.Text = "";
lblSensor.Text = "";
bool showC = false;
if (Setting_Init.Device_LedLight_PortName != "")
{
btnYellow.Visible = true;
btnGree.Visible = true;
btnChangeColor.Visible = true;
showC = true;
}
else
if (Setting_Init.Enable_HideColorTestBtn)
{
btnYellow.Visible = true;
btnGree.Visible = true;
btnChangeColor.Visible = true;
showC = false;
}
btnYellow.Visible = showC;
btnGree.Visible = showC;
btnChangeColor.Visible = showC;
button1.Visible = showC;
if (Setting_Init.Enable_HideAxisTestBtn)
{
btnAxisRTest.Visible = false;
......@@ -48,8 +50,8 @@ namespace TheMachine
}
else
{
btnAxisRTest.Visible = true ;
btnAxisRStop.Visible = true ;
btnAxisRTest.Visible = true;
btnAxisRStop.Visible = true;
}
}
......@@ -221,7 +223,7 @@ namespace TheMachine
{
Color color = colorDialog1.Color;
btnChangeColor.BackColor = color;
RobotManage.mainMachine.ShowColor(color);
RobotManage.mainMachine.ShowColor(color,color.Name);
}
}
......
此文件类型无法预览
此文件类型无法预览
......@@ -102,7 +102,7 @@ FrmPositionTool_groupBox6_groupBox2_btnAbsMove_Text 开始运动 Start Motion
FrmPositionTool_groupBox6_groupBox2_btnOpenFolder_Text 打开文件夹 Open
FrmPositionTool_groupBox6_groupBox2_btnSdStop_Text 停止 Stop
FrmPositionTool_groupBox6_groupBox2_ioStatusControl1_label1_Text 检测信号 Signal Detection
FrmPositionTool_groupBox6_groupBox2_label13_Text 目标位置: Set Location
FrmPositionTool_groupBox6_groupBox2_label13_Text 目标位置: Location
FrmPositionTool_groupBox6_groupBox2_label3_Text 保存文件名称: Nane:
FrmPositionTool_groupBox6_groupBox2_label4_Text 库位高点偏移量: Location High Point Offset:
FrmPositionTool_groupBox6_groupBox2_label5_Text 库位低点偏移量: Location Low Point Offset:
......@@ -113,7 +113,7 @@ FrmPositionTool_serv_state 伺服状态 Servo Status
AxisMoveControl_groupAxis_groupBox2_groupBox2_Text 轴状态监控 Axis Status Monitoring
AxisMoveControl_groupAxis_groupBox2_label2_Text 实际加速度: Acceleration:
AxisMoveControl_groupAxis_groupBox2_label4_Text 回原状态: Back To Origin Status:
AxisMoveControl_groupAxis_groupBox2_label4_Text 回原状态: Origin Status:
AxisMoveControl_groupAxis_groupBox2_label50_Text 规划模式: Set Mode:
AxisMoveControl_groupAxis_groupBox2_label52_Text 规划位置: Set Position:
AxisMoveControl_groupAxis_groupBox2_label53_Text 规划速度: Set Velocity
......@@ -143,8 +143,8 @@ AxisMoveControl_groupAxis_panel1_btnReadPosition_Text 读取位置 Read Location
AxisMoveControl_groupAxis_panel1_label1_Text 点动速度: Count Velocity
AxisMoveControl_groupAxis_panel1_label45_Text 端口号: Port:
AxisMoveControl_groupAxis_panel1_label46_Text 地址: Address:
AxisMoveControl_groupAxis_panel1_label47_Text 目标速度: Set Velocity
AxisMoveControl_groupAxis_panel1_label48_Text 目标位置: Set Location
AxisMoveControl_groupAxis_panel1_label47_Text 目标速度: Velocity
AxisMoveControl_groupAxis_panel1_label48_Text 目标位置: Location
AxisMoveControl_groupAxis_panel1_label49_Text AC伺服: AC Servo:
AxisMoveControl_groupAxis_panel1_label8_Text 实时位置: Live Location
AxisMoveControl_groupAxis_panel1_linkLabel1_Text 复制 Copy
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!