Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1eaf2994
由
刘韬
编写于
2021-08-13 15:12:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正自动双盘交替出入库
1 个父辈
9eae4e77
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
279 行增加
和
113 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/useControl/uc_boxdebug.Designer.cs
source/ACSingleStore/useControl/uc_boxdebug.cs
source/Common/Setting_Init.cs
source/Common/util/LogUtil.cs
source/DeviceLibrary/DeviceLibrary.csproj
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/dataLogic/DLScanSocket.cs
source/DeviceLibrary/store/Camera.cs
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
source/ACSingleStore/App.config
查看文件 @
1eaf299
...
@@ -12,7 +12,9 @@
...
@@ -12,7 +12,9 @@
<
add
key
=
"StartBlowValue"
value
=
"2"
/>
<
add
key
=
"StartBlowValue"
value
=
"2"
/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<
add
key
=
"StopBlowValue"
value
=
"4"
/>
<
add
key
=
"StopBlowValue"
value
=
"4"
/>
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"DoorOpenAirBlow"
value
=
"0"
/>
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<!--
Server
address
-->
<!--
Server
address
-->
<!--<
add
key
=
"http.server"
value
=
"http://localhost:80/"
/>-->
<!--<
add
key
=
"http.server"
value
=
"http://localhost:80/"
/>-->
<!--
storeType
-->
<!--
storeType
-->
...
@@ -74,6 +76,12 @@
...
@@ -74,6 +76,12 @@
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"ResourcesLog"
/>
<
appender
-
ref
ref
=
"ResourcesLog"
/>
</
logger
>
</
logger
>
<
logger
name
=
"HIK.IPCamera"
additivity
=
"false"
>
<
level
value
=
"All"
/>
<
appender
-
ref
ref
=
"Camera"
/>
</
logger
>
<
root
>
<
root
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
1eaf299
...
@@ -260,6 +260,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -260,6 +260,7 @@ namespace OnlineStore.ACSingleStore
//
//
// btnSotreReset
// btnSotreReset
//
//
this
.
btnSotreReset
.
Enabled
=
false
;
this
.
btnSotreReset
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSotreReset
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSotreReset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSotreReset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSotreReset
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
1
);
this
.
btnSotreReset
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
1
);
...
@@ -272,6 +273,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -272,6 +273,7 @@ namespace OnlineStore.ACSingleStore
//
//
// btnStoreStop
// btnStoreStop
//
//
this
.
btnStoreStop
.
Enabled
=
false
;
this
.
btnStoreStop
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStoreStop
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStoreStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStoreStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStoreStop
.
Location
=
new
System
.
Drawing
.
Point
(
139
,
1
);
this
.
btnStoreStop
.
Location
=
new
System
.
Drawing
.
Point
(
139
,
1
);
...
@@ -514,9 +516,9 @@ namespace OnlineStore.ACSingleStore
...
@@ -514,9 +516,9 @@ namespace OnlineStore.ACSingleStore
// pictureBox2
// pictureBox2
//
//
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
4
06
,
305
);
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
4
72
,
305
);
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
397
,
298
);
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
465
,
298
);
this
.
pictureBox2
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox2
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox2
.
TabIndex
=
269
;
this
.
pictureBox2
.
TabIndex
=
269
;
this
.
pictureBox2
.
TabStop
=
false
;
this
.
pictureBox2
.
TabStop
=
false
;
...
@@ -529,7 +531,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -529,7 +531,7 @@ namespace OnlineStore.ACSingleStore
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
305
);
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
305
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
397
,
298
);
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
465
,
298
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox1
.
TabIndex
=
269
;
this
.
pictureBox1
.
TabIndex
=
269
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
pictureBox1
.
TabStop
=
false
;
...
@@ -750,6 +752,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -750,6 +752,7 @@ namespace OnlineStore.ACSingleStore
this
.
uc_boxdebug1
.
Name
=
"uc_boxdebug1"
;
this
.
uc_boxdebug1
.
Name
=
"uc_boxdebug1"
;
this
.
uc_boxdebug1
.
Size
=
new
System
.
Drawing
.
Size
(
946
,
606
);
this
.
uc_boxdebug1
.
Size
=
new
System
.
Drawing
.
Size
(
946
,
606
);
this
.
uc_boxdebug1
.
TabIndex
=
0
;
this
.
uc_boxdebug1
.
TabIndex
=
0
;
this
.
uc_boxdebug1
.
Load
+=
new
System
.
EventHandler
(
this
.
uc_boxdebug1_Load
);
//
//
// tabPage1
// tabPage1
//
//
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
1eaf299
...
@@ -45,13 +45,19 @@ namespace OnlineStore.ACSingleStore
...
@@ -45,13 +45,19 @@ namespace OnlineStore.ACSingleStore
}
}
private
void
CodeManager_camera_event
(
object
sender
,
Bitmap
e
)
private
void
CodeManager_camera_event
(
object
sender
,
Bitmap
e
)
{
{
pictureBox2
.
Image
=
e
;
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
pictureBox2
.
Visible
=
true
;
pictureBox2
.
Image
=
e
;
},
sender
,
e
);
}
}
private
void
Camera_camera_event
(
object
sender
,
Bitmap
e
)
private
void
Camera_camera_event
(
object
sender
,
Bitmap
e
)
{
{
pictureBox1
.
Image
=
e
;
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
pictureBox1
.
Visible
=
true
;
pictureBox1
.
Image
=
e
;
},
sender
,
e
);
}
}
private
void
InitStoreValue
()
private
void
InitStoreValue
()
...
@@ -174,7 +180,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -174,7 +180,7 @@ namespace OnlineStore.ACSingleStore
{
{
chbIsDebug
.
Checked
=
false
;
chbIsDebug
.
Checked
=
false
;
richTextBox1
.
Visible
=
false
;
richTextBox1
.
Visible
=
false
;
tabControl1
.
TabPages
.
Remove
(
tabPage3
);
//
tabControl1.TabPages.Remove(tabPage3);
}
}
// this.tabControl1.TabPages.Remove(tabPage3);
// this.tabControl1.TabPages.Remove(tabPage3);
...
@@ -548,18 +554,25 @@ namespace OnlineStore.ACSingleStore
...
@@ -548,18 +554,25 @@ namespace OnlineStore.ACSingleStore
}
}
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
//store.dlScanSocket.StartConnect();
//store.GetCameraCode();
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
if
(
Camera
.
_cam
!=
null
)
if
(
store
.
dlScanSocket
.
isScannerRun
)
{
{
Camera
.
_cam
.
CloseAll
();
store
.
dlScanSocket
.
StartConnect
();
store
.
GetCameraCode
();
}
else
{
if
(
Camera
.
_cam
!=
null
)
{
Camera
.
_cam
.
CloseAll
();
}
CodeLibrary
.
FrmCodeDecode
frm
=
new
CodeLibrary
.
FrmCodeDecode
();
frm
.
chbZxing
.
Checked
=
false
;
frm
.
chbZxing
.
Visible
=
false
;
frm
.
ShowDialog
();
frm
.
Dispose
();
}
}
CodeLibrary
.
FrmCodeDecode
frm
=
new
CodeLibrary
.
FrmCodeDecode
();
frm
.
chbZxing
.
Checked
=
false
;
frm
.
chbZxing
.
Visible
=
false
;
frm
.
ShowDialog
();
frm
.
Dispose
();
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
}
}
...
@@ -1020,5 +1033,10 @@ namespace OnlineStore.ACSingleStore
...
@@ -1020,5 +1033,10 @@ namespace OnlineStore.ACSingleStore
if
(
obj
.
Dock
==
DockStyle
.
Fill
)
if
(
obj
.
Dock
==
DockStyle
.
Fill
)
obj
.
Dock
=
DockStyle
.
None
;
obj
.
Dock
=
DockStyle
.
None
;
}
}
private
void
uc_boxdebug1_Load
(
object
sender
,
EventArgs
e
)
{
}
}
}
}
}
source/ACSingleStore/useControl/uc_boxdebug.Designer.cs
查看文件 @
1eaf299
...
@@ -31,6 +31,8 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -31,6 +31,8 @@ namespace OnlineStore.ACSingleStore.useControl
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
groupInout
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupInout
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnInOutP1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
checkBox_Double_Alternate
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cmbPosition
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbPosition
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtJiange
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtJiange
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
...
@@ -59,13 +61,13 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -59,13 +61,13 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
btnUpDownP4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpDownP4
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
checkBox_Double_Alternate
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupInout
.
SuspendLayout
();
this
.
groupInout
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// groupInout
// groupInout
//
//
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInOutP1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
checkBox_Double_Alternate
);
this
.
groupInout
.
Controls
.
Add
(
this
.
checkBox_Double_Alternate
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cmbPosition
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtJiange
);
this
.
groupInout
.
Controls
.
Add
(
this
.
txtJiange
);
...
@@ -93,13 +95,43 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -93,13 +95,43 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP6
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP3
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP4
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnUpDownP4
);
this
.
groupInout
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
337
);
this
.
groupInout
.
Location
=
new
System
.
Drawing
.
Point
(
2
,
315
);
this
.
groupInout
.
Name
=
"groupInout"
;
this
.
groupInout
.
Name
=
"groupInout"
;
this
.
groupInout
.
Size
=
new
System
.
Drawing
.
Size
(
779
,
179
);
this
.
groupInout
.
Size
=
new
System
.
Drawing
.
Size
(
779
,
179
);
this
.
groupInout
.
TabIndex
=
101
;
this
.
groupInout
.
TabIndex
=
101
;
this
.
groupInout
.
TabStop
=
false
;
this
.
groupInout
.
TabStop
=
false
;
this
.
groupInout
.
Text
=
"料仓操作"
;
this
.
groupInout
.
Text
=
"料仓操作"
;
//
//
// btnInOutP1
//
this
.
btnInOutP1
.
AutoSize
=
true
;
this
.
btnInOutP1
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnInOutP1
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Default
;
this
.
btnInOutP1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInOutP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnInOutP1
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
btnInOutP1
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnInOutP1
.
Location
=
new
System
.
Drawing
.
Point
(
522
,
146
);
this
.
btnInOutP1
.
Name
=
"btnInOutP1"
;
this
.
btnInOutP1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnInOutP1
.
Size
=
new
System
.
Drawing
.
Size
(
133
,
29
);
this
.
btnInOutP1
.
TabIndex
=
226
;
this
.
btnInOutP1
.
Text
=
"进出轴回待机点P1"
;
this
.
btnInOutP1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
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
// cmbPosition
//
//
this
.
cmbPosition
.
AutoSize
=
true
;
this
.
cmbPosition
.
AutoSize
=
true
;
...
@@ -132,9 +164,9 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -132,9 +164,9 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
btnSavePosition
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnSavePosition
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnSavePosition
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSavePosition
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSavePosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSavePosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSavePosition
.
Location
=
new
System
.
Drawing
.
Point
(
52
2
,
146
);
this
.
btnSavePosition
.
Location
=
new
System
.
Drawing
.
Point
(
67
2
,
146
);
this
.
btnSavePosition
.
Name
=
"btnSavePosition"
;
this
.
btnSavePosition
.
Name
=
"btnSavePosition"
;
this
.
btnSavePosition
.
Size
=
new
System
.
Drawing
.
Size
(
161
,
29
);
this
.
btnSavePosition
.
Size
=
new
System
.
Drawing
.
Size
(
95
,
29
);
this
.
btnSavePosition
.
TabIndex
=
217
;
this
.
btnSavePosition
.
TabIndex
=
217
;
this
.
btnSavePosition
.
Text
=
"保存位置"
;
this
.
btnSavePosition
.
Text
=
"保存位置"
;
this
.
btnSavePosition
.
UseVisualStyleBackColor
=
false
;
this
.
btnSavePosition
.
UseVisualStyleBackColor
=
false
;
...
@@ -515,20 +547,10 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -515,20 +547,10 @@ namespace OnlineStore.ACSingleStore.useControl
this
.
dataGridView1
.
ShowCellToolTips
=
false
;
this
.
dataGridView1
.
ShowCellToolTips
=
false
;
this
.
dataGridView1
.
ShowEditingIcon
=
false
;
this
.
dataGridView1
.
ShowEditingIcon
=
false
;
this
.
dataGridView1
.
ShowRowErrors
=
false
;
this
.
dataGridView1
.
ShowRowErrors
=
false
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
785
,
3
31
);
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
785
,
3
13
);
this
.
dataGridView1
.
TabIndex
=
103
;
this
.
dataGridView1
.
TabIndex
=
103
;
this
.
dataGridView1
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dataGridView1_CellContentClick
);
this
.
dataGridView1
.
CellClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dataGridView1_CellContentClick
);
//
this
.
dataGridView1
.
CellMouseDown
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellMouseEventHandler
(
this
.
dataGridView1_CellMouseDown
);
// 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
);
//
//
// uc_boxdebug
// uc_boxdebug
//
//
...
@@ -577,5 +599,6 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -577,5 +599,6 @@ namespace OnlineStore.ACSingleStore.useControl
private
System
.
Windows
.
Forms
.
DataGridView
dataGridView1
;
private
System
.
Windows
.
Forms
.
DataGridView
dataGridView1
;
private
System
.
Windows
.
Forms
.
Label
cmbPosition
;
private
System
.
Windows
.
Forms
.
Label
cmbPosition
;
private
System
.
Windows
.
Forms
.
CheckBox
checkBox_Double_Alternate
;
private
System
.
Windows
.
Forms
.
CheckBox
checkBox_Double_Alternate
;
public
System
.
Windows
.
Forms
.
Button
btnInOutP1
;
}
}
}
}
source/ACSingleStore/useControl/uc_boxdebug.cs
查看文件 @
1eaf299
...
@@ -61,6 +61,7 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -61,6 +61,7 @@ namespace OnlineStore.ACSingleStore.useControl
private
void
Store_InOutEndProcessEvent
(
string
arg1
,
StoreMoveType
arg2
,
bool
arg3
)
private
void
Store_InOutEndProcessEvent
(
string
arg1
,
StoreMoveType
arg2
,
bool
arg3
)
{
{
//LogUtil.info($"出入库完成状态:{arg2},库位:{arg1}");
int
InStoreCheck
=
0
;
int
InStoreCheck
=
0
;
int
OutStoreCheck
=
0
;
int
OutStoreCheck
=
0
;
if
(
arg2
==
StoreMoveType
.
InStore
)
if
(
arg2
==
StoreMoveType
.
InStore
)
...
@@ -140,9 +141,10 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -140,9 +141,10 @@ namespace OnlineStore.ACSingleStore.useControl
if
(!
posState
.
ContainsKey
(
posid
))
if
(!
posState
.
ContainsKey
(
posid
))
posState
.
Add
(
posid
,
new
PosState
());
posState
.
Add
(
posid
,
new
PosState
());
if
(
inStoreCheck
>
0
)
posState
[
posid
].
InStoreCheck
=
inStoreCheck
;
posState
[
posid
].
InStoreCheck
=
inStoreCheck
;
posState
[
posid
].
OutStoreCheck
=
outStoreCheck
;
if
(
outStoreCheck
>
0
)
posState
[
posid
].
OutStoreCheck
=
outStoreCheck
;
var
poscheckfile
=
positionConfigFile
+
".check"
;
var
poscheckfile
=
positionConfigFile
+
".check"
;
File
.
WriteAllText
(
poscheckfile
,
JsonHelper
.
SerializeObject
(
posState
));
File
.
WriteAllText
(
poscheckfile
,
JsonHelper
.
SerializeObject
(
posState
));
return
posState
[
posid
];
return
posState
[
posid
];
...
@@ -169,6 +171,7 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -169,6 +171,7 @@ namespace OnlineStore.ACSingleStore.useControl
for
(
int
i
=
0
;
i
<
dataGridView1
.
Columns
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
dataGridView1
.
Columns
.
Count
;
i
++)
{
{
dataGridView1
.
Columns
[
i
].
Width
=
64
;
dataGridView1
.
Columns
[
i
].
Width
=
64
;
dataGridView1
.
Columns
[
i
].
SortMode
=
DataGridViewColumnSortMode
.
NotSortable
;
}
}
dataGridView1
.
Rows
.
Add
();
dataGridView1
.
Rows
.
Add
();
int
currentRowIndex
=
0
;
int
currentRowIndex
=
0
;
...
@@ -200,8 +203,9 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -200,8 +203,9 @@ namespace OnlineStore.ACSingleStore.useControl
currentColIndex
++;
currentColIndex
++;
currentRow
.
Cells
[
currentColIndex
].
Value
=
$
"{_posstr[1]}_{_posstr[2]}_{_posstr[3]}"
;
currentRow
.
Cells
[
currentColIndex
].
Value
=
$
"{_posstr[1]}_{_posstr[2]}_{_posstr[3]}"
;
currentRow
.
Cells
[
currentColIndex
].
Tag
=
posname
;
currentRow
.
Cells
[
currentColIndex
].
Tag
=
posname
;
currentRow
.
Cells
[
currentColIndex
].
Style
=
GetStyle
(
posname
);
htpp
.
Add
(
posname
,
new
PosPos
()
{
Posid
=
posname
,
index
=
i
,
row
=
currentRowIndex
,
col
=
currentColIndex
});
htpp
.
Add
(
posname
,
new
PosPos
()
{
Posid
=
posname
,
index
=
i
,
row
=
currentRowIndex
,
col
=
currentColIndex
});
currentRow
.
Cells
[
currentColIndex
].
Style
=
GetStyle
(
posname
);
currentRowIndex
++;
currentRowIndex
++;
}
}
dataGridView1
.
Rows
.
RemoveAt
(
dataGridView1
.
Rows
.
Count
-
1
);
dataGridView1
.
Rows
.
RemoveAt
(
dataGridView1
.
Rows
.
Count
-
1
);
...
@@ -268,15 +272,16 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -268,15 +272,16 @@ namespace OnlineStore.ACSingleStore.useControl
store
.
autoNext
=
true
;
store
.
autoNext
=
true
;
int
jiange
=
FormUtil
.
GetIntValue
(
txtJiange
);
int
jiange
=
FormUtil
.
GetIntValue
(
txtJiange
);
store
.
autoJiange
=
jiange
;
store
.
autoJiange
=
jiange
;
if
(
string
.
IsNullOrEmpty
(
cmbPosition
.
Text
))
if
(
!
string
.
IsNullOrEmpty
(
cmbPosition
.
Text
))
{
{
int
currIndex
=
store
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
;
int
currIndex
=
store
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
;
store
.
autoPositionIndex
=
currIndex
;
store
.
autoPositionIndex
=
currIndex
;
store
.
AutoStartIndex
=
currIndex
;
store
.
AutoStartIndex
=
currIndex
;
store
.
Double_Alternate
=
true
;
store
.
Double_Alternate
=
checkBox_Double_Alternate
.
Checked
;
store
.
Alternate
=
false
;
store
.
hasDoublePlate
=
false
;
store
.
hasDoublePlate
=
false
;
string
poText
=
cmbPosition
.
Text
;
string
poText
=
cmbPosition
.
Text
;
store
.
autoMsg
=
Auto
Out
+
":"
+
poText
;
store
.
autoMsg
=
Auto
In
+
":"
+
poText
;
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
LogUtil
.
info
(
LOGGER
,
store
.
StoreName
+
"开启自动出入库模式,开始位置【"
+
poText
+
"】(索引="
+
currIndex
+
"),间隔="
+
jiange
+
",入库开始!"
);
//store.StartOutStoreMove(new InOutStoreParam("", poText));
//store.StartOutStoreMove(new InOutStoreParam("", poText));
store
.
StartInStoreMove
(
new
InOutStoreParam
(
""
,
poText
));
store
.
StartInStoreMove
(
new
InOutStoreParam
(
""
,
poText
));
...
@@ -294,22 +299,29 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -294,22 +299,29 @@ namespace OnlineStore.ACSingleStore.useControl
{
{
LineMoveP
ktk
=
new
LineMoveP
();
LineMoveP
ktk
=
new
LineMoveP
();
//ktk.ComPress_P1 = FormUtil.GetIntValue(txtComP1);
//ktk.ComPress_P1 = FormUtil.GetIntValue(txtComP1);
ktk
.
ComPress_P1
=
store
.
Config
.
CompressAxis_P1_Position
;
ktk
.
ComPress_P2
=
FormUtil
.
GetIntValue
(
txtComP2
);
ktk
.
ComPress_P2
=
FormUtil
.
GetIntValue
(
txtComP2
);
ktk
.
ComPress_P3
=
FormUtil
.
GetIntValue
(
txtComP3
);
ktk
.
ComPress_P3
=
FormUtil
.
GetIntValue
(
txtComP3
);
//ktk.InOut_P1 = FormUtil.GetIntValue(txtInOutP1);
//ktk.InOut_P1 = FormUtil.GetIntValue(txtInOutP1);
ktk
.
InOut_P1
=
store
.
Config
.
InOutAxis_P1_Position
;
ktk
.
InOut_P2
=
FormUtil
.
GetIntValue
(
txtInOutP2
);
ktk
.
InOut_P2
=
FormUtil
.
GetIntValue
(
txtInOutP2
);
ktk
.
InOut_P3
=
FormUtil
.
GetIntValue
(
txtInOutP3
);
ktk
.
InOut_P3
=
FormUtil
.
GetIntValue
(
txtInOutP3
);
//ktk.Middle_P1 = FormUtil.GetIntValue(txtMiddleP1);
//ktk.Middle_P1 = FormUtil.GetIntValue(txtMiddleP1);
ktk
.
Middle_P1
=
store
.
Config
.
MiddleAxis_P1_Position
;
ktk
.
Middle_P2
=
FormUtil
.
GetIntValue
(
txtMiddleP2
);
ktk
.
Middle_P2
=
FormUtil
.
GetIntValue
(
txtMiddleP2
);
//ktk.UpDown_P1 = FormUtil.GetIntValue(txtUpDownP1);
//ktk.UpDown_P1 = FormUtil.GetIntValue(txtUpDownP1);
ktk
.
UpDown_P1
=
store
.
Config
.
UpDownAxis_DoorOPosition_P1
;
//ktk.UpDown_P2 = FormUtil.GetIntValue(txtUpDownP2);
//ktk.UpDown_P2 = FormUtil.GetIntValue(txtUpDownP2);
ktk
.
UpDown_P2
=
store
.
Config
.
UpDownAxis_DoorIPosition_P2
;
ktk
.
UpDown_P3
=
FormUtil
.
GetIntValue
(
txtUpDownP3
);
ktk
.
UpDown_P3
=
FormUtil
.
GetIntValue
(
txtUpDownP3
);
ktk
.
UpDown_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktk
.
UpDown_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
ktk
.
UpDown_P5
=
FormUtil
.
GetIntValue
(
txtUpDownP5
);
ktk
.
UpDown_P5
=
FormUtil
.
GetIntValue
(
txtUpDownP5
);
ktk
.
UpDown_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
ktk
.
UpDown_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
//ktk.UpDown_P7 = FormUtil.GetIntValue(txtUpDownP7);
//ktk.UpDown_P7 = FormUtil.GetIntValue(txtUpDownP7);
ktk
.
UpDown_P7
=
store
.
Config
.
UpDownAxis_DoorOBPosition_P7
;
//ktk.UpDown_P8 = FormUtil.GetIntValue(txtUpDownP8);
//ktk.UpDown_P8 = FormUtil.GetIntValue(txtUpDownP8);
ktk
.
UpDown_P8
=
store
.
Config
.
UpDownAxis_DoorIBPosition_P8
;
return
ktk
;
return
ktk
;
}
}
private
void
AxisABSMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
private
void
AxisABSMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
...
@@ -488,6 +500,7 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -488,6 +500,7 @@ namespace OnlineStore.ACSingleStore.useControl
{
{
var
pp
=
(
PosPos
)
htpp
[
msg
];
var
pp
=
(
PosPos
)
htpp
[
msg
];
dataGridView1
.
Rows
[
pp
.
row
].
Cells
[
pp
.
col
].
Selected
=
true
;
dataGridView1
.
Rows
[
pp
.
row
].
Cells
[
pp
.
col
].
Selected
=
true
;
setData
(
msg
);
}
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
}
...
@@ -522,5 +535,23 @@ namespace OnlineStore.ACSingleStore.useControl
...
@@ -522,5 +535,23 @@ namespace OnlineStore.ACSingleStore.useControl
else
else
txtJiange
.
Enabled
=
true
;
txtJiange
.
Enabled
=
true
;
}
}
private
void
btnInOutP1_Click
(
object
sender
,
EventArgs
e
)
{
if
(
store
.
InOutAxisCanMove
().
Equals
(
false
))
{
MyMessage
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
}
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
store
.
Config
.
InOutAxis_P1_Position
,
store
.
Config
.
InOutAxis_P1_Speed
);
}
private
void
dataGridView1_CellMouseDown
(
object
sender
,
DataGridViewCellMouseEventArgs
e
)
{
if
(
e
.
RowIndex
<
0
||
dataGridView1
.
Rows
[
e
.
RowIndex
].
Cells
[
e
.
ColumnIndex
].
Tag
==
null
)
return
;
var
posid
=
dataGridView1
.
Rows
[
e
.
RowIndex
].
Cells
[
e
.
ColumnIndex
].
Tag
.
ToString
();
setData
(
posid
);
}
}
}
}
}
source/Common/Setting_Init.cs
查看文件 @
1eaf299
...
@@ -104,5 +104,6 @@ namespace OnlineStore.Common
...
@@ -104,5 +104,6 @@ namespace OnlineStore.Common
public
static
string
MaxScanCount
=
"MaxScanCount"
;
public
static
string
MaxScanCount
=
"MaxScanCount"
;
public
static
string
QRCodeCount
=
"MaxScanCount"
;
public
static
string
QRCodeCount
=
"MaxScanCount"
;
public
static
string
DoorOpenAirBlow
=
"DoorOpenAirBlow"
;
}
}
}
}
source/Common/util/LogUtil.cs
查看文件 @
1eaf299
...
@@ -5,7 +5,7 @@ using System.Text;
...
@@ -5,7 +5,7 @@ using System.Text;
using
log4net
;
using
log4net
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Runtime.InteropServices
;
namespace
OnlineStore.Common
namespace
OnlineStore.Common
{
{
...
@@ -176,5 +176,7 @@ namespace OnlineStore.Common
...
@@ -176,5 +176,7 @@ namespace OnlineStore.Common
{
{
ResourcesLog
.
Info
(
str
);
ResourcesLog
.
Info
(
str
);
}
}
[
DllImport
(
"kernel32.dll"
,
CharSet
=
CharSet
.
Auto
)]
public
static
extern
void
OutputDebugString
(
string
message
);
}
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
1eaf299
...
@@ -76,6 +76,7 @@
...
@@ -76,6 +76,7 @@
<Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" />
<Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" />
<Compile Include="acSingleStore\DoorControl.cs" />
<Compile Include="acSingleStore\DoorControl.cs" />
<Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="dataLogic\DLScanSocket.cs" />
<Compile Include="halcon\CodeManager.cs" />
<Compile Include="halcon\CodeManager.cs" />
<Compile Include="IO\HCIOManager.cs" />
<Compile Include="IO\HCIOManager.cs" />
<Compile Include="IO\IOManager.cs" />
<Compile Include="IO\IOManager.cs" />
...
@@ -131,7 +132,9 @@
...
@@ -131,7 +132,9 @@
<None Include="StoreConfig\AC\StoreConfig.csv">
<None Include="StoreConfig\AC\StoreConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
<None Include="StoreConfig\Camera.json" />
<None Include="StoreConfig\Camera.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
1eaf299
...
@@ -29,63 +29,63 @@ DO,氮气阀门开启,StartOrStopBlow,6,HC,0,氮气阀门开启,Y06,Y07,0
...
@@ -29,63 +29,63 @@ DO,氮气阀门开启,StartOrStopBlow,6,HC,0,氮气阀门开启,Y06,Y07,0
DO,进料口门运转,Door_Moto_Run,7,HC,0,进料口门运转,Y07,Y08,0
DO,进料口门运转,Door_Moto_Run,7,HC,0,进料口门运转,Y07,Y08,0
DO,进料口门反转关门,Door_Moto_Rev,8,HC,0,进料口门反转,Y08,Y09,0
DO,进料口门反转关门,Door_Moto_Rev,8,HC,0,进料口门反转,Y08,Y09,0
,,,,,,,,,
,,,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,
699
000,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,
700
000,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,71
6
000,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,71
8
000,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,71
6
000,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,71
8
000,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,
6999
000,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,
700
000,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,151500,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,151500,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,0,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,0,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,2000,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,2000,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,
0
,,,,,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,
1
,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,
,温湿度传感器地址,TemperateServer_Port,9001,,,,,,
,温湿度传感器地址,TemperateServer_Port,9001,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,
25
0,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,
6000
0,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,
2
000,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,
150
000,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,
2
000,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,
150
000,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,
2
000,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,
1
000,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,
2
0000,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,
1
0000,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,
20
0000,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,
5
0000,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,
2
000,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,
300
000,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,
4
00,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,
8000
00,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,
4
00,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,
8000
00,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,3000,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,3000,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,45000,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,45000,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,
50
0000,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,
15
0000,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,
1
00,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,
2000
00,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,
3
00,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,
6000
00,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,
3
00,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,
6000
00,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,1000,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,1000,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,40000,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,40000,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,
4
00000,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,
2
00000,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,
1
00,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,
500
00,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,
3
00,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,
200
00,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,
3
00,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,
200
00,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,800,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,800,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,8000,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,8000,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,
100
000,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,
25
000,,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,
3
00000,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,
5
00000,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,
3
00000,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,
5
00000,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,
3
00000,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,
5
00000,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,200000,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,200000,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,
3
00000,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,
5
00000,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,200000,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,200000,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,200000,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,200000,,,,,,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,200000,,,,,,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,200000,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,
8
0000,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,
7
0000,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,
8
0000,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,
7
0000,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,
12
0000,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,
25
0000,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,
12
0000,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,
25
0000,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,
12
0000,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,
25
0000,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,
3
0000,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,
20
0000,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,
3
0000,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,
20
0000,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,
3
0000,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,
20
0000,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,100,,,,,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,100,,,,,,
...
@@ -109,8 +109,8 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,
...
@@ -109,8 +109,8 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,
PRO,温湿度端口号,Humiture_Port,COM5,,,,,,
PRO,温湿度端口号,Humiture_Port,COM5,,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,
0
,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,
5619
,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,
0
,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,
5619
,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,0,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,0,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,0,,,,,,
PRO,模拟信号4默认高度,AIDI4_DefaultPosition,0,,,,,,
,,,,,,,,,
,,,,,,,,,
...
@@ -119,6 +119,10 @@ PRO,模拟信号2的地址,AIDI2_Addr,1,,,,,,
...
@@ -119,6 +119,10 @@ PRO,模拟信号2的地址,AIDI2_Addr,1,,,,,,
PRO,模拟信号3的地址(13寸高度),AIDI3_Addr,2,,,,,,
PRO,模拟信号3的地址(13寸高度),AIDI3_Addr,2,,,,,,
PRO,模拟信号4的地址(15寸高度),AIDI4_Addr,3,,,,,,
PRO,模拟信号4的地址(15寸高度),AIDI4_Addr,3,,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,模拟转换系数,AI_ConvertPosition,
1
,,,,,,
PRO,模拟转换系数,AI_ConvertPosition,
62
,,,,,,
,,,,,,,,,
,,,,,,,,,
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,7,,,,,,
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,7,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32,,,,,,
PRO,扫码枪IP,Scanner_Ip,192.168.105.21,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,
PRO,旋转轴反转点位补偿,MiddleAxis_Reverse_Offset,0,,,,,,
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
1eaf299
此文件的差异太大,无法显示。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
1eaf299
...
@@ -16,7 +16,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -16,7 +16,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
partial
class
AC_SA_BoxBean
:
KTK_Store
public
partial
class
AC_SA_BoxBean
:
KTK_Store
{
{
//
public DLScanSocket dlScanSocket;
public
DLScanSocket
dlScanSocket
;
private
static
bool
IsIntSlvBlock
=
false
;
private
static
bool
IsIntSlvBlock
=
false
;
/// <summary>
/// <summary>
/// 开始运行
/// 开始运行
...
@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
LogUtil
.
info
(
StoreName
+
"共加载到["
+
positionList
.
Count
+
"]个库位,["
+
PositionNumList
.
Count
+
"]个为料仓有效库位"
);
LogUtil
.
info
(
StoreName
+
"共加载到["
+
positionList
.
Count
+
"]个库位,["
+
PositionNumList
.
Count
+
"]个为料仓有效库位"
);
//
dlScanSocket = new DLScanSocket(config.Scanner_Ip, config.Scanner_Port, onCodeReceived);
dlScanSocket
=
new
DLScanSocket
(
config
.
Scanner_Ip
,
config
.
Scanner_Port
,
onCodeReceived
);
//初始化摄像机配置
//初始化摄像机配置
CodeManager
.
LoadConfig
();
CodeManager
.
LoadConfig
();
IOManager
.
Init
();
IOManager
.
Init
();
...
@@ -219,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -219,7 +219,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus
=
StoreStatus
.
ResetMove
;
storeStatus
=
StoreStatus
.
ResetMove
;
//启动温湿度服务器
//启动温湿度服务器
HumitureController
.
Init
(
Config
.
Humiture_Port
);
HumitureController
.
Init
(
Config
.
Humiture_Port
);
//
dlScanSocket.StartConnect();
dlScanSocket
.
StartConnect
();
ReturnHome
();
ReturnHome
();
StartTime
=
DateTime
.
Now
;
StartTime
=
DateTime
.
Now
;
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
...
@@ -411,7 +411,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -411,7 +411,8 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
break
;
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成"
);
HuichuanLibrary
.
HCBoardManager
.
SetAxBacklash
(
Config
.
Middle_Axis
.
GetAxisValue
(),
Config
.
MiddleAxis_Reverse_Offset
,
Config
.
Middle_Axis
.
HomeLowSpeed
,
-
1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位完成,设置旋转轴反向间隙:"
+
Config
.
MiddleAxis_Reverse_Offset
);
storeRunStatus
=
StoreRunStatus
.
Runing
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
storeStatus
=
StoreStatus
.
StoreOnline
;
storeStatus
=
StoreStatus
.
StoreOnline
;
...
@@ -530,7 +531,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -530,7 +531,8 @@ namespace OnlineStore.DeviceLibrary
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
break
;
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点完成"
);
HuichuanLibrary
.
HCBoardManager
.
SetAxBacklash
(
Config
.
Middle_Axis
.
GetAxisValue
(),
Config
.
MiddleAxis_Reverse_Offset
,
Config
.
Middle_Axis
.
HomeLowSpeed
,
-
1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点完成,设置旋转轴反向间隙:"
+
Config
.
MiddleAxis_Reverse_Offset
);
storeRunStatus
=
StoreRunStatus
.
Runing
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
storeStatus
=
StoreStatus
.
StoreOnline
;
storeStatus
=
StoreStatus
.
StoreOnline
;
...
@@ -669,7 +671,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -669,7 +671,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
TimeSpan
span
=
DateTime
.
Now
-
StartTime
;
TimeSpan
span
=
DateTime
.
Now
-
StartTime
;
IsRun
=
false
;
IsRun
=
false
;
//
dlScanSocket.Close();
dlScanSocket
.
Close
();
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllDO
();
LogUtil
.
info
(
LOGGER
,
StoreName
+
",停止运行,总运行时间:"
+
span
.
ToString
());
LogUtil
.
info
(
LOGGER
,
StoreName
+
",停止运行,总运行时间:"
+
span
.
ToString
());
...
@@ -1131,7 +1133,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1131,7 +1133,7 @@ namespace OnlineStore.DeviceLibrary
// GetCameraCode();
// GetCameraCode();
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanTime
=
DateTime
.
Now
;
LastScanTime
=
DateTime
.
Now
;
//
dlScanSocket.BeginScan();
dlScanSocket
.
BeginScan
();
Task
.
Run
(()=>
{
Task
.
Run
(()=>
{
var
codelist
=
CodeManager
.
CameraScan
();
var
codelist
=
CodeManager
.
CameraScan
();
onCodeReceived
(
codelist
.
ToArray
());
onCodeReceived
(
codelist
.
ToArray
());
...
@@ -1556,7 +1558,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1556,7 +1558,7 @@ namespace OnlineStore.DeviceLibrary
{
{
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LastScanTime
=
DateTime
.
Now
;
LastScanTime
=
DateTime
.
Now
;
//
dlScanSocket.BeginScan();
dlScanSocket
.
BeginScan
();
Task
.
Run
(()
=>
{
Task
.
Run
(()
=>
{
var
codelist
=
CodeManager
.
CameraScan
();
var
codelist
=
CodeManager
.
CameraScan
();
onCodeReceived
(
codelist
.
ToArray
());
onCodeReceived
(
codelist
.
ToArray
());
...
@@ -1586,7 +1588,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1586,7 +1588,7 @@ namespace OnlineStore.DeviceLibrary
{
{
string
code
=
str
;
string
code
=
str
;
//根据二维码开头获取固定尺寸
//根据二维码开头获取固定尺寸
string
codeSize
=
""
;
//
Config.GetCodeSize(str.Trim());
string
codeSize
=
Config
.
GetCodeSize
(
str
.
Trim
());
if
(
String
.
IsNullOrEmpty
(
codeSize
))
if
(
String
.
IsNullOrEmpty
(
codeSize
))
{
{
//无固定尺寸,判断宽度是否是固定,如果不是固定,直接获取当前高度宽度
//无固定尺寸,判断宽度是否是固定,如果不是固定,直接获取当前高度宽度
...
@@ -1594,7 +1596,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1594,7 +1596,7 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(!
String
.
IsNullOrEmpty
(
code
))
if
(!
String
.
IsNullOrEmpty
(
code
))
{
{
message
=
message
+
"="
+
codeSize
+
"="
+
code
+
spiltStr
;
message
=
message
+
"="
+
"1+0x0-"
+
codeSize
+
"="
+
code
+
dlScanSocket
.
spiltStr
;
}
}
}
}
return
message
;
return
message
;
...
@@ -1661,12 +1663,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1661,12 +1663,13 @@ namespace OnlineStore.DeviceLibrary
double
ai2Value
=
ConvertAI
(
IOManager
.
GetADIOValue
(
Config
.
AIDI2_Addr
),
Config
.
AIDI2_DefaultPosition
);
double
ai2Value
=
ConvertAI
(
IOManager
.
GetADIOValue
(
Config
.
AIDI2_Addr
),
Config
.
AIDI2_DefaultPosition
);
double
Value
=
0
;
double
Value
=
0
;
if
(
ai1Value
>
5
&&
ai2Value
>
5
)
if
(
ai1Value
>
5
&&
ai2Value
>
5
)
Math
.
Round
((
ai1Value
+
ai2Value
)
/
2
,
1
);
Value
=
Math
.
Round
((
ai1Value
+
ai2Value
)
/
2
,
1
);
else
if
(
ai1Value
>
5
)
else
if
(
ai1Value
>
5
)
Value
=
Math
.
Round
(
ai1Value
,
1
);
Value
=
Math
.
Round
(
ai1Value
,
1
);
else
if
(
ai2Value
>
5
)
else
if
(
ai2Value
>
5
)
Value
=
Math
.
Round
(
ai2Value
,
1
);
Value
=
Math
.
Round
(
ai2Value
,
1
);
// Common.LogUtil.OutputDebugString($"ai1Value:{ai1Value},ai1Value:{ai2Value},Value:{Value}");
return
CalHeight
(
Value
);
return
CalHeight
(
Value
);
}
}
...
@@ -1681,10 +1684,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1681,10 +1684,11 @@ namespace OnlineStore.DeviceLibrary
{
{
return
result
;
return
result
;
}
}
double
ai3Value
=
ConvertAI
(
IOManager
.
GetADIOValue
(
Config
.
AIDI3_Addr
),
Config
.
AIDI3_DefaultPosition
);
double
ai3Value
=
ConvertAI
(
IOManager
.
GetADIOValue
(
Config
.
AIDI3_Addr
),
Config
.
AIDI3_DefaultPosition
);
double
ai4Value
=
ConvertAI
(
IOManager
.
GetADIOValue
(
Config
.
AIDI4_Addr
),
Config
.
AIDI4_DefaultPosition
);
double
ai4Value
=
ConvertAI
(
IOManager
.
GetADIOValue
(
Config
.
AIDI4_Addr
),
Config
.
AIDI4_DefaultPosition
);
double
Value
=
Math
.
Round
((
ai3Value
+
ai4Value
)
/
2
,
1
);
double
Value
=
Math
.
Round
((
ai3Value
+
ai4Value
)
/
2
,
1
);
return
CalHeight
(
Value
);
return
CalHeight
(
Value
);
}
}
...
@@ -1749,6 +1753,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1749,6 +1753,7 @@ namespace OnlineStore.DeviceLibrary
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
private
int
DoorOpenAirBlow
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
DoorOpenAirBlow
);
public
string
currTempStr
=
""
;
public
string
currTempStr
=
""
;
DateTime
doorAndTrayLastrunTime
=
DateTime
.
Now
;
DateTime
doorAndTrayLastrunTime
=
DateTime
.
Now
;
...
@@ -1756,21 +1761,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1756,21 +1761,24 @@ namespace OnlineStore.DeviceLibrary
{
{
try
try
{
{
if
(
IOManager
.
IOValue
(
IO_Type
.
Door_Down
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
HIGH
)
)
if
(
DoorOpenAirBlow
==
1
)
{
{
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
HIGH
);
if
(
IOManager
.
IOValue
(
IO_Type
.
Door_Down
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
HIGH
))
doorAndTrayLastrunTime
=
DateTime
.
Now
;
//IsInBlowing = true;
return
;
}
if
(!
IsInBlowing
&&
doorAndTrayLastrunTime
!=
new
DateTime
(
1997
,
1
,
1
)
&&
IOManager
.
IOValue
(
IO_Type
.
Door_Down
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
if
((
DateTime
.
Now
-
doorAndTrayLastrunTime
).
TotalSeconds
>
2
)
{
{
doorAndTrayLastrunTime
=
new
DateTime
(
1997
,
1
,
1
);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
doorAndTrayLastrunTime
=
DateTime
.
Now
;
//IsInBlowing = true;
return
;
}
if
(!
IsInBlowing
&&
doorAndTrayLastrunTime
!=
new
DateTime
(
1997
,
1
,
1
)
&&
IOManager
.
IOValue
(
IO_Type
.
Door_Down
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
LOW
))
{
if
((
DateTime
.
Now
-
doorAndTrayLastrunTime
).
TotalSeconds
>
2
)
{
doorAndTrayLastrunTime
=
new
DateTime
(
1997
,
1
,
1
);
IOManager
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
}
}
}
}
if
((
DateTime
.
Now
-
preLogTime
).
TotalSeconds
>
10
)
if
((
DateTime
.
Now
-
preLogTime
).
TotalSeconds
>
10
)
{
{
preLogTime
=
DateTime
.
Now
;
preLogTime
=
DateTime
.
Now
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
1eaf299
...
@@ -311,6 +311,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -311,6 +311,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
OpenDoor
();
OpenDoor
();
InOutBackToP1
(
moveP
.
InOut_P1
);
InOutBackToP1
(
moveP
.
InOut_P1
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
}
}
private
void
SI_05_DeviceToDoor
()
private
void
SI_05_DeviceToDoor
()
{
{
...
@@ -514,7 +515,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -514,7 +515,7 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Runing
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
//设备连接,入库后,BOX恢复原始状态
//设备连接,入库后,BOX恢复原始状态
storeStatus
=
StoreStatus
.
StoreOnline
;
storeStatus
=
StoreStatus
.
StoreOnline
;
InOutEndProcess
(
StoreMoveType
.
InStore
);
InOutEndProcess
(
StoreMoveType
.
InStore
,
posId
);
}
}
else
else
{
{
...
@@ -784,7 +785,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -784,7 +785,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 【"
+
posId
+
"】出库结束["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]"
,
storeMoveColor
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
" 【"
+
posId
+
"】出库结束["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]"
,
storeMoveColor
);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
storeRunStatus
=
StoreRunStatus
.
Runing
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
InOutEndProcess
(
StoreMoveType
.
OutStore
);
InOutEndProcess
(
StoreMoveType
.
OutStore
,
posId
);
}
}
private
void
SO_14_GoBack
()
private
void
SO_14_GoBack
()
{
{
...
@@ -864,16 +865,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -864,16 +865,15 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
bool
Alternate
=
true
;
public
bool
Alternate
=
true
;
private
void
InOutEndProcess
(
StoreMoveType
storeMoveType
)
private
void
InOutEndProcess
(
StoreMoveType
storeMoveType
,
string
current_posid
)
{
{
try
try
{
{
CurrInOutCount
++;
CurrInOutCount
++;
CurrInOutACount
++;
CurrInOutACount
++;
string
oldposid
=
PositionNumList
[
autoPositionIndex
];
InOutEndProcessEvent
?.
Invoke
(
current_posid
,
storeMoveType
,
true
);
InOutEndProcessEvent
?.
Invoke
(
oldposid
,
storeMoveType
,
true
);
//是否自动进入出库状态
//是否自动进入出库状态
if
(!
autoNext
)
if
(!
autoNext
)
{
{
...
@@ -882,7 +882,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -882,7 +882,7 @@ namespace OnlineStore.DeviceLibrary
if
(
storeMoveType
.
Equals
(
StoreMoveType
.
InStore
)
&&
Double_Alternate
&&
!
hasDoublePlate
)
if
(
storeMoveType
.
Equals
(
StoreMoveType
.
InStore
)
&&
Double_Alternate
&&
!
hasDoublePlate
)
{
{
string
posid
=
PositionNumList
[
autoPositionIndex
-
-
];
string
posid
=
PositionNumList
[
autoPositionIndex
-
1
];
LogUtil
.
info
(
LOGGER
,
StoreName
+
"自动进入双盘下一个入库:posid="
+
posid
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"自动进入双盘下一个入库:posid="
+
posid
);
hasDoublePlate
=
true
;
hasDoublePlate
=
true
;
autoMsg
=
"自动入库:"
+
posid
;
autoMsg
=
"自动入库:"
+
posid
;
...
...
source/DeviceLibrary/dataLogic/DLScanSocket.cs
查看文件 @
1eaf299
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 扫描枪 是否开始运行
/// 扫描枪 是否开始运行
/// </summary>
/// </summary>
p
rivate
bool
isScannerRun
=
false
;
p
ublic
bool
isScannerRun
=
false
;
private
string
ScannerIP
=
""
;
private
string
ScannerIP
=
""
;
private
int
ScannerPort
=
0
;
private
int
ScannerPort
=
0
;
public
delegate
void
OnCodeRevice
(
string
[]
codeList
);
public
delegate
void
OnCodeRevice
(
string
[]
codeList
);
...
@@ -31,6 +31,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -31,6 +31,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
bool
StartConnect
(
bool
isMustCon
=
false
)
public
bool
StartConnect
(
bool
isMustCon
=
false
)
{
{
if
(
ScannerIP
.
Length
<
4
)
return
false
;
bool
result
=
true
;
bool
result
=
true
;
try
try
{
{
...
@@ -84,6 +87,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -84,6 +87,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
void
BeginScan
()
public
void
BeginScan
()
{
{
if
(!
isScannerRun
)
return
;
try
try
{
{
string
str
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
StartScan_CMD
);
string
str
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
StartScan_CMD
);
...
...
source/DeviceLibrary/store/Camera.cs
查看文件 @
1eaf299
...
@@ -47,6 +47,8 @@ namespace OnlineStore
...
@@ -47,6 +47,8 @@ namespace OnlineStore
var
rtn
=
camera
.
Open
(
0
);
var
rtn
=
camera
.
Open
(
0
);
if
(!
rtn
)
if
(!
rtn
)
LogUtil
.
error
(
Name
+
"打开监控相机失败"
);
LogUtil
.
error
(
Name
+
"打开监控相机失败"
);
return
;
}
}
while
(
camera
.
IsOpen
[
0
])
while
(
camera
.
IsOpen
[
0
])
{
{
...
...
source/LoadCVSLibrary/storeConfig/config/AC_SA_Config.cs
查看文件 @
1eaf299
...
@@ -57,7 +57,16 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -57,7 +57,16 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"IsHasDoorLimit"
)]
[
ConfigProAttribute
(
"IsHasDoorLimit"
)]
public
int
IsHasDoorLimit
{
get
;
set
;
}
public
int
IsHasDoorLimit
{
get
;
set
;
}
/// <summary>
/// PRO 扫码枪IP Scanner_Ip 192.168.200.13
/// </summary>
[
ConfigProAttribute
(
"Scanner_Ip"
)]
public
string
Scanner_Ip
{
get
;
set
;
}
/// <summary>
/// PRO 扫码枪端口号 Scanner_Port 51236
/// </summary>
[
ConfigProAttribute
(
"Scanner_Port"
)]
public
int
Scanner_Port
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO (轴一)旋转轴原点目标速度 MiddleAxis_TargetSpeed 30000
/// PRO (轴一)旋转轴原点目标速度 MiddleAxis_TargetSpeed 30000
/// </summary>
/// </summary>
...
@@ -534,7 +543,56 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -534,7 +543,56 @@ namespace OnlineStore.LoadCSVLibrary
/// /// </summary>
/// /// </summary>
[
ConfigProAttribute
(
"AI_ConvertPosition"
)]
[
ConfigProAttribute
(
"AI_ConvertPosition"
)]
public
int
AI_ConvertPosition
{
get
;
set
;
}
public
int
AI_ConvertPosition
{
get
;
set
;
}
/// <summary>
/// PRO 旋转轴伺服反转误差 MiddleAxis_Reverse_Offset
/// </summary>
[
ConfigProAttribute
(
"MiddleAxis_Reverse_Offset"
)]
public
int
MiddleAxis_Reverse_Offset
{
get
;
set
;
}
private
Dictionary
<
string
,
string
>
CodeSizeMap
=
null
;
private
static
char
codeSpilt
=
'#'
;
public
string
GetCodeSize
(
string
code
)
{
try
{
if
(
CodeSizeMap
==
null
)
{
CodeSizeMap
=
new
Dictionary
<
string
,
string
>();
string
[]
array
=
CodeSizeConfig
.
Split
(
codeSpilt
);
if
(
array
.
Length
>
0
)
{
foreach
(
string
str
in
array
)
{
string
[]
codeStr
=
str
.
Split
(
'='
);
if
(
codeStr
.
Length
==
2
)
{
string
key
=
codeStr
[
0
].
Trim
();
string
value
=
codeStr
[
1
].
Trim
();
CodeSizeMap
.
Add
(
key
,
value
);
}
}
}
}
foreach
(
string
key
in
CodeSizeMap
.
Keys
)
{
if
(
code
.
Trim
().
StartsWith
(
key
))
{
return
CodeSizeMap
[
key
];
}
}
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"获取二维码【"
+
code
+
"】的固定尺寸出错:"
+
ex
.
ToString
());
}
return
""
;
}
protected
override
void
initMustHavePro
()
protected
override
void
initMustHavePro
()
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论