Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 16cf7bbc
由
几米阳光
编写于
2019-05-06 17:07:05 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出入库流程优化
1 个父辈
f28a4149
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
58 行增加
和
35 行删除
source/ACSingleStore/FrmStoreBox.cs
source/Common/bean/Bean.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/DeviceLibrary/ShuoKe/ShuoKeController.cs
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/FrmStoreBox.cs
查看文件 @
16cf7bb
...
...
@@ -1720,21 +1720,24 @@ namespace OnlineStore.AutoInOutStore
string
poText
=
cmbPosition
.
Text
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
DebugPosId
,
poText
);
store
.
autoMsg
=
"自动入库:"
+
poText
;
string
msg
=
AutomaticBaiting
.
doStartBatchIn
();
if
(
msg
.
Equals
(
""
))
{
store
.
autoNext
=
true
;
btnStart
.
Text
=
StopAuto
;
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
}
else
{
MessageBox
.
Show
(
msg
);
store
.
autoNext
=
false
;
btnStart
.
Text
=
StartAuto
;
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"自动出入库失败【"
+
msg
+
"】,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
}
store
.
autoMsg
=
"自动出入库:"
+
poText
;
store
.
autoNext
=
true
;
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
""
);
btnStart
.
Text
=
StopAuto
;
//string msg = AutomaticBaiting.doStartBatchIn();
//if (msg.Equals(""))
//{
// store.autoNext = true;
// btnStart.Text = StopAuto;
// LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
//}
//else
//{
// MessageBox.Show(msg);
// store.autoNext = false;
// btnStart.Text = StartAuto;
// LogUtil.info(LOGGER, store.StoreName + "自动出入库失败【"+msg+"】,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
//}
DebugStatus
(
false
);
}
}
...
...
source/Common/bean/Bean.cs
查看文件 @
16cf7bb
...
...
@@ -250,6 +250,6 @@ namespace OnlineStore.Common
/// </summary>
public
static
string
batchAxis
=
"device_batchAxis"
;
public
static
string
posName
=
"posName
"
;
public
static
string
inPos
=
"inPos
"
;
}
}
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
16cf7bb
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.IO.Ports
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading
;
namespace
OnlineStore.DeviceLibrary
{
...
...
@@ -390,6 +391,21 @@ namespace OnlineStore.DeviceLibrary
//Thread.Sleep(SleepMSendons);
OpenAndCloseSTB
(
portName
,
slvAddr
);
}
public
static
bool
isInPosition
(
ConfigMoveAxis
Axis
,
int
PPosition
)
{
int
outCount
=
ACServerManager
.
GetActualtPosition
(
Axis
.
DeviceName
,
Axis
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
-
PPosition
);
if
(
errorCount
<=
Axis
.
CanErrorCountMin
)
{
return
true
;
}
else
{
return
false
;
}
}
public
static
void
AbsMove
(
string
portName
,
int
slvAddr
,
int
targetPosition
,
int
targetSpeed
)
{
//先更新速度
...
...
source/DeviceLibrary/DeviceLibrary/ShuoKe/ShuoKeController.cs
查看文件 @
16cf7bb
...
...
@@ -341,7 +341,19 @@ namespace OnlineStore.DeviceLibrary
byte
[]
reviceData
=
SendData
(
slvAddr
,
ShuoKeCMD
.
GetAbsPosition
,
0x00
,
0
,
9
);
return
DataToPosition
(
reviceData
);
}
public
static
bool
IsInPosition
(
int
slvAddr
,
int
position
)
{
int
outCount
=
GetABSPosition
(
slvAddr
);
int
errorCount
=
Math
.
Abs
(
outCount
-
position
);
if
(
errorCount
<=
100
)
{
return
true
;
}
else
{
return
false
;
}
}
// <param name="homeType">0=反方向,1=正方向</param>
public
static
void
HomeMove
(
int
slvAddr
,
byte
homeType
)
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
16cf7bb
...
...
@@ -1348,12 +1348,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// <returns></returns>
public
bool
CanStarInOut
()
{
//if (isInSuddenDown || isNoAirCheck ||
// (!storeRunStatus.Equals(StoreRunStatus.Runing))
// || storeStatus.Equals(StoreStatus.InStoreExecute) || storeStatus.Equals(StoreStatus.OutStoreExecute)
// || storeStatus.Equals(StoreStatus.InStoreEnd) || storeStatus.Equals(StoreStatus.OutStoreBoxEnd))
{
if
((
isInSuddenDown
.
Equals
(
false
))
&&
(
isNoAirCheck
.
Equals
(
false
))
&&
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
&&
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)))
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
16cf7bb
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
16cf7bb
...
...
@@ -333,8 +333,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_SuckingDisc_Up
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升"
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SuckingDisc_Down, IO_VALUE.LOW));
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Down
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1500
));
}
else
if
(
SuckingDisc_WorkCount
<
3
)
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
16cf7bb
...
...
@@ -232,19 +232,15 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到【"
+
wait
.
IoType
+
"】信号,可以停止运动"
);
result
=
true
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
//else if (ACServerManager.GetLimitPositiveSingle(wait.AxisInfo).Equals(1))
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到正极限信号,可以停止运动"
);
//ACServerManager.SuddenStop(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
//Thread.Sleep(50);
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到正极限信号,可以停止运动"
);
result
=
true
;
}
if
(
result
)
{
//AutoAxisIsMove = 0;
{
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 停止运动"
);
ACServerManager
.
SuddenStop
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()
);
ACServerManager
.
SuddenStop
(
wait
.
AxisInfo
);
}
return
result
;
}
...
...
@@ -389,7 +385,7 @@ namespace OnlineStore.DeviceLibrary
string
autoposId
=
StoreManager
.
Store
.
GetAutoPosid
(
true
);
if
(
StoreManager
.
Store
.
autoNext
&&
(!
String
.
IsNullOrEmpty
(
autoposId
)))
{
operation
.
data
.
Add
(
ParamDefine
.
posName
,
autoposId
);
operation
.
data
.
Add
(
ParamDefine
.
inPos
,
autoposId
);
LogUtil
.
info
(
"添加自动入库库位号:"
+
autoposId
);
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论