Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f2affbe0
由
几米阳光
编写于
2019-01-16 16:38:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
批量上料轴增加单独处理。增加版本号。
1 个父辈
f21554bd
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
154 行增加
和
29 行删除
doc/设备IP地址分配.xlsx
source/ACSingleStore/FrmBase.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/ShuoKe/ShuoKeControls.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/DeviceLibrary/store/model/StoreMoveInfo.cs
doc/设备IP地址分配.xlsx
查看文件 @
f2affbe
此文件类型无法预览
source/ACSingleStore/FrmBase.cs
查看文件 @
f2affbe
...
...
@@ -13,6 +13,33 @@ namespace OnlineStore.AutoInOutStore
{
public
partial
class
FrmBase
:
Form
{
public
static
string
GetVersion
()
{
string
str
=
""
;
string
version
=
""
;
DateTime
newData
=
DateTime
.
Parse
(
"2000-01-01"
);
try
{
version
=
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
().
GetName
().
Version
.
ToString
();
string
[]
strArray
=
version
.
Split
(
'.'
);
if
(
strArray
.
Length
.
Equals
(
4
))
{
int
days
=
Convert
.
ToInt32
(
strArray
[
2
]);
int
seconds
=
Convert
.
ToInt32
(
strArray
[
3
]);
DateTime
d1
=
DateTime
.
Parse
(
"2000-01-01"
);
newData
=
d1
.
AddDays
(
days
);
newData
=
newData
.
AddSeconds
(
seconds
*
2
);
str
=
newData
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
}
catch
(
Exception
ex
)
{
str
=
version
;
LogUtil
.
error
(
"解析版本号【"
+
str
+
"】出错:"
+
ex
.
ToString
());
}
LogUtil
.
info
(
"版本号["
+
version
+
"]["
+
str
+
"]"
);
return
str
;
}
public
FrmBase
()
{
InitializeComponent
();
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
f2affbe
...
...
@@ -147,7 +147,7 @@ namespace OnlineStore.AutoInOutStore
private
bool
LoadOk
=
false
;
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
GetVersion
();
LogUtil
.
logBox
=
this
.
richTextBox1
;
this
.
ShowInTaskbar
=
true
;
this
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
...
...
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
f2affbe
...
...
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
//
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[
assembly
:
AssemblyVersion
(
"1.0.*"
)]
//
[assembly: AssemblyVersion("1.0.0.0")]
//
[assembly: AssemblyFileVersion("1.0.0.0")]
source/ACSingleStore/记录.txt
查看文件 @
f2affbe
...
...
@@ -109,6 +109,12 @@ PRO,最后一盘料需要补充的高度,LastTrayAddHeight,10,,,,,,,,,
20190111修改
1.波特率改为可配置模式。
2.松下伺服通信改为兼容模式。
3.批量上料轴上升过程中,新建一个线程用来验证是否需要停止。
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
f2affbe
...
...
@@ -67,6 +67,7 @@
<Compile Include="PanasonicServo\ACCMDManager.cs" />
<Compile Include="PanasonicServo\ACServerManager.cs" />
<Compile Include="PanasonicServo\ACServerManager_Partial.cs" />
<Compile Include="PanasonicServo\BatchAxisController.cs" />
<Compile Include="ShuoKe\MeteringSignalBean.cs" />
<Compile Include="ShuoKe\ShuoKeController.cs" />
<Compile Include="store\LineMoveP.cs" />
...
...
source/DeviceLibrary/PanasonicServo/BatchAxisController.cs
0 → 100644
查看文件 @
f2affbe
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
OnlineStore.DeviceLibrary
{
/// <summary>
/// 批量上下料 轴,检测料盘检测信号处理
/// </summary>
public
class
BatchAxisController
{
private
static
bool
IsStop
=
false
;
private
static
System
.
Timers
.
Timer
checkTimer
=
null
;
public
static
bool
StartCheck
()
{
if
(
checkTimer
==
null
)
{
checkTimer
=
new
System
.
Timers
.
Timer
();
checkTimer
.
AutoReset
=
true
;
checkTimer
.
Interval
+=
50
;
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
}
checkTimer
.
Start
();
return
true
;
}
public
static
bool
StopCheck
()
{
if
(!(
checkTimer
==
null
))
{
checkTimer
.
Stop
();
}
return
true
;
}
private
static
bool
IsInProcess
=
false
;
private
static
void
CheckTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
if
(
IsInProcess
)
{
return
;
}
IsInProcess
=
true
;
bool
result
=
false
;
if
(
KND
.
IOValue
(
LoadCSVLibrary
.
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
"批量上料轴,检测到上料机构料盘信号,可以停止运动"
);
result
=
true
;
}
else
if
(
ACServerManager
.
GetLimitPositiveSingle
(
StoreManager
.
Config
.
Batch_Axis
).
Equals
(
1
))
{
LogUtil
.
info
(
"批量上料轴,检测到正极限信号,可以停止运动"
);
result
=
true
;
}
if
(
result
)
{
//AutoAxisIsMove = 0;
LogUtil
.
debug
(
"批量上料轴, 停止运动"
);
ACServerManager
.
SuddenStop
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
StopCheck
();
}
IsInProcess
=
true
;
}
}
}
source/DeviceLibrary/ShuoKe/ShuoKeControls.cs
deleted
100644 → 0
查看文件 @
f21554b
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
f2affbe
...
...
@@ -1216,6 +1216,7 @@ namespace OnlineStore.DeviceLibrary
}
public
override
void
StopMove
(
bool
IsCloseAxis
)
{
BatchAxisController
.
StopCheck
();
AxisSuddenStop
();
if
(
IsHasCompress_Axis
)
{
...
...
@@ -1237,11 +1238,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
LOGGER
,
StoreName
+
"StopMove"
);
KND
.
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
AutomaticBaiting
.
StopMove
();
MeteringSignal
.
StopCheck
();
isInPro
=
false
;
AutomaticBaiting
.
StopMove
();
MeteringSignal
.
StopCheck
();
isInPro
=
false
;
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
f2affbe
...
...
@@ -139,11 +139,6 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
ACAxisMoveIsEnd
(
wait
.
AxisInfo
,
wait
.
TargetPosition
,
wait
.
TargetSpeed
,
out
msg
);
}
if
(!
wait
.
IsEnd
&&
(
Config
.
Batch_Axis
.
IsSameAxis
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()))
&&
wait
.
TargetPosition
.
Equals
(
Config
.
BatchAxis_P1
))
{
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
);
}
if
(!
msg
.
Equals
(
""
))
{
isOk
=
false
;
...
...
@@ -183,6 +178,29 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
AutomaticBaiting
.
IsGetTrayGo
;
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
//if ((Config.Batch_Axis.IsSameAxis(wait.AxisInfo.DeviceName, wait.AxisInfo.GetAxisValue())) && wait.TargetPosition.Equals(Config.BatchAxis_P1))
//{
if
(!
wait
.
IsEnd
)
{
wait
.
IsEnd
=
AutomaticBaiting
.
BatchAxisIsEnd
(
wait
);
}
if
(!
wait
.
IsEnd
)
{
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
&&
errorCount
<
wait
.
AxisInfo
.
CanErrorCountMax
)
{
wait
.
IsEnd
=
true
;
}
}
if
(
wait
.
IsEnd
)
{
BatchAxisController
.
StopCheck
();
}
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
ShuoKe_5
)
{
string
msg
=
""
;
...
...
@@ -211,9 +229,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndStepWait
();
}
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
{
{
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"]等待["
+
NotOkMsg
+
"]超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
15
);
LogUtil
.
error
(
WarnMsg
,
15
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
}
...
...
@@ -803,7 +821,11 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
TimeOutSeconds
=
120
;
ACAxisMove
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1_Speed
);
//ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
));
BatchAxisController
.
StartCheck
();
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_P1
;
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1_Speed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴到P1点【"
+
Config
.
BatchAxis_P1
+
"】 "
);
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
f2affbe
...
...
@@ -113,7 +113,8 @@ namespace OnlineStore.DeviceLibrary
ClearOutStoreInfo
();
}
public
static
void
StopMove
()
{
{
BatchAxisController
.
StopCheck
();
StoreMove
.
EndMove
();
ClearInStoreInfo
();
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
f2affbe
...
...
@@ -19,8 +19,9 @@ namespace OnlineStore.DeviceLibrary
//AutoAxisIsMove = 1;
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
EndMovePosition
=
StartMovePosition
;
LogUtil
.
info
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
));
LogUtil
.
info
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
0
));
BatchAxisController
.
StartCheck
();
ACServerManager
.
SpeedMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetSpeed
);
}
...
...
@@ -133,6 +134,10 @@ namespace OnlineStore.DeviceLibrary
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
wait
.
IsEnd
=
BatchAxisIsEnd
(
wait
);
if
(
wait
.
IsEnd
)
{
BatchAxisController
.
StopCheck
();
}
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
{
...
...
@@ -235,17 +240,13 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
false
;
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
wait
.
ToStr
()
+
"检测到上料机构料盘信号,可以停止运动"
);
LogUtil
.
info
(
wait
.
ToStr
()
+
"检测到上料机构料盘信号,可以停止运动"
);
result
=
true
;
}
else
else
if
(
ACServerManager
.
GetLimitPositiveSingle
(
wait
.
AxisInfo
).
Equals
(
1
))
{
int
limitP
=
ACServerManager
.
GetLimitPositiveSingle
(
wait
.
AxisInfo
);
if
(
limitP
.
Equals
(
1
))
{
LogUtil
.
info
(
wait
.
ToStr
()
+
"检测到正极限信号,可以停止运动"
);
result
=
true
;
}
LogUtil
.
info
(
wait
.
ToStr
()
+
"检测到正极限信号,可以停止运动"
);
result
=
true
;
}
if
(
result
)
{
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
f2affbe
...
...
@@ -277,9 +277,10 @@ namespace OnlineStore.DeviceLibrary
/// 10=等待批量上下料轴运动 停止
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitBatchAxisStop
(
ConfigMoveAxis
moveAxis
)
public
static
WaitResultInfo
WaitBatchAxisStop
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
TargetPosition
=
targetPosition
;
wait
.
CanWhileMoveCount
=
0
;
wait
.
AxisInfo
=
moveAxis
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
BatchAxisMove_10
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论