Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit aa303b48
由
刘韬
编写于
2023-01-05 09:31:35 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
73158970
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
53 行增加
和
26 行删除
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
DeviceLibrary/userControl/AxisMoveControl.cs
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
aa303b4
...
...
@@ -36,19 +36,39 @@ namespace DeviceLibrary
Msg
=
""
;
string
portName
=
Config
.
DeviceName
;
short
slvAddr
=
Config
.
GetAxisValue
();
AxisManager
.
AlarmClear
(
portName
,
slvAddr
);
Thread
.
Sleep
(
50
);
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
Thread
.
Sleep
(
50
);
//打开所有轴
if
(
isCheck
)
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
return
true
;
for
(
int
i
=
0
;
i
<
15
;
i
++)
{
if
(!
OpenAxis
(
out
Msg
))
Msg
+=
$
"第{i}次尝试打开轴:{Config.Explain}\r\n"
;
for
(
int
j
=
0
;
j
<
10
;
j
++)
{
return
false
;
if
(
AxisManager
.
GetAlarmStatus
(
portName
,
slvAddr
)
!=
0
)
{
AxisManager
.
AlarmClear
(
portName
,
slvAddr
);
Msg
+=
"...尝试清除报警第"
+
j
+
"次"
;
Thread
.
Sleep
(
500
);
continue
;
}
break
;
}
AxisManager
.
ServoOn
(
portName
,
slvAddr
);
Thread
.
Sleep
(
50
);
if
(
AxisManager
.
IsServeoOn
(
portName
,
slvAddr
))
{
Msg
+=
"...尝试使能成功"
;
return
true
;
}
else
Msg
+=
"...尝试使能失败"
;
Thread
.
Sleep
(
2000
);
Msg
+=
"\r\n"
;
}
return
true
;
return
false
;
}
/// <summary>
/// 打开所有轴
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
aa303b4
...
...
@@ -23,6 +23,7 @@ namespace DeviceLibrary
int
upspeed
;
int
downspeed
;
int
StrokeLength
=
270000
;
MoveInfo
moveInfo1
=
new
MoveInfo
(
"升降机构"
,
false
);
bool
paused
=
false
;
public
LiftMonitor
(
string
_up
,
string
_down
,
string
_break
,
AxisBean
_axisBean
,
int
_StrokeLength
,
int
_upspeed
,
int
_downspeed
=
0
)
{
up
=
_up
;
...
...
@@ -52,7 +53,7 @@ namespace DeviceLibrary
public
void
LiftUp
(
MoveInfo
moveInfo
)
{
if
(
moveInfo
==
null
)
moveInfo
=
new
MoveInfo
(
"界面"
,
false
)
;
moveInfo
=
moveInfo1
;
if
(
IOManager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
moveInfo
.
log
(
$
"急停未解除"
);
...
...
@@ -129,7 +130,7 @@ namespace DeviceLibrary
public
void
LiftDown
(
MoveInfo
moveInfo
)
{
if
(
moveInfo
==
null
)
moveInfo
=
new
MoveInfo
(
"界面"
,
false
)
;
moveInfo
=
moveInfo1
;
if
(
IOManager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
moveInfo
.
log
(
$
"急停未解除"
);
...
...
@@ -224,7 +225,11 @@ namespace DeviceLibrary
public
void
Resume
()
{
//throw new NotImplementedException();
if
(
moveInfo1
.
WaitList
.
Count
>
0
)
{
if
(
moveInfo1
.
WaitList
[
0
].
WaitType
==
WaitEnum
.
W013_Action
)
{
moveInfo1
.
WaitList
[
0
].
Action
?.
Invoke
(
moveInfo1
.
WaitList
[
0
]);
}
}
}
}
}
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
aa303b4
...
...
@@ -51,7 +51,6 @@ namespace DeviceLibrary
internal
AxisBean
Comp_Axis
;
internal
AxisBean
Batch_Axis
;
internal
AxisBean
Clamp_Axis
;
internal
AxisBean
StringDoor_Axis
;
public
LineRunMonitor
Line
;
public
CylinderManger
SingleDoor
;
...
...
@@ -566,7 +565,15 @@ namespace DeviceLibrary
}
Msg
.
add
(
crc
.
GetString
(
L
.
SafetyLight_is_block
,
"安全光栅被遮挡"
)
+
(
ok
?
ignorestring
:
""
),
MsgLevel
.
warning
);
}
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
{
if
(
IOValue
(
IO_Type
.
AGV_OnPosition
).
Equals
(
IO_VALUE
.
LOW
))
{
ok
=
false
;
DeviceSuddenStop
();
Msg
.
add
(
"料串门光栅被遮挡"
,
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
}
}
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
{
if
(
IOValue
(
IO_Type
.
LeftDoorClose_Check
).
Equals
(
IO_VALUE
.
LOW
))
...
...
@@ -674,18 +681,7 @@ namespace DeviceLibrary
else
{
lastAirCloseTime
=
DateTime
.
MinValue
;
}
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
{
if
(
StringDoor_Axis
!=
null
)
{
if
(
StringDoor_Axis
.
IsBusy
&&
IOValue
(
IO_Type
.
AGV_OnPosition
).
Equals
(
IO_VALUE
.
LOW
))
{
ok
=
false
;
StringDoor
.
Pause
();
Msg
.
add
(
"料串门光栅被遮挡"
,
MsgLevel
.
alarm
,
ErrInfo
.
SuddenStop
);
}
}
}
if
(
alarmType
!=
AlarmType
.
SuddenStop
)
{
TimeSpan
span
=
DateTime
.
Now
-
checkAlarmTime
;
...
...
DeviceLibrary/userControl/AxisMoveControl.Designer.cs
查看文件 @
aa303b4
...
...
@@ -169,6 +169,7 @@
this
.
lblAlarmcode
.
Tag
=
"not"
;
this
.
lblAlarmcode
.
Text
=
"ErrCode:160"
;
this
.
lblAlarmcode
.
Visible
=
false
;
this
.
lblAlarmcode
.
Click
+=
new
System
.
EventHandler
(
this
.
lblAlarmcode_Click
);
//
// label4
//
...
...
DeviceLibrary/userControl/AxisMoveControl.cs
查看文件 @
aa303b4
...
...
@@ -444,5 +444,10 @@ namespace DeviceLibrary
lbl
.
BackColor
=
this
.
BackColor
;
}
}
private
void
lblAlarmcode_Click
(
object
sender
,
EventArgs
e
)
{
MessageBox
.
Show
(
string
.
Join
(
","
,
HuichuanLibrary
.
HCBoardManager
.
GetAxisErrorDetail
(
currentAxis
.
Config
.
GetAxisValue
())));
}
}
}
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论