Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a3002d6c
由
几米阳光
编写于
2018-11-01 11:39:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调试修改
1 个父辈
0eb61213
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
104 行增加
和
71 行删除
source/ACSingleStore/FrmAxisDebug.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/KangNaiDe/KNDAIManager.cs
source/DeviceLibrary/ShuoKe/ShuoKeControls.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/halcon/HDevelopExport.cs
source/ACSingleStore/FrmAxisDebug.cs
查看文件 @
a3002d6
...
...
@@ -54,6 +54,8 @@ namespace OnlineStore.ACSingleStore
private
void
btnMiddleMove_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnMiddleMove
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
int
speed
=
FormUtil
.
GetIntValue
(
txtMiddleSpeed
);
if
(
speed
<=
0
)
{
...
...
@@ -63,6 +65,7 @@ namespace OnlineStore.ACSingleStore
btnMiddleMove
.
BackColor
=
Color
.
Green
;
AxisMove
(
middle
,
speed
);
}
}
private
void
btnMiddleMove_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
...
...
@@ -76,6 +79,8 @@ namespace OnlineStore.ACSingleStore
private
void
btnUpDownMove_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnUpDownMove
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
int
speed
=
FormUtil
.
GetIntValue
(
txtUpDownSpeed
);
if
(
speed
<=
0
)
{
...
...
@@ -85,6 +90,7 @@ namespace OnlineStore.ACSingleStore
btnUpDownMove
.
BackColor
=
Color
.
Green
;
AxisMove
(
updown
,
speed
);
}
}
private
void
btnUpDownMove_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
...
...
@@ -98,7 +104,9 @@ namespace OnlineStore.ACSingleStore
private
void
btnInOutMove_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
ACStoreManager
.
store
.
InOutAxisCanMove
().
Equals
(
false
))
if
(
this
.
btnInOutMove
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
if
(
ACStoreManager
.
store
.
InOutAxisCanMove
().
Equals
(
false
))
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
...
...
@@ -112,6 +120,7 @@ namespace OnlineStore.ACSingleStore
this
.
btnInOutMove
.
BackColor
=
Color
.
Green
;
AxisMove
(
inout
,
speed
);
}
}
private
void
btnInOutMove_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
...
...
@@ -122,11 +131,10 @@ namespace OnlineStore.ACSingleStore
UpdateInOutPosition
();
}
}
private
void
btnMiddleMovej_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnMiddleMovej
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
int
speed
=
FormUtil
.
GetIntValue
(
txtMiddleSpeed
);
if
(
speed
<=
0
)
{
...
...
@@ -136,6 +144,7 @@ namespace OnlineStore.ACSingleStore
this
.
btnMiddleMovej
.
BackColor
=
Color
.
Green
;
AxisMove
(
middle
,
-
speed
);
}
}
private
void
btnMiddleMovej_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
...
...
@@ -149,6 +158,8 @@ namespace OnlineStore.ACSingleStore
private
void
btnUpDownMovej_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnUpDownMovej
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
int
speed
=
FormUtil
.
GetIntValue
(
txtUpDownSpeed
);
if
(
speed
<=
0
)
{
...
...
@@ -158,6 +169,7 @@ namespace OnlineStore.ACSingleStore
btnUpDownMovej
.
BackColor
=
Color
.
Green
;
AxisMove
(
updown
,
-
speed
);
}
}
private
void
btnUpDownMovej_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
...
...
@@ -171,6 +183,8 @@ namespace OnlineStore.ACSingleStore
private
void
btnInOutMovej_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnInOutMovej
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
if
(
ACStoreManager
.
store
.
InOutAxisCanMove
().
Equals
(
false
))
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
...
...
@@ -185,6 +199,7 @@ namespace OnlineStore.ACSingleStore
this
.
btnInOutMovej
.
BackColor
=
Color
.
Green
;
AxisMove
(
inout
,
-
speed
);
}
}
private
void
btnInOutMovej_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
a3002d6
...
...
@@ -1461,7 +1461,7 @@
this
.
btnUpDownP7
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP7
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
this
.
btnUpDownP7
.
TabIndex
=
203
;
this
.
btnUpDownP7
.
Text
=
"升降轴
取
料缓冲点P7:"
;
this
.
btnUpDownP7
.
Text
=
"升降轴
入
料缓冲点P7:"
;
this
.
btnUpDownP7
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP7
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP7
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP7_Click
);
...
...
@@ -1497,7 +1497,7 @@
this
.
btnUpDownP1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnUpDownP1
.
Size
=
new
System
.
Drawing
.
Size
(
140
,
27
);
this
.
btnUpDownP1
.
TabIndex
=
199
;
this
.
btnUpDownP1
.
Text
=
"升降轴
取
料点P1:"
;
this
.
btnUpDownP1
.
Text
=
"升降轴
入
料点P1:"
;
this
.
btnUpDownP1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnUpDownP1
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpDownP1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpDownP1_Click
);
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
a3002d6
...
...
@@ -153,6 +153,7 @@ namespace OnlineStore.ACSingleStore
this
.
ShowInTaskbar
=
true
;
this
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
LoadOk
=
true
;
cmbHomeType
.
SelectedIndex
=
1
;
HideForm
();
}
private
DateTime
preReadModblsTime
=
DateTime
.
Now
;
...
...
source/DeviceLibrary/KangNaiDe/KNDAIManager.cs
查看文件 @
a3002d6
...
...
@@ -142,8 +142,8 @@ namespace OnlineStore.DeviceLibrary
}
else
{
ConnectionIP
(
io
);
LogUtil
.
error
(
LOGGER
,
"AI模块"
+
io
+
"当前没有连上,重连"
+
io
);
ConnectionIP
(
io
);
}
PreCheckTime
=
DateTime
.
Now
;
}
...
...
source/DeviceLibrary/ShuoKe/ShuoKeControls.cs
查看文件 @
a3002d6
...
...
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using
System.IO.Ports
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
namespace
OnlineStore.DeviceLibrary
{
...
...
@@ -232,7 +232,10 @@ namespace OnlineStore.DeviceLibrary
/// <param name="homeType">0=反方向,1=正方向</param>
public
static
void
HomeMove
(
int
slvAddr
,
byte
homeType
)
{
string
fangx
=
homeType
.
Equals
(
0
)
?
"反方向"
:
"正方向"
;
LogUtil
.
info
(
"压紧轴原点返回:"
+
fangx
);
byte
[]
sendData
=
WriteData
(
slvAddr
,
ShuoKeCMD
.
HomeMove
,
0x01
,
homeType
);
Thread
.
Sleep
(
100
);
}
public
static
void
VolMove
(
int
slvAddr
,
int
speed
)
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a3002d6
...
...
@@ -398,9 +398,10 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
BOX_H_OtherAxisBack
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_MiddleAxisToP1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:旋转轴运动到P1,上下轴走到P1!"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:旋转轴运动到P1,上下轴走到P1
,压紧轴到P1
!"
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成"
);
...
...
@@ -426,9 +427,10 @@ namespace OnlineStore.DeviceLibrary
break
;
case
StoreMoveStep
.
BOX_M_H_TOP1_CompressHome
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:旋转轴运动到P1,上下轴走到P1!"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:旋转轴运动到P1,上下轴走到P1
,压紧轴到P1
!"
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
break
;
case
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态完成"
);
...
...
@@ -444,6 +446,18 @@ namespace OnlineStore.DeviceLibrary
default
:
break
;
}
}
private
void
ComMoveToPosition
(
int
targetPosition
)
{
if
(
IsHasCompress_Axis
)
{
LogUtil
.
info
(
"压紧轴绝对运动目标位置:"
+
targetPosition
);
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
targetPosition
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
targetPosition
,
false
));
Thread
.
Sleep
(
100
);
}
}
private
void
OpenDoorAndWait
()
{
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
LOW
);
...
...
@@ -513,11 +527,11 @@ namespace OnlineStore.DeviceLibrary
break
;
case
StoreMoveStep
.
BOX_H_OtherAxisBack
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_MiddleAxisToP1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点:旋转轴运动到P1,上下轴到P1!"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点:旋转轴运动到P1,上下轴到P1
,压紧轴到P1
!"
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
);
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点完成"
);
...
...
@@ -949,11 +963,11 @@ namespace OnlineStore.DeviceLibrary
if
(
isWaitScan
)
{
TimeSpan
span
=
DateTime
.
Now
-
StartWaitScanTime
;
if
(
span
.
TotalSeconds
>
0.5
)
if
(
span
.
TotalSeconds
>
1
)
{
isWaitScan
=
false
;
IsScanCode
=
true
;
LogUtil
.
info
(
StoreName
+
"检测到料盘信号且等待
0.5
秒,开始扫码"
);
LogUtil
.
info
(
StoreName
+
"检测到料盘信号且等待
1
秒,开始扫码"
);
//BeginScannering();
GetCameraCode
();
}
...
...
@@ -1329,16 +1343,15 @@ namespace OnlineStore.DeviceLibrary
foreach
(
string
str
in
codeList
)
{
string
code
=
HDevelopExport
.
SubStrCode
(
str
);
code
=
"=
7X
"
+
height
+
" ="
+
code
;
code
=
"=
1+0x0-7x
"
+
height
+
" ="
+
code
;
message
=
message
+
code
+
spiltStr
;
}
if
(!
outMsg
.
Equals
(
""
))
{
LogUtil
.
error
(
"盘尺寸错误,清理二维码【"
+
message
+
"】"
);
LogUtil
.
error
(
"盘尺寸错误,清理二维码【"
+
message
+
"】"
);
message
=
""
;
}
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
onCodeReceived
(
message
);
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
a3002d6
...
...
@@ -307,11 +307,12 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_03_ReturnHome
);
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
,
false
));
}
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
);
}
...
...
@@ -321,8 +322,9 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_04_CompressWare
);
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
,
false
));
ComMoveToPosition
(
moveP
.
ComPress_P3
);
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
}
else
{
...
...
@@ -341,12 +343,13 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_06_DoorWarToDevice
);
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P2
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P2
,
false
));
System
.
Threading
.
Thread
.
Sleep
(
600
);
}
ComMoveToPosition
(
moveP
.
ComPress_P2
);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false));
// System.Threading.Thread.Sleep(600);
//}
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P7
,
Config
.
UpDownAxis_P7_Speed
);
}
...
...
@@ -413,11 +416,12 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点),压紧轴至P3(压紧前点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
,
false
));
}
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_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_12_PutWareToBag
)
...
...
@@ -438,11 +442,12 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_14 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_14_GoBack
);
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P1
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P1
,
false
));
}
ComMoveToPosition
(
moveP
.
ComPress_P1
);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false));
//}
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P1
,
Config
.
UpDownAxis_P1_Speed
);
CloseDoorAndWait
();
...
...
@@ -536,11 +541,12 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_03_ToBagPosition
);
OutStoreLog
(
"出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"
);
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P3
,
false
));
}
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
.
Middle_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
UpDown_P5
,
Config
.
UpDownAxis_P5_Speed
);
}
...
...
@@ -555,11 +561,12 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog
(
"出库:SO_05 拿起物品,升降轴至P6(库位出料缓冲点),压紧轴至P2(压紧点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_05_BagWareToDevice
);
//电缸微动至对应料盘的上端位置
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P2
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P2
,
false
));
}
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false));
//}
ComMoveToPosition
(
moveP
.
ComPress_P2
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P6
,
Config
.
UpDownAxis_P6_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_05_BagWareToDevice
)
...
...
@@ -632,11 +639,13 @@ namespace OnlineStore.DeviceLibrary
{
OutStoreLog
(
"出库:SO_11 放下物品,升降轴至P8(进料口出料缓冲点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_11_DevicePutWare
);
if
(
IsHasCompress_Axis
)
{
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P1
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
moveP
.
ComPress_P1
,
false
));
}
ComMoveToPosition
(
moveP
.
ComPress_P1
);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false));
//}
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P8
,
Config
.
UpDownAxis_P8_Speed
);
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_11_DevicePutWare
)
...
...
source/DeviceLibrary/halcon/HDevelopExport.cs
查看文件 @
a3002d6
...
...
@@ -73,24 +73,16 @@ namespace OnlineStore.DeviceLibrary
{
HObject
ho_Image
=
HDevelopExport
.
GrabImage
(
cameraName
);
List
<
string
>
codeList
=
HDevelopExport
.
GetCode
(
ho_Image
);
if
(
codeList
.
Count
>
0
)
{
Bitmap
bitmap
=
HObject2Bpp24
(
ho_Image
);
//DateTime time = DateTime.Now;
//try
//{
// string name = time.Hour.ToString() + time.Minute.ToString() + time.Second.ToString() + time.Millisecond.ToString() + ".jpg";
// bitmap.Save(name);
//}
//catch(Exception ex)
//if (codeList.Count > 0)
//{
// Bitmap bitmap = HObject2Bpp24(ho_Image);
// if (Exist(bitmap))
// {
// msg = "盘尺寸错误";
// LogUtil.error("盘尺寸错误!");
// }
// bitmap = null;
//}
if
(
Exist
(
bitmap
))
{
msg
=
"盘尺寸错误"
;
LogUtil
.
error
(
"盘尺寸错误!"
);
}
}
allCodeList
.
AddRange
(
codeList
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论