Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a88261c6
由
LN
编写于
2019-09-02 10:08:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加压紧轴复位的配置
1 个父辈
3479aa35
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
96 行增加
和
18 行删除
source/ACSingleStore/FrmAxisDebug.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/KangNaiDe/KNDAIManager.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/store/StoreStep.cs
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
source/ACSingleStore/FrmAxisDebug.cs
查看文件 @
a88261c
...
...
@@ -265,7 +265,9 @@ namespace OnlineStore.ACSingleStore
{
btnComMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
ShuoKeControls
.
SuddownStop
(
compress_Slv
);
ShuoKeControls
.
GetABSPosition
(
compress_Slv
);
// ShuoKeControls.GetABSPosition(compress_Slv);
txtComPosition
.
Text
=
ShuoKeControls
.
GetABSPosition
(
compress_Slv
).
ToString
();
}
}
private
void
btnComMovej_MouseDown
(
object
sender
,
MouseEventArgs
e
)
...
...
@@ -288,7 +290,8 @@ namespace OnlineStore.ACSingleStore
{
btnComMovej
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
ShuoKeControls
.
SuddownStop
(
compress_Slv
);
ShuoKeControls
.
GetABSPosition
(
compress_Slv
);
// ShuoKeControls.GetABSPosition(compress_Slv);
txtComPosition
.
Text
=
ShuoKeControls
.
GetABSPosition
(
compress_Slv
).
ToString
();
}
}
...
...
@@ -310,14 +313,19 @@ namespace OnlineStore.ACSingleStore
UpdateMiddlePosition
();
UpdateInOutPosition
();
UpdateUpdownPosition
();
ShuoKeInfo
info
=
ShuoKeControls
.
GetLastPosition
(
compress_Slv
);
txtComPosition
.
Text
=
info
.
LastPosition
.
ToString
();
TimeSpan
span
=
DateTime
.
Now
-
info
.
UpdateTime
;
if
(
span
.
TotalSeconds
>
1.5
)
{
ShuoKeControls
.
GetABSPosition
(
compress_Slv
);
}
txtComPosition
.
Text
=
ShuoKeControls
.
GetABSPosition
(
compress_Slv
).
ToString
();
//ShuoKeInfo info = ShuoKeControls.GetLastPosition(compress_Slv);
//if (info != null)
//{
// txtComPosition.Text = info.LastPosition.ToString();
// TimeSpan span = DateTime.Now - info.UpdateTime;
// if (span.TotalSeconds > 1.5)
// {
// ShuoKeControls.GetABSPosition(compress_Slv);
// }
//}
}
}
...
...
source/ACSingleStore/记录.txt
查看文件 @
a88261c
...
...
@@ -83,3 +83,7 @@ bug修改:压紧轴点动时实时坐标更新。
增加Y15 允许放料信号
20190830:
增加压紧轴复位的配置。
StoreConfig.csv增加:
PRO,出入库多少次自动复位压紧轴,Box_ResetCCount,3,,,,,,,
\ No newline at end of file
source/DeviceLibrary/KangNaiDe/KNDAIManager.cs
查看文件 @
a88261c
...
...
@@ -68,12 +68,15 @@ namespace OnlineStore.DeviceLibrary
MBmaster
.
OnException
+=
new
AITcpClient
.
ExceptionData
(
MBmaster_OnException
);
MBmaster
.
autoConnectOfBreak
=
false
;
mastMap
.
Add
(
ioIp
,
MBmaster
);
if
(
MBmaster
.
ISConnection
())
{
LogUtil
.
info
(
LOGGER
,
"连接AI模块["
+
ioIp
+
"]成功"
);
Thread
.
Sleep
(
10
);
WriteAIScope
(
ioIp
,
1
);
Thread
.
Sleep
(
10
);
ReadAll
(
ioIp
);
}
}
catch
(
Exception
error
)
{
LogUtil
.
error
(
LOGGER
,
"连接AI模块["
+
ioIp
+
"]出错:"
+
error
.
ToString
());
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
a88261c
...
...
@@ -91,6 +91,7 @@ PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,出入库多少次自动复位压紧轴,Box_ResetCCount,3,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a88261c
...
...
@@ -223,6 +223,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
""
;
CurrInOutACount
=
0
;
CurrInOutCount
=
0
;
CurrInOutCCount
=
0
;
KNDIOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
...
...
@@ -277,6 +278,7 @@ namespace OnlineStore.DeviceLibrary
{
CurrInOutCount
=
0
;
CurrInOutACount
=
0
;
CurrInOutCCount
=
0
;
KNDIOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
LOW
);
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
a88261c
...
...
@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
private
int
CurrInOutCount
=
0
;
private
int
CurrInOutACount
=
0
;
private
int
CurrInOutCCount
=
0
;
private
bool
LoadParamPosition
(
InOutStoreParam
param
)
{
...
...
@@ -316,10 +317,14 @@ namespace OnlineStore.DeviceLibrary
}
private
void
SI_02_Move
(
LineMoveP
moveP
)
{
InStoreLog
(
"入库:SI_02_ 进出轴(叉子)动作至P1
,打开舱门"
);
InStoreLog
(
"入库:SI_02_ 进出轴(叉子)动作至P1
,打开舱门,已出入库次数:"
+
CurrInOutCCount
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_02_InOutAxisHome
);
OpenDoorAndWait
();
InOutBackToP1
(
moveP
.
InOut_P1
);
if
(
Config
.
Box_ResetCCount
<
CurrInOutCCount
&&
IsHasCompress_Axis
)
{
ComBeforeHomeMove
();
}
}
private
void
SI_05_DeviceToDoor
()
{
...
...
@@ -358,14 +363,27 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_02_InOutAxisHome
)
{
if
(
Config
.
Box_ResetCCount
<
CurrInOutCCount
&&
IsHasCompress_Axis
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_021_CompAxisHome
);
OutStoreLog
(
"出库:SI_021 已出入库"
+
CurrInOutCCount
+
"次,压紧轴需要原点返回"
);
CurrInOutCCount
=
0
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
0
,
true
));
ShuoKeControls
.
HomeMove
(
Config
.
CompressAxis_Slv
,
1
);
}
else
{
InStoreLog
(
"入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_021_CompAxisHome
)
{
InStoreLog
(
"入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
//}
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
}
...
...
@@ -559,10 +577,14 @@ namespace OnlineStore.DeviceLibrary
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_02_DeviceBack
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1 ,打开舱门
开始"
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1 ,打开舱门
,已出入库次数:"
+
CurrInOutCCount
);
//ACAxisMove(Config.InOut_Axis, StoreMove.MoveParam.MoveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1
(
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
);
if
(
Config
.
Box_ResetCCount
<
CurrInOutCCount
&&
IsHasCompress_Axis
)
{
ComBeforeHomeMove
();
}
//OpenDoorAndWait();
}
else
...
...
@@ -593,11 +615,34 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_01_LocationCylinderDown
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_02_DeviceBack
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1
"
);
OutStoreLog
(
"出库:SO_02 叉子先运动到P1
,已出入库次数:"
+
CurrInOutCCount
);
InOutBackToP1
(
StoreMove
.
MoveParam
.
MoveP
.
InOut_P1
);
if
(
Config
.
Box_ResetCCount
<
CurrInOutCCount
&&
IsHasCompress_Axis
)
{
ComBeforeHomeMove
();
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_02_DeviceBack
)
{
if
(
Config
.
Box_ResetCCount
<
CurrInOutCCount
&&
IsHasCompress_Axis
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_021_CompAxisHome
);
OutStoreLog
(
"出库:SO_021 已出入库"
+
CurrInOutCCount
+
"次,压紧轴需要原点返回"
);
CurrInOutCCount
=
0
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
0
,
true
));
ShuoKeControls
.
HomeMove
(
Config
.
CompressAxis_Slv
,
1
);
}
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_03_ToBagPosition
);
OutStoreLog
(
"出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ACAxisMove
(
Config
.
Middle_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P5
,
Config
.
UpDownAxis_P5_Speed
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_021_CompAxisHome
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_03_ToBagPosition
);
OutStoreLog
(
"出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
...
...
@@ -841,6 +886,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
CurrInOutCCount
++;
CurrInOutCount
++;
CurrInOutACount
++;
//是否自动进入出库状态
...
...
@@ -896,7 +942,8 @@ namespace OnlineStore.DeviceLibrary
if
(
AutoOnlyOut
)
{
StartNewOut
(
posid
);
}
else
}
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"自动入库:posid="
+
posid
);
autoMsg
=
"自动入库:"
+
posid
;
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
a88261c
...
...
@@ -219,6 +219,10 @@ namespace OnlineStore.DeviceLibrary
///料仓出库:叉子先运动到P1
/// </summary>
SO_02_DeviceBack
=
102
,
/// <summary>
/// 料仓出库,,压紧轴原点返回
/// </summary>
SO_021_CompAxisHome
=
120
,
/// <summary>
/// 料仓出库,,所有轴运行到库位, 轴4( 压紧) 至P3(压紧前点) ,轴1( 转盘) 至P2( 库位点),轴2(上下) 至P5(库位出库前点)
...
...
@@ -302,6 +306,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SI_02_InOutAxisHome
=
202
,
/// <summary>
/// 入库。。压紧轴原点返回
/// </summary>
SI_021_CompAxisHome
=
220
,
/// <summary>
/// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
/// </summary>
SI_03_ReturnHome
=
203
,
...
...
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
查看文件 @
a88261c
...
...
@@ -291,6 +291,11 @@ namespace OnlineStore.LoadCSVLibrary
public
int
Box_ResetACount
{
get
;
set
;
}
/// <summary>
/// PRO,出入库多少次自动复位压紧轴,Box_ResetCCount,1000,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"Box_ResetCCount"
)]
public
int
Box_ResetCCount
{
get
;
set
;
}
/// <summary>
/// PRO IO信号超时时间(毫秒) IOSingle_TimerOut 5000
/// </summary>
[
ConfigProAttribute
(
"IOSingle_TimerOut"
,
false
)]
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论