Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d45702e0
由
张东亮
编写于
2023-08-23 14:46:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
折叠门停止问题
1 个父辈
4972d290
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
36 行增加
和
20 行删除
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
d45702e
...
@@ -325,6 +325,7 @@ namespace DeviceLibrary
...
@@ -325,6 +325,7 @@ namespace DeviceLibrary
public
void
SuddenStop
()
public
void
SuddenStop
()
{
{
AxisManager
.
SuddenStop
(
Config
.
DeviceName
,
Config
.
GetAxisValue
());
AxisManager
.
SuddenStop
(
Config
.
DeviceName
,
Config
.
GetAxisValue
());
LogUtil
.
info
(
"SuddenStop【"
+
AxisName
+
"】"
);
}
}
/// <summary>
/// <summary>
/// 判断轴运动是否安全
/// 判断轴运动是否安全
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
d45702e
...
@@ -116,7 +116,7 @@ namespace DeviceLibrary
...
@@ -116,7 +116,7 @@ namespace DeviceLibrary
}
}
if
(!
string
.
IsNullOrEmpty
(
saftylight
)
&&
IOManager
.
IOValue
(
saftylight
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
down
.
ToString
()).
Equals
(
IO_VALUE
.
LOW
))
if
(!
string
.
IsNullOrEmpty
(
saftylight
)
&&
IOManager
.
IOValue
(
saftylight
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
down
.
ToString
()).
Equals
(
IO_VALUE
.
LOW
))
{
{
moveInfo
.
log
(
"安全光栅
触发停止"
);
moveInfo
.
log
(
$
"{saftylight}
触发停止"
);
Pause
();
Pause
();
return
;
return
;
}
}
...
@@ -214,7 +214,7 @@ namespace DeviceLibrary
...
@@ -214,7 +214,7 @@ namespace DeviceLibrary
}
}
if
(!
string
.
IsNullOrEmpty
(
saftylight
)
&&
IOManager
.
IOValue
(
saftylight
).
Equals
(
IO_VALUE
.
LOW
))
if
(!
string
.
IsNullOrEmpty
(
saftylight
)
&&
IOManager
.
IOValue
(
saftylight
).
Equals
(
IO_VALUE
.
LOW
))
{
{
moveInfo
.
log
(
"安全光栅
触发停止"
);
moveInfo
.
log
(
$
"{saftylight}
触发停止"
);
Pause
();
Pause
();
return
;
return
;
}
}
...
@@ -275,7 +275,7 @@ namespace DeviceLibrary
...
@@ -275,7 +275,7 @@ namespace DeviceLibrary
}
}
public
void
Pause
()
public
void
Pause
()
{
{
if
(!
isDoorClose
())
//
if (!isDoorClose())
{
{
paused
=
true
;
paused
=
true
;
axisBean
.
SuddenStop
();
axisBean
.
SuddenStop
();
...
@@ -290,6 +290,10 @@ namespace DeviceLibrary
...
@@ -290,6 +290,10 @@ namespace DeviceLibrary
public
int
ResumeWaitTimeSec
=
0
;
public
int
ResumeWaitTimeSec
=
0
;
public
void
Resume
()
public
void
Resume
()
{
{
}
public
void
ResumeSingle
()
{
LastResumeTime
=
DateTime
.
Now
;
LastResumeTime
=
DateTime
.
Now
;
try
try
{
{
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
d45702e
...
@@ -124,8 +124,8 @@ namespace DeviceLibrary
...
@@ -124,8 +124,8 @@ namespace DeviceLibrary
{
{
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Work
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Work
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Home
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Home
);
MotorFlipDoorB
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_L_Home
,
IO_Type
.
ReelFlipDoor_L_Work
,
IO_Type
.
SafetyLightCurtains
,
null
,
new
AxisBean
(
Config
.
FlipDoor_L_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
,
0
,
"B翻转门"
);
MotorFlipDoorB
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_L_Home
,
IO_Type
.
ReelFlipDoor_L_Work
,
IO_Type
.
SafetyLightCurtains
,
null
,
new
AxisBean
(
Config
.
FlipDoor_L_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
,
0
,
"B翻转门"
);
MotorFlipDoorA
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_R_Home
,
IO_Type
.
ReelFlipDoor_R_Work
,
IO_Type
.
SafetyLightCurtains
,
null
,
new
AxisBean
(
Config
.
FlipDoor_R_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
,
0
,
"A翻转门"
);
MotorFlipDoorA
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_R_Home
,
IO_Type
.
ReelFlipDoor_R_Work
,
IO_Type
.
SafetyLightCurtains
,
null
,
new
AxisBean
(
Config
.
FlipDoor_R_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
,
0
,
"A翻转门"
);
MotorFlipDoorB
.
SlowAftPause
=
true
;
MotorFlipDoorB
.
SlowAftPause
=
true
;
MotorFlipDoorB
.
SlowAftPause
=
true
;
MotorFlipDoorB
.
SlowAftPause
=
true
;
LogUtil
.
info
(
"加载翻板门类型为:步进"
);
LogUtil
.
info
(
"加载翻板门类型为:步进"
);
...
@@ -143,7 +143,7 @@ namespace DeviceLibrary
...
@@ -143,7 +143,7 @@ namespace DeviceLibrary
var
sf
=
""
;
var
sf
=
""
;
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
sf
=
IO_Type
.
AGV_OnPosition
;
sf
=
IO_Type
.
AGV_OnPosition
;
StringDoor
=
new
LiftMonitor
(
IO_Type
.
StringDoor_Open
,
IO_Type
.
StringDoor_Close
,
sf
,
IO_Type
.
StringDoor_Axis_Break
,
new
AxisBean
(
Config
.
StringDoor_Axis
,
Name
),
Config
.
StringDoorLength
,
Config
.
StringDoorLength_speed
,
0
,
"折叠门"
);
StringDoor
=
new
LiftMonitor
(
IO_Type
.
StringDoor_Open
,
IO_Type
.
StringDoor_Close
,
sf
,
IO_Type
.
StringDoor_Axis_Break
,
new
AxisBean
(
Config
.
StringDoor_Axis
,
Name
),
Config
.
StringDoorLength
,
Config
.
StringDoorLength_speed
,
0
,
"折叠门"
);
StringDoor
.
DownOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_DownOverTimeMS"
,
0
);
StringDoor
.
DownOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_DownOverTimeMS"
,
0
);
StringDoor
.
UpOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_UpOverTimeMS"
,
0
);
StringDoor
.
UpOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_UpOverTimeMS"
,
0
);
StringDoor
.
ResumeWaitTimeSec
=
5
;
StringDoor
.
ResumeWaitTimeSec
=
5
;
...
@@ -151,17 +151,16 @@ namespace DeviceLibrary
...
@@ -151,17 +151,16 @@ namespace DeviceLibrary
}
}
else
else
LogUtil
.
info
(
"加载料串门类型为:气缸"
);
LogUtil
.
info
(
"加载料串门类型为:气缸"
);
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
{
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
AGV_OnPosition
);
}
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
{
{
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
LeftDoorClose_Check
);
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
LeftDoorClose_Check
);
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
RightDoorClose_Check
);
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
RightDoorClose_Check
);
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
BackDoorClose_Check
);
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
BackDoorClose_Check
);
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
{
RobotManage
.
Config
.
DIList
.
Remove
(
IO_Type
.
AGV_OnPosition
);
}
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
DoorSafe_Disable
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
DoorSafe_Disable
);
}
}
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_IO_HasX29"
,
true
))
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_IO_HasX29"
,
true
))
...
@@ -481,9 +480,11 @@ namespace DeviceLibrary
...
@@ -481,9 +480,11 @@ namespace DeviceLibrary
case
MoveStep
.
H13_HomeReset
:
case
MoveStep
.
H13_HomeReset
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H14_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H14_HomeReset
);
var
h
=
NGDoor_Tray_Test_Reel
;
var
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
}
else
if
(!
h
.
Value
)
if
(!
h
.
Value
)
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"传感器未检测到单料口料盘."
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"传感器未检测到单料口料盘."
),
MsgLevel
.
alarm
);
...
@@ -499,7 +500,7 @@ namespace DeviceLibrary
...
@@ -499,7 +500,7 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
}
else
else
if
(
h
.
Value
)
if
(
h
.
Value
)
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_higt_has_reel
,
"系统启动检测到有无信息料盘,等待取走单料口料盘"
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_higt_has_reel
,
"系统启动检测到有无信息料盘,等待取走单料口料盘"
),
MsgLevel
.
alarm
);
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
))
...
@@ -535,7 +536,8 @@ namespace DeviceLibrary
...
@@ -535,7 +536,8 @@ namespace DeviceLibrary
if
(!
h
.
HasValue
)
if
(!
h
.
HasValue
)
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
}
else
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
h
.
Value
)
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
h
.
Value
)
{
{
ResetMoveInfo
.
log
(
"NG口还是检测到料盘"
);
ResetMoveInfo
.
log
(
"NG口还是检测到料盘"
);
...
@@ -582,7 +584,7 @@ namespace DeviceLibrary
...
@@ -582,7 +584,7 @@ namespace DeviceLibrary
&&
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
&&
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
{
var
pos
=
BoxStorePosition
.
GetFixPos
(
Config
,
reelParam
);
var
pos
=
BoxStorePosition
.
GetFixPos
(
Config
,
reelParam
);
if
(
pos
!=
null
)
if
(
pos
!=
null
)
{
{
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
);
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
);
...
@@ -591,7 +593,7 @@ namespace DeviceLibrary
...
@@ -591,7 +593,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
RobotManage
.
ClearReelInFixPos
()
;
RobotManage
.
ClearReelInFixPos
();
}
}
}
}
runStatus
=
RunStatus
.
Running
;
runStatus
=
RunStatus
.
Running
;
...
@@ -617,6 +619,7 @@ namespace DeviceLibrary
...
@@ -617,6 +619,7 @@ namespace DeviceLibrary
public
bool
IgnoreGratingSignal
=
false
;
public
bool
IgnoreGratingSignal
=
false
;
bool
lastSafeCheckStatus
=
true
;
bool
lastSafeCheckStatus
=
true
;
bool
lastStringSafetyStatus
=
true
;
bool
SafeCheck
()
bool
SafeCheck
()
{
{
bool
ok
=
true
;
bool
ok
=
true
;
...
@@ -633,11 +636,19 @@ namespace DeviceLibrary
...
@@ -633,11 +636,19 @@ namespace DeviceLibrary
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
{
{
//IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW) &&
//IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW) &&
if
(
IOValue
(
IO_Type
.
AGV_OnPosition
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
LOW
)
)
if
(
IOValue
(
IO_Type
.
AGV_OnPosition
).
Equals
(
IO_VALUE
.
LOW
))
{
{
ok
=
false
;
DeviceSuddenStop
();
Msg
.
add
(
"料串门光栅被遮挡"
,
MsgLevel
.
warning
);
Msg
.
add
(
"料串门光栅被遮挡"
,
MsgLevel
.
warning
);
if
(
lastStringSafetyStatus
)
{
lastStringSafetyStatus
=
false
;
StringDoor
.
Pause
();
}
}
else
if
(!
lastStringSafetyStatus
)
{
StringDoor
.
ResumeSingle
();
lastStringSafetyStatus
=
true
;
}
}
}
}
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
if
(!
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论