Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b6d4f719
由
LN
编写于
2024-07-04 16:20:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
灯条测试问题修改
1 个父辈
c2617b00
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
44 行增加
和
41 行删除
DeviceLibrary/DeviceLibrary/flyelectronicControl/Flyelectronic_485_RGB_Controller.cs
DeviceLibrary/theMachine/MainMachine _LedRGBProcess.cs
TheMachine/AxisControl.cs
DeviceLibrary/DeviceLibrary/flyelectronicControl/Flyelectronic_485_RGB_Controller.cs
查看文件 @
b6d4f71
...
@@ -90,12 +90,10 @@ namespace DeviceLibrary
...
@@ -90,12 +90,10 @@ namespace DeviceLibrary
}
}
private
void
Run
()
private
void
Run
()
{
{
return
;
Task
.
Run
(()
=>
{
Task
.
Run
(()
=>
{
try
try
{
{
var
p1
=
RobotManage
.
mainMachine
.
Config
.
Middle_P1
;
var
p1_speed
=
RobotManage
.
mainMachine
.
Config
.
Middle_P1_speed
;
var
axis
=
RobotManage
.
mainMachine
.
Middle_Axis
;
while
(
ok
)
while
(
ok
)
{
{
...
...
DeviceLibrary/theMachine/MainMachine _LedRGBProcess.cs
查看文件 @
b6d4f71
...
@@ -48,7 +48,7 @@ namespace DeviceLibrary
...
@@ -48,7 +48,7 @@ namespace DeviceLibrary
{
{
LogUtil
.
error
(
"LED灯初始化成功"
);
LogUtil
.
error
(
"LED灯初始化成功"
);
rgbLedInitOk
=
true
;
rgbLedInitOk
=
true
;
ledRgbTimer
=
new
System
.
Threading
.
Timer
(
new
TimerCallback
(
RgbLedProcess
),
null
,
0
,
10
00
);
ledRgbTimer
=
new
System
.
Threading
.
Timer
(
new
TimerCallback
(
RgbLedProcess
),
null
,
0
,
5
00
);
GC
.
KeepAlive
(
ledRgbTimer
);
GC
.
KeepAlive
(
ledRgbTimer
);
msg
=
""
;
msg
=
""
;
return
true
;
return
true
;
...
@@ -75,11 +75,11 @@ namespace DeviceLibrary
...
@@ -75,11 +75,11 @@ namespace DeviceLibrary
}
}
if
(
lastColor
!=
""
&&
lastColor
.
Equals
(
color
.
Name
.
ToString
()))
if
(
lastColor
!=
""
&&
lastColor
.
Equals
(
color
.
Name
.
ToString
()))
{
{
return
;
//
return;
}
}
else
else
{
{
LogUtil
.
info
(
Name
+
"
ShowColor "
+
lastS
+
"="
+
lastColor
);
LogUtil
.
info
(
Name
+
"
oldColor :"
+
lastS
+
"="
+
lastColor
+
" , ShowColor "
+
lastState
+
"="
+
color
.
Name
.
ToString
()
);
}
}
//if (lastColor.Equals("yellowL")||lastColor.Equals("greenL"))
//if (lastColor.Equals("yellowL")||lastColor.Equals("greenL"))
//{
//{
...
@@ -89,29 +89,31 @@ namespace DeviceLibrary
...
@@ -89,29 +89,31 @@ namespace DeviceLibrary
lastS
=
lastState
;
lastS
=
lastState
;
//rGB_Controller.CloseLed();
//rGB_Controller.CloseLed();
rGB_Controller
.
ShowColor
(
color
);
rGB_Controller
.
ShowColor
(
color
);
lastColor
=
color
.
Name
.
ToString
();
lastColor
=
color
.
Name
.
ToString
();
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"ShowColror "
+
color
+
", "
+
lastState
+
"出错:"
+
ex
.
ToString
());
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"ShowColror "
+
color
+
", "
+
lastState
+
"出错:"
+
ex
.
ToString
());
}
}
}
public
void
ShowYellowLight
()
public
void
ShowYellowLight
(
string
s
=
"storeOut"
)
{
{
if
(
lastColor
.
Equals
(
"yellowL"
))
if
(
!
lastColor
.
Equals
(
"yellowL"
))
{
{
return
;
LogUtil
.
info
(
Name
+
" oldColor :"
+
lastS
+
"="
+
lastColor
+
" , ShowColor "
+
s
+
"=yellowL"
);
}
}
lastS
=
s
;
lastColor
=
"yellowL"
;
lastColor
=
"yellowL"
;
//rGB_Controller.CloseLed();
//rGB_Controller.CloseLed();
rGB_Controller
.
ShowYellowLight
();
rGB_Controller
.
ShowYellowLight
();
}
}
public
void
ShowGreenLight
()
public
void
ShowGreenLight
(
string
s
=
"storeIn"
)
{
{
if
(
lastColor
.
Equals
(
"greenL"
))
if
(
!
lastColor
.
Equals
(
"greenL"
))
{
{
return
;
LogUtil
.
info
(
Name
+
" oldColor :"
+
lastS
+
"="
+
lastColor
+
" , ShowColor "
+
s
+
"=yellowL"
);
}
}
lastColor
=
"greenL"
;
lastColor
=
"greenL"
;
lastS
=
s
;
//rGB_Controller.CloseLed();
//rGB_Controller.CloseLed();
rGB_Controller
.
ShowGreenLight
();
rGB_Controller
.
ShowGreenLight
();
}
}
...
@@ -141,8 +143,11 @@ namespace DeviceLibrary
...
@@ -141,8 +143,11 @@ namespace DeviceLibrary
//出入库 绿闪 黄闪
//出入库 绿闪 黄闪
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
)
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
)
{
{
inOut
=
true
;
}
else
if
(
StringMoveInfo
.
MoveStep
>=
MoveStep
.
StringReelPut
&&
StringMoveInfo
.
MoveStep
<=
MoveStep
.
StringReelPut_05
)
{
inOut
=
true
;
inOut
=
true
;
}
}
else
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreIn01
)
else
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreIn01
)
{
{
...
@@ -152,21 +157,21 @@ namespace DeviceLibrary
...
@@ -152,21 +157,21 @@ namespace DeviceLibrary
{
{
inPut
=
true
;
inPut
=
true
;
}
}
else
if
(!
ClampMoveInfo
.
IsStep
(
MoveStep
.
Wait
))
else
if
(
StringMoveInfo
.
MoveStep
>=
MoveStep
.
StringReelPut
&&
StringMoveInfo
.
MoveStep
<=
MoveStep
.
StringReelPut_05
)
{
{
inPut
=
true
;
inOut
=
true
;
}
}
if
(
ClampMoveInfo
.
IsStep
(
MoveStep
.
ReelClamp_10
)
&&
(!
RobotManage
.
InoutDebugMode
)
&&
(!
ClampMoveInfo
.
MoveParam
.
IsNg
))
if
(
ClampMoveInfo
.
IsStep
(
MoveStep
.
ReelClamp_10
)
&&
(!
RobotManage
.
InoutDebugMode
)
&&
(!
ClampMoveInfo
.
MoveParam
.
IsNg
))
{
{
scanCode
=
true
;
scanCode
=
true
;
}
}
if
(
StoreMoveInfo
.
IsStep
(
MoveStep
.
Wait
)&&
ClampMoveInfo
.
IsStep
(
MoveStep
.
Wait
)&&
StringMoveInfo
.
IsStep
(
MoveStep
.
Wait
))
{
if
(
ResetMoveInfo
.
IsStep
(
MoveStep
.
H14_HomeReset
))
{
waitTake
=
true
;
}
}
else
if
(
h
!=
null
&&
h
.
Value
)
else
if
(
ClampMoveInfo
.
IsStep
(
MoveStep
.
NGOUT_03
)
)
{
{
waitTake
=
true
;
waitTake
=
true
;
}
}
...
@@ -175,7 +180,7 @@ namespace DeviceLibrary
...
@@ -175,7 +180,7 @@ namespace DeviceLibrary
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
)
||
isInSuddenDown
)
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
)
||
isInSuddenDown
)
{
{
//红色: 急停,
//红色: 急停,
ShowColor
(
Color
.
Red
,
"suddenStop"
);
ShowColor
(
Color
.
Red
,
"suddenStop"
);
}
}
else
if
(
runStatus
==
RunStatus
.
Stop
)
else
if
(
runStatus
==
RunStatus
.
Stop
)
{
{
...
@@ -189,37 +194,37 @@ namespace DeviceLibrary
...
@@ -189,37 +194,37 @@ namespace DeviceLibrary
{
{
}
}
}
}
else
if
(
scanCode
)
else
if
(
scanCode
)
{
{
//蓝色: 扫码检测
//蓝色: 扫码检测
ShowColor
(
Color
.
Blue
,
"scanCode"
);
ShowColor
(
Color
.
Blue
,
"scanCode"
);
}
else
if
(
waitTake
)
{
//暂停等待料盘拿走
//白色: 等待用户响应(等待取走盘等),
//蓝色: 扫码检测
ShowColor
(
Color
.
White
,
"waitTask"
);
}
}
//出入库 绿闪 黄闪
//出入库 绿闪 黄闪
else
if
(
inOut
)
else
if
(
inOut
)
{
{
////流动黄: 出库,
////流动黄: 出库,
ShowYellowLight
();
ShowYellowLight
();
lastS
=
"storeOut"
;
//lastS = "storeOut";
LogUtil
.
info
(
Name
+
" ShowColor "
+
lastS
+
"="
+
lastColor
);
//
LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
}
}
else
if
(
inPut
)
else
if
(
inPut
)
{
{
ShowGreenLight
();
ShowGreenLight
();
lastS
=
"storeIn"
;
//lastS = "storeIn";
LogUtil
.
info
(
Name
+
" ShowColor "
+
lastS
+
"="
+
lastColor
);
//LogUtil.info(Name + " ShowColor " + lastS + "=" + lastColor);
}
else
if
(
waitTake
)
{
//暂停等待料盘拿走
//白色: 等待用户响应(等待取走盘等),
//蓝色: 扫码检测
ShowColor
(
Color
.
White
,
"waitTask"
);
}
}
else
if
(
hasAlarm
)
else
if
(
hasAlarm
)
{
{
//紫色: 异常,
//紫色: 异常,
ShowColor
(
Color
.
Purple
,
"hasAlarm"
);
ShowColor
(
Color
.
Purple
,
"hasAlarm"
);
}
//温度超限
}
//温度超限
//else if (IsTHoutRange())
//else if (IsTHoutRange())
...
@@ -238,7 +243,7 @@ namespace DeviceLibrary
...
@@ -238,7 +243,7 @@ namespace DeviceLibrary
else
else
{
{
//待机 蓝绿
//待机 蓝绿
ShowColor
(
Color
.
FromArgb
(
0
,
255
,
64
),
"waiting"
);
ShowColor
(
Color
.
FromArgb
(
0
,
255
,
64
),
"waiting"
);
}
}
}
}
}
}
...
...
TheMachine/AxisControl.cs
查看文件 @
b6d4f71
...
@@ -207,13 +207,13 @@ namespace TheMachine
...
@@ -207,13 +207,13 @@ namespace TheMachine
private
void
btnYellow_Click
(
object
sender
,
EventArgs
e
)
private
void
btnYellow_Click
(
object
sender
,
EventArgs
e
)
{
{
RobotManage
.
mainMachine
.
ShowYellowLight
();
RobotManage
.
mainMachine
.
ShowYellowLight
(
"test"
);
}
}
private
void
btnGree_Click
(
object
sender
,
EventArgs
e
)
private
void
btnGree_Click
(
object
sender
,
EventArgs
e
)
{
{
RobotManage
.
mainMachine
.
ShowGreenLight
();
RobotManage
.
mainMachine
.
ShowGreenLight
(
"test"
);
}
}
private
void
btnChangeColor_Click
(
object
sender
,
EventArgs
e
)
private
void
btnChangeColor_Click
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论