Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 28bd9b47
由
刘韬
编写于
2023-04-10 09:19:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正料串重新上升顶升没有顶起的问题
1 个父辈
0d25c6ad
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
100 行增加
和
33 行删除
DLL/CodeLibrary.dll
DLL/ConfigHelper.dll
DeviceLibrary/DeviceLibrary/CodeManager.cs
DeviceLibrary/DeviceLibrary/LineRunMonitor.cs
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_ServerControl.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DLL/CodeLibrary.dll
查看文件 @
28bd9b4
此文件类型无法预览
DLL/ConfigHelper.dll
查看文件 @
28bd9b4
此文件类型无法预览
DeviceLibrary/DeviceLibrary/CodeManager.cs
查看文件 @
28bd9b4
...
@@ -247,8 +247,9 @@ namespace DeviceLibrary
...
@@ -247,8 +247,9 @@ namespace DeviceLibrary
return
codeList
;
return
codeList
;
}
}
static
bool
lastHasReel
=
false
;
static
bool
lastHasReel
=
false
;
public
static
bool
?
TestHasRight
=
null
;
[
HandleProcessCorruptedStateExceptions
]
[
HandleProcessCorruptedStateExceptions
]
public
static
bool
TestHasReel
(
string
cameraName
)
public
static
bool
?
TestHasReel
(
string
cameraName
)
{
{
int
retrytime
=
0
;
int
retrytime
=
0
;
retry
:
retry
:
...
@@ -261,9 +262,10 @@ namespace DeviceLibrary
...
@@ -261,9 +262,10 @@ namespace DeviceLibrary
if
(
bmp
==
null
)
if
(
bmp
==
null
)
{
{
if
(
retrytime
>
2
)
if
(
retrytime
>
2
)
return
true
;
return
null
;
retrytime
++;
retrytime
++;
LoadCamera
(
true
);
Camera
.
_cam
.
Close
(
cameraName
);
//LoadCamera(true);
LogUtil
.
info
(
$
"bitmap为空重试第{retrytime}次"
);
LogUtil
.
info
(
$
"bitmap为空重试第{retrytime}次"
);
Thread
.
Sleep
(
500
);
Thread
.
Sleep
(
500
);
...
@@ -314,9 +316,7 @@ namespace DeviceLibrary
...
@@ -314,9 +316,7 @@ namespace DeviceLibrary
}
}
}
}
b
.
UnlockBits
(
bd
);
b
.
UnlockBits
(
bd
);
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_debug"
,
false
))
SaveImageToFile
(
"test2"
,
cameraName
,
b
);
b
.
Dispose
();
double
calc
=
maskcout
/
(
double
)
totalcover
;
double
calc
=
maskcout
/
(
double
)
totalcover
;
logtxt
+=
$
" 检测到覆盖面积计数:maskcout:{maskcout}/{totalcover}={calc}<{threshold},result:{calc <= threshold}"
;
logtxt
+=
$
" 检测到覆盖面积计数:maskcout:{maskcout}/{totalcover}={calc}<{threshold},result:{calc <= threshold}"
;
bool
hasReel
=
calc
<=
threshold
;
bool
hasReel
=
calc
<=
threshold
;
...
@@ -324,17 +324,23 @@ namespace DeviceLibrary
...
@@ -324,17 +324,23 @@ namespace DeviceLibrary
lastHasReel
=
hasReel
;
lastHasReel
=
hasReel
;
}
else
if
(!
ConfigHelper
.
Config
.
Get
(
"CamTestReel_debug"
,
false
))
}
else
if
(!
ConfigHelper
.
Config
.
Get
(
"CamTestReel_debug"
,
false
))
logtxt
=
""
;
logtxt
=
""
;
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_debug"
,
false
)
||
(
TestHasRight
.
HasValue
&&
TestHasRight
.
Value
!=
hasReel
))
SaveImageToFile
(
"test2"
,
cameraName
,
b
);
b
.
Dispose
();
TestHasRight
=
null
;
return
hasReel
;
return
hasReel
;
}
}
catch
(
AccessViolationException
e
)
catch
(
AccessViolationException
e
)
{
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
Camera
.
_cam
.
Close
(
cameraName
);
// GC.Collect()
;
return
null
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
());
return
null
;
}
}
finally
finally
{
{
...
@@ -343,7 +349,6 @@ namespace DeviceLibrary
...
@@ -343,7 +349,6 @@ namespace DeviceLibrary
if
(!
string
.
IsNullOrEmpty
(
logtxt
))
if
(!
string
.
IsNullOrEmpty
(
logtxt
))
LogUtil
.
error
(
logtxt
);
LogUtil
.
error
(
logtxt
);
}
}
return
true
;
}
}
/// <summary>
/// <summary>
///
///
...
...
DeviceLibrary/DeviceLibrary/LineRunMonitor.cs
查看文件 @
28bd9b4
...
@@ -34,6 +34,8 @@ namespace DeviceLibrary
...
@@ -34,6 +34,8 @@ namespace DeviceLibrary
lineTimer
.
Start
();
lineTimer
.
Start
();
GC
.
KeepAlive
(
lineTimer
);
GC
.
KeepAlive
(
lineTimer
);
}
}
if
(!
lineTimer
.
Enabled
)
lineTimer
.
Enabled
=
true
;
}
}
private
void
LineTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
private
void
LineTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
...
@@ -149,8 +151,12 @@ namespace DeviceLibrary
...
@@ -149,8 +151,12 @@ namespace DeviceLibrary
LogUtil
.
info
(
Name
+
$
" 线体管理器 {id},{parentname} 请求立刻停止线体."
);
LogUtil
.
info
(
Name
+
$
" 线体管理器 {id},{parentname} 请求立刻停止线体."
);
}
}
}
}
if
(!
canStopLine
(
out
string
msg
))
if
(!
canStopLine
(
out
string
msg
))
LogUtil
.
info
(
Name
+
$
" {Name}"
);
LogUtil
.
info
(
Name
+
$
" {Name}"
);
if
(!
lineTimer
.
Enabled
)
lineTimer
.
Enabled
=
true
;
// IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
// IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
}
}
bool
canStopLine
(
out
string
msg
)
bool
canStopLine
(
out
string
msg
)
...
...
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
查看文件 @
28bd9b4
...
@@ -19,6 +19,7 @@ namespace DeviceLibrary
...
@@ -19,6 +19,7 @@ namespace DeviceLibrary
}
}
void
Reset_BTN
()
{
void
Reset_BTN
()
{
LogUtil
.
info
(
"按下复位按钮"
);
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press
,
"按下复位按钮."
),
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press
,
"按下复位按钮."
),
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
...
@@ -26,9 +27,10 @@ namespace DeviceLibrary
...
@@ -26,9 +27,10 @@ namespace DeviceLibrary
else
else
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press_with_sudden
,
"急停未解除,按下复位按钮尝试复位安全继电器."
),
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press_with_sudden
,
"急停未解除,按下复位按钮尝试复位安全继电器."
),
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
return
;
}
}
LogUtil
.
info
(
"按下复位按钮"
);
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
//暂停时按下reaet按钮
//暂停时按下reaet按钮
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
28bd9b4
...
@@ -428,12 +428,12 @@ namespace DeviceLibrary
...
@@ -428,12 +428,12 @@ namespace DeviceLibrary
ResetMoveInfo
.
log
(
"旋转轴,升降轴,到P1待机点"
);
ResetMoveInfo
.
log
(
"旋转轴,升降轴,到P1待机点"
);
Middle_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_speed
);
Middle_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_speed
);
UpDown_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
UpDown_P1
,
Config
.
UpDown_P1_speed
);
UpDown_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
UpDown_P1
,
Config
.
UpDown_P1_speed
);
Batch_Axis
.
AbsMove
(
ResetMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
break
;
break
;
case
MoveStep
.
H06_HomeReset
:
case
MoveStep
.
H06_HomeReset
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H07_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H07_HomeReset
);
ResetMoveInfo
.
log
(
"压紧轴回原"
);
ResetMoveInfo
.
log
(
"压紧轴回原"
);
Comp_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
Comp_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
break
;
break
;
case
MoveStep
.
H07_HomeReset
:
case
MoveStep
.
H07_HomeReset
:
if
(
GetWidth
()
>
0
)
if
(
GetWidth
()
>
0
)
...
@@ -442,7 +442,7 @@ namespace DeviceLibrary
...
@@ -442,7 +442,7 @@ namespace DeviceLibrary
ResetMoveInfo
.
log
(
"夹爪上有料盘,送到NG口"
);
ResetMoveInfo
.
log
(
"夹爪上有料盘,送到NG口"
);
}
}
else
if
(
IOValue
(
IO_Type
.
ReelFlipDoor_L_Home
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
ReelFlipDoor_R_Home
).
Equals
(
IO_VALUE
.
LOW
)
&&
NGDoor_Tray_Test_Reel
)
else
if
(
IOValue
(
IO_Type
.
ReelFlipDoor_L_Home
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
ReelFlipDoor_R_Home
).
Equals
(
IO_VALUE
.
LOW
)
&&
NGDoor_Tray_Test_Reel
.
HasValue
&&
NGDoor_Tray_Test_Reel
.
Value
)
{
{
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H12_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H12_HomeReset
);
ResetMoveInfo
.
log
(
"反转托盘上有料盘,送到NG口"
);
ResetMoveInfo
.
log
(
"反转托盘上有料盘,送到NG口"
);
...
@@ -480,7 +480,11 @@ namespace DeviceLibrary
...
@@ -480,7 +480,11 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
H13_HomeReset
:
case
MoveStep
.
H13_HomeReset
:
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H14_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H14_HomeReset
);
if
(!
NGDoor_Tray_Test_Reel
)
var
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
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
);
RobotManage
.
UserPause
(
crc
.
GetString
(
"x29_low_no_reel"
,
"传感器未检测到单料口料盘."
));
RobotManage
.
UserPause
(
crc
.
GetString
(
"x29_low_no_reel"
,
"传感器未检测到单料口料盘."
));
...
@@ -489,7 +493,13 @@ namespace DeviceLibrary
...
@@ -489,7 +493,13 @@ namespace DeviceLibrary
SingleDoor
.
ToHigh
(
ResetMoveInfo
);
SingleDoor
.
ToHigh
(
ResetMoveInfo
);
break
;
break
;
case
MoveStep
.
H14_HomeReset
:
case
MoveStep
.
H14_HomeReset
:
if
(
NGDoor_Tray_Test_Reel
)
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
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
))
...
@@ -521,12 +531,17 @@ namespace DeviceLibrary
...
@@ -521,12 +531,17 @@ namespace DeviceLibrary
}
}
break
;
break
;
case
MoveStep
.
H16_HomeReset
:
case
MoveStep
.
H16_HomeReset
:
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
NGDoor_Tray_Test_Reel
)
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
h
.
Value
)
{
{
ResetMoveInfo
.
log
(
"NG口还是检测到料盘"
);
ResetMoveInfo
.
log
(
"NG口还是检测到料盘"
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H14_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
H14_HomeReset
);
}
}
else
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
!
NGDoor_Tray_Test_Reel
)
else
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
!
h
.
Value
)
{
{
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
HEND_HomeReset
);
ResetMoveInfo
.
NextMoveStep
(
MoveStep
.
HEND_HomeReset
);
ResetMoveInfo
.
log
(
"关门NG口门"
);
ResetMoveInfo
.
log
(
"关门NG口门"
);
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
28bd9b4
...
@@ -244,20 +244,36 @@ namespace DeviceLibrary
...
@@ -244,20 +244,36 @@ namespace DeviceLibrary
ClampMoveInfo
.
log
(
"打开单料口门"
);
ClampMoveInfo
.
log
(
"打开单料口门"
);
//CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
//CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
SingleDoor
.
ToHigh
(
null
);
SingleDoor
.
ToHigh
(
null
);
CodeManager
.
TestHasRight
=
true
;
break
;
break
;
case
MoveStep
.
NGOUT_02
:
case
MoveStep
.
NGOUT_02
:
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_03
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_03
);
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
)
&&
!
NGDoor_Tray_Test_Reel
)
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
))
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"传感器X29未检测到单料口料盘."
),
MsgLevel
.
alarm
);
var
h1
=
NGDoor_Tray_Test_Reel
;
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
if
(!
h1
.
HasValue
)
RobotManage
.
UserPause
(
crc
.
GetString
(
"Res0005"
,
"传感器X29未检测到单料口料盘"
));
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
if
(!
h1
.
Value
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"传感器X29未检测到单料口料盘."
),
MsgLevel
.
alarm
);
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
RobotManage
.
UserPause
(
crc
.
GetString
(
"Res0005"
,
"传感器X29未检测到单料口料盘"
));
}
}
}
SingleDoor
.
ToHigh
(
ClampMoveInfo
);
SingleDoor
.
ToHigh
(
ClampMoveInfo
);
break
;
break
;
case
MoveStep
.
NGOUT_03
:
case
MoveStep
.
NGOUT_03
:
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
if
(
NGDoor_Tray_Test_Reel
)
var
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
if
(
h
.
Value
)
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
please_take_ngdoor_reel
,
"等待取走单料口料盘"
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
L
.
please_take_ngdoor_reel
,
"等待取走单料口料盘"
),
MsgLevel
.
alarm
);
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
))
...
@@ -290,13 +306,13 @@ namespace DeviceLibrary
...
@@ -290,13 +306,13 @@ namespace DeviceLibrary
}
}
break
;
break
;
case
MoveStep
.
NGOUT_05
:
case
MoveStep
.
NGOUT_05
:
//if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH) && NGDoor_Tray_Test_Reel)
h
=
NGDoor_Tray_Test_Reel
;
//{
if
(!
h
.
HasValue
)
// ClampMoveInfo.log("NG口还是检测到料盘");
{
// ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03
);
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
//
}
}
//else
else
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)&&
!
NGDoor_Tray_Test_Reel
)
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)&&
!
h
.
Value
)
{
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_06
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_06
);
ClampMoveInfo
.
log
(
"关门NG口门"
);
ClampMoveInfo
.
log
(
"关门NG口门"
);
...
@@ -332,7 +348,14 @@ namespace DeviceLibrary
...
@@ -332,7 +348,14 @@ namespace DeviceLibrary
SingleDoor
.
ToLow
(
ClampMoveInfo
);
SingleDoor
.
ToLow
(
ClampMoveInfo
);
ClampMoveInfo
.
MoveParam
.
PlateW
=
7
;
ClampMoveInfo
.
MoveParam
.
PlateW
=
7
;
ClampMoveInfo
.
MoveParam
.
PlateH
=
100
;
ClampMoveInfo
.
MoveParam
.
PlateH
=
100
;
if
(!
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
)
||
NGDoor_Tray_Test_Reel
)
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
if
(!
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
)
||
h
.
Value
)
{
}
{
}
else
{
else
{
ClampMoveInfo
.
log
(
"单盘入库没有检测到放入料盘"
);
ClampMoveInfo
.
log
(
"单盘入库没有检测到放入料盘"
);
...
@@ -344,7 +367,7 @@ namespace DeviceLibrary
...
@@ -344,7 +367,7 @@ namespace DeviceLibrary
break
;
break
;
}
}
}
}
bool
NGDoor_Tray_Test_Reel
bool
?
NGDoor_Tray_Test_Reel
{
{
get
get
{
{
...
...
DeviceLibrary/theMachine/MainMachine_ServerControl.cs
查看文件 @
28bd9b4
...
@@ -53,14 +53,20 @@ namespace DeviceLibrary
...
@@ -53,14 +53,20 @@ namespace DeviceLibrary
}
}
else
else
{
{
if
(
NGDoor_Tray_Test_Reel
)
var
h
=
NGDoor_Tray_Test_Reel
;
if
(!
h
.
HasValue
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
x29_low_no_reel
,
"检测相机打开失败."
),
MsgLevel
.
alarm
);
}
else
if
(
h
.
Value
)
{
{
RobotManage
.
UserPause
(
crc
.
GetString
(
"please_take_ngdoor_reel"
,
"等待取走单口料盘"
));
RobotManage
.
UserPause
(
crc
.
GetString
(
"please_take_ngdoor_reel"
,
"等待取走单口料盘"
));
return
crc
.
GetString
(
"please_take_ngdoor_reel"
,
"等待取走单口料盘"
);
return
crc
.
GetString
(
"please_take_ngdoor_reel"
,
"等待取走单口料盘"
);
}
}
else
else
{
{
RobotManage
.
UserPause
(
""
,
false
);
RobotManage
.
UserPause
(
""
,
false
);
}
}
}
}
LogUtil
.
info
(
$
"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}"
);
LogUtil
.
info
(
$
"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}"
);
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
28bd9b4
...
@@ -67,6 +67,7 @@ namespace DeviceLibrary
...
@@ -67,6 +67,7 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
HIGH
);
newreel
=
true
;
newreel
=
true
;
return
true
;
return
true
;
}
}
...
@@ -93,9 +94,18 @@ namespace DeviceLibrary
...
@@ -93,9 +94,18 @@ namespace DeviceLibrary
switch
(
StringMoveInfo
.
MoveStep
)
switch
(
StringMoveInfo
.
MoveStep
)
{
{
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
if
(
StringMoveInfo
.
IsTimeOut
(
3
)
&&
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
if
(!
Batch_Axis
.
IsInPosition
(
Config
.
Batch_P1
))
{
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
}
}
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01
);
Batch_Axis
.
SuddenStop
();
StringMoveInfo
.
log
(
$
"检测到有料串"
);
StringMoveInfo
.
log
(
$
"检测到有料串"
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
}
}
...
@@ -198,7 +208,7 @@ namespace DeviceLibrary
...
@@ -198,7 +208,7 @@ namespace DeviceLibrary
{
{
StringMoveInfo
.
log
(
$
"料串检测为空"
);
StringMoveInfo
.
log
(
$
"料串检测为空"
);
StringState
=
StringStateE
.
OutStore
;
StringState
=
StringStateE
.
OutStore
;
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
)
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
&&
ServerCM
.
queueTaskCount
<=
0
&&
boxTransport
.
IsComplateOrFree
)
{
{
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
StringMoveInfo
.
log
(
$
"当前空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
log
(
$
"当前空料串, 并且没有出库任务, 料串下降待机"
);
...
@@ -287,7 +297,7 @@ namespace DeviceLibrary
...
@@ -287,7 +297,7 @@ namespace DeviceLibrary
case
MoveStep
.
StringReadyPut
:
case
MoveStep
.
StringReadyPut
:
Msg
.
add
(
crc
.
GetString
(
L
.
string_ready_for_put
,
"料串放料准备就绪"
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
string_ready_for_put
,
"料串放料准备就绪"
),
MsgLevel
.
info
);
StringMoveInfo
.
log
(
$
"料串放料准备就绪"
);
StringMoveInfo
.
log
(
$
"料串放料准备就绪"
);
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
ServerCM
.
queueTaskCount
=
=
0
&&
boxTransport
.
IsComplateOrFree
)
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
ServerCM
.
queueTaskCount
<
=
0
&&
boxTransport
.
IsComplateOrFree
)
{
{
StringMoveInfo
.
log
(
$
"当前服务器反馈没有出库任务, 料串下降待机"
);
StringMoveInfo
.
log
(
$
"当前服务器反馈没有出库任务, 料串下降待机"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论