Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9c954c62
由
刘韬
编写于
2022-01-07 16:02:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
a3ea18af
全部展开
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
59 行增加
和
22 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Program.cs
source/ACSingleStore/Properties/Resource.en-US.resx
source/ACSingleStore/Properties/Resource.ja-JP.resx
source/ACSingleStore/Properties/Resource.zh-CN.resx
source/ACSingleStore/ResourceCulture.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/DeviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/store/StoreMoveStep.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
9c954c6
...
...
@@ -244,6 +244,7 @@ namespace OnlineStore.AutoInOutStore
this
.
toolStripSeparator16
.
Visible
=
StoreManager
.
HasDisableDoorControl
;
this
.
toolStripSeparator18
.
Visible
=
StoreManager
.
HasDisableDoorControl
;
txtTempPort
.
Text
=
store
.
Config
.
Humiture_Port
;
chbDebug
.
Checked
=
store
.
IsDebug
;
LoadOk
=
true
;
// cmbHomeType.SelectedIndex = 1;
timer1
.
Start
();
...
...
@@ -1275,6 +1276,10 @@ namespace OnlineStore.AutoInOutStore
return
;
}
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
if
(
Camera
.
_cam
!=
null
)
{
Camera
.
_cam
.
CloseAll
();
}
CodeLibrary
.
FrmCodeDecode
frm
=
new
FrmCodeDecode
();
frm
.
chbZxing
.
Checked
=
false
;
frm
.
ShowDialog
();
...
...
source/ACSingleStore/Program.cs
查看文件 @
9c954c6
...
...
@@ -53,6 +53,7 @@ namespace OnlineStore.AutoInOutStore
[
STAThread
]
static
void
Main
(
string
[]
Args
)
{
Environment
.
CurrentDirectory
=
Application
.
StartupPath
;
Application
.
ThreadException
+=
new
System
.
Threading
.
ThreadExceptionEventHandler
(
Application_ThreadException
);
AppDomain
.
CurrentDomain
.
UnhandledException
+=
new
UnhandledExceptionEventHandler
(
CurrentDomain_UnhandledException
);
...
...
@@ -94,6 +95,7 @@ namespace OnlineStore.AutoInOutStore
if
(!
isShow
)
{
XmlConfigurator
.
Configure
();
Environment
.
CurrentDirectory
=
Application
.
StartupPath
;
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
#if PositionTool
...
...
source/ACSingleStore/Properties/Resource.en-US.resx
查看文件 @
9c954c6
...
...
@@ -1215,4 +1215,7 @@
<data name="FrmStoreBox_tabPage6_Text" xml:space="preserve">
<value>Storage Adjust</value>
</data>
<data name="FrmStoreBox_tabPage6_Text1" xml:space="preserve">
<value>Storage location</value>
</data>
</root>
\ No newline at end of file
source/ACSingleStore/Properties/Resource.ja-JP.resx
查看文件 @
9c954c6
...
...
@@ -1215,4 +1215,7 @@
<data name="InstoreInfo" xml:space="preserve">
<value> マルチ入出庫情報:入庫: </value>
</data>
<data name="FrmStoreBox_tabPage6_Text" xml:space="preserve">
<value>ロケーションデバッグ</value>
</data>
</root>
\ No newline at end of file
source/ACSingleStore/Properties/Resource.zh-CN.resx
查看文件 @
9c954c6
此文件的差异被折叠,
点击展开。
source/ACSingleStore/ResourceCulture.cs
查看文件 @
9c954c6
...
...
@@ -19,7 +19,7 @@ namespace OnlineStore.AutoInOutStore
{
public
class
ResourceCulture
{
public
static
bool
ShowLog
=
fals
e
;
public
static
bool
ShowLog
=
tru
e
;
public
static
string
China
=
"zh-CN"
;
public
static
string
English
=
"en-US"
;
public
static
string
German
=
"ge-DE"
;
...
...
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
9c954c6
...
...
@@ -74,7 +74,7 @@ namespace OnlineStore.DeviceLibrary
aioBox
=
new
AIOBOX
(
"AIOBOX"
);
aioBox
.
SetType
(
Asa
.
IOModule
.
Box_Type
.
DI
,
DILength
,
Asa
.
IOModule
.
Box_Type
.
DO
,
DOLength
);
aioBox
.
IP
=
ioIp
;
aioBox
.
Upload
=
fals
e
;
aioBox
.
Upload
=
tru
e
;
aioBox
.
DI_Changed_Event
+=
AioBox_DI_Changed_Event
;
aioBox
.
DO_Changed_Event
+=
AioBox_DO_Changed_Event
;
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
查看文件 @
9c954c6
...
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
{
checkTimer
=
new
System
.
Timers
.
Timer
();
checkTimer
.
AutoReset
=
true
;
checkTimer
.
Interval
+=
1
0
;
checkTimer
.
Interval
+=
3
0
;
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
checkTimer
.
Enabled
=
false
;
}
...
...
source/DeviceLibrary/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
9c954c6
...
...
@@ -157,15 +157,16 @@ namespace OnlineStore.DeviceLibrary
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片"
);
HalconDotNet
.
HObject
ho_Image
=
null
;
Bitmap
bit
=
null
;
try
{
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
);
if
(
ho_Image
==
null
)
{
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
continue
;
}
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bit
,
true
);
//
if (ho_Image == null)
//
{
//
LogUtil.error( " 【" + cameraName + "】取图片失败[" + Camera._cam.ErrInfo + "],关闭相机");
//
CloseCamera(cameraName);
//
continue;
//
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
string
r
=
""
;
...
...
@@ -196,11 +197,12 @@ namespace OnlineStore.DeviceLibrary
codeCount
=
QRCodeCount
,
timeout
=
3000
};
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
ho_Image
,
remoteDecodeParam
);
if
(
cc
==
null
)
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
bit
,
remoteDecodeParam
);
if
(
cc
==
null
||
cc
.
Count
==
0
)
{
cc
=
new
List
<
CodeInfo
>();
// SaveImageToFile(deviceName, cameraName, bit);
SaveImageToFile
(
"MIMO"
,
cameraName
,
bit
);
LogUtil
.
info
(
" 【"
+
cameraName
+
"】"
+
" 扫码失败"
);
}
foreach
(
CodeInfo
c
in
cc
)
...
...
@@ -213,6 +215,7 @@ namespace OnlineStore.DeviceLibrary
}
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】"
+
" 扫码完成【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】 :"
+
r
);
}
catch
(
AccessViolationException
e
)
{
...
...
@@ -230,6 +233,8 @@ namespace OnlineStore.DeviceLibrary
{
ho_Image
.
Dispose
();
}
if
(
bit
!=
null
)
bit
.
Dispose
();
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
9c954c6
...
...
@@ -1274,7 +1274,7 @@ namespace OnlineStore.DeviceLibrary
try
{
TimeSpan
span
=
DateTime
.
Now
-
preProTime
;
if
(
span
.
TotalSeconds
<
10
)
if
(
span
.
TotalSeconds
<
2
)
{
return
;
}
...
...
@@ -1513,7 +1513,7 @@ namespace OnlineStore.DeviceLibrary
}
public
void
LoguStatus
()
{
LogUtil
.
error
(
StoreName
+
"当前状态:"
+
"
isInSuddenDown["
+
isInSuddenDown
+
"],isNoAirCheck["
+
isNoAirCheck
+
"],"
+
"StoreMove.MoveType["
+
StoreMove
.
MoveType
+
"],storeRunStatus["
+
storeRunStatus
+
"]"
,
106
);
LogUtil
.
error
(
StoreName
+
"当前状态:"
+
$
"lastPosId[{lastPosId}],
isInSuddenDown["
+
isInSuddenDown
+
"],isNoAirCheck["
+
isNoAirCheck
+
"],"
+
"StoreMove.MoveType["
+
StoreMove
.
MoveType
+
"],storeRunStatus["
+
storeRunStatus
+
"]"
,
106
);
}
#
region
温湿度处理
...
...
@@ -1743,10 +1743,6 @@ namespace OnlineStore.DeviceLibrary
{
boxStatus
.
status
=
(
int
)
StoreStatus
.
Debugging
;
}
else
if
(
storeStatus
.
Equals
(
StoreStatus
.
OutStoreBoxEnd
)
||
storeStatus
.
Equals
(
StoreStatus
.
InStoreEnd
))
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
}
else
if
(!
lastPosId
.
Equals
(
""
))
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
...
...
@@ -1757,6 +1753,10 @@ namespace OnlineStore.DeviceLibrary
}
lastPosId
=
""
;
}
else
if
(
storeStatus
.
Equals
(
StoreStatus
.
OutStoreBoxEnd
)
||
storeStatus
.
Equals
(
StoreStatus
.
InStoreEnd
))
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
}
ASTemperateParam
param
=
HumitureController
.
LastData
;
if
(
param
!=
null
)
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
9c954c6
...
...
@@ -554,7 +554,7 @@ namespace OnlineStore.DeviceLibrary
lastPosIdStatus
=
StoreStatus
.
InStoreEnd
;
storeStatus
=
StoreStatus
.
InStoreEnd
;
//手动发给服务器状态,防止没有手动
//Task.Factory.StartNew
(delegate { SendLineStatus(); });
Task
.
Run
(
delegate
{
SendLineStatus
();
});
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_12_PutWareToBag
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
...
...
@@ -1088,9 +1088,11 @@ namespace OnlineStore.DeviceLibrary
string
posId
=
StoreMove
.
MoveParam
!=
null
?
StoreMove
.
MoveParam
.
PositionNum
:
""
;
storeStatus
=
StoreStatus
.
StoreOnline
;
LogUtil
.
info
(
LOGGER
,
"【"
+
posId
+
"】出库结束,耗时【"
+
FormUtil
.
GetSpanStr
(
InOutWatch
.
Elapsed
)
+
"】累积出库: "
+
AutomaticBaiting
.
BatchOutStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"mm"
);
StoreMove
.
EndMove
();
preProTime
=
DateTime
.
Now
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
lastPosId
=
""
;
InOutEndProcess
(
posId
,
StoreMoveType
.
OutStore
);
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
9c954c6
...
...
@@ -344,7 +344,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I01_Wait
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I02_MoveTo
Up
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I02_MoveTo
Down
);
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
InStoreLog
(
" 已检测到料盘,轴不需要上升"
);
...
...
@@ -355,6 +355,21 @@ namespace OnlineStore.DeviceLibrary
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P3
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I02_MoveToDown
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I02_MoveReUp
);
int
currBatchValue
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
var
tatget
=
currBatchValue
-
AutomaticBaiting
.
AxisChangeValue
*
15
;
InStoreLog
(
$
" 轴下降15mm,curr:{currBatchValue},target:{tatget}"
);
ACAxisAbsMove
(
StoreManager
.
Config
.
Batch_Axis
,
tatget
,
StoreManager
.
Config
.
BatchAxis_P1_Speed
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I02_MoveReUp
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I02_MoveToUp
);
InStoreLog
(
" 轴重新上升到检测到料盘,速度【"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P3
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I02_MoveToUp
))
{
IsNeedScanCode
();
...
...
@@ -676,7 +691,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I02_MoveToUp
);
InStoreLog
(
" 轴上升到检测到料盘,速度【"
+
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P3
,
StoreManager
.
Config
.
Batch
_Axis
.
Target
Speed
,
IO_Type
.
TrayCheck_LoadMaterial
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
BatchAxis_P3
,
StoreManager
.
Config
.
Batch
Axis_Slow
Speed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
}
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
9c954c6
...
...
@@ -506,6 +506,8 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
自动上下料上料功能
AUTO_I02_MoveToDown
,
AUTO_I02_MoveReUp
,
/// <summary>
/// 开始自动上料
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论