Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20031_TinStorage
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d9dc5137
由
刘韬
编写于
2024-06-25 09:39:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化io手动安全检测
1 个父辈
2128f57a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
26 行增加
和
16 行删除
DeviceLibrary/theMachine/MainMachine.cs
TheMachine/Form1.cs
TheMachine/IOControls.cs
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
d9dc513
...
...
@@ -573,10 +573,9 @@ namespace DeviceLibrary
else
if
(
isInSuddenDown
)
{
Alarm
(
AlarmType
.
SuddenStop
);
Msg
.
add
(
crc
.
GetString
(
"Res0100"
,
"急停中"
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
"Res0100"
,
"急停中"
),
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
ok
=
false
;
}
}
else
if
(
alarmType
!=
AlarmType
.
None
)
{
//if (IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.Left_BTN).Equals(IO_VALUE.HIGH))
...
...
@@ -590,7 +589,6 @@ namespace DeviceLibrary
ok
=
false
;
}
}
if
(
ok
&&
!
AxisBean
.
RunMultiAxis
(
true
,
out
string
msg
,
AxisBean
.
List
))
{
ok
=
false
;
...
...
TheMachine/Form1.cs
查看文件 @
d9dc513
...
...
@@ -169,12 +169,7 @@ namespace TheMachine
}).
ContinueWith
(
delegate
{
CylinderButton
.
IsSafe
+=
()
=>
{
if
(
RobotManage
.
isRunning
)
return
(
false
,
"Safety interlock activated"
);
if
(!
RobotManage
.
mainMachine
.
IsAllDoorClosed
())
return
(
false
,
"Safe door was not closed"
);
return
(
true
,
""
);
return
IOControls
.
IsSafe
();
};
});
...
...
@@ -434,25 +429,39 @@ namespace TheMachine
if
(
msg
.
errInfo
==
ErrInfo
.
X09_BoxNotDetect
)
{
btn_IgnoreX09
.
Visible
=
true
;
}
else
if
(
msg
.
errInfo
==
ErrInfo
.
X09_Clear
)
}
else
if
(
msg
.
errInfo
==
ErrInfo
.
X09_Clear
)
{
btn_IgnoreX09
.
Visible
=
false
;
}
else
if
(
msg
.
errInfo
==
ErrInfo
.
LabelInPaste
)
{
RobotManage
.
mainMachine
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
if
(
FrmAlarm
.
ShowAlarmDialog
(
"Labeling Exceptions:"
+
"\r\n"
+
msg
.
msgtxt
)
==
DialogResult
.
OK
)
{
if
(
FrmAlarm
.
ShowAlarmDialog
(
"Labeling Exceptions:"
+
"\r\n"
+
msg
.
msgtxt
)
==
DialogResult
.
OK
)
{
LogUtil
.
info
(
"用户确认已处理"
);
//Setting_Init.Runtime_Step = Runtime_StepE.None;
RobotManage
.
UserPause
(
false
);
}
else
{
else
{
btn_stop_Click
(
this
,
EventArgs
.
Empty
);
LogUtil
.
info
(
"用户取消处理,系统停止"
);
}
}
else
if
(
msg
.
errInfo
==
ErrInfo
.
SuddenStop
)
{
Task
.
Run
(()
=>
{
LogUtil
.
info
(
"急停触发停止"
);
if
(
RobotManage
.
isRunning
)
this
.
Invoke
((
EventHandler
)
delegate
{
btn_stop_Click
(
this
,
EventArgs
.
Empty
);
});
});
}
}
this
.
ResumeLayout
(
true
);
...
...
TheMachine/IOControls.cs
查看文件 @
d9dc513
...
...
@@ -141,14 +141,17 @@ namespace TheMachine
RobotManage
.
mainMachine
.
RotateEquip
.
TurnRound
();
}
public
(
bool
,
string
)
IsSafe
()
{
public
static
(
bool
,
string
)
IsSafe
()
{
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
return
(
false
,
"Emergency stop."
);
if
(
RobotManage
.
isRunning
)
return
(
false
,
"Safety interlock activated"
);
if
(!
RobotManage
.
mainMachine
.
IsAllDoorClosed
())
return
(
false
,
"Safe door was not closed"
);
return
(
true
,
""
);
}
private
void
button9_Click
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论