Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d3f8124f
由
张东亮
编写于
2024-03-26 16:19:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
问题修复
1 个父辈
fc530fa1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
67 行增加
和
58 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
TheMachine/Program.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
d3f8124
...
...
@@ -47,22 +47,22 @@ namespace DeviceLibrary
{
//if (!Monitor.TryEnter(serverConnectTimer))
//{
try
{
if
(!
server
.
StartsWith
(
"http"
))
return
;
if
(!
RobotManage
.
isRunning
)
ProcessMsg
(
Msg
.
msg
);
SendLineStatus
();
}
catch
(
Exception
ex
)
{
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
}
finally
{
//Monitor.Exit(serverConnectTimer);
}
try
{
if
(!
server
.
StartsWith
(
"http"
))
return
;
if
(!
RobotManage
.
isRunning
)
ProcessMsg
(
Msg
.
msg
);
SendLineStatus
();
}
catch
(
Exception
ex
)
{
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
}
finally
{
//Monitor.Exit(serverConnectTimer);
}
//}
}
...
...
@@ -148,7 +148,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
if
(
RobotManage
.
InoutDebugMode
)
return
true
;
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
5000
,
true
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
5000
,
true
);
if
(
resultOperation
==
null
)
{
...
...
@@ -484,10 +484,10 @@ namespace DeviceLibrary
map
[
ParamDefine
.
singleReelIn
]
=
ParamDefine
.
enable
;
}
}
map
[
ParamDefine
.
SendEmptyShelf
]=
ParamDefine
.
disable
;
map
[
ParamDefine
.
SendFullShelf
]
=
ParamDefine
.
disable
;
map
[
ParamDefine
.
NeedEmptySHelf
]=
ParamDefine
.
disable
;
map
[
ParamDefine
.
NeedFullShelf
]=
ParamDefine
.
disable
;
map
[
ParamDefine
.
SendEmptyShelf
]
=
ParamDefine
.
disable
;
map
[
ParamDefine
.
SendFullShelf
]
=
ParamDefine
.
disable
;
map
[
ParamDefine
.
NeedEmptySHelf
]
=
ParamDefine
.
disable
;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
disable
;
if
(
RobotManage
.
mainMachine
?.
StringState
==
MainMachine
.
StringStateE
.
None
)
{
//map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable;
...
...
@@ -507,7 +507,7 @@ namespace DeviceLibrary
return
map
;
}
public
Dictionary
<
string
,
string
>
GetAgvBtnStatus
()
public
Dictionary
<
string
,
string
>
GetAgvBtnStatus
()
{
//mimo呼叫agv按钮
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
...
...
@@ -669,7 +669,7 @@ namespace DeviceLibrary
}
else
{
if
(
plateH
==
0
||
plateW
==
0
)
if
(
plateH
==
0
||
plateW
==
0
)
{
plateW
=
position
.
BagWidth
;
plateH
=
position
.
BagHigh
;
...
...
@@ -696,14 +696,16 @@ namespace DeviceLibrary
/// <param name="deviceName"></param>
/// <param name="barcode"></param>
/// <returns></returns>
public
string
cancelPutInTask
(
string
deviceName
,
string
barcode
)
public
bool
cancelPutInTask
(
string
deviceName
,
string
barcode
,
out
string
msg
)
{
string
msg
=
""
;
msg
=
""
;
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"barcode"
,
barcode
);
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>
{
{
"barcode"
,
barcode
}
};
string
server
=
GetAddr
(
Addr_cancelPutInTask
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
...
...
@@ -714,20 +716,26 @@ namespace DeviceLibrary
if
(
data
==
null
)
{
return
msg
=
deviceName
+
" cancelPutInTask【 "
+
barcode
+
"】 没有收到服务器反馈"
;
msg
=
deviceName
+
" cancelPutInTask【 "
+
barcode
+
"】 没有收到服务器反馈"
;
return
false
;
}
else
if
(
data
.
code
.
Equals
(
0
).
Equals
(
false
)
)
else
if
(
data
.
code
.
Equals
(
0
).
Equals
(
true
)
)
{
return
msg
=
deviceName
+
" cancelPutInTask【 "
+
barcode
+
"】 :"
+
data
.
msg
;
return
true
;
}
return
""
;
else
if
(
data
.
code
.
Equals
(
2002
).
Equals
(
true
)||
data
.
code
.
Equals
(
2003
).
Equals
(
true
))
{
msg
=
deviceName
+
" cancelPutInTask【 "
+
barcode
+
"】 :"
+
data
.
msg
;
return
true
;
}
msg
=
deviceName
+
" cancelPutInTask【 "
+
barcode
+
"】 :"
+
data
.
msg
;
return
false
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
}
return
msg
;
return
false
;
}
private
static
string
GetAddr
(
string
addr
,
Dictionary
<
string
,
string
>
paramsMap
)
{
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
d3f8124
...
...
@@ -456,14 +456,14 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
StoreTS14
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS15
);
//
if (Common.IsInstore(storeMoveType) && !(mainMachine?.StoreMoveInfo?.MoveParam.IsNg ?? false))
//
{
//
if (!mainMachine.ServerCM.SendStoreState(mainMachine?.StoreMoveInfo?.MoveParam?.PosID, StoreStatus.InStoreEnd))
//
{
//
Msg.add(crc.GetString("Res0008", "服务器连接异常"), MsgLevel.warning);
//
return false;
//
}
//
}
if
(
Common
.
IsInstore
(
storeMoveType
)
&&
!(
mainMachine
?.
StoreMoveInfo
?.
MoveParam
.
IsNg
??
false
))
{
if
(!
mainMachine
.
ServerCM
.
SendStoreState
(
mainMachine
?.
StoreMoveInfo
?.
MoveParam
?.
PosID
,
StoreStatus
.
InStoreEnd
))
{
Msg
.
add
(
crc
.
GetString
(
"Res0008"
,
"服务器连接异常"
),
MsgLevel
.
warning
);
return
false
;
}
}
InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOut_P1
,
Config
.
InOut_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:进出轴去待机点P1[{Config.InOut_P1}]"
);
break
;
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
d3f8124
...
...
@@ -40,21 +40,21 @@ namespace DeviceLibrary
/// <param name="reason"></param>
public
void
DisableInstorePos
(
string
reason
=
"入库中,放料前急停屏蔽库位"
)
{
try
{
if
(
boxTransport
!=
null
)
{
if
(
boxTransport
.
IsInstore
)
//&& !boxTransport.IsPutOnOut
{
ServerCommunication
.
DisablePos
(
Name
,
StoreMoveInfo
.
MoveParam
?.
WareCode
,
StoreMoveInfo
.
MoveParam
?.
PosID
,
reason
);
}
}
//
try
//
{
//
if (boxTransport != null)
//
{
//
if (boxTransport.IsInstore)//&& !boxTransport.IsPutOnOut
//
{
//
ServerCommunication.DisablePos(Name, StoreMoveInfo.MoveParam?.WareCode, StoreMoveInfo.MoveParam?.PosID, reason);
//
}
//
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
$
"DisableInstorePos error"
,
e
);
}
//
}
//
catch (Exception e)
//
{
//
LogUtil.error($"DisableInstorePos error", e);
//
}
}
void
StoreProcess
()
{
...
...
@@ -191,13 +191,13 @@ namespace DeviceLibrary
}
break
;
case
MoveStep
.
StoreInNG_01
:
string
msg
=
ServerCM
.
cancelPutInTask
(
Name
,
StoreMoveInfo
.
MoveParam
.
WareCode
);
if
(
string
.
IsNullOrEmpty
(
msg
)
)
bool
rtn
=
ServerCM
.
cancelPutInTask
(
Name
,
StoreMoveInfo
.
MoveParam
.
WareCode
,
out
string
msg
);
if
(
rtn
)
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreInNG_02
);
CloseFlipDoor
(
StoreMoveInfo
);
CodeManager
.
TestHasRight
=
true
;
StoreMoveInfo
.
log
(
$
"取消[{StoreMoveInfo.MoveParam.WareCode}]入库任务"
);
StoreMoveInfo
.
log
(
$
"取消[{StoreMoveInfo.MoveParam.WareCode}]入库任务
:{msg}
"
);
}
break
;
case
MoveStep
.
StoreInNG_02
:
...
...
TheMachine/Program.cs
查看文件 @
d3f8124
...
...
@@ -23,6 +23,7 @@ namespace TheMachine
[
STAThread
]
static
void
Main
()
{
Config
.
LoadMyConfig
(
new
Setting_Init
().
GetType
());
//ConfigHelper.Config.Set("CamTestReel_debug", true);
//CodeManager.TestHasReel("", out string a, out string b);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论