Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c58170bf
由
LN
编写于
2024-12-03 19:39:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出库未检测到物料忽略时屏蔽库位
1 个父辈
43745a9a
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
66 行增加
和
1 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
TheMachine/ledColor/0625/gr.bmp
TheMachine/ledColor/0625/ye.bmp
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
c58170b
...
@@ -791,7 +791,61 @@ namespace DeviceLibrary
...
@@ -791,7 +791,61 @@ namespace DeviceLibrary
return
path
;
return
path
;
}
}
/// <summary>
/// 屏蔽库位接口
/// </summary>
static
string
Addr_disabledPos
=
"/service/store/disabledPos"
;
/// <summary>
/// 屏蔽库位
/// </summary>
/// <param name="deviceName"></param>
/// <param name="barcode"></param>
/// <param name="poid"></param>
/// <returns></returns>
public
static
string
DisablePos
(
string
deviceName
,
string
barcode
,
string
poid
,
string
reason
=
""
)
{
string
msg
=
""
;
try
{
if
(
String
.
IsNullOrEmpty
(
barcode
))
{
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>
{
{
"posId"
,
poid
},
//posId:库位号
{
"barcode"
,
barcode
},
// barcode = 料盘的条码
{
"msg"
,
reason
}
};
string
server
=
GetAddr
(
Addr_cancelPutInTask
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
,
3000
);
LogUtil
.
info
(
deviceName
+
"DisablePos "
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
" 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
ResultData
data
=
JsonHelper
.
DeserializeJsonToObject
<
ResultData
>(
resultStr
);
if
(
data
==
null
)
{
msg
=
deviceName
+
"DisablePos【 "
+
barcode
+
"】【"
+
poid
+
"】没有收到服务器反馈"
;
}
else
if
(
data
.
code
.
Equals
(
0
).
Equals
(
false
))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg
=
deviceName
+
" DisablePos【 "
+
barcode
+
"】【"
+
poid
+
"】:"
+
"["
+
data
.
code
+
"]"
+
data
.
msg
;
}
if
(!
msg
.
Equals
(
""
))
{
LogUtil
.
error
(
msg
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
msg
;
}
}
}
public
class
ResultData
public
class
ResultData
{
{
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
c58170b
...
@@ -106,6 +106,7 @@ namespace DeviceLibrary
...
@@ -106,6 +106,7 @@ namespace DeviceLibrary
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS06
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS06
);
return
true
;
return
true
;
}
}
private
bool
isWaitIgnoreX09
=
false
;
public
bool
Process
()
public
bool
Process
()
{
{
if
(
mainMachine
.
CheckWait
(
MoveInfo
))
if
(
mainMachine
.
CheckWait
(
MoveInfo
))
...
@@ -175,19 +176,29 @@ namespace DeviceLibrary
...
@@ -175,19 +176,29 @@ namespace DeviceLibrary
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS09
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS09
);
InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOut_P1
,
Config
.
InOut_P1_speed
);
InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOut_P1
,
Config
.
InOut_P1_speed
);
IgnoreX09
=
false
;
IgnoreX09
=
false
;
MoveInfo
.
log
(
$
"{storeMoveType}:进出轴去待机点P1【{Config.InOut_P1}】【{Config.InOut_P1_speed}】"
);
isWaitIgnoreX09
=
false
;
MoveInfo
.
log
(
$
"{storeMoveType}:进出轴去待机点P1【{Config.InOut_P1}】【{Config.InOut_P1_speed}】,设置 isWaitIgnoreX09="
+
isWaitIgnoreX09
);
break
;
break
;
case
MoveStep
.
StoreTS09
:
case
MoveStep
.
StoreTS09
:
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
From
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
FromOut
));
RobotManage
.
CameraA
.
CameraGrabOne
(
RobotManage
.
CameraA
.
GetFixtureStateFilename
(
From
.
posid
,
WareCode
,
storeMoveType
,
FixtureState
.
FromOut
));
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
if
(!
IgnoreX09
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
{
isWaitIgnoreX09
=
true
;
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_not_detect_material
,
"取料后料叉X30没有检测到有物料无法继续,请检查."
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_not_detect_material
,
"取料后料叉X30没有检测到有物料无法继续,请检查."
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
//RobotManage.UserPause(crc.GetString(L.out_store_not_detect_material, "取料前料叉X30没有检测到有物料无法继续,请检查."));
//RobotManage.UserPause(crc.GetString(L.out_store_not_detect_material, "取料前料叉X30没有检测到有物料无法继续,请检查."));
}
}
else
else
{
{
if
(
isWaitIgnoreX09
&&
IgnoreX09
&&
storeMoveType
.
Equals
(
StoreMoveType
.
OutStore
))
{
//屏蔽库位
string
pos
=
From
.
posid
;
MoveInfo
.
log
(
$
"{storeMoveType}:取到料后未检测到物料,点忽略信号继续,需要屏蔽库位:"
+
pos
);
ServerCommunication
.
DisablePos
(
Setting_Init
.
App_CID
,
WareCode
,
pos
,
"IgnoreX09"
);
}
Msg
.
add
(
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
Msg
.
add
(
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
IgnoreX09
=
false
;
IgnoreX09
=
false
;
isWaitIgnoreX09
=
false
;
if
(
To
.
posid
==
BoxStorePosition
.
strings
&&
Setting_Init
.
Enable_Fixpos
&&
Fix
!=
null
)
if
(
To
.
posid
==
BoxStorePosition
.
strings
&&
Setting_Init
.
Enable_Fixpos
&&
Fix
!=
null
)
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX01
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX01
);
else
else
...
...
TheMachine/ledColor/0625/gr.bmp
0 → 100644
查看文件 @
c58170b
此文件类型无法预览
TheMachine/ledColor/0625/ye.bmp
0 → 100644
查看文件 @
c58170b
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论