Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f2c66f9f
由
LN
编写于
2024-08-14 13:16:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
三色灯优化
1 个父辈
077f9f78
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
57 行增加
和
35 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
DeviceLibrary/theMachine/MainMachine.cs
TheMachineNView/Form1.Designer.cs
TheMachineNView/Form1.cs
TheMachineNView/SettingControl.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
f2c66f9
...
@@ -281,7 +281,7 @@ namespace DeviceLibrary
...
@@ -281,7 +281,7 @@ namespace DeviceLibrary
lineOperation
.
msgEn
=
lineOperation
.
msg
;
lineOperation
.
msgEn
=
lineOperation
.
msg
;
lineOperation
.
msgJp
=
lineOperation
.
msg
;
lineOperation
.
msgJp
=
lineOperation
.
msg
;
//lineOperation.status = 1;
lineOperation
.
boxStatus
.
Add
(
StoreID
,
boxStatus
);
lineOperation
.
boxStatus
.
Add
(
StoreID
,
boxStatus
);
return
lineOperation
;
return
lineOperation
;
}
}
...
...
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
查看文件 @
f2c66f9
...
@@ -102,7 +102,7 @@ namespace DeviceLibrary
...
@@ -102,7 +102,7 @@ namespace DeviceLibrary
}
}
void
ProcessLefCfg
(
MachineLedStateE
machineLedStateE
)
void
ProcessLefCfg
(
MachineLedStateE
machineLedStateE
)
{
{
ledStr
=
runStatus
+
", "
+
machineLedStateE
.
ToString
()
+
","
+
DateTime
.
Now
.
ToString
();
if
(!
MachineLedState
.
ContainsKey
(
machineLedStateE
))
if
(!
MachineLedState
.
ContainsKey
(
machineLedStateE
))
{
{
LogUtil
.
info
(
"灯塔配置未包含:"
+
machineLedStateE
.
ToString
());
LogUtil
.
info
(
"灯塔配置未包含:"
+
machineLedStateE
.
ToString
());
...
@@ -118,6 +118,7 @@ namespace DeviceLibrary
...
@@ -118,6 +118,7 @@ namespace DeviceLibrary
Led
.
LedColors
[
ledcolor
].
LedState
=
ledcfg
[
ledcolor
];
Led
.
LedColors
[
ledcolor
].
LedState
=
ledcfg
[
ledcolor
];
}
}
}
}
public
string
ledStr
=
""
;
void
LedProcess
(
object
o
)
void
LedProcess
(
object
o
)
{
{
StandbyLed
.
LedState
=
LedState
.
off
;
StandbyLed
.
LedState
=
LedState
.
off
;
...
@@ -193,8 +194,10 @@ namespace DeviceLibrary
...
@@ -193,8 +194,10 @@ namespace DeviceLibrary
public
LedState
LedState
=
LedState
.
off
;
public
LedState
LedState
=
LedState
.
off
;
public
LedColor
Color
=
LedColor
.
green
;
public
LedColor
Color
=
LedColor
.
green
;
ushort
ledio
;
ushort
ledio
;
public
Led
(
ushort
io
,
LedColor
ledColor
)
string
ioType
=
""
;
public
Led
(
string
ioType
,
ushort
io
,
LedColor
ledColor
)
{
{
this
.
ioType
=
ioType
;
Color
=
ledColor
;
Color
=
ledColor
;
ledio
=
io
;
ledio
=
io
;
LedGroup
.
Add
(
this
);
LedGroup
.
Add
(
this
);
...
@@ -228,6 +231,12 @@ namespace DeviceLibrary
...
@@ -228,6 +231,12 @@ namespace DeviceLibrary
lastiovalue
=
iovalue
;
lastiovalue
=
iovalue
;
IOManager
.
WriteSingleDO
(
""
,
0x00
,
ledio
,
iovalue
);
IOManager
.
WriteSingleDO
(
""
,
0x00
,
ledio
,
iovalue
);
}
}
else
if
(
ioType
!=
""
&&
(!
IOManager
.
IOValue
(
ioType
).
Equals
(
iovalue
)))
{
//需要重写
IOManager
.
WriteSingleDO
(
""
,
0x00
,
ledio
,
iovalue
);
}
}
}
}
}
public
enum
LedState
public
enum
LedState
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
f2c66f9
...
@@ -104,9 +104,9 @@ namespace DeviceLibrary
...
@@ -104,9 +104,9 @@ namespace DeviceLibrary
SelfAuditMoveInfo
=
new
MoveInfo
(
$
"盘点"
);
SelfAuditMoveInfo
=
new
MoveInfo
(
$
"盘点"
);
#
region
初始化
led
灯
#
region
初始化
led
灯
RunningLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Run_Led
].
GetIOAddr
(),
LedColor
.
green
);
RunningLed
=
new
Led
(
IO_Type
.
Run_Led
,
Config
.
DOList
[
IO_Type
.
Run_Led
].
GetIOAddr
(),
LedColor
.
green
);
StandbyLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Standby_Led
].
GetIOAddr
(),
LedColor
.
yellow
);
StandbyLed
=
new
Led
(
IO_Type
.
Standby_Led
,
Config
.
DOList
[
IO_Type
.
Standby_Led
].
GetIOAddr
(),
LedColor
.
yellow
);
AlarmLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
(),
LedColor
.
red
);
AlarmLed
=
new
Led
(
IO_Type
.
Alarm_Led
,
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
(),
LedColor
.
red
);
//NG_Led = new Led(Config.DOList[IO_Type.MaterialNG_Led].GetIOAddr());
//NG_Led = new Led(Config.DOList[IO_Type.MaterialNG_Led].GetIOAddr());
#
endregion
#
endregion
...
...
TheMachineNView/Form1.Designer.cs
查看文件 @
f2c66f9
...
@@ -48,7 +48,9 @@ namespace TheMachineNView
...
@@ -48,7 +48,9 @@ namespace TheMachineNView
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
stateView
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
stateView
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
btn_releasestring
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_releasestring
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_stop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_IgnoreSafecheck
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_IgnoreSafecheck
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
btn_run
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
pictureBox2
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
pictureBox2
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
cb_IgnoreGratingSignal
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_IgnoreGratingSignal
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_EnableBuzzer
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_EnableBuzzer
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
@@ -57,8 +59,7 @@ namespace TheMachineNView
...
@@ -57,8 +59,7 @@ namespace TheMachineNView
this
.
tabMonitor
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabMonitor
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
panelVideo
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panelVideo
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
btn_stop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblLedInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_run
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
tabc
.
SuspendLayout
();
this
.
tabc
.
SuspendLayout
();
this
.
tabP1
.
SuspendLayout
();
this
.
tabP1
.
SuspendLayout
();
...
@@ -199,6 +200,7 @@ namespace TheMachineNView
...
@@ -199,6 +200,7 @@ namespace TheMachineNView
//
//
// pnl
// pnl
//
//
this
.
pnl
.
Controls
.
Add
(
this
.
lblLedInfo
);
this
.
pnl
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
pnl
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
pnl
.
Controls
.
Add
(
this
.
btn_releasestring
);
this
.
pnl
.
Controls
.
Add
(
this
.
btn_releasestring
);
this
.
pnl
.
Controls
.
Add
(
this
.
btn_stop
);
this
.
pnl
.
Controls
.
Add
(
this
.
btn_stop
);
...
@@ -249,6 +251,18 @@ namespace TheMachineNView
...
@@ -249,6 +251,18 @@ namespace TheMachineNView
this
.
btn_releasestring
.
UseVisualStyleBackColor
=
true
;
this
.
btn_releasestring
.
UseVisualStyleBackColor
=
true
;
this
.
btn_releasestring
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_releasestring_Click
);
this
.
btn_releasestring
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_releasestring_Click
);
//
//
// btn_stop
//
this
.
btn_stop
.
Enabled
=
false
;
this
.
btn_stop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_stop
.
Location
=
new
System
.
Drawing
.
Point
(
129
,
213
);
this
.
btn_stop
.
Name
=
"btn_stop"
;
this
.
btn_stop
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btn_stop
.
TabIndex
=
3
;
this
.
btn_stop
.
Text
=
"停止"
;
this
.
btn_stop
.
UseVisualStyleBackColor
=
true
;
this
.
btn_stop
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_stop_Click
);
//
// cb_IgnoreSafecheck
// cb_IgnoreSafecheck
//
//
this
.
cb_IgnoreSafecheck
.
AutoSize
=
true
;
this
.
cb_IgnoreSafecheck
.
AutoSize
=
true
;
...
@@ -261,6 +275,18 @@ namespace TheMachineNView
...
@@ -261,6 +275,18 @@ namespace TheMachineNView
this
.
cb_IgnoreSafecheck
.
Visible
=
false
;
this
.
cb_IgnoreSafecheck
.
Visible
=
false
;
this
.
cb_IgnoreSafecheck
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_IgnoreSafecheck_CheckedChanged
);
this
.
cb_IgnoreSafecheck
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_IgnoreSafecheck_CheckedChanged
);
//
//
// btn_run
//
this
.
btn_run
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_run
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
213
);
this
.
btn_run
.
Name
=
"btn_run"
;
this
.
btn_run
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btn_run
.
TabIndex
=
4
;
this
.
btn_run
.
Tag
=
"not"
;
this
.
btn_run
.
Text
=
"启动"
;
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
this
.
btn_run
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_run_Click
);
//
// pictureBox2
// pictureBox2
//
//
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
...
@@ -326,7 +352,7 @@ namespace TheMachineNView
...
@@ -326,7 +352,7 @@ namespace TheMachineNView
this
.
tabMonitor
.
Controls
.
Add
(
this
.
panelVideo
);
this
.
tabMonitor
.
Controls
.
Add
(
this
.
panelVideo
);
this
.
tabMonitor
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
30
);
this
.
tabMonitor
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
30
);
this
.
tabMonitor
.
Name
=
"tabMonitor"
;
this
.
tabMonitor
.
Name
=
"tabMonitor"
;
this
.
tabMonitor
.
Size
=
new
System
.
Drawing
.
Size
(
1179
,
666
);
this
.
tabMonitor
.
Size
=
new
System
.
Drawing
.
Size
(
762
,
630
);
this
.
tabMonitor
.
TabIndex
=
1
;
this
.
tabMonitor
.
TabIndex
=
1
;
this
.
tabMonitor
.
Text
=
"监控"
;
this
.
tabMonitor
.
Text
=
"监控"
;
this
.
tabMonitor
.
UseVisualStyleBackColor
=
true
;
this
.
tabMonitor
.
UseVisualStyleBackColor
=
true
;
...
@@ -336,7 +362,7 @@ namespace TheMachineNView
...
@@ -336,7 +362,7 @@ namespace TheMachineNView
this
.
panelVideo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panelVideo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panelVideo
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panelVideo
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panelVideo
.
Name
=
"panelVideo"
;
this
.
panelVideo
.
Name
=
"panelVideo"
;
this
.
panelVideo
.
Size
=
new
System
.
Drawing
.
Size
(
1179
,
666
);
this
.
panelVideo
.
Size
=
new
System
.
Drawing
.
Size
(
762
,
630
);
this
.
panelVideo
.
TabIndex
=
276
;
this
.
panelVideo
.
TabIndex
=
276
;
//
//
// listView1
// listView1
...
@@ -354,31 +380,15 @@ namespace TheMachineNView
...
@@ -354,31 +380,15 @@ namespace TheMachineNView
this
.
listView1
.
TabIndex
=
2
;
this
.
listView1
.
TabIndex
=
2
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
//
//
//
btn_stop
//
lblLedInfo
//
//
this
.
btn_stop
.
Enabled
=
false
;
this
.
lblLedInfo
.
AutoSize
=
true
;
this
.
btn_stop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblLedInfo
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
261
);
this
.
btn_stop
.
Location
=
new
System
.
Drawing
.
Point
(
129
,
213
);
this
.
lblLedInfo
.
Name
=
"lblLedInfo"
;
this
.
btn_stop
.
Name
=
"btn_stop"
;
this
.
lblLedInfo
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
21
);
this
.
btn_stop
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
lblLedInfo
.
TabIndex
=
273
;
this
.
btn_stop
.
TabIndex
=
3
;
this
.
btn_stop
.
Text
=
"停止"
;
this
.
btn_stop
.
UseVisualStyleBackColor
=
true
;
this
.
btn_stop
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_stop_Click
);
//
// btn_run
//
this
.
btn_run
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_run
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
213
);
this
.
btn_run
.
Name
=
"btn_run"
;
this
.
btn_run
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btn_run
.
TabIndex
=
4
;
this
.
btn_run
.
Tag
=
"not"
;
this
.
btn_run
.
Text
=
"启动"
;
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
this
.
btn_run
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_run_Click
);
//
//
// F
rmMain
// F
orm1
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
14F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
14F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
...
@@ -390,7 +400,7 @@ namespace TheMachineNView
...
@@ -390,7 +400,7 @@ namespace TheMachineNView
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
Name
=
"F
rmMain
"
;
this
.
Name
=
"F
orm1
"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"Form1"
;
this
.
Text
=
"Form1"
;
this
.
WindowState
=
System
.
Windows
.
Forms
.
FormWindowState
.
Maximized
;
this
.
WindowState
=
System
.
Windows
.
Forms
.
FormWindowState
.
Maximized
;
...
@@ -441,6 +451,7 @@ namespace TheMachineNView
...
@@ -441,6 +451,7 @@ namespace TheMachineNView
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
englishToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
englishToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
TabPage
tabMonitor
;
private
System
.
Windows
.
Forms
.
TabPage
tabMonitor
;
private
System
.
Windows
.
Forms
.
Panel
panelVideo
;
private
System
.
Windows
.
Forms
.
Panel
panelVideo
;
private
System
.
Windows
.
Forms
.
Label
lblLedInfo
;
}
}
}
}
TheMachineNView/Form1.cs
查看文件 @
f2c66f9
...
@@ -199,6 +199,7 @@ namespace TheMachineNView
...
@@ -199,6 +199,7 @@ namespace TheMachineNView
if
(
RobotManage
.
mainMachine
==
null
)
if
(
RobotManage
.
mainMachine
==
null
)
return
;
return
;
lblLedInfo
.
Text
=
RobotManage
.
mainMachine
.
runStatus
+
", "
+
RobotManage
.
mainMachine
.
ledStr
;
this
.
SuspendLayout
();
this
.
SuspendLayout
();
stateView
.
Items
.
Clear
();
stateView
.
Items
.
Clear
();
foreach
(
MoveInfo
moveInfo
in
moveInfoList
)
foreach
(
MoveInfo
moveInfo
in
moveInfoList
)
...
...
TheMachineNView/SettingControl.cs
查看文件 @
f2c66f9
...
@@ -50,8 +50,9 @@ namespace TheMachineNView
...
@@ -50,8 +50,9 @@ namespace TheMachineNView
private
void
SettingControl_Load
(
object
sender
,
EventArgs
e
)
private
void
SettingControl_Load
(
object
sender
,
EventArgs
e
)
{
{
//Config.PropertyBind("Device_Humiture_Port", cb_tempsensorport, "SelectedItem", "SelectedIndexChanged");
//Config.PropertyBind("Device_Humiture_Port", cb_tempsensorport, "SelectedItem", "SelectedIndexChanged");
Config
.
PropertyBind
(
"Device_Use_Fixpos"
,
cb_usefixpos
,
"Checked"
,
"CheckedChanged"
);
//
Config.PropertyBind("Device_Use_Fixpos", cb_usefixpos, "Checked", "CheckedChanged");
Config
.
PropertyBind
(
"Enable_Fixpos"
,
cb_usefixpos
,
"Checked"
,
"CheckedChanged"
);
if
(
Setting_Init
.
Device_WeightSensor_PortName
==
""
)
if
(
Setting_Init
.
Device_WeightSensor_PortName
==
""
)
{
{
SShow
(
false
);
SShow
(
false
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论