Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 25df7720
由
几米阳光
编写于
2018-12-21 13:47:02 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调试功能修改
1 个父辈
0bc7c233
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
43 行增加
和
28 行删除
doc/设备IP地址分配.xlsx
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/ShuoKe/MeteringSignalBean.cs
source/DeviceLibrary/ShuoKe/ShuoKeController.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/KTK_Store.cs
doc/设备IP地址分配.xlsx
查看文件 @
25df772
此文件类型无法预览
source/ACSingleStore/App.config
查看文件 @
25df772
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<!--出库等待料盘拿走的时间,秒-->
<!--出库等待料盘拿走的时间,秒-->
<
add
key
=
"OutStoreWaitSeconds"
value
=
"600"
/>
<
add
key
=
"OutStoreWaitSeconds"
value
=
"600"
/>
<!--压紧轴对应
1
mm
的脉冲-->
<!--压紧轴对应
1
mm
的脉冲-->
<
add
key
=
"ComAxisChangeValue"
value
=
"
8
00"
/>
<
add
key
=
"ComAxisChangeValue"
value
=
"
24
00"
/>
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
</
identity
>
</
identity
>
</
endpoint
>
</
endpoint
>
<
endpoint
address
=
"mex"
binding
=
"mexHttpBinding"
contract
=
"IMetadataExchange"
/>
<
endpoint
address
=
"mex"
binding
=
"mexHttpBinding"
contract
=
"IMetadataExchange"
/>
<
host
>
<
host
>
<
baseAddresses
>
<
baseAddresses
>
<
add
baseAddress
=
"http://localhost:8733/Design_Time_Addresses/AcStoreWCF/CWSMDBox/"
/>
<
add
baseAddress
=
"http://localhost:8733/Design_Time_Addresses/AcStoreWCF/CWSMDBox/"
/>
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
25df772
...
@@ -1343,6 +1343,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -1343,6 +1343,7 @@ namespace OnlineStore.ACSingleStore
private
void
btnGetPosition_Click
(
object
sender
,
EventArgs
e
)
private
void
btnGetPosition_Click
(
object
sender
,
EventArgs
e
)
{
{
int
value
=
ShuoKeControls
.
GetABSPosition
(
store
.
Config
.
CompressAxis_Slv
);
int
value
=
ShuoKeControls
.
GetABSPosition
(
store
.
Config
.
CompressAxis_Slv
);
lblShuoKeMsg
.
Text
=
DateTime
.
Now
.
ToLongTimeString
()
+
"实时位置:"
+
value
;
lblShuoKeMsg
.
Text
=
DateTime
.
Now
.
ToLongTimeString
()
+
"实时位置:"
+
value
;
}
}
private
void
btnStop_Click
(
object
sender
,
EventArgs
e
)
private
void
btnStop_Click
(
object
sender
,
EventArgs
e
)
...
...
source/DeviceLibrary/ShuoKe/MeteringSignalBean.cs
查看文件 @
25df772
...
@@ -18,14 +18,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -18,14 +18,17 @@ namespace OnlineStore.DeviceLibrary
/// 信号变化次数
/// 信号变化次数
/// </summary>
/// </summary>
public
static
int
SignalChangeCount
=
0
;
public
static
int
SignalChangeCount
=
0
;
public
static
int
TragetChangeCount
=
1
;
public
static
int
TragetChangeCount
=
0
;
public
static
IO_VALUE
PreSignalValue
=
IO_VALUE
.
LOW
;
public
static
IO_VALUE
PreSignalValue
=
IO_VALUE
.
LOW
;
private
static
System
.
Timers
.
Timer
timer
=
null
;
private
static
System
.
Timers
.
Timer
timer
=
null
;
public
static
void
StartCheck
(
int
targetPositon
,
int
currPosition
)
public
static
void
StartCheck
(
int
targetPositon
,
int
currPosition
)
{
int
count
=
Math
.
Abs
(
targetPositon
-
currPosition
)
/
ComAxisChangeValue
;
if
(
count
>
0
)
{
{
int
count
=
Math
.
Abs
(
targetPositon
-
currPosition
)/
ComAxisChangeValue
;
StartCheck
(
count
);
StartCheck
(
count
);
}
}
}
private
static
void
StartCheck
(
int
targetCount
)
private
static
void
StartCheck
(
int
targetCount
)
{
{
TragetChangeCount
=
targetCount
;
TragetChangeCount
=
targetCount
;
...
@@ -45,6 +48,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -45,6 +48,8 @@ namespace OnlineStore.DeviceLibrary
public
static
void
StopCheck
()
public
static
void
StopCheck
()
{
{
if
(
timer
==
null
)
{
return
;
}
timer
.
Stop
();
timer
.
Stop
();
}
}
private
static
bool
IsInProcess
=
false
;
private
static
bool
IsInProcess
=
false
;
...
...
source/DeviceLibrary/ShuoKe/ShuoKeController.cs
查看文件 @
25df772
...
@@ -290,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
{
{
int
position
=
GetABSPosition
(
slvAddr
);
int
position
=
GetABSPosition
(
slvAddr
);
msg
+=
"位置【"
+
position
+
"】"
;
msg
+=
"位置【"
+
position
+
"】"
;
if
(
Math
.
Abs
(
position
-
targetPosition
)
<
10
)
if
(
Math
.
Abs
(
position
-
targetPosition
)
<
10
||
targetPosition
.
Equals
(-
2000
)
)
{
{
return
true
;
return
true
;
}
}
...
@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -305,7 +305,7 @@ namespace OnlineStore.DeviceLibrary
{
{
ShuoKeInfo
shuokeInfo
=
GetStatus
(
slvAddr
);
ShuoKeInfo
shuokeInfo
=
GetStatus
(
slvAddr
);
msg
=
" IsInMove【"
+
shuokeInfo
.
IsInMove
+
"】Org【"
+
shuokeInfo
.
Org
+
"】"
;
msg
=
" IsInMove【"
+
shuokeInfo
.
IsInMove
+
"】Org【"
+
shuokeInfo
.
Org
+
"】"
;
if
(
shuokeInfo
.
IsInMove
==
0
&&
shuokeInfo
.
UpdateTime
>
time
&&
shuokeInfo
.
Org
==
0
)
if
(
shuokeInfo
.
IsInMove
.
Equals
(
0
)
&&
shuokeInfo
.
Org
.
Equals
(
0
)&&
shuokeInfo
.
UpdateTime
>
time
)
{
{
return
true
;
return
true
;
}
}
...
@@ -557,12 +557,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -557,12 +557,12 @@ namespace OnlineStore.DeviceLibrary
{
{
public
ShuoKeInfo
(
int
slv
,
int
position
)
public
ShuoKeInfo
(
int
slv
,
int
position
)
{
{
this
.
IsInMove
=
0
;
this
.
IsInMove
=
-
1
;
this
.
SlvAddr
=
slv
;
this
.
SlvAddr
=
slv
;
this
.
LLimit
=
0
;
this
.
LLimit
=
-
1
;
this
.
RLimit
=
0
;
this
.
RLimit
=
-
1
;
this
.
Org
=
0
;
this
.
Org
=
-
1
;
this
.
En
=
0
;
this
.
En
=
-
1
;
UpdateTime
=
DateTime
.
Now
;
UpdateTime
=
DateTime
.
Now
;
LastPosition
=
position
;
LastPosition
=
position
;
}
}
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
25df772
...
@@ -31,9 +31,9 @@ DO,相机照明开,CameraLight_Power,110,192.168.200.11,0,相机照明开,Y11,DO-11,0,
...
@@ -31,9 +31,9 @@ DO,相机照明开,CameraLight_Power,110,192.168.200.11,0,相机照明开,Y11,DO-11,0,
,,,113,192.168.200.11,0,,Y14,DO-14,0,
,,,113,192.168.200.11,0,,Y14,DO-14,0,
,,,114,192.168.200.11,0,,Y15,DO-15,0,
,,,114,192.168.200.11,0,,Y15,DO-15,0,
,,,115,192.168.200.11,0,,Y16,DO-16,0,
,,,115,192.168.200.11,0,,Y16,DO-16,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM
4
,0,,,,,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM
6
,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM5,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM5,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM
6
,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM
4
,0,,,,,
,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,,
,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,,
,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,,
,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,,
,扫码枪端口号,Scanner_Port,51236,,,,,,,
,扫码枪端口号,Scanner_Port,51236,,,,,,,
...
@@ -109,11 +109,11 @@ PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM3,,,,,,,
...
@@ -109,11 +109,11 @@ PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM3,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,
1
5000,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,5000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
5
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
1
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
30
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
5
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,
15
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,
3
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,
15
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,
3
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制归零速度(原点返回速度),CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制归零速度(原点返回速度),CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,,
,,,,,,,,, ,
,,,,,,,,, ,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
25df772
...
@@ -456,10 +456,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -456,10 +456,17 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
ComMoveToPosition
(
int
targetPosition
)
private
void
ComMoveToPosition
(
int
targetPosition
)
{
{
ComMoveToPosition
(
targetPosition
,
false
);
}
private
void
ComMoveToPosition
(
int
targetPosition
,
bool
isNeedCheckSingle
)
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
)
{
{
LogUtil
.
debug
(
"压紧轴绝对运动目标位置:"
+
targetPosition
);
LogUtil
.
debug
(
"压紧轴绝对运动目标位置:"
+
targetPosition
);
if
(
isNeedCheckSingle
)
{
MeteringSignal
.
StartCheck
(
targetPosition
,
ShuoKeControls
.
GetABSPosition
(
Config
.
CompressAxis_Slv
));
MeteringSignal
.
StartCheck
(
targetPosition
,
ShuoKeControls
.
GetABSPosition
(
Config
.
CompressAxis_Slv
));
}
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
targetPosition
,
false
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
targetPosition
,
false
));
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
targetPosition
);
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
targetPosition
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
25df772
...
@@ -210,12 +210,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -210,12 +210,12 @@ namespace OnlineStore.DeviceLibrary
private
bool
ShuoKeIsEnd
(
WaitResultInfo
wait
,
out
string
msg
)
private
bool
ShuoKeIsEnd
(
WaitResultInfo
wait
,
out
string
msg
)
{
{
bool
result
=
false
;
//
bool result = false;
msg
=
""
;
msg
=
""
;
if
(
wait
.
IsHomeMove
)
if
(
wait
.
IsHomeMove
)
{
{
re
sult
=
ShuoKeControls
.
IsHomeMoveEnd
(
wait
.
SlvAddr
,
StoreMove
.
LastSetpTime
,
out
msg
);
re
turn
ShuoKeControls
.
IsHomeMoveEnd
(
wait
.
SlvAddr
,
StoreMove
.
LastSetpTime
,
out
msg
);
}
}
else
else
{
{
...
@@ -223,15 +223,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -223,15 +223,16 @@ namespace OnlineStore.DeviceLibrary
if
(
isend
)
if
(
isend
)
{
{
bool
isCheckOk
=
(
MeteringSignal
.
TragetChangeCount
<=
MeteringSignal
.
SignalChangeCount
);
bool
isCheckOk
=
(
MeteringSignal
.
TragetChangeCount
<=
MeteringSignal
.
SignalChangeCount
);
if
(
isCheckOk
)
if
(
isCheckOk
||
MeteringSignal
.
TragetChangeCount
<=
0
)
{
{
MeteringSignal
.
StopCheck
();
MeteringSignal
.
StopCheck
();
return
true
;
return
true
;
}
}
else
else
{
{
msg
=
"压紧轴计量检测目标【"
+
MeteringSignal
.
SignalChangeCount
+
"】实际【"
+
MeteringSignal
.
Traget
ChangeCount
+
"】"
;
msg
=
"压紧轴计量检测目标【"
+
MeteringSignal
.
TragetChangeCount
+
"】实际【"
+
MeteringSignal
.
Signal
ChangeCount
+
"】"
;
LogUtil
.
error
(
"压紧轴已经停止运动,但是 "
+
msg
);
LogUtil
.
error
(
"压紧轴已经停止运动,但是 "
+
msg
);
return
true
;
}
}
}
}
}
}
...
@@ -346,7 +347,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -346,7 +347,7 @@ namespace OnlineStore.DeviceLibrary
{
{
InStoreLog
(
"入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3"
);
InStoreLog
(
"入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
true
);
//if (IsHasCompress_Axis)
//if (IsHasCompress_Axis)
//{
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
...
@@ -361,7 +362,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -361,7 +362,7 @@ namespace OnlineStore.DeviceLibrary
{
{
InStoreLog
(
"入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"
);
InStoreLog
(
"入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_04_CompressWare
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_04_CompressWare
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
true
);
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
}
}
...
@@ -463,7 +464,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -463,7 +464,7 @@ namespace OnlineStore.DeviceLibrary
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
true
);
//if (IsHasCompress_Axis)
//if (IsHasCompress_Axis)
//{
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
...
@@ -581,7 +582,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -581,7 +582,7 @@ namespace OnlineStore.DeviceLibrary
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_03_ToBagPosition
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_03_ToBagPosition
);
OutStoreLog
(
"出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"
);
OutStoreLog
(
"出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"
);
ComMoveToPosition
(
moveP
.
ComPress_P3
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
true
);
//if (IsHasCompress_Axis)
//if (IsHasCompress_Axis)
//{
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
...
...
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
25df772
...
@@ -225,7 +225,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -225,7 +225,7 @@ namespace OnlineStore.DeviceLibrary
protected
void
ACAxisHomeMove
(
ConfigMoveAxis
moveAxis
)
protected
void
ACAxisHomeMove
(
ConfigMoveAxis
moveAxis
)
{
{
moveAxis
.
TargetPosition
=
0
;
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
LOGGER
,
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
LogUtil
.
info
(
LOGGER
,
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
AddAxisMoveTime
(
moveAxis
);
AddAxisMoveTime
(
moveAxis
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论