Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d79298bc
由
LN
编写于
2019-11-13 14:17:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
取出料盘时若检测到料盘信号,需要下降到P2点
1 个父辈
593a1088
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
73 行增加
和
76 行删除
source/ACSingleStore/Properties/Resource.en-US.resx
source/ACSingleStore/Properties/Resource.zh-CN.resx
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/ACSingleStore/Properties/Resource.en-US.resx
查看文件 @
d79298b
...
...
@@ -1333,7 +1333,6 @@
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<value>Startup failure: device initialization is not complete</value>
</data>
<data name="FrmPositionTool_groupBox1_Text" xml:space="preserve">
<value>equipment information</value>
</data>
...
...
@@ -1367,18 +1366,19 @@
<data name="请输入正确的速度" xml:space="preserve">
<value>Please enter the correct speed</value>
</data>
<data name="StartCycle" xml:space="preserve">
<value>Start looping out</value>
</data>
<data name="StopCycle" xml:space="preserve">
<value>Stop the loop</value>
</data>
<data name="FrmStoreBox_btnCycleOut_Text" xml:space="preserve">
<value>Start looping out</value>
</data>
<data name="OutFull" xml:space="preserve">
<value>Batch shaft is full, please take out the material tray</value>
</data>
<data name="TheDoorOpen" xml:space="preserve">
<value>门锁未关闭,无法出库</value>
</data>
</root>
\ No newline at end of file
source/ACSingleStore/Properties/Resource.zh-CN.resx
查看文件 @
d79298b
...
...
@@ -1377,4 +1377,7 @@
<data name="OutFull" xml:space="preserve">
<value>批量轴已满,请取出料盘</value>
</data>
<data name="TheDoorOpen" xml:space="preserve">
<value>The door lock is not closed, unable to exit the warehouse</value>
</data>
</root>
\ No newline at end of file
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
d79298b
...
...
@@ -1247,80 +1247,72 @@ namespace OnlineStore.DeviceLibrary
Reset
(
false
);
}
}
else
if
(
waitOutStoreList
.
Count
>
0
&&
CanStarInOut
()
)
else
if
(
waitOutStoreList
.
Count
>
0
)
{
FixtureCodeInfo
currInOutFixture
=
null
;
lock
(
waitOutListLock
)
if
(
CanStarInOut
()
&&
AutomaticBaiting
.
BatchOutStoreHeight
<
Config
.
BatchAxis_MaxHeight
&&
AutomaticBaiting
.
DoorIsClose
())
{
if
(
waitOutStoreList
.
Count
>
0
&&
CanStarInOut
())
FixtureCodeInfo
currInOutFixture
=
null
;
lock
(
waitOutListLock
)
{
currInOutFixture
=
waitOutStoreList
[
0
];
waitOutStoreList
.
RemoveAt
(
0
);
if
(
waitOutStoreList
.
Count
>
0
)
{
currInOutFixture
=
waitOutStoreList
[
0
];
waitOutStoreList
.
RemoveAt
(
0
);
}
}
}
if
(
currInOutFixture
!=
null
&&
currInOutFixture
.
WareNum
.
Equals
(
""
))
{
//出库
LogUtil
.
info
(
LOGGER
,
StoreName
+
"开始执行排队中的出库【"
+
currInOutFixture
.
ToStr
()
+
"】"
);
bool
result
=
StartOutStoreMove
(
new
InOutStoreParam
(
""
,
currInOutFixture
.
PosId
,
currInOutFixture
.
plateH
,
currInOutFixture
.
plateW
),
currInOutFixture
.
BatchInOut
);
if
(!
result
)
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 执行排队中的出库【"
+
currInOutFixture
.
ToStr
()
+
"】失败,重新加入等待队列"
);
AddWaitOutInfo
(
currInOutFixture
);
if
(
currInOutFixture
!=
null
&&
currInOutFixture
.
WareNum
.
Equals
(
""
))
{
//出库
LogUtil
.
info
(
LOGGER
,
StoreName
+
"开始执行排队中的出库【"
+
currInOutFixture
.
ToStr
()
+
"】"
);
bool
result
=
StartOutStoreMove
(
new
InOutStoreParam
(
""
,
currInOutFixture
.
PosId
,
currInOutFixture
.
plateH
,
currInOutFixture
.
plateW
),
currInOutFixture
.
BatchInOut
);
if
(!
result
)
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 执行排队中的出库【"
+
currInOutFixture
.
ToStr
()
+
"】失败,重新加入等待队列"
);
AddWaitOutInfo
(
currInOutFixture
);
}
}
}
}
else
if
(
autoNext
&&
CanStarInOut
())
else
if
(
autoNext
)
{
//获取出库的库位号
string
readId
=
""
;
//[{"LOC":"1","RI":"A100007","QTY":1000,"PN":"pn"},{"LOC":"2","RI":"A100015","QTY":1000,"PN":"pn"}]
//http://[SMD-BOX-IP]:[SMD-BOX-Port]/rest/api/v2/mes/inventory
//http://localhost/myproject/rest/api/v2/mes/inventory?LOC=1
int
LOC
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
LOC
);
if
(
LOC
<=
0
)
if
(
CanStarInOut
()
&&
AutomaticBaiting
.
BatchOutStoreHeight
<
Config
.
BatchAxis_MaxHeight
&&
AutomaticBaiting
.
DoorIsClose
())
{
LOC
=
1
;
}
string
result
=
HttpHelper
.
Get
(
StoreManager
.
GetAPI
(
""
,
StoreManager
.
api_inventory
)
+
"?LOC="
+
LOC
);
if
(!
String
.
IsNullOrEmpty
(
result
))
{
List
<
APIInfo
>
apilist
=
JsonHelper
.
DeserializeJsonToList
<
APIInfo
>(
result
);
foreach
(
APIInfo
a
in
apilist
)
//获取出库的库位号
string
readId
=
""
;
//[{"LOC":"1","RI":"A100007","QTY":1000,"PN":"pn"},{"LOC":"2","RI":"A100015","QTY":1000,"PN":"pn"}]
//http://[SMD-BOX-IP]:[SMD-BOX-Port]/rest/api/v2/mes/inventory
//http://localhost/myproject/rest/api/v2/mes/inventory?LOC=1
int
LOC
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
LOC
);
if
(
LOC
<=
0
)
{
if
(
a
.
LOC
.
Equals
(
LOC
))
LOC
=
1
;
}
string
result
=
HttpHelper
.
Get
(
StoreManager
.
GetAPI
(
""
,
StoreManager
.
api_inventory
)
+
"?LOC="
+
LOC
);
if
(!
String
.
IsNullOrEmpty
(
result
))
{
List
<
APIInfo
>
apilist
=
JsonHelper
.
DeserializeJsonToList
<
APIInfo
>(
result
);
foreach
(
APIInfo
a
in
apilist
)
{
readId
=
a
.
RI
;
LogUtil
.
debug
(
"自动出入库:查找到:RI: "
+
readId
);
if
(
a
.
LOC
.
Equals
(
LOC
))
{
readId
=
a
.
RI
;
LogUtil
.
debug
(
"自动出入库:查找到:RI: "
+
readId
);
}
}
}
//string[] rArray = result.Split('}');
//foreach (string obj in rArray)
//{
// string[] objArray = obj.Split(',');
// if (objArray.Length >= 4)
// {
// string rId = objArray[1];
// if (rId.Length > 7)
// {
// readId = rId.Substring(6, rId.Length - 7);
// LogUtil.debug("自动出入库:查找到:RI: " + readId);
// break;
// }
// }
//}
}
if
(
readId
.
Equals
(
""
))
{
//开始自动入库
string
msg
=
AutomaticBaiting
.
doStartBatchIn
();
LogUtil
.
info
(
"自动出入库:库位号【"
+
GetAutoPosid
(
false
)
+
"】,开始入库"
+
msg
);
}
else
{
autoMsg
=
"自动出库:RI:"
+
readId
;
result
=
HttpHelper
.
Post
(
StoreManager
.
GetAPI
(
""
,
StoreManager
.
api_stackOut
)
+
"?RIS="
+
readId
);
LogUtil
.
info
(
"自动出入库:自动出库:RI: "
+
readId
+
" ,"
+
result
);
if
(
readId
.
Equals
(
""
))
{
//开始自动入库
string
msg
=
AutomaticBaiting
.
doStartBatchIn
();
LogUtil
.
info
(
"自动出入库:库位号【"
+
GetAutoPosid
(
false
)
+
"】,开始入库"
+
msg
);
}
else
{
autoMsg
=
"自动出库:RI:"
+
readId
;
result
=
HttpHelper
.
Post
(
StoreManager
.
GetAPI
(
""
,
StoreManager
.
api_stackOut
)
+
"?RIS="
+
readId
);
LogUtil
.
info
(
"自动出入库:自动出库:RI: "
+
readId
+
" ,"
+
result
);
}
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
d79298b
...
...
@@ -788,7 +788,7 @@ namespace OnlineStore.DeviceLibrary
}
}
int
height
=
param
.
GetPosition
().
BagHeight
;
if
(
AutomaticBaiting
.
BatchOutStoreHeight
+
height
>
Config
.
BatchAxis_MaxHeight
)
if
(
AutomaticBaiting
.
BatchOutStoreHeight
>=
Config
.
BatchAxis_MaxHeight
)
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,当前高【"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"】出库料盘高【"
+
height
+
"】,最大高【"
+
Config
.
BatchAxis_MaxHeight
+
"】"
);
UpdateInOutMsg
(
logMsg
+
"失败,批量上下料机构已满,请先拿出料盘"
);
...
...
@@ -868,7 +868,7 @@ namespace OnlineStore.DeviceLibrary
{
AutomaticBaiting
.
BatchOutStoreCount
++;
AutomaticBaiting
.
BatchOutStoreHeight
=
1000
;
OutStoreLog
(
"出库:SO_03批量上下料轴需下降【"
+
outDownPosition
+
"】目标【"
+
targetValue
+
"】 ,请检查料盘是否已满"
);
OutStoreLog
(
"出库:SO_03批量上下料轴需下降【"
+
outDownPosition
+
"】目标【"
+
targetValue
+
"】
,实时位置【"
+
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
)
+
"】
,请检查料盘是否已满"
);
//停止出库
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
storeStatus
=
StoreStatus
.
StoreOnline
;
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
d79298b
...
...
@@ -696,7 +696,7 @@ namespace OnlineStore.DeviceLibrary
//若X12亮,先匀速下降到X12不亮,再开门。
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O00_Wait
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
OutCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
)
)
{
LogUtil
.
info
(
Name
+
"出料: OutCheck=LOW ,直接打开门锁 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O02_WaitDoorOpen
);
...
...
@@ -706,27 +706,29 @@ namespace OnlineStore.DeviceLibrary
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O01_BatchAxisDown
);
LogUtil
.
info
(
Name
+
"出料: OutCheck=HIGH,批量轴先匀速下降到P2 "
);
//批量轴直接走到P2
LogUtil
.
info
(
Name
+
"出料: OutCheck=HIGH或TrayCheck_LoadMaterial=High,批量轴先匀速下降到P2 "
);
ACAxisAbsMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P2
,
StoreManager
.
Config
.
BatchAxis_P2_Speed
);
return
;
//批量轴直接走到P2
AUTO_SA_Config
Config
=
StoreManager
.
Config
;
//ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.OutCheck);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P2
,
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
BatchAxisController
.
StartCheck
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
);
StoreManager
.
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_P2
;
//int speed = Config.BatchAxis_SlowSpeed;
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_OutMaxValue
,
Config
.
BatchAxis_P2_Speed
);
// ACAxisAbsMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_P2, StoreManager.Config.BatchAxis_P2_Speed);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O01_BatchAxisDown
))
{
LogUtil
.
info
(
Name
+
"出料: 批量轴已下降到
OutCheck=LOW
,打开门锁 "
);
LogUtil
.
info
(
Name
+
"出料: 批量轴已下降到
P2
,打开门锁 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O02_WaitDoorOpen
);
BatchDoorOpen
(
true
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O02_WaitDoorOpen
))
{
LogUtil
.
info
(
Name
+
"出料:回到待机点完成,出料结束"
);
StoreMove
.
EndMove
();
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
return
;
if
(
IOManager
.
IOValue
(
IO_Type
.
OutCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O03_WaitOutSingleLow
);
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
d79298b
...
...
@@ -657,8 +657,8 @@ namespace OnlineStore.DeviceLibrary
{
if
(
BatchOutStoreCount
>
0
&&
BatchOutStoreHeight
>
0
)
{
BatchDoorOpen
(
false
);
//
return StartOut();
//
BatchDoorOpen(false);
return
StartOut
();
return
""
;
}
else
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论