Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 97edbb72
由
几米阳光
编写于
2018-12-27 14:29:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
压紧轴,升降轴P1都根据高度改变。最后一个料盘高度需要增加补充。
1 个父辈
8c107f8f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
223 行增加
和
97 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/Common/Setting_Init.cs
source/Common/util/ConfigAppSettings.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
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/DeviceLibrary/store/AC_Store.cs
source/DeviceLibrary/store/InOrOutStoreParam.cs
source/DeviceLibrary/store/model/FixtureCodeInfo.cs
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
source/ACSingleStore/App.config
查看文件 @
97edbb7
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
<
add
key
=
"AxisChangeValue"
value
=
"5000"
/>
<
add
key
=
"AxisChangeValue"
value
=
"5000"
/>
<!--压紧轴计量检测信号亮
1
次的脉冲值-->
<!--压紧轴计量检测信号亮
1
次的脉冲值-->
<
add
key
=
"ComAxisChangeValue"
value
=
"10000"
/>
<
add
key
=
"ComAxisChangeValue"
value
=
"10000"
/>
<
add
key
=
"DebugPosId"
value
=
"1#AC1_2_1_1"
/>
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
97edbb7
此文件的差异被折叠,
点击展开。
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
97edbb7
此文件的差异被折叠,
点击展开。
source/ACSingleStore/记录.txt
查看文件 @
97edbb7
...
@@ -79,15 +79,22 @@ X22_气压检测:
...
@@ -79,15 +79,22 @@ X22_气压检测:
压紧轴改为同步返回数据模式,压紧轴增加计量检测功能。
压紧轴改为同步返回数据模式,压紧轴增加计量检测功能。
201
2
1226
201
8
1226
出库状态下,如果复位未开门锁,不能清理出库信息
出库状态下,如果复位未开门锁,不能清理出库信息
出入库增加统计,增加气压检测功能。
出入库增加统计,增加气压检测功能。
出入库失败信息发个服务器
出入库失败信息发个服务器
20181227
压紧轴修改
最后一盘料需要补充高度
PRO,压紧轴(轴4)P2压紧点集合,CompressAxis_P2_List,52#-10000;48#-10000,,,,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,
·
入库老报警,入库的P1没有重新加载
...
...
source/Common/Setting_Init.cs
查看文件 @
97edbb7
...
@@ -78,5 +78,7 @@ namespace OnlineStore.Common
...
@@ -78,5 +78,7 @@ namespace OnlineStore.Common
public
static
string
CodeRun
=
"CodeRun"
;
public
static
string
CodeRun
=
"CodeRun"
;
public
static
string
ComAxisChangeValue
=
"ComAxisChangeValue"
;
public
static
string
ComAxisChangeValue
=
"ComAxisChangeValue"
;
public
static
string
DebugPosId
=
"DebugPosId"
;
}
}
}
}
source/Common/util/ConfigAppSettings.cs
查看文件 @
97edbb7
...
@@ -202,5 +202,10 @@ namespace OnlineStore.Common
...
@@ -202,5 +202,10 @@ namespace OnlineStore.Common
LogUtil
.
error
(
LOGGER
,
"SetValue保存配置出错:AppKey="
+
AppKey
+
",AppValue="
+
AppValue
+
","
+
ex
.
StackTrace
);
LogUtil
.
error
(
LOGGER
,
"SetValue保存配置出错:AppKey="
+
AppKey
+
",AppValue="
+
AppValue
+
","
+
ex
.
StackTrace
);
}
}
}
}
public
static
string
GetValue
(
object
debugPosId
)
{
throw
new
NotImplementedException
();
}
}
}
}
}
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
97edbb7
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
97edbb7
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
97edbb7
...
@@ -939,9 +939,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -939,9 +939,9 @@ namespace OnlineStore.DeviceLibrary
//没有启动时收到复位按钮,相当于启动按钮
//没有启动时收到复位按钮,相当于启动按钮
LogUtil
.
info
(
LOGGER
,
StoreName
+
"没有启动时收到复位按钮,相当于启动按钮,开始调用启动方法!"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"没有启动时收到复位按钮,相当于启动按钮,开始调用启动方法!"
);
bool
result
=
StartRun
();
bool
result
=
StartRun
();
if
(
result
.
Equals
(
false
)
)
if
(
!
result
)
{
{
LogUtil
.
error
(
"料仓启动失败,继续等待下次启动!"
);
LogUtil
.
info
(
"料仓启动失败,继续等待下次启动!"
);
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
if
(
isAuto
==
1
)
if
(
isAuto
==
1
)
{
{
...
@@ -1588,7 +1588,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1588,7 +1588,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
CanStarInOut
())
if
(
CanStarInOut
())
{
{
StartOutStoreMove
(
new
InOutStoreParam
(
""
,
posId
,
position
),
!
isSingleOut
);
StartOutStoreMove
(
new
InOutStoreParam
(
""
,
posId
),
!
isSingleOut
);
}
}
else
else
{
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
97edbb7
...
@@ -38,16 +38,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -38,16 +38,12 @@ namespace OnlineStore.DeviceLibrary
{
{
return
false
;
return
false
;
}
}
int
height
=
24
;
if
(
Config
.
Default_TrayWidth
.
Equals
(
7
))
{
height
=
8
;
}
//加载位置
//加载位置
if
(
param
.
MoveP
==
null
)
if
(
param
.
MoveP
==
null
)
{
{
LineMoveP
p
=
new
LineMoveP
();
LineMoveP
p
=
new
LineMoveP
();
AutoStorePosition
position
=
param
.
Get
AC
Position
();
AutoStorePosition
position
=
param
.
GetPosition
();
if
(
position
==
null
)
if
(
position
==
null
)
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
"出入库时发现param中取到的Position=null,没有库位不能执行出入库"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
"出入库时发现param中取到的Position=null,没有库位不能执行出入库"
);
...
@@ -62,12 +58,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -62,12 +58,9 @@ namespace OnlineStore.DeviceLibrary
p
.
UpDown_OutLow_P8
=
Config
.
UpDownAxis_OutLow_P8
;
p
.
UpDown_OutLow_P8
=
Config
.
UpDownAxis_OutLow_P8
;
p
.
InOut_P2
=
position
.
InOutAxis_Batch_P2
;
p
.
InOut_P2
=
position
.
InOutAxis_Batch_P2
;
p
.
InOut_P4
=
position
.
InOutAxis_DoorOutPosition_P4
;
p
.
InOut_P4
=
position
.
InOutAxis_DoorOutPosition_P4
;
//if (IsBatch)
//{
// p.InOut_P2 = position.InOutAxis_Batch_P2;
//}
p
.
UpDown_P1
=
Config
.
GetUpDownP1
(
position
.
BagHeight
);
p
.
UpDown_P1
=
Config
.
GetUpDownP1
(
param
.
PlateH
);
p
.
ComPress_P2
=
position
.
CompressAxis_Position_P2
;
p
.
ComPress_P2
=
position
.
CompressAxis_Position_P2
;
p
.
ComPress_P3
=
position
.
CompressAxis_CPosition_P3
;
p
.
ComPress_P3
=
position
.
CompressAxis_CPosition_P3
;
p
.
InOut_P3
=
position
.
InOutAxis_Position_P3
;
p
.
InOut_P3
=
position
.
InOutAxis_Position_P3
;
...
@@ -76,22 +69,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -76,22 +69,20 @@ namespace OnlineStore.DeviceLibrary
p
.
UpDown_P4
=
position
.
UpDownAxis_ILPosition_P4
;
p
.
UpDown_P4
=
position
.
UpDownAxis_ILPosition_P4
;
p
.
UpDown_P5
=
position
.
UpDownAxis_OHPosition_P5
;
p
.
UpDown_P5
=
position
.
UpDownAxis_OHPosition_P5
;
p
.
UpDown_P6
=
position
.
UpDownAxis_OLPosition_P6
;
p
.
UpDown_P6
=
position
.
UpDownAxis_OLPosition_P6
;
height
=
position
.
BagHeight
;
param
.
MoveP
=
p
;
param
.
MoveP
=
p
;
return
true
;
}
}
else
int
com2Value
=
Config
.
GetComP2
(
param
.
PlateH
);
if
(
com2Value
.
Equals
(-
1
).
Equals
(
false
))
{
{
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
param
.
PositionNum
);
param
.
MoveP
.
ComPress_P2
=
com2Value
;
if
(
position
!=
null
)
//LogUtil.debug("【" + param.PositionNum + "】高度【" + param.PlateH + "】压紧点2位置【" + param.MoveP.ComPress_P2 + "】");
{
height
=
position
.
BagHeight
;
}
}
}
//出库时批量上下料轴需要下降的高度
//出库时批量上下料轴需要下降的高度
param
.
MoveP
.
BatchAxis_DownValue
=
AutomaticBaiting
.
AxisChangeValue
*
height
+
Config
.
BatchAxis_OutDownPosition
;
param
.
MoveP
.
BatchAxis_DownValue
=
AutomaticBaiting
.
AxisChangeValue
*
param
.
PlateH
+
Config
.
BatchAxis_OutDownPosition
;
LogUtil
.
debug
(
"【"
+
param
.
PositionNum
+
"】高度【"
+
height
+
"】批量上下料轴需要下降【"
+
param
.
MoveP
.
BatchAxis_DownValue
+
"】"
);
//LogUtil.debug("【" + param.PositionNum + "】高度【" + param.PlateH + "】批量上下料轴需要下降【" + param.MoveP.BatchAxis_DownValue + "】");
param
.
MoveP
.
UpDown_P1
=
Config
.
GetUpDownP1
(
param
.
PlateH
);
LogUtil
.
info
(
"【"
+
param
.
PositionNum
+
"】高【"
+
param
.
PlateH
+
"】升降轴P1【"
+
param
.
MoveP
.
UpDown_P1
+
"】压紧轴P2【"
+
param
.
MoveP
.
ComPress_P2
+
"】批量上下料轴需要下降【"
+
param
.
MoveP
.
BatchAxis_DownValue
+
"】"
);
return
true
;
return
true
;
}
}
...
@@ -597,7 +588,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -597,7 +588,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
return
false
;
}
}
}
}
int
height
=
param
.
Get
AC
Position
().
BagHeight
;
int
height
=
param
.
GetPosition
().
BagHeight
;
if
(
AutomaticBaiting
.
BatchOutStoreHeight
+
height
>
Config
.
BatchAxis_MaxHeight
)
if
(
AutomaticBaiting
.
BatchOutStoreHeight
+
height
>
Config
.
BatchAxis_MaxHeight
)
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,当前高【"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"】出库料盘高【"
+
height
+
"】,最大高【"
+
Config
.
BatchAxis_MaxHeight
+
"】"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
logMsg
+
" 出错,当前高【"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"】出库料盘高【"
+
height
+
"】,最大高【"
+
Config
.
BatchAxis_MaxHeight
+
"】"
);
...
@@ -756,7 +747,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -756,7 +747,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog
(
"出库:SO_11_PutTray 放下料盘,升降轴到P8(出库低点),压紧轴至P3(压紧前点)"
);
OutStoreLog
(
"出库:SO_11_PutTray 放下料盘,升降轴到P8(出库低点),压紧轴至P3(压紧前点)"
);
ComMoveToPosition
(
StoreMove
.
MoveParam
.
MoveP
.
ComPress_P3
,
true
);
ComMoveToPosition
(
StoreMove
.
MoveParam
.
MoveP
.
ComPress_P3
,
true
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_OutLow_P8
,
Config
.
UpDownAxis_P8_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_OutLow_P8
,
Config
.
UpDownAxis_P8_Speed
);
AutomaticBaiting
.
BatchOutStoreHeight
+=
StoreMove
.
MoveParam
.
Get
AC
Position
().
BagHeight
;
AutomaticBaiting
.
BatchOutStoreHeight
+=
StoreMove
.
MoveParam
.
GetPosition
().
BagHeight
;
AutomaticBaiting
.
BatchOutStoreCount
++;
AutomaticBaiting
.
BatchOutStoreCount
++;
}
}
else
if
(
KND
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
KND
.
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
97edbb7
...
@@ -19,7 +19,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -19,7 +19,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
static
int
DoorStatus
=
2
;
public
static
int
DoorStatus
=
2
;
private
static
int
LastHeight
=
0
;
private
static
int
LastHeight
=
0
;
private
static
int
Last
Size
=
0
;
private
static
int
Last
Width
=
0
;
private
static
string
LastCode
=
""
;
private
static
string
LastCode
=
""
;
private
static
string
LastPosId
=
""
;
private
static
string
LastPosId
=
""
;
public
static
int
AxisChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AxisChangeValue
);
public
static
int
AxisChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AxisChangeValue
);
...
@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
LastCode
=
""
;
LastCode
=
""
;
LastPosId
=
""
;
LastPosId
=
""
;
LastHeight
=
0
;
LastHeight
=
0
;
Last
Size
=
0
;
Last
Width
=
0
;
}
}
public
static
void
StopRun
()
public
static
void
StopRun
()
...
@@ -133,13 +133,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -133,13 +133,13 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
info
(
Name
+
" 复位前,清理报警【"
+
StoreManager
.
Store
.
alarmType
+
"】"
);
LogUtil
.
info
(
Name
+
" 复位前,清理报警【"
+
StoreManager
.
Store
.
alarmType
+
"】"
);
StoreManager
.
Store
.
alarmType
=
StoreAlarmType
.
None
;
StoreManager
.
Store
.
alarmType
=
StoreAlarmType
.
None
;
WarnMsg
=
""
;
}
}
AutomaticBaiting
.
IsNeedStartInout
=
isNeedInout
;
AutomaticBaiting
.
IsNeedStartInout
=
isNeedInout
;
if
(!
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
if
(!
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
{
{
StopMove
();
StopMove
();
}
}
WarnMsg
=
""
;
ClearInStoreInfo
();
ClearInStoreInfo
();
DoorStatus
=
2
;
DoorStatus
=
2
;
AutoBaitingStatus
=
StoreRunStatus
.
Reset
;
AutoBaitingStatus
=
StoreRunStatus
.
Reset
;
...
@@ -289,6 +289,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -289,6 +289,7 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_SuckingDisc_Up
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_SuckingDisc_Up
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升,等待宽度到达"
+
StoreManager
.
Config
.
Default_TrayWidth
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升,等待宽度到达"
+
StoreManager
.
Config
.
Default_TrayWidth
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
...
@@ -323,6 +324,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -323,6 +324,11 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
StoreManager
.
Store
.
CanStarInOut
())
if
(
StoreManager
.
Store
.
CanStarInOut
())
{
{
LastWidth
=
StoreManager
.
Config
.
Default_TrayWidth
;
LastHeight
=
GetHeight
();
BatchInStoreCount
++;
BatchInStoreHeight
+=
LastHeight
;
if
(
LastCode
.
Equals
(
""
))
if
(
LastCode
.
Equals
(
""
))
{
{
LogUtil
.
info
(
Name
+
"入料: 未扫到二维码,将料盘送出,等待料盘拿走"
);
LogUtil
.
info
(
Name
+
"入料: 未扫到二维码,将料盘送出,等待料盘拿走"
);
...
@@ -331,11 +337,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -331,11 +337,8 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I08_GetPosId
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I08_GetPosId
);
LastSize
=
StoreManager
.
Config
.
Default_TrayWidth
;
LastHeight
=
GetHeight
();
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastWidth
+
"*"
+
LastHeight
+
"】二维码【"
+
LastCode
+
"】"
);
BatchInStoreCount
++;
BatchInStoreHeight
+=
LastHeight
;
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastSize
+
"*"
+
LastHeight
+
"】二维码【"
+
LastCode
+
"】"
);
GetInStorePosId
(
ProcessMsg
());
GetInStorePosId
(
ProcessMsg
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
...
@@ -389,8 +392,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -389,8 +392,23 @@ namespace OnlineStore.DeviceLibrary
{
{
//计算高度
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
if
(
EndMovePosition
.
Equals
(-
1
))
{
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
}
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
);
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
);
LogUtil
.
info
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】计算后高度【"
+
LastHeight
+
"】"
);
int
addHeight
=
0
;
//如果检测信号未亮,极限亮了,需要补充高
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
addHeight
=
StoreManager
.
Config
.
LastTrayAddHeight
;
}
LastHeight
+=
addHeight
;
LogUtil
.
info
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后高度【"
+
LastHeight
+
"】"
);
if
(
LastHeight
<
0
)
{
LastHeight
=
StoreManager
.
Config
.
GetDefaultHeight
();
}
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
{
{
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
...
@@ -405,15 +423,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -405,15 +423,27 @@ namespace OnlineStore.DeviceLibrary
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
}
}
}
}
return
LastHeight
;
return
LastHeight
;
}
}
private
static
List
<
AutoStorePosition
>
AllPosList
=
null
;
private
static
void
SendTrayOut
()
private
static
void
SendTrayOut
()
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I10_WaitTrayGo
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I10_WaitTrayGo
);
StoreMove
.
TimeOutSeconds
=
120
;
StoreMove
.
TimeOutSeconds
=
120
;
string
posId
=
StoreManager
.
Store
.
PositionNumList
[
0
];
string
posId
=
StoreManager
.
Store
.
PositionNumList
[
0
];
StoreManager
.
Store
.
StartInStoreMove
(
new
InOutStoreParam
(
""
,
posId
),
true
,
false
);
//盘先根据高低排序
if
(
AllPosList
==
null
)
{
AllPosList
=
CSVPositionReader
<
AutoStorePosition
>.
getPositionList
();
AllPosList
=
(
from
m
in
AllPosList
orderby
m
.
BagHeight
ascending
select
m
).
ToList
<
AutoStorePosition
>();
}
List
<
AutoStorePosition
>
okList
=
(
from
m
in
AllPosList
where
m
.
BagHeight
>=
LastHeight
select
m
).
ToList
<
AutoStorePosition
>();
if
(
okList
.
Count
>
0
)
{
posId
=
okList
[
0
].
PositionNum
;
}
StoreManager
.
Store
.
StartInStoreMove
(
new
InOutStoreParam
(
LastCode
,
posId
,
LastHeight
,
LastWidth
),
true
,
false
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitStoreRuning
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitStoreRuning
());
}
}
...
@@ -432,7 +462,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -432,7 +462,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LastCode
=
""
;
LastCode
=
""
;
LastHeight
=
0
;
LastHeight
=
0
;
Last
Size
=
0
;
Last
Width
=
0
;
LastPosId
=
""
;
LastPosId
=
""
;
SuckingDisc_WorkCount
=
0
;
SuckingDisc_WorkCount
=
0
;
//如果有超时异常,需要清理
//如果有超时异常,需要清理
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
97edbb7
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/store/AC_Store.cs
查看文件 @
97edbb7
...
@@ -368,31 +368,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -368,31 +368,14 @@ namespace OnlineStore.DeviceLibrary
msg
=
""
;
msg
=
""
;
string
deviceName
=
moveAxis
.
DeviceName
;
string
deviceName
=
moveAxis
.
DeviceName
;
short
axisNo
=
moveAxis
.
GetAxisValue
();
short
axisNo
=
moveAxis
.
GetAxisValue
();
////如果是进出轴,并且光栅被遮挡,直接返回false
//if (NeedCheckSafetyLight.Equals(2))
//{
// if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor) ||
// StoreMove.MoveStep.Equals(StoreMoveStep.SI_04_DeviceToDoor))
// {
// return false;
// }
//}
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
int
errorCount
=
Math
.
Abs
(
outCount
-
targetPosition
);
int
errorCount
=
Math
.
Abs
(
outCount
-
targetPosition
);
if
(
isOk
)
if
(
isOk
)
{
{
if
(
errorCount
>
moveAxis
.
CanErrorCountMax
)
if
(
errorCount
>
moveAxis
.
CanErrorCountMax
)
{
{
//if (NeedCheckSafetyLight.Equals(2))
//{
// if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor) ||
// StoreMove.MoveStep.Equals(StoreMoveStep.SI_04_DeviceToDoor))
// {
// return false;
// }
//}
//判断是否需要重新运动
//判断是否需要重新运动
if
(
StoreMove
.
CanWhileCount
>
0
)
if
(
StoreMove
.
CanWhileCount
>
0
)
{
{
...
...
source/DeviceLibrary/store/InOrOutStoreParam.cs
查看文件 @
97edbb7
...
@@ -34,8 +34,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -34,8 +34,9 @@ namespace OnlineStore.DeviceLibrary
PositionNum
=
posId
;
PositionNum
=
posId
;
MoveP
=
null
;
MoveP
=
null
;
IsSolderPaste
=
false
;
IsSolderPaste
=
false
;
SetSize
();
}
}
public
InOutStoreParam
(
string
wareNo
,
string
posId
,
string
plateH
,
string
plateW
)
public
InOutStoreParam
(
string
wareNo
,
string
posId
,
int
plateH
,
int
plateW
)
{
{
ACStoreP
=
null
;
ACStoreP
=
null
;
WareNumber
=
wareNo
;
WareNumber
=
wareNo
;
...
@@ -45,17 +46,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -45,17 +46,17 @@ namespace OnlineStore.DeviceLibrary
this
.
PlateH
=
plateH
;
this
.
PlateH
=
plateH
;
IsSolderPaste
=
false
;
IsSolderPaste
=
false
;
}
}
public
InOutStoreParam
(
string
wareNo
,
string
posId
,
string
plateH
,
string
plateW
,
int
trayCode
)
//public InOutStoreParam(string wareNo, string posId, int plateH, int
plateW,int trayCode)
{
//
{
ACStoreP
=
null
;
//
ACStoreP = null;
WareNumber
=
wareNo
;
//
WareNumber = wareNo;
PositionNum
=
posId
;
//
PositionNum = posId;
MoveP
=
null
;
//
MoveP = null;
this
.
PlagtW
=
plateW
;
//
this.PlagtW = plateW;
this
.
PlateH
=
plateH
;
//
this.PlateH = plateH;
this
.
TrayCode
=
trayCode
;
//
this.TrayCode = trayCode;
IsSolderPaste
=
false
;
//
IsSolderPaste = false;
}
//
}
public
InOutStoreParam
(
string
wareNo
,
string
posId
,
LineMoveP
linePosition
)
public
InOutStoreParam
(
string
wareNo
,
string
posId
,
LineMoveP
linePosition
)
{
{
...
@@ -64,19 +65,33 @@ namespace OnlineStore.DeviceLibrary
...
@@ -64,19 +65,33 @@ namespace OnlineStore.DeviceLibrary
PositionNum
=
posId
;
PositionNum
=
posId
;
MoveP
=
linePosition
;
MoveP
=
linePosition
;
IsSolderPaste
=
false
;
IsSolderPaste
=
false
;
SetSize
();
}
}
public
InOutStoreParam
(
string
wareNo
,
string
posId
,
AutoStorePosition
movep
)
//public InOutStoreParam(string wareNo, string posId, AutoStorePosition movep)
//{
// ACStoreP = movep;
// WareNumber = wareNo;
// PositionNum = posId;
// MoveP = null;
// IsSolderPaste = false;
//}
public
void
SetSize
()
{
{
ACStoreP
=
movep
;
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
PositionNum
);
WareNumber
=
wareNo
;
if
(!(
position
==
null
))
PositionNum
=
posId
;
{
MoveP
=
null
;
this
.
PlateH
=
position
.
BagHeight
;
IsSolderPaste
=
false
;
this
.
PlagtW
=
position
.
BagWidth
;
}
else
{
this
.
PlagtW
=
StoreManager
.
Config
.
Default_TrayWidth
;
this
.
PlateH
=
StoreManager
.
Config
.
GetDefaultHeight
();
}
}
}
private
AutoStorePosition
ACStoreP
=
null
;
private
AutoStorePosition
ACStoreP
=
null
;
public
AutoStorePosition
Get
AC
Position
()
public
AutoStorePosition
GetPosition
()
{
{
try
try
{
{
...
@@ -109,11 +124,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -109,11 +124,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 料盘高度
/// 料盘高度
/// </summary>
/// </summary>
public
string
PlateH
{
get
;
set
;
}
public
int
PlateH
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 料盘宽度
/// 料盘宽度
/// </summary>
/// </summary>
public
string
PlagtW
{
get
;
set
;
}
public
int
PlagtW
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 是否是放入锡膏(在线料仓才需要此字段)
/// 是否是放入锡膏(在线料仓才需要此字段)
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/store/model/FixtureCodeInfo.cs
查看文件 @
97edbb7
using
System
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -17,16 +18,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -17,16 +18,29 @@ namespace OnlineStore.DeviceLibrary
this
.
TrayCode
=
trayCode
;
this
.
TrayCode
=
trayCode
;
this
.
WareNum
=
wareNum
;
this
.
WareNum
=
wareNum
;
this
.
PosId
=
posId
;
this
.
PosId
=
posId
;
this
.
plateH
=
""
;
SetSize
();
this
.
plateW
=
""
;
}
}
public
FixtureCodeInfo
(
int
trayCode
,
string
wareNum
,
string
posId
,
string
platew
,
string
plateh
)
//public FixtureCodeInfo(int trayCode, string wareNum, string posId,int platew, int plateh)
//{
// this.TrayCode = trayCode;
// this.WareNum = wareNum;
// this.PosId = posId;
// this.plateW = platew;
// this.plateH = plateh;
//}
public
void
SetSize
()
{
{
this
.
TrayCode
=
trayCode
;
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
PosId
);
this
.
WareNum
=
wareNum
;
if
(!(
position
==
null
))
this
.
PosId
=
posId
;
{
this
.
plateW
=
platew
;
this
.
plateH
=
position
.
BagHeight
;
this
.
plateH
=
plateh
;
this
.
plateW
=
position
.
BagWidth
;
}
else
{
this
.
plateW
=
StoreManager
.
Config
.
Default_TrayWidth
;
this
.
plateH
=
StoreManager
.
Config
.
GetDefaultHeight
();
}
}
}
/// <summary>
/// <summary>
/// 夹具编码值(1-6)
/// 夹具编码值(1-6)
...
@@ -43,11 +57,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -43,11 +57,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 料盘宽
/// 料盘宽
/// </summary>
/// </summary>
public
string
plateW
{
get
;
set
;
}
public
int
plateW
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 料盘高
/// 料盘高
/// </summary>
/// </summary>
public
string
plateH
{
get
;
set
;
}
public
int
plateH
{
get
;
set
;
}
public
string
ToStr
()
public
string
ToStr
()
...
...
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
查看文件 @
97edbb7
...
@@ -352,6 +352,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -352,6 +352,11 @@ namespace OnlineStore.LoadCSVLibrary
public
int
CompressAxis_P1_Position
{
get
;
set
;
}
public
int
CompressAxis_P1_Position
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,压紧轴(轴4)P2压紧点集合,CompressAxis_P2_List,52#-10000;48#-10000,,,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"CompressAxis_P2_List"
)]
public
string
CompressAxis_P2_List
{
get
;
set
;
}
/// <summary>
/// PRO 是否使用料盘检测信号 IsUse_Tray_Check
/// PRO 是否使用料盘检测信号 IsUse_Tray_Check
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"IsUse_Tray_Check"
)]
[
ConfigProAttribute
(
"IsUse_Tray_Check"
)]
...
@@ -594,11 +599,73 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -594,11 +599,73 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"IO_DOLength"
)]
[
ConfigProAttribute
(
"IO_DOLength"
)]
public
string
IO_DOLength
{
get
;
set
;
}
public
string
IO_DOLength
{
get
;
set
;
}
/// <summary>
/// PRO,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"LastTrayAddHeight"
)]
public
int
LastTrayAddHeight
{
get
;
set
;
}
private
Dictionary
<
string
,
ushort
>
DILengthMap
=
null
;
private
Dictionary
<
string
,
ushort
>
DILengthMap
=
null
;
private
Dictionary
<
string
,
ushort
>
DOLengthMap
=
null
;
private
Dictionary
<
string
,
ushort
>
DOLengthMap
=
null
;
private
Dictionary
<
int
,
int
>
ComP2Map
=
null
;
public
int
GetComP2
(
int
trayHeight
)
{
try
{
if
(
ComP2Map
==
null
)
{
ComP2Map
=
new
Dictionary
<
int
,
int
>();
string
[]
arrayList
=
CompressAxis_P2_List
.
Split
(
';'
);
foreach
(
string
str
in
arrayList
)
{
string
[]
arrStr
=
str
.
Split
(
'#'
);
if
(
arrStr
.
Length
==
2
)
{
int
ioip
=
Convert
.
ToInt32
(
arrStr
[
0
]);
int
length
=
Convert
.
ToInt32
(
arrStr
[
1
]);
ComP2Map
.
Add
(
ioip
,
length
);
}
}
}
}
catch
(
Exception
ex
)
{
}
if
(
ComP2Map
.
ContainsKey
(
trayHeight
))
{
return
ComP2Map
[
trayHeight
];
}
else
{
LogUtil
.
error
(
"未找到料盘高度为【"
+
trayHeight
+
"】的压紧轴P2"
);
return
-
1
;
}
}
public
void
UpdateComP2
(
int
height
,
int
value
)
{
int
oldP1
=
GetComP2
(
height
);
if
(!
oldP1
.
Equals
(
value
))
{
if
(
ComP2Map
.
ContainsKey
(
height
))
{
ComP2Map
[
height
]
=
value
;
}
else
{
ComP2Map
.
Add
(
height
,
value
);
}
}
string
msg
=
""
;
foreach
(
int
key
in
ComP2Map
.
Keys
)
{
msg
+=
key
+
"#"
+
ComP2Map
[
key
]
+
";"
;
}
this
.
CompressAxis_P2_List
=
msg
;
}
private
Dictionary
<
int
,
int
>
UpDownAxisP1Map
=
null
;
private
Dictionary
<
int
,
int
>
UpDownAxisP1Map
=
null
;
public
int
GetUpDownP1
(
int
trayHeight
)
public
int
GetUpDownP1
(
int
trayHeight
)
{
{
...
@@ -630,11 +697,12 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -630,11 +697,12 @@ namespace OnlineStore.LoadCSVLibrary
}
}
else
else
{
{
LogUtil
.
error
(
"未找到料盘高度为【"
+
trayHeight
+
"】的升降轴P1"
);
LogUtil
.
error
(
"未找到料盘高度为【"
+
trayHeight
+
"】的升降轴P1
,查找最大高度的P1
"
);
if
(
UpDownAxisP1Map
.
Count
>
0
)
if
(
UpDownAxisP1Map
.
Count
>
0
)
{
{
List
<
int
>
list
=
new
List
<
int
>(
UpDownAxisP1Map
.
Values
);
List
<
int
>
list
=
new
List
<
int
>(
UpDownAxisP1Map
.
Keys
);
return
list
[
0
];
list
=
(
from
m
in
list
orderby
m
descending
select
m
).
ToList
<
int
>();
return
UpDownAxisP1Map
[
list
[
0
]];
}
}
}
}
...
@@ -662,8 +730,18 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -662,8 +730,18 @@ namespace OnlineStore.LoadCSVLibrary
this
.
UpDownAxis_P1_List
=
msg
;
this
.
UpDownAxis_P1_List
=
msg
;
}
}
public
int
GetDefaultUpDownP1
()
public
int
GetDefaultUpDownP1
()
{
return
GetUpDownP1
(
GetDefaultHeight
());
}
public
int
GetDefaultHeight
()
{
{
return
GetUpDownP1
(
8
);
int
defaultH
=
8
;
if
(
Default_TrayWidth
.
Equals
(
13
))
{
defaultH
=
40
;
}
return
defaultH
;
}
}
public
ushort
GetDILength
(
string
ip
)
public
ushort
GetDILength
(
string
ip
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论