Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit eb08dc23
由
LN
编写于
2019-12-05 18:01:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
82abb114
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
84 行增加
和
50 行删除
dll/Asa.IOModule.AIOBOX.dll
dll/Asa.IOModule.AIOBOX.xml
source/AssemblyLineClient/FrmIOMsg.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/model/StoreStep.cs
source/DeviceLibrary/server/LineServer.cs
dll/Asa.IOModule.AIOBOX.dll
查看文件 @
eb08dc2
此文件类型无法预览
dll/Asa.IOModule.AIOBOX.xml
查看文件 @
eb08dc2
...
...
@@ -331,11 +331,12 @@
日志操作类
</summary>
</member>
<member
name=
"M:Asa.IOModule.LogFile.#ctor(System.String)"
>
<member
name=
"M:Asa.IOModule.LogFile.#ctor(System.String
,System.String
)"
>
<summary>
日志
</summary>
<param
name=
"path"
>
文件夹路径
</param>
<param
name=
"args"
></param>
</member>
<member
name=
"M:Asa.IOModule.LogFile.Close"
>
<summary>
...
...
source/AssemblyLineClient/FrmIOMsg.Designer.cs
查看文件 @
eb08dc2
...
...
@@ -107,7 +107,7 @@
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
766
,
708
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
961
,
708
);
this
.
Controls
.
Add
(
this
.
btnExit
);
this
.
Controls
.
Add
(
this
.
btnUpdate
);
this
.
Controls
.
Add
(
this
.
lblMsg
);
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
eb08dc2
...
...
@@ -133,7 +133,8 @@ namespace OnlineStore.AssemblyLine
AddHealder
(
"BOX_CID"
,
80
);
AddHealder
(
"BOX报警"
,
100
);
AddHealder
(
"更新时间"
,
80
);
AddHealder
(
"BOX状态"
,
listView1
.
Size
.
Width
-
100
-
80
-
80
-
100
-
100
-
100
-
40
-
8
);
AddHealder
(
"BOX状态"
,
100
);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
foreach
(
MoveEquip
move
in
lineBean
.
MoveEquipMap
.
Values
)
{
ListViewItem
lvi
=
new
ListViewItem
();
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
查看文件 @
eb08dc2
...
...
@@ -417,7 +417,7 @@ namespace OnlineStore.DeviceLibrary
//判断是哪个工位有料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
FI_0
7_ShelfLocationUP
();
FI_0
4_WaitTime
();
}
else
{
...
...
@@ -427,17 +427,15 @@ namespace OnlineStore.DeviceLibrary
}
return
true
;
}
/// <summary>
/// 检测到上料工位有料架,缓冲阻挡上升,定位气缸上升,准备入料
/// </summary>
private
void
FI_07_ShelfLocationUP
()
private
void
FI_04_WaitTime
()
{
//定位工位有料架,直接开始入料
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_07_LocationCylinder_Up
);
InStoreLog
(
" 定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡上升, 定位气缸上升"
);
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡下降
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SW4_LocationCylinder_Up
);
//定位工位有料架,等待1秒后再次检测
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_04_WaitTime
);
InStoreLog
(
" 定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 等待1秒再次检测"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
private
void
LineInStoreProcess
()
{
IOMove
(
IO_Type
.
SL_Line_Run
,
IO_VALUE
.
LOW
);
...
...
@@ -445,7 +443,7 @@ namespace OnlineStore.DeviceLibrary
//判断是哪个工位有料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
FI_0
7_ShelfLocationUP
();
FI_0
4_WaitTime
();
}
//阻挡工位有料架,流水线转动一个工位
else
if
(
IOValue
(
IO_Type
.
SL_Stop_Check
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
@@ -508,7 +506,31 @@ namespace OnlineStore.DeviceLibrary
{
LineInStoreProcess
();
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_04_WaitTime
))
{
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
//定位工位有料架,直接开始入料
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_07_LocationCylinder_Up
);
InStoreLog
(
" 定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡上升, 定位气缸上升"
);
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡下降
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SW4_LocationCylinder_Up
);
}
else
{
MoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
Runing
;
LogUtil
.
info
(
" 未检测到料架,入料结束"
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_05_WaitS
))
{
//定位工位有料架,直接开始入料
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_07_LocationCylinder_Up
);
InStoreLog
(
" 定位工位检测到料架: "
+
MoveInfo
.
SLog
+
" 缓冲阻挡上升, 定位气缸上升"
);
IOMove
(
IO_Type
.
SL_Buffer_StopDown
,
IO_VALUE
.
LOW
);
//缓冲阻挡下降
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SW4_LocationCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_07_LocationCylinder_Up
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_08_BatchAxisToP2
);
...
...
@@ -545,20 +567,24 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
SL_MoveCylinder_Give
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SL_MoveCylinder_Take
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_13_ScanCode
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":开始扫码:暂时不扫码"
);
bool
isScan
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedScanCode
).
Equals
(
1
);
InStoreLog
(
" 料盘移栽"
+
MoveInfo
.
SLog
+
":开始扫码:是否需要扫码【"
+
isScan
+
"】"
);
LastCodeList
=
new
List
<
string
>();
//MoveInfo.WaitList.Add(WaitResultInfo.WaitFeedScanCode());
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
//Task<List<string>> scanTask = Task.Factory.StartNew(delegate
//{
// LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
// if (LastCodeList.Count <= 0)
// {
// LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
// }
// return LastCodeList;
//});
if
(
isScan
)
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitFeedScanCode
());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
());
if
(
LastCodeList
.
Count
<=
0
)
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
());
}
return
LastCodeList
;
});
}
}
else
{
...
...
@@ -770,7 +796,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
Runing
;
// MoveInfo.NextMoveStep(LineMoveStep.FI_39_OutLineRun);
InStoreLog
(
"
上料完成,
,料架到达出口处, 通知AGV取空料架, 入料流程结束"
);
InStoreLog
(
"
上料完成
,料架到达出口处, 通知AGV取空料架, 入料流程结束"
);
AgvClient
.
ReadyEmpty
(
Config
.
AgvOutName
);
}
...
...
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
eb08dc2
...
...
@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
{
// Create new modbus master and add event functions
aioBox
=
new
AIOBOX
();
//
aioBox.LogPath( Application.StartupPath+@"\logs\aio\");
aioBox
.
LogPath
(
Application
.
StartupPath
+
@"\logs\aio\"
);
aioBox
.
IP
=
ioIp
;
// bool rtn = aioBox.AutoIP(ioIp);
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
eb08dc2
...
...
@@ -558,20 +558,27 @@ namespace OnlineStore.DeviceLibrary
/// 入口流水线转动,等待入料检测信号消失
/// </summary>
FI_03_LineStart
=
11003
,
/// <summary>
/// 入口流水线转动,等待
阻挡气缸信号到位
/// 入口流水线转动,等待
定位工位信号稳定1秒
/// </summary>
FI_04_
LineRunCheck
=
11004
,
FI_04_
WaitTime
=
11004
,
/// <summary>
/// 入口流水线转动,等待入料阻挡信号消失
/// </summary>
FI_05_LineStart
=
11005
,
/// 入口流水线转动,等待定位工位信号稳定1秒
/// </summary>
FI_05_WaitS
=
11005
,
///// <summary>
///// 入口流水线转动,等待阻挡气缸信号到位
///// </summary>
//FI_04_LineRunCheck= 11004,
///// <summary>
///// 入口流水线转动,等待入料阻挡信号消失
///// </summary>
//FI_05_LineStart = 11005,
/// <summary>
/// 入口流水线转动,等待定位工位检测到位
/// </summary>
FI_06_LineRunCheck
=
11006
,
///
//
<summary>
///
//
入口流水线转动,等待定位工位检测到位
///
//
</summary>
//
FI_06_LineRunCheck = 11006,
/// <summary>
///入料检测: 工位检测信号,定位气缸上升
...
...
source/DeviceLibrary/server/LineServer.cs
查看文件 @
eb08dc2
...
...
@@ -284,11 +284,7 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
private
static
bool
SendStrToClient
(
TcpClientBean
client
,
string
sendMsg
)
{
if
(
client
!=
null
&&
client
.
ClientSocket
.
Connected
)
...
...
@@ -322,6 +318,10 @@ namespace OnlineStore.DeviceLibrary
{
ClientMap
.
Remove
(
id
);
}
else
{
LogUtil
.
info
(
"有新的料仓连接上,料仓ID【"
+
id
+
"】,地址【"
+
client
.
AddStr
+
"】"
);
}
ClientMap
.
Add
(
id
,
client
);
}
}
...
...
@@ -344,22 +344,21 @@ namespace OnlineStore.DeviceLibrary
private
static
bool
ProcessMsg
(
TcpClientBean
client
,
string
msg
)
{
IPEndPoint
clientipe
=
(
IPEndPoint
)
client
.
ClientSocket
.
RemoteEndPoint
;
string
add
=
clientipe
.
Address
.
ToString
();
// string[] msgArray = msg.Split(cmd_spilt);
msg
=
msg
.
Replace
(
"\r"
,
""
);
LogUtil
.
info
(
"收到【"
+
add
+
"】的消息【"
+
msg
+
"】"
);
LogUtil
.
debug
(
"收到【"
+
client
.
AddStr
+
"】的消息【"
+
msg
+
"】"
);
StoreSendBean
storeSMsg
=
JsonHelper
.
DeserializeJsonToObject
<
StoreSendBean
>(
msg
);
if
(
storeSMsg
==
null
)
{
LogUtil
.
error
(
"收到【"
+
add
+
"】的消息【"
+
msg
+
"】,解析失败"
);
LogUtil
.
error
(
"收到【"
+
client
.
AddStr
+
"】的消息【"
+
msg
+
"】,解析失败"
);
}
else
{
int
id
=
storeSMsg
.
StoreId
;
BoxInfo
box
=
new
BoxInfo
(
storeSMsg
.
StoreId
,
storeSMsg
.
Cid
,
storeSMsg
.
Seq
,
storeSMsg
.
SStatus
,
storeSMsg
.
SRunStatus
,
storeSMsg
.
DoorHasTray
,
storeSMsg
.
AlarmType
,
storeSMsg
.
WaitInStoreList
);
SaveBoxClient
(
id
,
box
,
client
);
SaveBoxClient
(
id
,
box
,
client
);
string
cmd
=
storeSMsg
.
Cmd
;
if
(
cmd
.
StartsWith
(
cmd_heart
))
...
...
@@ -367,7 +366,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
cmd
.
StartsWith
(
cmd_outend
))
{
LogUtil
.
info
(
"收到【"
+
add
+
"】的出库完成消息【"
+
msg
+
"】"
);
LogUtil
.
info
(
"收到【"
+
client
.
AddStr
+
"】的出库完成消息【"
+
msg
+
"】"
);
string
posId
=
storeSMsg
.
PosId
;
int
plateH
=
Convert
.
ToInt32
(
storeSMsg
.
PlateH
.
Trim
());
int
plateW
=
Convert
.
ToInt32
(
storeSMsg
.
PlateW
.
Trim
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论