Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 925363cc
由
LN
编写于
2021-05-18 11:19:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
10de6088
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
66 行增加
和
317 行删除
source/AssemblyLineClient/FrmFeedingEquip.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
925363c
...
...
@@ -124,8 +124,8 @@ namespace OnlineStore.AssemblyLine
}
}
lblAgvInfo
.
Text
=
"AGV-"
+
equipBean
.
Config
.
AgvInName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvInName
).
ToString
()
+
"\t AGV-"
+
equipBean
.
Config
.
AgvOutName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvOutName
).
ToString
()
+
""
;
//
lblAgvInfo.Text = "AGV-" + equipBean.Config.AgvInName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvInName).ToString() +
//
"\t AGV-" + equipBean.Config.AgvOutName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvOutName).ToString() + "";
string
canOut
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
)
?
"紧急出料模块"
:
"入料模块"
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
runStatus
)
+
"("
+
canOut
+
")"
;
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
...
...
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
925363c
...
...
@@ -83,9 +83,9 @@
this
.
二维码学习
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator7
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
托盘初始化
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator16
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator9
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem3
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator16
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem2
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator13
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
iO
模块状态
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -105,7 +105,6 @@
this
.
toolStripSeparator15
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
启用蜂鸣器
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator25
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
aGVCancelStateToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator17
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
自动保存托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
contextMenuStrip_control
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
...
...
@@ -647,50 +646,50 @@
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator6
.
Visible
=
false
;
//
// 二维码学习ToolStripMenuItem
//
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码学习"
;
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
//
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 托盘初始化ToolStripMenuItem
//
this
.
托盘初始化
ToolStripMenuItem
.
Name
=
"托盘初始化ToolStripMenuItem"
;
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
托盘初始化
ToolStripMenuItem
.
Text
=
"托盘编码"
;
this
.
托盘初始化
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
托盘初始化
ToolStripMenuItem_Click
);
//
// toolStripSeparator16
//
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
6
);
//
// toolStripSeparator9
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator9
.
Visible
=
false
;
//
// toolStripMenuItem3
//
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem3
.
Text
=
"脆盘料号配置"
;
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
//
// toolStripSeparator16
//
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
//
// toolStripMenuItem2
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"AGV调试"
;
this
.
toolStripMenuItem2
.
Visible
=
false
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
...
...
@@ -698,36 +697,36 @@
// toolStripSeparator13
//
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// iO模块状态ToolStripMenuItem
//
this
.
iO
模块状态
ToolStripMenuItem
.
Name
=
"iO模块状态ToolStripMenuItem"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
iO
模块状态
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
iO
模块状态
ToolStripMenuItem
.
Text
=
"查看料仓状态"
;
this
.
iO
模块状态
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
iO
模块状态
ToolStripMenuItem_Click
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 查看托盘信息ToolStripMenuItem
//
this
.
查看托盘信息
ToolStripMenuItem
.
Name
=
"查看托盘信息ToolStripMenuItem"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
查看托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
查看托盘信息
ToolStripMenuItem
.
Text
=
"查看托盘信息"
;
this
.
查看托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTrayInfo_Click
);
//
// toolStripSeparator12
//
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 清空托盘信息ToolStripMenuItem
//
this
.
清空托盘信息
ToolStripMenuItem
.
Name
=
"清空托盘信息ToolStripMenuItem"
;
this
.
清空托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
清空托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
清空托盘信息
ToolStripMenuItem
.
Text
=
"清空托盘信息"
;
this
.
清空托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清空托盘信息
ToolStripMenuItem_Click
);
//
...
...
@@ -797,7 +796,6 @@
this
.
toolStripSeparator15
,
this
.
启用蜂鸣器
ToolStripMenuItem
,
this
.
toolStripSeparator25
,
this
.
aGVCancelStateToolStripMenuItem
,
this
.
toolStripSeparator17
,
this
.
自动保存托盘信息
ToolStripMenuItem
});
this
.
运行参数
ToolStripMenuItem
.
Name
=
"运行参数ToolStripMenuItem"
;
...
...
@@ -807,45 +805,37 @@
// 开机自动启动ToolStripMenuItem
//
this
.
开机自动启动
ToolStripMenuItem
.
Name
=
"开机自动启动ToolStripMenuItem"
;
this
.
开机自动启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
206
,
26
);
this
.
开机自动启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
开机自动启动
ToolStripMenuItem
.
Text
=
"开机自动启动"
;
this
.
开机自动启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开机自动启动
ToolStripMenuItem_Click
);
//
// toolStripSeparator15
//
this
.
toolStripSeparator15
.
Name
=
"toolStripSeparator15"
;
this
.
toolStripSeparator15
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
this
.
toolStripSeparator15
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
//
// 启用蜂鸣器ToolStripMenuItem
//
this
.
启用蜂鸣器
ToolStripMenuItem
.
Name
=
"启用蜂鸣器ToolStripMenuItem"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
206
,
26
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Text
=
"启用蜂鸣器"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用蜂鸣器
ToolStripMenuItem_Click
);
//
// toolStripSeparator25
//
this
.
toolStripSeparator25
.
Name
=
"toolStripSeparator25"
;
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
//
// aGVCancelStateToolStripMenuItem
//
this
.
aGVCancelStateToolStripMenuItem
.
Name
=
"aGVCancelStateToolStripMenuItem"
;
this
.
aGVCancelStateToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
206
,
26
);
this
.
aGVCancelStateToolStripMenuItem
.
Text
=
"AGV cancelState"
;
this
.
aGVCancelStateToolStripMenuItem
.
Visible
=
false
;
this
.
aGVCancelStateToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
aGVCancelStateToolStripMenuItem_Click
);
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
//
// toolStripSeparator17
//
this
.
toolStripSeparator17
.
Name
=
"toolStripSeparator17"
;
this
.
toolStripSeparator17
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
this
.
toolStripSeparator17
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
this
.
toolStripSeparator17
.
Visible
=
false
;
//
// 自动保存托盘信息ToolStripMenuItem
//
this
.
自动保存托盘信息
ToolStripMenuItem
.
Name
=
"自动保存托盘信息ToolStripMenuItem"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
206
,
26
);
this
.
自动保存托盘信息
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
自动保存托盘信息
ToolStripMenuItem
.
Text
=
"保存托盘信息"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Visible
=
false
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
自动保存托盘信息
ToolStripMenuItem_Click
);
...
...
@@ -1031,7 +1021,6 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
开机自动启动
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
启用蜂鸣器
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator15
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
aGVCancelStateToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator17
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage2
;
private
System
.
Windows
.
Forms
.
Panel
panel2
;
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
925363c
...
...
@@ -358,7 +358,7 @@ namespace OnlineStore.AssemblyLine
停止所有料仓
TToolStripMenuItem_Click
(
null
,
null
);
}
AgvClient
.
Dispose
();
//
AgvClient.Dispose();
if
(
IOManager
.
instance
!=
null
)
{
IOManager
.
instance
.
CloseAllDO
();
...
...
@@ -438,14 +438,7 @@ namespace OnlineStore.AssemblyLine
string
canScanCode
=
""
;
if
(
AgvClient
.
CurrCancelState
)
{
aGVCancelStateToolStripMenuItem
.
Text
=
gouStr
+
" AGV cancelState"
;
}
else
{
aGVCancelStateToolStripMenuItem
.
Text
=
"AGV cancelState"
;
}
lblStatus
.
Text
=
lineBean
.
GetRunStr
()
+
canScanCode
;
string
warnMsg
=
""
;
if
(
LineManager
.
Line
.
runStatus
>
LineRunStatus
.
Wait
)
...
...
@@ -742,30 +735,7 @@ namespace OnlineStore.AssemblyLine
}
LogUtil
.
info
(
Name
+
" 点击:"
+
启用蜂鸣器
ToolStripMenuItem
.
Text
);
}
private
void
aGVCancelStateToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
bool
result
=
!
aGVCancelStateToolStripMenuItem
.
Text
.
Contains
(
gouStr
);
if
(
result
.
Equals
(
AgvClient
.
CurrCancelState
))
{
return
;
}
AgvClient
.
SetCancelState
(
result
);
//robot.XrayBean.OpenXLine = result;
if
(
result
)
{
aGVCancelStateToolStripMenuItem
.
Text
=
gouStr
+
" AGV cancelState"
;
}
else
{
aGVCancelStateToolStripMenuItem
.
Text
=
"AGV cancelState"
;
}
LogUtil
.
info
(
Name
+
" 点击:"
+
aGVCancelStateToolStripMenuItem
.
Text
);
}
#
region
按钮界面
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
925363c
...
...
@@ -74,7 +74,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="agvClient\AgvClient.cs" />
<Compile Include="assemblyLine\HY\HYEquipBase.cs" />
<Compile Include="assemblyLine\HY\HY_C1_SLStation.cs" />
<Compile Include="assemblymanager\ALineManager.cs" />
...
...
@@ -82,7 +81,6 @@
<Compile Include="assemblyLine\FeedingEquip.cs" />
<Compile Include="assemblymanager\RFIDManagercs.cs" />
<Compile Include="assemblymanager\SServerManager.cs" />
<Compile Include="assemblymanager\EDataManager.cs" />
<Compile Include="assemblymanager\TrayManager.cs" />
<Compile Include="baan\AxisBean.cs" />
<Compile Include="baan\ClampJawBean.cs" />
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
925363c
...
...
@@ -117,8 +117,8 @@ namespace OnlineStore.DeviceLibrary
//}
ClampJwa
.
Reset
();
//复位时设置状态为none
AgvClient
.
SetStatus
(
Config
.
AgvInName
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
);
//
AgvClient.SetStatus(Config.AgvInName);
//
AgvClient.SetStatus(Config.AgvOutName);
//OutStoreHeight = -1;
//OutStoreCount = 0;
...
...
@@ -319,8 +319,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
//StopMove时设置状态为none
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
None
,
ClientLevel
.
Low
,
true
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
""
,
ClientAction
.
None
,
ClientLevel
.
Low
,
true
);
//
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None, ClientLevel.Low, true);
//
AgvClient.SetStatus(Config.AgvOutName, "", ClientAction.None, ClientLevel.Low, true);
BatchAxisStopCheck
();
BatchAxis
.
SuddenStop
();
...
...
@@ -344,8 +344,8 @@ namespace OnlineStore.DeviceLibrary
}
StopMove
();
CloseLed
();
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
None
,
ClientLevel
.
Low
,
true
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
""
,
ClientAction
.
None
,
ClientLevel
.
Low
,
true
);
//
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None, ClientLevel.Low, true);
//
AgvClient.SetStatus(Config.AgvOutName, "", ClientAction.None, ClientLevel.Low, true);
}
...
...
@@ -431,7 +431,6 @@ namespace OnlineStore.DeviceLibrary
//}
}
AgvStatusPro
();
LedProcess
();
...
...
@@ -798,218 +797,12 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
AGV
#
region
料架号保存
#
region
AGV
状态处理
private
Stopwatch
needEnterWatch
=
new
Stopwatch
();
private
Stopwatch
needLeaveWatch
=
new
Stopwatch
();
//private void ResetEndAgvPro()
//{
// if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH))
// {
// ClientLevel level = ClientLevel.Low;
// if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.HIGH))
// {
// level = ClientLevel.Middle;
// }
// if (Config.IsCanOut.Equals(1))
// {
// level = ClientLevel.High;
// }
// LogInfo("重置完成,出口检测到有料架,调用 " + Config.AgvOutName + " AgvClient.NeedLeave");
// AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, level);
// }
//}
private
void
AgvStatusPro
()
{
if
(
NoErrorAlarm
())
{
//bool HasOutLine = Config.DOList.ContainsKey(IO_Type.SL_OutLine_Run);
//if (HasOutLine && IOValue(IO_Type.SL_OutLine_Check).Equals(IO_VALUE.HIGH))
//{
// if (CheckStopWatch(needLeaveWatch, 3000))
// {
// ClientLevel level = ClientLevel.Low;
// if (Config.IsCanOut.Equals(1))
// {
// level = ClientLevel.High;
// }
// else if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH) || (!MoveInfo.MoveType.Equals(LineMoveType.None)))
// {
// level = ClientLevel.Middle;
// }
// //线体出口检测到料架,需要通知AGV小车
// AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, level);
// }
//}
if
((!
HasOutLine
)
&&
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
CheckStopWatch
(
needLeaveWatch
,
3000
))
{
ClientLevel
level
=
ClientLevel
.
Low
;
if
(
Config
.
IsCanOut
.
Equals
(
1
))
{
level
=
ClientLevel
.
High
;
}
else
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
(!
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)))
{
level
=
ClientLevel
.
Middle
;
}
//线体出口检测到料架,需要通知AGV小车
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
level
);
}
}
else
{
needLeaveWatch
.
Stop
();
AgvClient
.
SetToNone
(
Config
.
AgvOutName
);
}
//入口无料架,mayEnter
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
CheckStopWatch
(
needEnterWatch
,
3000
))
{
ClientLevel
level
=
ClientLevel
.
Low
;
if
(
Config
.
IsCanOut
.
Equals
(
1
))
{
//如果是出料模块且当前无料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
level
=
ClientLevel
.
High
;
}
}
AgvClient
.
NeedEnter
(
Config
.
AgvInName
,
""
,
level
);
}
}
else
{
needEnterWatch
.
Stop
();
AgvClient
.
SetToNone
(
Config
.
AgvInName
);
}
}
else
{
needLeaveWatch
.
Stop
();
AgvClient
.
SetToNone
(
Config
.
AgvOutName
);
needEnterWatch
.
Stop
();
AgvClient
.
SetToNone
(
Config
.
AgvInName
);
}
}
#
endregion
internal
void
AgvArrive
(
string
nodeId
,
string
rfid
)
{
string
logN
=
Name
+
"收到 AgvArrive 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
Config
.
AgvInName
))
{
}
else
if
(
nodeId
.
Equals
(
Config
.
AgvOutName
))
{
}
LogUtil
.
info
(
logN
+
":"
+
"暂无处理"
);
}
internal
void
AgvReady
(
string
nodeId
,
string
rfid
)
{
string
logN
=
Name
+
"收到 AgvReady 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
Config
.
AgvInName
))
{
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
logN
+
" ,入口有料架,暂不处理,重置 ["
+
nodeId
+
"] 状态为None"
);
AgvClient
.
SetStatus
(
nodeId
);
return
;
}
ShelfEnterProcess
();
}
else
if
(
nodeId
.
Equals
(
Config
.
AgvOutName
))
{
if
(
IOValue
(
IO_Type
.
SL_Out_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
logN
+
" ,未检测到出口有料架,暂不处理,重置 ["
+
nodeId
+
"] 状态为None"
);
AgvClient
.
SetStatus
(
nodeId
);
return
;
}
ShelfOutProcess
();
}
}
private
bool
ProcessShelfEnter
=
false
;
private
bool
ProcessShelfOut
=
false
;
internal
void
ShelfOutProcess
()
{
//AGV已到达,将料架送入AGV中
Task
.
Factory
.
StartNew
(
delegate
{
string
checkIo
=
IO_Type
.
SL_Out_Check
;
string
lineDo
=
IO_Type
.
SL_OutSideWay_Run
;
string
stopDo
=
IO_Type
.
SL_Out_StopDown
;
//if (HasOutLine)
//{
// checkIo = IO_Type.SL_OutLine_Check;
// lineDo = IO_Type.SL_OutLine_Run;
//}
string
logName
=
Name
+
"["
+
Config
.
AgvOutName
+
"] 料架送入AGV "
;
try
{
LogUtil
.
info
(
logName
+
"开始,先设置状态为None"
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
LastOutShelfId
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
if
(
IOValue
(
checkIo
).
Equals
(
IO_VALUE
.
HIGH
))
{
// AgvClient.SetStatus(Config.AgvOutName,"",ClientAction.MayLeave,ClientLevel.High);
ProcessShelfOut
=
true
;
//出口阻挡下降,出口线体转动
IOMove
(
stopDo
,
IO_VALUE
.
HIGH
);
IOMove
(
lineDo
,
IO_VALUE
.
HIGH
);
bool
result
=
WaitIo
(
checkIo
,
IO_VALUE
.
LOW
,
60000
);
if
(!
result
)
{
LogUtil
.
info
(
logName
+
" 等待 "
+
checkIo
+
"=LOW超时,等待8000后停止"
+
lineDo
+
"转动,发送FinishLeave"
);
}
else
{
LogUtil
.
info
(
logName
+
" 已收到"
+
checkIo
+
"=LOW ,等待8000后停止"
+
lineDo
+
"转动,发送FinishLeave"
);
}
//再转动2000
Thread
.
Sleep
(
8000
);
//停止转动 ,阻挡上升
IOMove
(
lineDo
,
IO_VALUE
.
LOW
);
IOMove
(
stopDo
,
IO_VALUE
.
LOW
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
LastOutShelfId
,
ClientAction
.
FinishLeave
,
ClientLevel
.
High
,
true
);
Thread
.
Sleep
(
1000
);
AgvClient
.
SetStatus
(
Config
.
AgvOutName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
ProcessShelfOut
=
false
;
LogUtil
.
info
(
logName
+
",停止转动,清空料架["
+
LastOutShelfId
+
"], 结束"
);
}
else
{
LogUtil
.
info
(
logName
+
"开始,未检测到料架信号,不处理"
);
}
}
catch
(
TimeoutException
te
)
{
LogUtil
.
error
(
logName
+
" 超时:"
+
te
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
logName
+
" 出错:"
,
ex
);
}
finally
{
IOMove
(
lineDo
,
IO_VALUE
.
LOW
);
ProcessShelfOut
=
false
;
}
});
}
internal
void
ShelfEnterProcess
()
{
Task
.
Factory
.
StartNew
(
delegate
...
...
@@ -1020,7 +813,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
SL_Entry_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
logName
+
" 开始,设置状态=MayEnter"
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
MayEnter
,
ClientLevel
.
High
,
true
);
//
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.MayEnter, ClientLevel.High, true);
ProcessShelfEnter
=
true
;
//转动线体
...
...
@@ -1033,17 +826,7 @@ namespace OnlineStore.DeviceLibrary
result
=
WaitIo
(
IO_Type
.
SL_Stop_Check
,
IO_VALUE
.
HIGH
,
600000
);
LogUtil
.
info
(
logName
+
" 等待 SL_Stop_Check=High "
+
result
+
",开始等待CloseDoor 超时10分钟"
);
try
{
result
=
WaitUtil
.
Wait
(
600000
,
delegate
()
{
return
AgvClient
.
GetAction
(
Config
.
AgvInName
).
Equals
(
ClientAction
.
CloseDoor
);
},
logName
+
"等待CloseDoor超时"
);
}
catch
(
TimeoutException
te
)
{
LogUtil
.
error
(
logName
+
" 超时:"
+
te
);
}
////等待 15000 毫秒后停止转动
//Thread.Sleep(15000);
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_05_LineStart
))
...
...
@@ -1059,14 +842,14 @@ namespace OnlineStore.DeviceLibrary
//AgvClient.SetStatus(Config.AgvInName, "", ClientAction.FinishEnter, ClientLevel.High, true);
Thread
.
Sleep
(
1000
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
//
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None, ClientLevel.High, true);
ProcessShelfEnter
=
false
;
LogUtil
.
info
(
logName
+
" 结束"
);
}
else
{
LogUtil
.
info
(
logName
+
"开始,未检测到料架信号,不处理,设置=None"
);
AgvClient
.
SetStatus
(
Config
.
AgvInName
,
LastOutShelfId
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
//
AgvClient.SetStatus(Config.AgvInName, LastOutShelfId, ClientAction.None, ClientLevel.High, true);
}
}
catch
(
TimeoutException
te
)
...
...
@@ -1112,8 +895,6 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
#
region
料架号保存
private
void
UpdateLastShelfID
(
string
currRfid
=
""
)
{
string
configStr
=
Setting_Init
.
Feed_LastShelfID_
+
DeviceID
;
...
...
@@ -1127,8 +908,6 @@ namespace OnlineStore.DeviceLibrary
}
#
endregion
#
endregion
internal
bool
NeedEmptyTray
()
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
)
&&
...
...
@@ -1164,8 +943,21 @@ namespace OnlineStore.DeviceLibrary
}
public
string
GetLastTrayInfo
()
{
return
""
+
LastWidth
+
"X"
+
LastHeight
+
"="
+
lastcode
+(
(
LastPosParam
!=
null
)
?(
"["
+
LastPosParam
.
PosId
+
"]"
):
""
)+((
bool
)(
LastPosParam
?.
IsNG
)?(
"入库NG:"
+
LastPosParam
?.
NgMsg
):
""
);
try
{
if
(
LastPosParam
==
null
)
{
return
""
+
LastWidth
+
"X"
+
LastHeight
+
"="
+
lastcode
?.
ToString
();
}
else
{
return
""
+
LastWidth
+
"X"
+
LastHeight
+
"="
+
lastcode
?.
ToString
()
+
((
LastPosParam
!=
null
)
?
(
"["
+
LastPosParam
.
PosId
+
"]"
)
:
""
)
+
((
bool
)(
LastPosParam
?.
IsNG
)
?
(
"入库NG:"
+
LastPosParam
?.
NgMsg
)
:
""
);
}
}
catch
(
Exception
ex
)
{
return
""
;
}
}
}
}
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
925363c
...
...
@@ -683,7 +683,7 @@ namespace OnlineStore.DeviceLibrary
MoveEndS
();
LastOutShelfId
=
CurrShelfId
;
InLog
(
"上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId="
+
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
ClientLevel
.
Low
);
//
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, ClientLevel.Low);
}
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
FI_62_OutLineRun
))
...
...
@@ -693,7 +693,7 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
SL_Out_StopDown
,
IO_VALUE
.
LOW
);
//IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
InLog
(
"上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId="
+
LastOutShelfId
);
AgvClient
.
NeedLeave
(
Config
.
AgvOutName
,
LastOutShelfId
,
ClientLevel
.
Low
);
//
AgvClient.NeedLeave(Config.AgvOutName, LastOutShelfId, ClientLevel.Low);
}
#
endregion
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
925363c
...
...
@@ -68,8 +68,8 @@ namespace OnlineStore.DeviceLibrary
ConfigClampJaw
jawconfig
=
Line_Config
.
ClampJawMap
[
config
.
Id
];
FeedingEquip
equip
=
new
FeedingEquip
(
lineConfig
.
CID
,
config
,
jawconfig
);
//增加AGV小车客户端
AgvClient
.
NodeList
.
Add
(
config
.
AgvInName
);
AgvClient
.
NodeList
.
Add
(
config
.
AgvOutName
);
//
AgvClient.NodeList.Add(config.AgvInName);
//
AgvClient.NodeList.Add(config.AgvOutName);
AddDeviceName
(
ioList
,
config
.
IOIPList
);
FeedingEquipMap
.
Add
(
config
.
Id
,
equip
);
...
...
@@ -112,7 +112,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
Enabled
=
true
;
IoCheckTimer
.
Enabled
=
true
;
AgvClient
.
Init
();
//
AgvClient.Init();
canStart
=
true
;
});
...
...
@@ -368,7 +368,7 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
serverConTimer
.
Enabled
=
false
;
AgvClient
.
SetCancelState
(
true
);
//
AgvClient.SetCancelState(true);
RFIDManager
.
Close
();
//停止运行时,把阻挡气缸上升
//StopMove();
...
...
@@ -903,7 +903,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
EndMove
();
mainTimer
.
Interval
=
300
;
maxSeconds
=
3
;
AgvClient
.
SetCancelState
(
AgvClient
.
CurrCancelState
);
//
AgvClient.SetCancelState(AgvClient.CurrCancelState);
LogUtil
.
info
(
Name
+
"所有移栽模块复位完成,打开流水线,开始运转,定时器改为300,耗时 ["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]"
);
}
else
if
(
span
.
TotalSeconds
>
120
)
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
925363c
...
...
@@ -316,7 +316,7 @@ namespace OnlineStore.DeviceLibrary
OutLog
(
"出库 "
+
MoveInfo
.
SLog
+
": 夹料气缸夹紧,更新料盘位置【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】【MOVING】【"
+
DeviceID
+
"】"
);
//更新料盘位置
SServerManager
.
UpdateTrayLoc
(
Name
,
MoveInfo
.
MoveParam
.
WareCode
,
LocStatus
.
MOVING
,
DeviceID
.
ToString
());
EDataManager
.
UpdateParam
(
DeviceID
,
2
,
MoveInfo
.
MoveParam
);
//
EDataManager.UpdateParam(DeviceID, 2, MoveInfo.MoveParam);
}
else
{
...
...
@@ -449,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
EDataManager
.
UpdateParam
(
DeviceID
);
//
EDataManager.UpdateParam(DeviceID);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MO_61_CylinderRelax
))
{
...
...
@@ -578,7 +578,7 @@ namespace OnlineStore.DeviceLibrary
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
": 夹料气缸夹紧"
);
ClampEmptyMove
=
false
;
ClampJwa
.
Push
(
MoveInfo
,
true
,
MoveInfo
.
MoveParam
.
WareCode
);
EDataManager
.
UpdateParam
(
DeviceID
,
1
,
MoveInfo
.
MoveParam
);
//
EDataManager.UpdateParam(DeviceID, 1, MoveInfo.MoveParam);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MI_05_CylinderOpen
))
{
...
...
@@ -641,7 +641,7 @@ namespace OnlineStore.DeviceLibrary
InLog
(
"入库 "
+
MoveInfo
.
SLog
+
",夹料气缸放松"
);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa
.
Relax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
WareCode
);
EDataManager
.
UpdateParam
(
DeviceID
);
//
EDataManager.UpdateParam(DeviceID);
}
else
if
(
MoveInfo
.
IsStep
(
LineMoveStep
.
MI_12_CylinderRelax
))
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论