Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 407fa49b
由
刘韬
编写于
2022-03-18 10:25:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
3f2df859
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
348 行增加
和
235 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
source/ACSingleStore/ResourceCulture.cs
source/ACSingleStore/userControl/uc_boxdebug.Designer.cs
source/ACSingleStore/userControl/uc_boxdebug.cs
source/Common/Setting_Init.cs
source/Common/util/ConfigAppSettings.cs
source/Common/util/HumitureController.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/DeviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
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/StoreMoveStep.cs
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
source/ACSingleStore/App.config
查看文件 @
407fa49
...
...
@@ -15,6 +15,9 @@
<
add
key
=
"StartBlowValue"
value
=
"0.5"
/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<
add
key
=
"StopBlowValue"
value
=
"1"
/>
<
add
key
=
"humidityadjust"
value
=
"-11"
/>
<
add
key
=
"humiditylimited"
value
=
"4"
/>
<!--
Server
address
-->
<!--<
add
key
=
"http.server"
value
=
""
/>-->
<
add
key
=
"http.server"
value
=
"http://localhost/myproject/"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
407fa49
此文件的差异太大,无法显示。
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
407fa49
...
...
@@ -63,6 +63,8 @@ namespace OnlineStore.AutoInOutStore
txtMiddleP1
.
Text
=
store
.
Config
.
MiddleAxis_P1_Position
.
ToString
();
txtInOutP1
.
Text
=
store
.
Config
.
InOutAxis_P1_Position
.
ToString
();
txtComP1
.
Text
=
store
.
Config
.
CompressAxis_P1_Position
.
ToString
();
txtBatchP1
.
Text
=
store
.
Config
.
BatchAxis_P1
.
ToString
();
txtBatchP3
.
Text
=
store
.
Config
.
BatchAxis_P3
.
ToString
();
txtUpdownP8
.
Text
=
store
.
Config
.
UpDownAxis_OutLow_P8
.
ToString
();
txtUpdownP2
.
Text
=
store
.
Config
.
UpDownAxis_OutHigh_P2
.
ToString
();
...
...
@@ -103,6 +105,8 @@ namespace OnlineStore.AutoInOutStore
setAxisPopup
(
txtComP1
,
btnComP1
,
store
.
Config
.
Comp_Axis
);
setAxisPopup
(
txtComP2
,
btnComP2
,
store
.
Config
.
Comp_Axis
);
setAxisPopup
(
txtComP3
,
btnComP3
,
store
.
Config
.
Comp_Axis
);
setAxisPopup
(
txtBatchP1
,
btnBatchP1
,
store
.
Config
.
Batch_Axis
);
setAxisPopup
(
txtBatchP3
,
btnBatchP3
,
store
.
Config
.
Batch_Axis
);
setAxisPopup
(
txtInOutP1
,
btnInOutP1
,
store
.
Config
.
InOut_Axis
);
setAxisPopup
(
txtInOutP2
,
btnInOutP2
,
store
.
Config
.
InOut_Axis
);
...
...
@@ -680,7 +684,16 @@ namespace OnlineStore.AutoInOutStore
store
.
Config
.
UpDownAxis_OutLow_P8
=
FormUtil
.
GetIntValue
(
txtUpdownP8
);
needUpdate
=
true
;
}
if
(
store
.
Config
.
BatchAxis_P1
!=
FormUtil
.
GetIntValue
(
txtBatchP1
))
{
store
.
Config
.
BatchAxis_P1
=
FormUtil
.
GetIntValue
(
txtBatchP1
);
needUpdate
=
true
;
}
if
(
store
.
Config
.
BatchAxis_P3
!=
FormUtil
.
GetIntValue
(
txtBatchP3
))
{
store
.
Config
.
BatchAxis_P3
=
FormUtil
.
GetIntValue
(
txtBatchP3
);
needUpdate
=
true
;
}
if
(
needUpdate
)
{
//更新缓存
...
...
@@ -917,6 +930,11 @@ namespace OnlineStore.AutoInOutStore
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
if
(
Camera
.
_cam
!=
null
)
{
Camera
.
_cam
.
CloseAll
();
}
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
string
message
=
""
;
string
outMsg
=
""
;
...
...
@@ -1133,6 +1151,10 @@ namespace OnlineStore.AutoInOutStore
{
return
;
}
if
(
Camera
.
_cam
!=
null
)
{
Camera
.
_cam
.
CloseAll
();
}
IOManager
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
CodeLibrary
.
FrmCodeDecode
frm
=
new
FrmCodeDecode
();
frm
.
chbZxing
.
Checked
=
false
;
...
...
@@ -1564,5 +1586,22 @@ namespace OnlineStore.AutoInOutStore
StoreManager
.
UpdateBoxConfig
(
store
.
Config
);
}
}
private
void
btnBatchP1_Click
(
object
sender
,
EventArgs
e
)
{
int
value
=
FormUtil
.
GetIntValue
(
txtBatchP1
);
AxisABSMove
(
store
.
Config
.
Batch_Axis
,
value
,
store
.
Config
.
BatchAxis_P1_Speed
);
}
private
void
btnBatchP3_Click
(
object
sender
,
EventArgs
e
)
{
int
value
=
FormUtil
.
GetIntValue
(
txtBatchP3
);
AxisABSMove
(
store
.
Config
.
Batch_Axis
,
value
,
store
.
Config
.
BatchAxis_P1_Speed
);
}
private
void
uc_boxdebug1_Load
(
object
sender
,
EventArgs
e
)
{
}
}
}
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
407fa49
...
...
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui
5072d6b64fa922fb976758170e2bcb644ff8bf92
")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui
3f2df85964baa20c171b0ce228d8bc29c4a2eb1f
")]
[assembly: AssemblyCopyright("edf7e3d07d3c8cafa890a08f4b855e559a36d414")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
...
...
source/ACSingleStore/ResourceCulture.cs
查看文件 @
407fa49
...
...
@@ -239,7 +239,13 @@ namespace OnlineStore.AutoInOutStore
NoIdLog
(
id
,
defaultStr
);
}
}
return
String
.
Format
(
strCurLanguage
,
param
);
try
{
return
String
.
Format
(
strCurLanguage
,
param
);
}
catch
{
return
strCurLanguage
;
}
}
...
...
source/ACSingleStore/userControl/uc_boxdebug.Designer.cs
查看文件 @
407fa49
...
...
@@ -34,8 +34,8 @@ namespace OnlineStore.ACSingleStore.useControl
System
.
Windows
.
Forms
.
DataGridViewCellStyle
dataGridViewCellStyle2
=
new
System
.
Windows
.
Forms
.
DataGridViewCellStyle
();
System
.
Windows
.
Forms
.
DataGridViewCellStyle
dataGridViewCellStyle3
=
new
System
.
Windows
.
Forms
.
DataGridViewCellStyle
();
this
.
groupInout
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label_verify
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnInOutP1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
checkBox_Double_Alternate
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cmbPosition
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtJiange
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -50,8 +50,6 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
txtUpDownP5
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP6
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtUpDownP3
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOutStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtUpDownP4
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnInOutP2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnComP3
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -70,8 +68,8 @@ namespace OnlineStore.ACSingleStore.useControl
//
// groupInout
//
this
.
groupInout
.
Controls
.
Add
(
this
.
label_verify
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
checkBox_Double_Alternate
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtJiange
);
this
.
groupInout
.
Controls
.
Add
(
this
.
lblMsg
);
...
...
@@ -86,8 +84,6 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP5
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnOutStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtUpDownP4
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP2
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnComP3
);
...
...
@@ -105,6 +101,16 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
groupInout
.
TabStop
=
false
;
this
.
groupInout
.
Text
=
"料仓操作"
;
//
// label_verify
//
this
.
label_verify
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label_verify
.
AutoSize
=
true
;
this
.
label_verify
.
Location
=
new
System
.
Drawing
.
Point
(
856
,
0
);
this
.
label_verify
.
Name
=
"label_verify"
;
this
.
label_verify
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
label_verify
.
TabIndex
=
228
;
this
.
label_verify
.
Text
=
"label1"
;
//
// btnInOutP1
//
this
.
btnInOutP1
.
AutoSize
=
true
;
...
...
@@ -124,17 +130,6 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
btnInOutP1
.
UseVisualStyleBackColor
=
false
;
this
.
btnInOutP1
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInOutP1_Click
);
//
// checkBox_Double_Alternate
//
this
.
checkBox_Double_Alternate
.
AutoSize
=
true
;
this
.
checkBox_Double_Alternate
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
154
);
this
.
checkBox_Double_Alternate
.
Name
=
"checkBox_Double_Alternate"
;
this
.
checkBox_Double_Alternate
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
16
);
this
.
checkBox_Double_Alternate
.
TabIndex
=
225
;
this
.
checkBox_Double_Alternate
.
Text
=
"Double Alternate"
;
this
.
checkBox_Double_Alternate
.
UseVisualStyleBackColor
=
true
;
this
.
checkBox_Double_Alternate
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
checkBox_Double_Alternate_CheckedChanged
);
//
// cmbPosition
//
this
.
cmbPosition
.
AutoSize
=
true
;
...
...
@@ -149,7 +144,7 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
txtJiange
.
Name
=
"txtJiange"
;
this
.
txtJiange
.
Size
=
new
System
.
Drawing
.
Size
(
37
,
21
);
this
.
txtJiange
.
TabIndex
=
221
;
this
.
txtJiange
.
Text
=
"
0
"
;
this
.
txtJiange
.
Text
=
"
1
"
;
//
// lblMsg
//
...
...
@@ -180,7 +175,7 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
btnStartAuTo
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnStartAuTo
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStartAuTo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStartAuTo
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
116
);
this
.
btnStartAuTo
.
Location
=
new
System
.
Drawing
.
Point
(
97
,
49
);
this
.
btnStartAuTo
.
Name
=
"btnStartAuTo"
;
this
.
btnStartAuTo
.
Size
=
new
System
.
Drawing
.
Size
(
149
,
32
);
this
.
btnStartAuTo
.
TabIndex
=
222
;
...
...
@@ -318,32 +313,6 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
txtUpDownP3
.
TabIndex
=
162
;
this
.
txtUpDownP3
.
Text
=
"-1"
;
//
// btnInStore
//
this
.
btnInStore
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnInStore
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnInStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
44
);
this
.
btnInStore
.
Name
=
"btnInStore"
;
this
.
btnInStore
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
32
);
this
.
btnInStore
.
TabIndex
=
102
;
this
.
btnInStore
.
Text
=
"入库测试"
;
this
.
btnInStore
.
UseVisualStyleBackColor
=
false
;
this
.
btnInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInStore_Click
);
//
// btnOutStore
//
this
.
btnOutStore
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnOutStore
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOutStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOutStore
.
Location
=
new
System
.
Drawing
.
Point
(
129
,
44
);
this
.
btnOutStore
.
Name
=
"btnOutStore"
;
this
.
btnOutStore
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
32
);
this
.
btnOutStore
.
TabIndex
=
101
;
this
.
btnOutStore
.
Text
=
"出库测试"
;
this
.
btnOutStore
.
UseVisualStyleBackColor
=
false
;
this
.
btnOutStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOutStore_Click
);
//
// txtUpDownP4
//
this
.
txtUpDownP4
.
AcceptsReturn
=
true
;
...
...
@@ -373,7 +342,7 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
btnInOutP2
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnInOutP2
.
Size
=
new
System
.
Drawing
.
Size
(
185
,
29
);
this
.
btnInOutP2
.
TabIndex
=
211
;
this
.
btnInOutP2
.
Text
=
"进出轴取料点P2:"
;
this
.
btnInOutP2
.
Text
=
"进出轴
夹爪
取料点P2:"
;
this
.
btnInOutP2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnInOutP2
.
UseVisualStyleBackColor
=
false
;
this
.
btnInOutP2
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInOutP2_Click
);
...
...
@@ -427,7 +396,7 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
btnInOutP3
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnInOutP3
.
Size
=
new
System
.
Drawing
.
Size
(
185
,
29
);
this
.
btnInOutP3
.
TabIndex
=
193
;
this
.
btnInOutP3
.
Text
=
"进出轴
取
料点P3:"
;
this
.
btnInOutP3
.
Text
=
"进出轴
库位取放
料点P3:"
;
this
.
btnInOutP3
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnInOutP3
.
UseVisualStyleBackColor
=
false
;
this
.
btnInOutP3
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInOutP3_Click
);
...
...
@@ -574,7 +543,7 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
dataGridView1
.
ShowCellToolTips
=
false
;
this
.
dataGridView1
.
ShowEditingIcon
=
false
;
this
.
dataGridView1
.
ShowRowErrors
=
false
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
909
,
2
09
);
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
909
,
3
09
);
this
.
dataGridView1
.
TabIndex
=
103
;
this
.
dataGridView1
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dataGridView1_CellContentClick
);
this
.
dataGridView1
.
CellMouseDown
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellMouseEventHandler
(
this
.
dataGridView1_CellMouseDown
);
...
...
@@ -597,7 +566,6 @@ namespace OnlineStore.ACSingleStore.useControl
#
endregion
private
System
.
Windows
.
Forms
.
GroupBox
groupInout
;
private
System
.
Windows
.
Forms
.
Label
lblMsg
;
private
System
.
Windows
.
Forms
.
Button
btnSavePosition
;
private
System
.
Windows
.
Forms
.
Button
btnStartAuTo
;
private
System
.
Windows
.
Forms
.
Label
label9
;
...
...
@@ -610,8 +578,6 @@ namespace OnlineStore.ACSingleStore.useControl
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP5
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP6
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP3
;
private
System
.
Windows
.
Forms
.
Button
btnInStore
;
private
System
.
Windows
.
Forms
.
Button
btnOutStore
;
public
System
.
Windows
.
Forms
.
TextBox
txtUpDownP4
;
public
System
.
Windows
.
Forms
.
Button
btnInOutP2
;
public
System
.
Windows
.
Forms
.
Button
btnComP3
;
...
...
@@ -625,7 +591,8 @@ namespace OnlineStore.ACSingleStore.useControl
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
DataGridView
dataGridView1
;
private
System
.
Windows
.
Forms
.
Label
cmbPosition
;
private
System
.
Windows
.
Forms
.
CheckBox
checkBox_Double_Alternate
;
public
System
.
Windows
.
Forms
.
Button
btnInOutP1
;
private
System
.
Windows
.
Forms
.
Label
lblMsg
;
private
System
.
Windows
.
Forms
.
Label
label_verify
;
}
}
source/ACSingleStore/userControl/uc_boxdebug.cs
查看文件 @
407fa49
...
...
@@ -91,6 +91,7 @@ namespace OnlineStore.ACSingleStore.useControl
var
cells
=
dataGridView1
.
Rows
[
pp
.
row
].
Cells
[
pp
.
col
];
cells
.
Style
=
GetStyle
(
arg1
);
}
checkVerify
();
}
DataGridViewCellStyle
GetStyle
(
string
posid
)
{
if
(
htpp
.
ContainsKey
(
posid
)
&&
posState
.
ContainsKey
(
posid
))
...
...
@@ -300,6 +301,7 @@ namespace OnlineStore.ACSingleStore.useControl
if
(
dataGridView1
.
SelectedCells
.
Count
>
0
)
setData
(
dataGridView1
.
SelectedCells
[
0
].
Tag
.
ToString
());
checkVerify
();
}
void
setData
(
string
posid
)
{
AutoStorePosition
ktkPosition
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
posid
);
...
...
@@ -353,39 +355,57 @@ namespace OnlineStore.ACSingleStore.useControl
if
(
store
.
autoNext
)
{
store
.
autoNext
=
false
;
btnStartAuTo
.
Text
=
StartAuto
;
//btnStart
.Text = StartAuto;
}
else
{
DialogResult
res
=
M
yMessage
.
Show
(
"确定开始自动出入库?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
DialogResult
res
=
M
essageBox
.
Show
(
ResourceCulture
.
GetString
(
"确定开始自动出入库?"
,
"确定开始自动出入库?"
),
ResourceCulture
.
GetString
(
ResourceCulture
.
MsgTitle
,
"提示"
)
,
MessageBoxButtons
.
YesNo
);
if
(
res
.
Equals
(
DialogResult
.
Yes
))
{
store
.
autoNext
=
true
;
int
jiange
=
FormUtil
.
GetIntValue
(
txtJiange
);
int
jiange
=
int
.
Parse
(
txtJiange
.
Text
);
store
.
autoJiange
=
jiange
;
if
(
!
string
.
IsNullOrEmpty
(
cmbPosition
.
Text
)
)
if
(
cmbPosition
.
Text
.
Length
>=
0
)
{
int
currIndex
=
store
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
int
currIndex
=
store
.
PositionNumList
.
FindIndex
(
new
Predicate
<
string
>((
pos
)=>{
return
pos
==
cmbPosition
.
Text
;
})
);
store
.
autoPositionIndex
=
currIndex
;
store
.
AutoStartIndex
=
currIndex
;
//store.Double_Alternate = checkBox_Double_Alternate.Checked;
//store.Alternate = false;
//store.hasDoublePlate = false;
string
poText
=
cmbPosition
.
Text
;
store
.
autoMsg
=
AutoIn
+
":"
+
poText
;
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
//store.StartOutStoreMove(new InOutStoreParam("", poText));
store
.
StartInStoreMove
(
new
InOutStoreParam
(
""
,
poText
));
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
DebugPosId
,
poText
);
store
.
autoMsg
=
ResourceCulture
.
GetString
(
"自动出入库"
,
"自动出入库"
)
+
":"
+
poText
;
store
.
autoNext
=
true
;
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
""
);
//btnStart.Text = StopAuto;
//DebugStatus(false);
string
msg
=
AutomaticBaiting
.
doStartBatchIn
();
LogUtil
.
info
(
"自动出入库: 开始自动入库:库位号【"
+
poText
+
"】,开始入库,结果:"
+
msg
);
}
btnStartAuTo
.
Text
=
StopAuto
;
}
}
}
else
{
M
yMessage
.
Show
(
"请先启动料仓!"
);
M
essageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
PleaseStartStore
,
"请先启动料仓!"
)
);
}
}
void
checkVerify
()
{
int
finish
=
0
;
for
(
int
i
=
0
;
i
<
store
.
PositionNumList
.
Count
;
i
++)
{
var
posid
=
store
.
PositionNumList
[
i
];
if
(
htpp
.
ContainsKey
(
posid
)
&&
posState
.
ContainsKey
(
posid
))
{
var
pps
=
(
PosState
)
posState
[
posid
];
if
(
pps
.
InStoreCheck
==
1
&&
pps
.
OutStoreCheck
==
1
)
{
finish
++;
}
}
}
double
s
=
(
double
)
finish
/
store
.
PositionNumList
.
Count
*
100
;
label_verify
.
Text
=
s
.
ToString
(
"0.0"
)
+
"%"
;
}
private
LineMoveP
LoadPostion
()
{
LineMoveP
ktk
=
new
LineMoveP
();
...
...
@@ -552,18 +572,7 @@ namespace OnlineStore.ACSingleStore.useControl
}
bool
preOpen
=
false
;
public
void
StoreOpenStatus
(
bool
isOpen
)
{
if
(
preOpen
.
Equals
(
isOpen
))
{
return
;
}
preOpen
=
isOpen
;
btnOutStore
.
Enabled
=
isOpen
;
btnInStore
.
Enabled
=
isOpen
;
}
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
if
(!
Visible
)
...
...
source/Common/Setting_Init.cs
查看文件 @
407fa49
...
...
@@ -118,5 +118,8 @@ namespace OnlineStore.Common
public
static
string
code_block_size_list
=
"code_block_size_list"
;
public
static
string
DisableFixTray
=
"DisableFixTray"
;
public
static
string
InOutFixPos
=
"InOutFixPos"
;
public
static
string
wait_take_reel_sec
=
"wait_take_reel_sec"
;
public
static
string
humidityadjust
=
"humidityadjust"
;
public
static
string
humiditylimited
=
"humiditylimited"
;
}
}
source/Common/util/ConfigAppSettings.cs
查看文件 @
407fa49
...
...
@@ -104,9 +104,9 @@ namespace OnlineStore.Common
}
return
a
;
}
public
static
int
GetIntValue
(
string
key
)
public
static
int
GetIntValue
(
string
key
,
int
defalut
=
0
)
{
int
a
=
0
;
int
a
=
defalut
;
System
.
Configuration
.
Configuration
config
=
ConfigurationManager
.
OpenExeConfiguration
(
ConfigurationUserLevel
.
None
);
if
(
config
.
AppSettings
.
Settings
[
key
]
==
null
)
{
...
...
source/Common/util/HumitureController.cs
查看文件 @
407fa49
...
...
@@ -20,7 +20,8 @@ namespace OnlineStore.Common
private
static
int
dataBits
=
8
;
//数据位
private
static
StopBits
stopBits
=
StopBits
.
One
;
//停止位
private
static
AcSerialBean
sb
=
null
;
static
double
humidityadjust
=
(
double
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
humidityadjust
);
static
double
humiditylimited
=
(
double
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
humiditylimited
);
private
static
string
LogName
=
""
;
public
static
bool
Init
(
string
port
)
{
...
...
@@ -32,8 +33,8 @@ namespace OnlineStore.Common
{
Release
();
}
LogName
=
"温湿度传感器["
+
port
+
"]
"
;
LogName
=
"温湿度传感器["
+
port
+
$
"]{humidityadjust},{humiditylimited}
"
;
LogUtil
.
info
(
LogName
);
if
(
sb
==
null
)
{
serialPort
=
port
;
...
...
@@ -77,6 +78,15 @@ namespace OnlineStore.Common
List
<
double
>
data
=
queryData
();
if
(
data
.
Count
.
Equals
(
2
))
{
if
(
humidityadjust
!=
0
&&
humiditylimited
!=
0
)
{
if
(
data
[
0
]
+
humidityadjust
<
humiditylimited
)
{
data
[
0
]
=
humiditylimited
;
}
else
data
[
0
]
+=
humidityadjust
;
}
param
=
new
ASTemperateParam
(
data
[
1
],
data
[
0
]);
}
LastData
=
param
;
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
查看文件 @
407fa49
...
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
{
checkTimer
=
new
System
.
Timers
.
Timer
();
checkTimer
.
AutoReset
=
true
;
checkTimer
.
Interval
+=
3
0
;
checkTimer
.
Interval
+=
1
0
;
checkTimer
.
Elapsed
+=
CheckTimer_Elapsed
;
checkTimer
.
Enabled
=
false
;
}
...
...
source/DeviceLibrary/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
407fa49
...
...
@@ -12,6 +12,8 @@ using CodeLibrary;
using
System.Drawing.Imaging
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Runtime.Serialization.Formatters.Binary
;
using
System.Threading
;
namespace
OnlineStore.DeviceLibrary
{
...
...
@@ -69,7 +71,7 @@ namespace OnlineStore.DeviceLibrary
continue
;
}
string
file
=
GetCodeParamFilePath
(
str
.
Trim
());
LogUtil
.
info
(
"加载到配置二维码类型:"
+
str
.
Trim
()
+
",配置文件:"
+
file
);
LogUtil
.
info
(
"加载到配置二维码类型:"
+
str
.
Trim
()
+
",配置文件:"
+
file
+
",QRCodeCount:"
+
QRCodeCount
.
ToString
()
);
codeTypeList
.
Add
(
str
.
Trim
());
}
...
...
@@ -142,80 +144,86 @@ namespace OnlineStore.DeviceLibrary
Camera
.
_cam
.
CloseAll
();
}
[
HandleProcessCorruptedStateExceptions
]
public
static
List
<
string
>
CameraScan
(
)
{
int
codeCount
=
1
;
public
static
List
<
string
>
CameraScan
()
{
int
codeCount
=
QRCodeCount
;
List
<
string
>
codeList
=
new
List
<
string
>();
if
(
cameraNameList
==
null
||
cameraNameList
.
Count
<=
0
)
{
return
codeList
;
}
try
Task
[]
cameraTask
=
new
Task
[
cameraNameList
.
Count
()];
LogUtil
.
info
(
cameraNameList
.
Count
()+
" 开始取图片"
);
for
(
int
i
=
0
;
i
<
cameraNameList
.
Count
();
i
++)
{
//Task[] cameraTask = new Task[cameraNameList.Count()];
for
(
int
i
=
0
;
i
<
cameraNameList
.
Count
();
i
++)
cameraTask
[
i
]
=
Task
.
Run
(()
=>
{
var
cameraName
=
cameraNameList
[
i
];
//cameraTask[i] = Task.Run(() =>
//{
if
(
cameraName
.
Trim
().
Equals
(
""
))
{
continue
;
}
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片"
);
HalconDotNet
.
HObject
ho_Image
=
null
;
Bitmap
bmp
=
null
;
if
(
cameraName
.
Trim
().
Equals
(
""
))
{
return
;
}
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片"
);
HalconDotNet
.
HObject
ho_Image
=
null
;
Bitmap
bmp
=
null
;
try
{
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bmp
,
true
);
}
catch
(
AccessViolationException
e
)
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
());
}
try
{
bool
nohalcon
=
false
;
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bmp
,
nohalcon
);
if
(
ho_Image
==
null
&&
!
nohalcon
)
{
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
continue
;
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
string
r
=
""
;
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
{
codeTypeList
=
codeTypeList
.
ToArray
(),
codeCount
=
codeCount
,
timeout
=
4
000
timeout
=
2
000
};
var
cc
=
RemoteDecodeHelper
.
DecodeRequest
(
bmp
,
remoteDecodeParam
);
if
(
cc
!=
null
)
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码1"
);
lock
(
codeList
)
{
foreach
(
CodeInfo
c
in
cc
)
if
(
cc
!=
null
)
{
string
str
=
CodeManager
.
ReplaceCode
(
c
.
CodeStr
);
if
(!
codeList
.
Contains
(
str
)
)
foreach
(
CodeInfo
c
in
cc
)
{
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
string
str
=
CodeManager
.
ReplaceCode
(
c
.
CodeStr
);
if
(!
codeList
.
Contains
(
str
))
{
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
}
}
}
if
(
codeList
.
Count
()
==
0
)
{
SaveImageToFile
(
"mimo"
,
cameraName
,
bmp
);
}
}
if
(
codeList
.
Count
()
==
0
)
{
SaveImageToFile
(
"mimo"
,
cameraName
,
bmp
);
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】"
+
" 扫码完成【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】 :"
+
r
);
}
catch
(
AccessViolationException
e
)
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
// GC.Collect();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"
扫码
出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"
识别
出错:"
+
ex
.
ToString
());
}
finally
{
...
...
@@ -224,24 +232,45 @@ namespace OnlineStore.DeviceLibrary
ho_Image
.
Dispose
();
}
if
(
bmp
!=
null
)
{
bmp
.
Dispose
();
}
}
// });
//cameraTask[i].Wait();
}
//Task.WaitAll(cameraTask);
});
Thread
.
Sleep
(
500
);
}
catch
(
AccessViolationException
e
)
//Thread.Sleep(1000);
//Task.WaitAll(cameraTask, 10 * 1000);
while
(!
cameraTask
[
0
].
IsCompleted
||
!
cameraTask
[
1
].
IsCompleted
)
{
LogUtil
.
error
(
" 扫码出现AccessViolationException异常:"
+
e
.
ToString
()
);
// GC.Collect(
);
Application
.
DoEvents
(
);
Thread
.
Sleep
(
100
);
}
catch
(
Exception
ex
)
return
codeList
;
}
[
HandleProcessCorruptedStateExceptions
]
public
static
T
DeepClone
<
T
>(
T
_object
)
{
try
{
T
dstobject
;
using
(
MemoryStream
mStream
=
new
MemoryStream
())
{
BinaryFormatter
bf
=
new
BinaryFormatter
();
bf
.
Serialize
(
mStream
,
_object
);
mStream
.
Seek
(
0
,
SeekOrigin
.
Begin
);
//指定当前流的位置为流的开头。
dstobject
=
(
T
)
bf
.
Deserialize
(
mStream
);
mStream
.
Close
();
}
return
dstobject
;
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
());
LogUtil
.
info
(
"GetStringCenterA"
+
e
.
ToString
());
return
default
;
}
return
codeList
;
}
private
static
void
SaveImageToFile
(
string
deviceName
,
string
cameraName
,
Bitmap
bitmap
)
{
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
407fa49
...
...
@@ -50,61 +50,62 @@ AXIS,(轴四)压紧轴,Comp_Axis,3,HC,0,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,4,HC,0,,,,
,,,,,,,,,
,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,
3377
,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,
2276
,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,
2073
,,,,,,
PRO,升降轴从吸盘下方接料后下降的高度,UpDownAxis_DownValue,
1
00,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#
3917;12#3893;16#3840;20#3800;24#3789;
,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,
2995
,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,
606179
,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,
389483
,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,
359087
,,,,,,
PRO,升降轴从吸盘下方接料后下降的高度,UpDownAxis_DownValue,
200
00,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#
684265;12#678000;16#670280;24#658742;28#652000
,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,
166268
,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,100,,,,,,
PRO,压紧轴(轴四)P1待机原位点,CompressAxis_P1_Position,7000,,,,,,
PRO,压紧轴(轴四)P2压紧点集合,CompressAxis_P2_List,8#4
4201;12#38557;16#34550;20#30540;24#26030;
,,,,,,
PRO,压紧轴(轴四)P2压紧点集合,CompressAxis_P2_List,8#4
3000;12#42000;16#40000;24#30000;28#26000
,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,1,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayWidth,0,,,,, ,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,0,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayWidth,0,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayHeight,0,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,180,,,,,,
,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,
8
00,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,
24
00,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,
24
00,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,100,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,
1
00,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,500,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,
2
000,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,6000,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,6000,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,
2
0,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,
25
0,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,
3
000,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,
1
000,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,
5
000,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,
5
000,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,
8
0,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,
2
00,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,
3
000,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,2000,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,2000,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,2000,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,1
5
0,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,2000,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,1
5
0,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,
2
000,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,
8
00,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,
8
00,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,
16
00,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,
18
00,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,
18
00,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,
250
00,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,
1000
00,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,
1000
00,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,100
0
,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,
200
00,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,500
00
,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,
50
000,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,6000
00
,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,6000
00
,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,
300
0,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,
4000
0,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,
120
000,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,
200
000,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,
600
000,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,
600
000,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,
100
0,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,
400
00,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,
120
000,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,2000
00
,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,2000
00
,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,2000
00
,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,1
0000
0,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,2000
00
,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,1
0000
0,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,
100
000,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100
000
,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,
400
00,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,
400
00,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,
2000
00,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,
2000
00,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,
2000
00,,,,,,
PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,5,,,,,,
PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,5,,,,,,
PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,5,,,,,,
PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,20,,,,,,
PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,
2
0,,,,,,
PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,
2
0,,,,,,
PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,2
5
0,,,,,,
PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,
100
0,,,,,,
PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,
30
0,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,500,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,
...
...
@@ -123,37 +124,37 @@ PRO,温湿度端口号,Humiture_Port,COM5,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,
13
000,,,,,,
PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,
8
000,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,
6
0000,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,
6
0000,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,
90
00,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,
15
000,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,
100
000,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,
2857
78,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,
40
000,,,,,,
PRO,(轴五)上料轴慢速匀速上升速度,BatchAxis_SlowSpeed,
3
000,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,
2
0000,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,
2
0000,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,
8
00,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,
8
000,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,
25
000,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,
3101
78,,,,,,
PRO,(轴五)上料轴P2点(待机点),BatchAxis_P2,3000,,,,,,
PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,2
0
000,,,,,,
PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,2
5
000,,,,,,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,100,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,200,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,
30
000,,,,,,
PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_DownPosition2,
60
000,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,
22
000,,,,,,
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,250,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,
9
,,,,,,
PRO,(轴五)上料轴P3点(上料目标位置),BatchAxis_P3,3
58243
,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,
15
000,,,,,,
PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_DownPosition2,
3
000,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,
50
000,,,,,,
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,250
00
,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,
6
,,,,,,
PRO,(轴五)上料轴P3点(上料目标位置),BatchAxis_P3,3
40874
,,,,,,
,,,,,,,,,
PRO,(轴二)升降轴单盘入库抬升料盘的高度,UpdownAxis_UpPosition,100,,,,,,
PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,100,,,,,,
,,,,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,
1
0000,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,
95
000,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,
95
000,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,
30
00,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,
5
000,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,
10
000,,,,,,
PRO,(轴四)压紧轴P1速度,CompAxis_P1_Speed,
1
0000,,,,,,
PRO,(轴四)压紧轴P2速度,CompAxis_P2_Speed,20000,,,,,,
PRO,(轴四)压紧轴P3速度,CompAxis_P3_Speed,
3
0000,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,T
,PartNum,1=330x81
,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,
5
0000,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,
1200
000,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,
1200
000,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,
8
00,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,
8
000,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,
25
000,,,,,,
PRO,(轴四)压紧轴P1速度,CompAxis_P1_Speed,
20
0000,,,,,,
PRO,(轴四)压紧轴P2速度,CompAxis_P2_Speed,20000
0
,,,,,,
PRO,(轴四)压紧轴P3速度,CompAxis_P3_Speed,
20
0000,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,T
=13x28#S=7x8,,
,,,,
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
407fa49
此文件的差异太大,无法显示。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
407fa49
...
...
@@ -89,6 +89,7 @@ namespace OnlineStore.DeviceLibrary
IOManager
.
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
Buzzer_Sign
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
Device_Led
,
IO_VALUE
.
HIGH
);
mainTimer
.
Enabled
=
(
isAuto
==
1
);
LoadOk
=
true
;
});
...
...
@@ -358,6 +359,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
//WarnMsg = "";
SetWarnMsg
(
""
);
if
(!
RunAxis
(
true
))
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位时打开轴失败,需要再次复位,直接报警停止复位"
);
...
...
@@ -377,6 +381,10 @@ namespace OnlineStore.DeviceLibrary
//LocationDownAndWait();
}
AutomaticBaiting
.
StartReset
();
IoCheckTimer
.
Enabled
=
true
;
serverConnectTimer
.
Enabled
=
true
;
ledCheckTimer
.
Enabled
=
true
;
isInPro
=
false
;
}
private
void
InoutStartReset
()
...
...
@@ -493,7 +501,7 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
BOX_R42_OpenDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_R43_WaitTrayGo
);
ResetLog
(
"复位时清料: 等待操作人员拿走料盘 "
);
StoreMove
.
TimeOutSeconds
=
120
;
StoreMove
.
TimeOutSeconds
=
wait_take_reel_sec
;
AutomaticBaiting
.
IsWaitTragGo
=
true
;
AutomaticBaiting
.
IsGetTrayGo
=
false
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTakeTray
());
...
...
@@ -1875,9 +1883,18 @@ namespace OnlineStore.DeviceLibrary
DateTime
time
=
DateTime
.
Now
;
//构建发送给服务器的对象
Operation
lineOperation
=
getLineBoxStatus
();
if
(
Max_Humidity
<=
0
||
(
Max_Temperature
<=
0
))
{
lineOperation
.
op
=
5
;
LogUtil
.
info
(
LOGGER
,
StoreName
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
);
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
PostOP
(
StoreManager
.
GetPostApi
(
server
),
lineOperation
);
Operation
resultOperation
=
null
;
lock
(
StoreManager
.
Store
)
{
resultOperation
=
HttpHelper
.
PostOP
(
StoreManager
.
GetPostApi
(
server
),
lineOperation
);
}
//发送状态信息到服务器
if
(
resultOperation
==
null
)
{
...
...
@@ -1895,7 +1912,7 @@ namespace OnlineStore.DeviceLibrary
public
void
OperationProcess
(
Operation
resultOperation
)
{
if
(
resultOperation
.
data
!=
null
)
if
(
resultOperation
.
op
.
Equals
(
5
)
)
{
ProcessHumidityCMD
(
resultOperation
);
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
407fa49
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
407fa49
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
407fa49
...
...
@@ -17,13 +17,14 @@ namespace OnlineStore.DeviceLibrary
private
static
int
StartMovePosition
=
0
;
private
static
int
EndMovePosition
=
0
;
//public static int AutoAxisIsMove = 0;
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
,
string
targetSingle
)
private
static
void
ACAxisSpeedMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
,
string
targetSingle
,
bool
needwait
=
true
)
{
//AutoAxisIsMove = 1;
StartMovePosition
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
EndMovePosition
=
StartMovePosition
;
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
targetPosition
,
targetSingle
));
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升,needwait="
+
needwait
.
ToString
());
if
(
needwait
)
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
targetPosition
,
targetSingle
));
BatchAxisController
.
StartCheck
(
targetSingle
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
...
...
@@ -404,6 +405,7 @@ namespace OnlineStore.DeviceLibrary
if
(
LastCode
.
Equals
(
""
))
{
StoreManager
.
Store
.
CodeOrInoutMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
InStoreNoCode
,
"未扫到二维码,需要将料盘送出"
);
LogUtil
.
error
(
"未扫到二维码,需要将料盘送出"
);
}
TimeSpan
span
=
DateTime
.
Now
-
startTime
;
...
...
@@ -430,19 +432,22 @@ namespace OnlineStore.DeviceLibrary
//string[] codeArray = LastCode.Split(new string[] { spiltStr});
if
(
LastCodeList
.
Count
>
0
)
{
foreach
(
string
cc
in
LastCodeList
)
foreach
(
string
cc
in
LastCodeList
.
ToArray
()
)
{
string
code
=
cc
.
Trim
()
;
if
(!
code
.
Equals
(
""
))
string
code
=
cc
;
if
(!
code
.
Trim
().
Equals
(
""
))
{
string
codeSize
=
StoreManager
.
Config
.
GetCodeSize
(
ref
code
);
if
(
String
.
IsNullOrEmpty
(
codeSize
))
LogUtil
.
info
(
Name
+
$
"code:{code},codeSize:{codeSize}"
);
if
(!
String
.
IsNullOrEmpty
(
codeSize
))
{
msg
=
msg
+
"=1+0x0-"
+
LastWidth
+
"x"
+
LastHeight
+
"="
+
code
+
spiltStr
;
}
else
{
msg
=
msg
+
"=1+0x0-"
+
codeSize
+
"="
+
code
+
spiltStr
;
LastCodeList
.
Remove
(
cc
);
//msg = msg + "=1+0x0-" + codeSize + "=" + code + spiltStr;
var
w
=
codeSize
.
Substring
(
0
,
codeSize
.
IndexOf
(
"x"
));
var
h
=
codeSize
.
Substring
(
codeSize
.
IndexOf
(
"x"
)
+
1
);
LastWidth
=
int
.
Parse
(
w
);
LastHeight
=
int
.
Parse
(
h
);
LogUtil
.
info
(
Name
+
$
"弃用条码:{cc},LastWidth:{LastWidth},LastHeight:{LastHeight}"
);
}
}
}
...
...
@@ -451,6 +456,17 @@ namespace OnlineStore.DeviceLibrary
{
msg
=
msg
+
"=1+0x0-"
+
LastWidth
+
"x"
+
LastHeight
+
"="
+
LastCode
+
spiltStr
;
}
if
(
LastCodeList
.
Count
>
0
)
{
foreach
(
string
cc
in
LastCodeList
.
ToArray
())
{
string
code
=
cc
;
if
(!
code
.
Trim
().
Equals
(
""
))
{
msg
=
msg
+
"=1+0x0-"
+
LastWidth
+
"x"
+
LastHeight
+
"="
+
code
+
spiltStr
;
}
}
}
msg
=
CodeManager
.
ReplaceCode
(
msg
);
LastSendCode
=
msg
;
return
msg
;
...
...
@@ -514,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
InOutStoreParam
GetInStoreParam
(
string
LogName
,
string
message
)
public
static
InOutStoreParam
GetInStoreParam
(
string
LogName
,
string
message
,
bool
singlein
=
false
)
{
//message = CodeManager.ReplaceCode(message);
if
(
message
.
Equals
(
""
)
||
string
.
IsNullOrEmpty
(
message
))
...
...
@@ -536,7 +552,7 @@ namespace OnlineStore.DeviceLibrary
operation
.
data
.
Add
(
"code"
,
message
);
operation
.
data
.
Add
(
"boxId"
,
StoreManager
.
Store
.
StoreID
.
ToString
());
if
(
LastHeight
.
Equals
(
0
)
&&
LastWidth
.
Equals
(
0
)
)
if
(
(
LastHeight
.
Equals
(
0
)
&&
LastWidth
.
Equals
(
0
))
||
singlein
)
{
//singleIn 单盘入库
operation
.
data
.
Add
(
"singleIn"
,
"true"
);
...
...
@@ -545,6 +561,8 @@ namespace OnlineStore.DeviceLibrary
{
operation
.
data
.
Add
(
"singleIn"
,
"false"
);
}
string
autoposId
=
StoreManager
.
Store
.
GetAutoPosid
(
true
);
if
(
StoreManager
.
Store
.
autoNext
&&
(!
String
.
IsNullOrEmpty
(
autoposId
)))
{
...
...
@@ -552,18 +570,17 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
debug
(
"添加自动入库库位号:"
+
autoposId
);
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
PostOP
(
StoreManager
.
GetPostApi
(
server
),
operation
,
2000
);
if
(
resultOperation
==
null
)
Operation
resultOperation
=
null
;
lock
(
StoreManager
.
Store
)
{
LogUtil
.
info
(
LogName
+
"二维码【"
+
message
+
"】没有收到服务器反馈"
);
return
null
;
resultOperation
=
HttpHelper
.
PostOP
(
StoreManager
.
GetPostApi
(
server
),
operation
,
2000
);
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
)
)
if
(
resultOperation
==
null
)
{
LogUtil
.
info
(
LogName
+
"
服务器反馈 二维码【"
+
message
+
"】【"
+
autoposId
+
"】 :"
+
resultOperation
.
msg
);
LogUtil
.
info
(
LogName
+
"
二维码【"
+
message
+
"】没有收到服务器反馈"
);
return
null
;
}
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
posId
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateH
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateW
))
...
...
@@ -602,6 +619,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LogName
+
"解析服务发送的入库【"
+
posId
+
"】出错"
+
ex
.
StackTrace
);
}
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
LogUtil
.
info
(
LogName
+
"服务器反馈 二维码【"
+
message
+
"】【"
+
autoposId
+
"】 :"
+
resultOperation
.
msg
);
return
null
;
}
else
{
LogUtil
.
error
(
LogName
+
"二维码【"
+
message
+
"】获取入库库位失败 "
);
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
407fa49
...
...
@@ -600,6 +600,8 @@ namespace OnlineStore.DeviceLibrary
/// 等待1秒钟后在下降
/// </summary>
AUTO_O07_WaitDown
=
1307
,
AUTO_I02_1
=
1309
,
AUTO_I02_2
=
1310
,
#
endregion
...
...
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
查看文件 @
407fa49
...
...
@@ -603,6 +603,11 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"Default_TrayWidth"
)]
public
int
Default_TrayWidth
{
get
;
set
;
}
/// <summary>
/// PRO,默认的料盘高度(不可更改),Default_TrayHeight,7
/// </summary>
[
ConfigProAttribute
(
"Default_TrayHeight"
)]
public
int
Default_TrayHeight
{
get
;
set
;
}
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary>
[
ConfigProAttribute
(
"IO_DILength"
,
false
)]
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论