Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c8751624
由
刘韬
编写于
2023-03-09 14:17:31 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
1
2 个父辈
d963e77d
31e61c1c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
50 行增加
和
39 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_ServerControl.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
c875162
...
...
@@ -13,7 +13,7 @@ namespace DeviceLibrary
{
partial
class
ServerCommunication
{
volatile
StoreStatus
_storeStatus
=
StoreStatus
.
Debugging
;
volatile
StoreStatus
_storeStatus
=
StoreStatus
.
None
;
public
StoreStatus
storeStatus
{
get
=>
_storeStatus
;
...
...
@@ -45,41 +45,34 @@ namespace DeviceLibrary
int
lockerrtime
=
0
;
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
//if (!Monitor.TryEnter(serverConnectTimer))
//{
// LogUtil.error("ServerConnectTimer_Elapsed locked");
// lockerrtime++;
// if (lockerrtime > 3)
// {
// lockerrtime = 0;
// Monitor.Exit(serverConnectTimer);
// }
// return;
//}
try
if
(!
Monitor
.
TryEnter
(
serverConnectTimer
))
{
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
);
}
}
}
public
void
StartConnectServer
()
{
//
serverConnectTimer.Enabled = true;
serverConnectTimer
.
Enabled
=
true
;
}
public
void
StopConnectServer
()
{
//
serverConnectTimer.Enabled = false;
serverConnectTimer
.
Enabled
=
false
;
}
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
...
...
@@ -443,14 +436,14 @@ namespace DeviceLibrary
return
map
;
if
(
//
RobotManage.mainMachine.IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH) &&
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
)
&&
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
||
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
Wait
))
{
//map.Add(ParamDefine.doorStatus, "料串门关闭");
map
[
ParamDefine
.
openLock
]
=
ParamDefine
.
enable
;
}
//else//
if (RobotManage.mainMachine.IOValue(IO_Type.StringDoor_Open).Equals(IO_VALUE.HIGH))
else
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
StringDoor_Open
).
Equals
(
IO_VALUE
.
HIGH
))
{
map
[
ParamDefine
.
closeLock
]
=
ParamDefine
.
enable
;
//map.Add(ParamDefine.doorStatus, "料串门打开");
...
...
@@ -468,13 +461,13 @@ 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
.
Add
(
ParamDefine
.
SendEmptyShelf
,
ParamDefine
.
disable
)
;
map
.
Add
(
ParamDefine
.
SendFullShelf
,
ParamDefine
.
disable
)
;
map
.
Add
(
ParamDefine
.
NeedEmptySHelf
,
ParamDefine
.
disable
)
;
map
.
Add
(
ParamDefine
.
NeedFullShelf
,
ParamDefine
.
disable
)
;
if
(
RobotManage
.
mainMachine
?.
StringState
==
MainMachine
.
StringStateE
.
None
)
{
map
[
ParamDefine
.
NeedEmptySHelf
]
=
ParamDefine
.
enable
;
//
map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
enable
;
}
if
(
RobotManage
.
mainMachine
?.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
c875162
...
...
@@ -311,8 +311,8 @@ namespace DeviceLibrary
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
if
(!
UserPause
)
Msg
.
clear
();
else
currnetstoreStatus
=
StoreStatus
.
Debugging
;
//
else
//
currnetstoreStatus = StoreStatus.Debugging;
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
ServerCM
.
storeStatus
=
currnetstoreStatus
;
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
c875162
...
...
@@ -296,7 +296,7 @@ namespace DeviceLibrary
// ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03);
//}
//else
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
)
&&
!
NGDoor_Tray_Test_Reel
)
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_06
);
ClampMoveInfo
.
log
(
"关门NG口门"
);
...
...
DeviceLibrary/theMachine/MainMachine_ServerControl.cs
查看文件 @
c875162
...
...
@@ -51,6 +51,18 @@ namespace DeviceLibrary
ClampMoveInfo
.
NewMove
(
MoveStep
.
SingleInRun
);
return
crc
.
GetString
(
L
.
close_singledoor
,
"关闭单料门"
);
}
else
{
if
(
NGDoor_Tray_Test_Reel
)
{
RobotManage
.
UserPause
(
crc
.
GetString
(
"please_take_ngdoor_reel"
,
"等待取走单口料盘"
));
return
crc
.
GetString
(
"please_take_ngdoor_reel"
,
"等待取走单口料盘"
);
}
else
{
RobotManage
.
UserPause
(
""
,
false
);
}
}
LogUtil
.
info
(
$
"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}"
);
return
crc
.
GetString
(
L
.
not_in_single_prosses
,
"当前没有在等待单盘入库:"
)+
ClampMoveInfo
.
MoveStep
;
}
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
c875162
...
...
@@ -134,6 +134,8 @@ namespace DeviceLibrary
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02a
);
StringMoveInfo
.
log
(
$
"顶起料串固定顶升"
);
//if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
// StringDoorClose(StringMoveInfo);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
HIGH
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
}
...
...
@@ -395,7 +397,11 @@ namespace DeviceLibrary
case
MoveStep
.
StringOut_Released
:
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
if
(
StringState
==
StringStateE
.
Full
)
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0427
{
//if (ConfigHelper.Config.Get("OpenStringDoorAfterOutStoreEnd", true))
// StringDoorOpen(StringMoveInfo);
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0427
}
else
Msg
.
add
(
crc
.
GetString
(
L
.
wait_string_take
,
"等待料串被取走"
),
MsgLevel
.
warning
);
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
))
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论