Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fb400ac6
由
LN
编写于
2020-06-18 16:51:08 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
批量上料轴上升改为绝对运动
1 个父辈
692849d3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
51 行增加
和
38 行删除
source/Common/util/LogUtil.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
source/Common/util/LogUtil.cs
查看文件 @
fb400ac
...
@@ -14,7 +14,7 @@ namespace OnlineStore.Common
...
@@ -14,7 +14,7 @@ namespace OnlineStore.Common
private
static
LogUtil
instance
=
new
LogUtil
();
private
static
LogUtil
instance
=
new
LogUtil
();
public
delegate
void
ShowLog
(
string
msg
,
Color
color
);
public
delegate
void
ShowLog
(
string
msg
,
Color
color
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
AIOLog
=
LogManager
.
GetLogger
(
"AIOBOXLog
"
);
// public static readonly ILog AIOLog = LogManager.GetLogger("AIOBOX
");
public
static
Dictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Dictionary
<
int
,
DateTime
>();
public
static
Dictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Dictionary
<
int
,
DateTime
>();
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
fb400ac
...
@@ -36,7 +36,8 @@
...
@@ -36,7 +36,8 @@
<Prefer32Bit>false</Prefer32Bit>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference Include="Asa.IOModule.AIOBOX">
<Reference Include="Asa.IOModule.AIOBOX, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
</Reference>
<Reference Include="CodeLibrary">
<Reference Include="CodeLibrary">
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
查看文件 @
fb400ac
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
{
{
checkTimer
=
new
System
.
Timers
.
Timer
();
checkTimer
=
new
System
.
Timers
.
Timer
();
checkTimer
.
AutoReset
=
true
;
checkTimer
.
AutoReset
=
true
;
checkTimer
.
Interval
+=
2
0
;
checkTimer
.
Interval
+=
3
0
;
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
checkTimer
.
Enabled
=
false
;
checkTimer
.
Enabled
=
false
;
}
}
...
@@ -53,11 +53,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -53,11 +53,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
"批量上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",可以停止运动"
);
LogUtil
.
info
(
"批量上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",可以停止运动"
);
result
=
true
;
result
=
true
;
}
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
//
else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
{
//
{
LogUtil
.
info
(
"批量上料轴,检测到正极限信号,可以停止运动"
);
//
LogUtil.info("批量上料轴,检测到正极限信号,可以停止运动");
result
=
true
;
//
result = true;
}
//
}
if
(
result
)
if
(
result
)
{
{
//AutoAxisIsMove = 0;
//AutoAxisIsMove = 0;
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
fb400ac
...
@@ -148,7 +148,6 @@ PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
...
@@ -148,7 +148,6 @@ PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,800,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,800,,,,,,,
PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,80,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,
...
@@ -156,12 +155,14 @@ PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
...
@@ -156,12 +155,14 @@ PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,2000,,,,,, ,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,2000,,,,,, ,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1700000,,,,,, ,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1700000,,,,,, ,
PRO,(轴五)上料轴P2点(待机点),BatchAxis_P2,30000,,,,,,,
PRO,(轴五)上料轴P2点(待机点),BatchAxis_P2,30000,,,,,,,
PRO,(轴五)上料轴P
2速度,BatchAxis_P2_Speed,2
000,,,,,,,
PRO,(轴五)上料轴P
3点(上料目标位置),BatchAxis_P3,1700
000,,,,,,,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,2000,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,2000,,,,,,,
PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,2000,,,,,,,
PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,80,,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,30000,,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,30000,,,,,,,
PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_DownPosition2,150000,,,,,,,
PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_DownPosition2,150000,,,,,,,
PRO,(轴五)上料轴最最大料盘高度mm,到达后无法批量出库,BatchAxis_MaxHeight,250,,,,,,,
PRO,(轴五)上料轴最最大料盘高度mm,到达后无法批量出库,BatchAxis_MaxHeight,250,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
fb400ac
...
@@ -208,16 +208,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -208,16 +208,16 @@ namespace OnlineStore.DeviceLibrary
{
{
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
,
span
);
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
,
span
);
}
}
if
(!
wait
.
IsEnd
)
//
if (!wait.IsEnd)
{
//
{
bool
MoveEnd
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
//
bool MoveEnd = ACServerManager.GetBusyStatus(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue()).Equals(0);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
//
int outCount = ACServerManager.GetActualtPosition(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue());
int
errorCount
=
Math
.
Abs
(
outCount
-
wait
.
TargetPosition
);
//
int errorCount = Math.Abs(outCount - wait.TargetPosition);
if
(
MoveEnd
&&
errorCount
<
wait
.
AxisInfo
.
CanErrorCountMax
)
//
if (MoveEnd && errorCount < wait.AxisInfo.CanErrorCountMax)
{
//
{
wait
.
IsEnd
=
true
;
//
wait.IsEnd = true;
}
//
}
}
//
}
if
(
wait
.
IsEnd
)
if
(
wait
.
IsEnd
)
{
{
BatchAxisController
.
StopCheck
();
BatchAxisController
.
StopCheck
();
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
fb400ac
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
fb400ac
...
@@ -15,15 +15,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -15,15 +15,15 @@ namespace OnlineStore.DeviceLibrary
private
static
int
StartMovePosition
=
0
;
private
static
int
StartMovePosition
=
0
;
private
static
int
EndMovePosition
=
0
;
private
static
int
EndMovePosition
=
0
;
//public static int AutoAxisIsMove = 0;
//public static int AutoAxisIsMove = 0;
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetSpeed
,
string
targetSingle
)
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
,
string
targetSingle
)
{
{
//AutoAxisIsMove = 1;
//AutoAxisIsMove = 1;
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
EndMovePosition
=
StartMovePosition
;
EndMovePosition
=
StartMovePosition
;
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
0
,
targetSingle
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
targetPosition
,
targetSingle
));
BatchAxisController
.
StartCheck
(
targetSingle
);
BatchAxisController
.
StartCheck
(
targetSingle
);
ACServerManager
.
SpeedMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
}
}
private
static
void
ACAxisAbsMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
private
static
void
ACAxisAbsMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
...
@@ -58,8 +58,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -58,8 +58,8 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
// msg = Name + " storeMoveStep=" + StoreMove.MoveStep + moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警";
// msg = Name + " storeMoveStep=" + StoreMove.MoveStep + moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警";
SetWarnMsgAndLog
(
ResourceControl
.
AxisHomeMoveAlarm
,
StoreMove
.
MoveStep
+
""
,
moveAxis
.
GetNameStr
(),
outCount
+
""
);
SetWarnMsgAndLog
(
ResourceControl
.
AxisHomeMoveAlarm
,
StoreMove
.
MoveStep
+
""
,
moveAxis
.
GetNameStr
(),
outCount
+
""
);
msg
=
WarnObj
.
WarnMsg
;
msg
=
WarnObj
.
WarnMsg
;
LogUtil
.
error
(
msg
,
100
);
LogUtil
.
error
(
msg
,
100
);
...
@@ -67,10 +67,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -67,10 +67,11 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
return
true
;
return
true
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
LogUtil
.
error
(
"批量轴原点返回时BatchAxis_Limit=High ,停止运动"
,
30
);
LogUtil
.
error
(
"批量轴原点返回时BatchAxis_Limit=High ,停止运动"
,
30
);
ACServerManager
.
SuddenStop
(
StoreManager
.
Config
.
Batch_Axis
);
ACServerManager
.
SuddenStop
(
StoreManager
.
Config
.
Batch_Axis
);
}
}
return
false
;
return
false
;
}
}
...
@@ -281,22 +282,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -281,22 +282,26 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
false
;
bool
result
=
false
;
if
(
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
))
if
(
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
))
{
{
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到 "
+
wait
.
IoType
+
"="
+
wait
.
IoValue
+
",可以停止运动"
);
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到 "
+
wait
.
IoType
+
"="
+
wait
.
IoValue
+
",可以停止运动"
);
result
=
true
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
debug
(
wait
.
ToStr
()
+
" 检测到正极限信号,可以停止运动"
);
result
=
true
;
result
=
true
;
}
}
//else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
//{
// LogUtil.debug(wait.ToStr() + " 检测到正极限信号,可以停止运动");
// result = true;
//}
else
if
(
wait
.
TargetPosition
>
0
)
else
if
(
wait
.
TargetPosition
>
0
)
{
{
bool
MoveEnd
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
bool
MoveEnd
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
-
wait
.
TargetPosition
);
if
(
MoveEnd
)
if
(
MoveEnd
&&
(
errorCount
<
wait
.
AxisInfo
.
CanErrorCountMax
))
{
{
result
=
true
;
int
outCount
=
ACServerManager
.
GetActualtPosition
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
-
wait
.
TargetPosition
);
if
((
errorCount
<
wait
.
AxisInfo
.
CanErrorCountMax
))
{
result
=
true
;
}
}
}
}
}
if
(
result
)
if
(
result
)
...
...
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
查看文件 @
fb400ac
...
@@ -706,6 +706,12 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -706,6 +706,12 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"BatchAxis_DownPosition2"
,
false
)]
[
ConfigProAttribute
(
"BatchAxis_DownPosition2"
,
false
)]
public
int
BatchAxis_DownPosition2
{
get
;
set
;
}
public
int
BatchAxis_DownPosition2
{
get
;
set
;
}
/// <summary>
/// PRO,(轴五) 上料轴P3点(上料目标位置),BatchAxis_P3,1700000,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"BatchAxis_P3"
,
false
)]
public
int
BatchAxis_P3
{
get
;
set
;
}
private
Dictionary
<
string
,
string
>
CodeSizeMap
=
null
;
private
Dictionary
<
string
,
string
>
CodeSizeMap
=
null
;
private
static
char
codeSpilt
=
'#'
;
private
static
char
codeSpilt
=
'#'
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论