Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b4f34238
由
张东亮
编写于
2023-02-22 14:37:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
0a82a1e2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
28 行增加
和
33 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
b4f3423
...
@@ -45,41 +45,34 @@ namespace DeviceLibrary
...
@@ -45,41 +45,34 @@ namespace DeviceLibrary
int
lockerrtime
=
0
;
int
lockerrtime
=
0
;
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
//if (!Monitor.TryEnter(serverConnectTimer))
if
(!
Monitor
.
TryEnter
(
serverConnectTimer
))
//{
// LogUtil.error("ServerConnectTimer_Elapsed locked");
// lockerrtime++;
// if (lockerrtime > 3)
// {
// lockerrtime = 0;
// Monitor.Exit(serverConnectTimer);
// }
// return;
//}
try
{
{
if
(!
server
.
StartsWith
(
"http"
))
try
return
;
{
if
(!
RobotManage
.
isRunning
)
if
(!
server
.
StartsWith
(
"http"
))
ProcessMsg
(
Msg
.
msg
);
return
;
SendLineStatus
();
if
(!
RobotManage
.
isRunning
)
}
ProcessMsg
(
Msg
.
msg
);
catch
(
Exception
ex
)
SendLineStatus
();
{
}
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
catch
(
Exception
ex
)
}
{
finally
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
{
}
//Monitor.Exit(serverConnectTimer);
finally
{
Monitor
.
Exit
(
serverConnectTimer
);
}
}
}
}
}
public
void
StartConnectServer
()
public
void
StartConnectServer
()
{
{
//
serverConnectTimer.Enabled = true;
serverConnectTimer
.
Enabled
=
true
;
}
}
public
void
StopConnectServer
()
public
void
StopConnectServer
()
{
{
//
serverConnectTimer.Enabled = false;
serverConnectTimer
.
Enabled
=
false
;
}
}
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
...
@@ -468,13 +461,9 @@ namespace DeviceLibrary
...
@@ -468,13 +461,9 @@ namespace DeviceLibrary
{
{
map
[
ParamDefine
.
singleReelIn
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
singleReelIn
]
=
ParamDefine
.
enable
;
}
}
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
)
if
(
RobotManage
.
mainMachine
?.
StringState
==
MainMachine
.
StringStateE
.
None
)
{
{
map
[
ParamDefine
.
NeedEmptySHelf
]
=
ParamDefine
.
enable
;
//
map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
enable
;
}
}
if
(
RobotManage
.
mainMachine
?.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
if
(
RobotManage
.
mainMachine
?.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
b4f3423
...
@@ -134,6 +134,8 @@ namespace DeviceLibrary
...
@@ -134,6 +134,8 @@ namespace DeviceLibrary
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02a
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02a
);
StringMoveInfo
.
log
(
$
"顶起料串固定顶升"
);
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
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
HIGH
);
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
);
}
}
...
@@ -395,7 +397,11 @@ namespace DeviceLibrary
...
@@ -395,7 +397,11 @@ namespace DeviceLibrary
case
MoveStep
.
StringOut_Released
:
case
MoveStep
.
StringOut_Released
:
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
if
(
StringState
==
StringStateE
.
Full
)
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
else
Msg
.
add
(
crc
.
GetString
(
L
.
wait_string_take
,
"等待料串被取走"
),
MsgLevel
.
warning
);
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
))
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
请
注册
或
登录
后发表评论