Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9d2a7c0d
由
几米阳光
编写于
2018-12-26 16:06:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出入库失败的消息也发送给服务器
1 个父辈
c5bf45f1
全部展开
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
162 行增加
和
76 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/DeviceLibrary/StoreConfig/AC/StoreConfig.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/ACSingleStore/App.config
查看文件 @
9d2a7c0
...
...
@@ -7,13 +7,15 @@
<!--是否开机自动启动料仓-->
<
add
key
=
"App_AutoRun"
value
=
"1"
/>
<
add
key
=
"App_Title"
value
=
"料仓_批量上下料"
/>
<
add
key
=
"Server_Log_Open"
value
=
"0"
/>
<
add
key
=
"scanner_start_command"
value
=
"S"
/>
<!-- 开始吹气的判断值(配置值=服务器发送的湿度值-开始吹气值)-->
<
add
key
=
"StartBlowValue"
value
=
"4"
/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<
add
key
=
"StopBlowValue"
value
=
"4"
/>
<!--
Server
address
-->
<
add
key
=
"http.server"
value
=
"http://192.168.1.187/myproject/"
/>
<
add
key
=
"http.server"
value
=
""
/>
<!--<
add
key
=
"http.server"
value
=
"http://192.168.1.187/myproject/"
/> -->
<!--
storeType
-->
<
add
key
=
"store_count"
value
=
"1"
/>
<!--
start
one
store
config
-->
...
...
@@ -25,16 +27,16 @@
<!--摄像机名称列表配置,用
#分割-->
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C69898477)"
/>
<!--二维码类型列表配置,用
#分割-->
<
add
key
=
"CodeType"
value
=
"
Data Matrix ECC 200#
QR Code"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<
add
key
=
"CodeType"
value
=
"QR Code"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200
#QR Code
"
/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"10000"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--
批量上下料轴
5000
脉冲对应
1
mm
-->
<!--
5000
脉冲对应
1
mm
-->
<
add
key
=
"AxisChangeValue"
value
=
"5000"
/>
<!--压紧轴计量检测信号亮
1
次的脉冲值-->
<
add
key
=
"ComAxisChangeValue"
value
=
"2400"
/>
<
add
key
=
"ComAxisChangeValue"
value
=
"10000"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
9d2a7c0
...
...
@@ -83,14 +83,10 @@
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblAxisStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
button3
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axis_5_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
txtBatchTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblCountPulse5
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblOutPulse5
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label20
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
label38
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtMiddleTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtInoutTarget
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -245,6 +241,10 @@
this
.
btnGetOutTray
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblDoorStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnBatchInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axis_5_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_1_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_3_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
axis_2_Alarm
=
new
UserFromControl
.
IOStatusControl
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -989,16 +989,6 @@
this
.
button3
.
UseVisualStyleBackColor
=
true
;
this
.
button3
.
Click
+=
new
System
.
EventHandler
(
this
.
button3_Click
);
//
// axis_5_Alarm
//
this
.
axis_5_Alarm
.
IOName
=
""
;
this
.
axis_5_Alarm
.
IOValue
=
0
;
this
.
axis_5_Alarm
.
isCanClick
=
false
;
this
.
axis_5_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
418
,
37
);
this
.
axis_5_Alarm
.
Name
=
"axis_5_Alarm"
;
this
.
axis_5_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_5_Alarm
.
TabIndex
=
271
;
//
// txtBatchTarget
//
this
.
txtBatchTarget
.
Location
=
new
System
.
Drawing
.
Point
(
395
,
139
);
...
...
@@ -1033,36 +1023,6 @@
this
.
label20
.
TabIndex
=
267
;
this
.
label20
.
Text
=
"批量出入料轴"
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
116
,
37
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
318
,
37
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
213
,
37
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// label38
//
this
.
label38
.
AutoSize
=
true
;
...
...
@@ -2643,7 +2603,6 @@
//
// groupBox6
//
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblOutInfo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblBatchMsg
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnOpenDoor
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblWaitTragGo
);
...
...
@@ -2655,6 +2614,7 @@
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnGetOutTray
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblDoorStatus
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnBatchInStore
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblOutInfo
);
this
.
groupBox6
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
124
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
...
...
@@ -2665,14 +2625,14 @@
//
// lblOutInfo
//
this
.
lblOutInfo
.
AutoSize
=
true
;
this
.
lblOutInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblOutInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblOutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
1
27
,
105
);
this
.
lblOutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
1
9
,
105
);
this
.
lblOutInfo
.
Name
=
"lblOutInfo"
;
this
.
lblOutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
10
6
,
22
);
this
.
lblOutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
44
6
,
22
);
this
.
lblOutInfo
.
TabIndex
=
234
;
this
.
lblOutInfo
.
Text
=
"累积出库信息"
;
this
.
lblOutInfo
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// lblBatchMsg
//
...
...
@@ -2794,6 +2754,46 @@
this
.
btnBatchInStore
.
UseVisualStyleBackColor
=
true
;
this
.
btnBatchInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBatchInStore_Click
);
//
// axis_5_Alarm
//
this
.
axis_5_Alarm
.
IOName
=
""
;
this
.
axis_5_Alarm
.
IOValue
=
0
;
this
.
axis_5_Alarm
.
isCanClick
=
false
;
this
.
axis_5_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
418
,
37
);
this
.
axis_5_Alarm
.
Name
=
"axis_5_Alarm"
;
this
.
axis_5_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_5_Alarm
.
TabIndex
=
271
;
//
// axis_1_Alarm
//
this
.
axis_1_Alarm
.
IOName
=
""
;
this
.
axis_1_Alarm
.
IOValue
=
0
;
this
.
axis_1_Alarm
.
isCanClick
=
false
;
this
.
axis_1_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
116
,
37
);
this
.
axis_1_Alarm
.
Name
=
"axis_1_Alarm"
;
this
.
axis_1_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_1_Alarm
.
TabIndex
=
264
;
//
// axis_3_Alarm
//
this
.
axis_3_Alarm
.
IOName
=
""
;
this
.
axis_3_Alarm
.
IOValue
=
0
;
this
.
axis_3_Alarm
.
isCanClick
=
false
;
this
.
axis_3_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
318
,
37
);
this
.
axis_3_Alarm
.
Name
=
"axis_3_Alarm"
;
this
.
axis_3_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_3_Alarm
.
TabIndex
=
266
;
//
// axis_2_Alarm
//
this
.
axis_2_Alarm
.
IOName
=
""
;
this
.
axis_2_Alarm
.
IOValue
=
0
;
this
.
axis_2_Alarm
.
isCanClick
=
false
;
this
.
axis_2_Alarm
.
Location
=
new
System
.
Drawing
.
Point
(
213
,
37
);
this
.
axis_2_Alarm
.
Name
=
"axis_2_Alarm"
;
this
.
axis_2_Alarm
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
39
);
this
.
axis_2_Alarm
.
TabIndex
=
265
;
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
9d2a7c0
...
...
@@ -313,10 +313,11 @@ namespace OnlineStore.AutoInOutStore
lblDoorStatus
.
Text
=
"仓门状态:打开"
;
UpdateFormDoorStats
(
true
);
}
lblOutInfo
.
Visible
=
AutomaticBaiting
.
BatchOutStoreHeight
>
0
;
lblOutInfo
.
Text
=
"累积出库: "
+
AutomaticBaiting
.
BatchOutStoreCount
+
"盘, 高"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"mm"
;
}
}
lblOutInfo
.
Visible
=
!
lblWaitTragGo
.
Visible
;
lblOutInfo
.
Text
=
"累积处理 入库:"
+
AutomaticBaiting
.
BatchInStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchInStoreHeight
+
"mm,"
+
"出库: "
+
AutomaticBaiting
.
BatchOutStoreCount
+
"盘共"
+
AutomaticBaiting
.
BatchOutStoreHeight
+
"mm"
;
if
(
HumitureController
.
IsRun
)
{
btnSelTemp
.
Enabled
=
true
;
...
...
source/ACSingleStore/记录.txt
查看文件 @
9d2a7c0
...
...
@@ -79,6 +79,15 @@ X22_气压检测:
压紧轴改为同步返回数据模式,压紧轴增加计量检测功能。
20121226
出库状态下,如果复位未开门锁,不能清理出库信息
出入库增加统计,增加气压检测功能。
出入库失败信息发个服务器
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
9d2a7c0
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
9d2a7c0
...
...
@@ -34,6 +34,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
private
Dictionary
<
string
,
AxisAlarmInfo
>
AxisAlarmCodeMap
=
new
Dictionary
<
string
,
AxisAlarmInfo
>();
private
IO_VALUE
preAirValue
=
IO_VALUE
.
HIGH
;
private
bool
IsHasCompress_Axis
=
true
;
public
AC_SA_BoxBean
(
AUTO_SA_Config
config
)
{
...
...
@@ -112,11 +113,47 @@ namespace OnlineStore.DeviceLibrary
}
else
{
//气压检测,如果气压持续3秒没有信号,报气压报警
AirCheckProcess
();
//光栅处理
//SafetyLightProcess();
}
}
}
private
void
AirCheckProcess
()
{
IO_VALUE
currAirValue
=
KND
.
IOValue
(
IO_Type
.
Airpressure_Check
);
if
(
isInSuddenDown
)
{
return
;
}
if
(
currAirValue
.
Equals
(
IO_VALUE
.
LOW
))
{
//判断是否持续了3秒
if
(
preAirValue
.
Equals
(
IO_VALUE
.
LOW
)
)
{
TimeSpan
span
=
DateTime
.
Now
-
lastAirCloseTime
;
if
(
span
.
TotalSeconds
>
Config
.
AirCheckSeconds
)
{
WarnMsg
=
"未检测到气压信号"
;
preAirValue
=
IO_VALUE
.
LOW
;
LogUtil
.
info
(
"已持续【"
+
FormUtil
.
GetSpanStr
(
span
)
+
"】未检测到气压信号,报警"
);
Alarm
(
StoreAlarmType
.
NoAirCheck
,
"2"
,
WarnMsg
,
StoreMoveType
.
None
);
return
;
}
}
else
{
lastAirCloseTime
=
DateTime
.
Now
;
isNoAirCheck
=
false
;
}
}
else
{
isNoAirCheck
=
false
;
}
preAirValue
=
currAirValue
;
}
/// <summary>
/// 配置速度,加减速时间
/// </summary>
...
...
@@ -700,7 +737,7 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus
=
StoreRunStatus
.
Wait
;
mainTimer
.
Enabled
=
false
;
AutomaticBaiting
.
StopRun
();
KNDManager
.
CloseAllDO
();
if
(
IsHasCompress_Axis
)
{
...
...
@@ -1357,7 +1394,7 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
与服务器通信定时器,每
1
秒向服务器通知一次状态
,
同时执行出库操作
p
rivate
string
Code
Msg
=
""
;
p
ublic
string
CodeOrInout
Msg
=
""
;
private
bool
isInProcess
=
false
;
private
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -1421,10 +1458,10 @@ namespace OnlineStore.DeviceLibrary
}
if
(
boxStatus
.
msg
.
Equals
(
""
))
{
boxStatus
.
msg
=
CodeMsg
;
lineOperation
.
msg
=
CodeMsg
;
boxStatus
.
msg
=
Code
OrInout
Msg
;
lineOperation
.
msg
=
Code
OrInout
Msg
;
}
if
(
CodeMsg
.
Equals
(
""
))
if
(
Code
OrInout
Msg
.
Equals
(
""
))
{
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)&&
AutomaticBaiting
.
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
KND
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
@@ -1433,7 +1470,7 @@ namespace OnlineStore.DeviceLibrary
lineOperation
.
msg
=
"叉子料盘检测有料,请检查"
;
}
}
CodeMsg
=
""
;
Code
OrInout
Msg
=
""
;
//WarnMsg = "";
//状态
boxStatus
.
status
=
(
int
)
storeStatus
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
9d2a7c0
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
9d2a7c0
...
...
@@ -35,6 +35,9 @@ namespace OnlineStore.DeviceLibrary
public
static
int
BatchOutStoreCount
=
0
;
public
static
int
BatchOutStoreHeight
=
0
;
public
static
int
BatchInStoreCount
=
0
;
public
static
int
BatchInStoreHeight
=
0
;
/// <summary>
/// 初始化数据
/// </summary>
...
...
@@ -86,22 +89,32 @@ namespace OnlineStore.DeviceLibrary
return
msg
;
}
private
static
void
ClearInOutInfo
()
public
static
void
ClearOutStoreInfo
()
{
BatchOutStoreCount
=
0
;
BatchOutStoreHeight
=
0
;
BatchInStoreCount
=
0
;
BatchInStoreHeight
=
0
;
}
private
static
void
ClearInStoreInfo
()
{
LastCode
=
""
;
LastPosId
=
""
;
LastHeight
=
0
;
LastSize
=
0
;
}
public
static
void
StopRun
()
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
ClearInStoreInfo
();
ClearOutStoreInfo
();
}
public
static
void
StopMove
()
{
StoreMove
.
EndMove
();
ClearIn
Out
Info
();
ClearIn
Store
Info
();
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
BatchDoorClose
(
false
);
...
...
@@ -127,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
StopMove
();
}
WarnMsg
=
""
;
ClearIn
Out
Info
();
ClearIn
Store
Info
();
DoorStatus
=
2
;
AutoBaitingStatus
=
StoreRunStatus
.
Reset
;
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
...
...
@@ -318,14 +331,10 @@ namespace OnlineStore.DeviceLibrary
else
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I08_GetPosId
);
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
LastHeight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
LogUtil
.
info
(
Name
+
"入料: 计算高度:上升前位置【"
+
StartMovePosition
+
"】实时位置【"
+
EndMovePosition
+
"】,计算后高度【"
+
LastHeight
+
"】"
);
if
(
LastHeight
>
12
)
{
LastHeight
=
24
;
}
else
if
(
LastHeight
>=
8
)
{
LastHeight
=
12
;
}
else
if
(
LastHeight
>
0
)
{
LastHeight
=
8
;
}
LastSize
=
StoreManager
.
Config
.
Default_TrayWidth
;
LastHeight
=
GetHeight
();
BatchInStoreCount
++;
BatchInStoreHeight
+=
LastHeight
;
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastSize
+
"*"
+
LastHeight
+
"】二维码【"
+
LastCode
+
"】"
);
GetInStorePosId
(
ProcessMsg
());
...
...
@@ -376,6 +385,29 @@ namespace OnlineStore.DeviceLibrary
}
}
private
static
int
GetHeight
()
{
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
);
LogUtil
.
info
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】计算后高度【"
+
LastHeight
+
"】"
);
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
{
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
else
if
(
LastHeight
<=
12
)
{
LastHeight
=
12
;
}
else
{
LastHeight
=
24
;
}
}
else
{
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
else
{
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
}
}
return
LastHeight
;
}
private
static
void
SendTrayOut
()
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I10_WaitTrayGo
);
...
...
@@ -470,7 +502,8 @@ namespace OnlineStore.DeviceLibrary
}
public
static
void
BatchDoorOpen
(
bool
isWait
)
{
ClearInOutInfo
();
ClearInStoreInfo
();
ClearOutStoreInfo
();
DoorStatus
=
1
;
KND
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
HIGH
);
...
...
@@ -483,7 +516,8 @@ namespace OnlineStore.DeviceLibrary
public
static
void
BatchDoorClose
(
bool
isWait
)
{
ClearInOutInfo
();
ClearInStoreInfo
();
ClearOutStoreInfo
();
DoorStatus
=
2
;
if
(
isWait
)
{
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
9d2a7c0
...
...
@@ -299,6 +299,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
LastCode
.
Equals
(
""
))
{
StoreManager
.
Store
.
CodeOrInoutMsg
=
"未扫到二维码,需要将料盘送出"
;
LogUtil
.
error
(
"未扫到二维码,需要将料盘送出"
);
}
else
...
...
@@ -444,5 +445,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
ex
.
StackTrace
);
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论