Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1057-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 763c406e
由
张东亮
编写于
2023-03-30 18:00:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库完成后检查是否在库位,否则出库
1 个父辈
9b67e065
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
52 行增加
和
70 行删除
source/DeviceLibrary/manager/SServerManager.cs
source/DeviceLibrary/storeBean/EquipBase.cs
source/DeviceLibrary/storeBean/XLRStoreBean.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.Designer.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
763c406
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/storeBean/EquipBase.cs
查看文件 @
763c406
...
@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
try
try
{
{
OnTimerProcess
();
OnTimerProcess
();
if
(
IsDebug
&&
runStatus
<=
RunStatus
.
Wait
)
if
(
runStatus
<=
RunStatus
.
Wait
)
{
{
isInPro
=
false
;
isInPro
=
false
;
return
;
return
;
...
...
source/DeviceLibrary/storeBean/XLRStoreBean.cs
查看文件 @
763c406
...
@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -140,11 +140,6 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
EquipStartRun
(
EquipBase
moveEquip
)
private
void
EquipStartRun
(
EquipBase
moveEquip
)
{
{
if
(
moveEquip
.
IsDebug
)
{
LogUtil
.
info
(
moveEquip
.
Name
+
"调试状态,暂不启动"
);
}
else
{
{
bool
result
=
moveEquip
.
StartRun
();
bool
result
=
moveEquip
.
StartRun
();
Thread
.
Sleep
(
60
);
Thread
.
Sleep
(
60
);
...
@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -202,7 +197,6 @@ namespace OnlineStore.DeviceLibrary
private
void
EquipReset
(
EquipBase
equip
,
bool
isNeedAllReset
)
private
void
EquipReset
(
EquipBase
equip
,
bool
isNeedAllReset
)
{
{
//调试状态不再重置
//调试状态不再重置
if
(!
equip
.
IsDebug
)
{
{
if
(
isNeedAllReset
||
(!
equip
.
NoAlarm
()))
if
(
isNeedAllReset
||
(!
equip
.
NoAlarm
()))
{
{
...
@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -321,7 +315,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
foreach
(
EquipBase
equip
in
this
.
equipsMap
.
Values
)
foreach
(
EquipBase
equip
in
this
.
equipsMap
.
Values
)
{
{
if
(!
equip
.
IsDebug
)
{
{
equip
.
StopRun
();
equip
.
StopRun
();
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
763c406
...
@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -49,11 +49,6 @@ namespace OnlineStore.DeviceLibrary
{
{
//humBean.HumidityProcess(this);
//humBean.HumidityProcess(this);
HumitureBean
.
ProcessAllHumidity
(
this
);
HumitureBean
.
ProcessAllHumidity
(
this
);
if
(
IsDebug
)
{
}
else
{
{
if
(
StoreManager
.
IsConnectServer
)
if
(
StoreManager
.
IsConnectServer
)
{
{
...
@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -124,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
//WarnMsg = "";
//WarnMsg = "";
//状态
//状态
boxStatus
.
status
=
(
int
)
deviceStatus
;
boxStatus
.
status
=
(
int
)
deviceStatus
;
if
(
IsDebug
)
if
(
runStatus
.
Equals
(
DeviceStatus
.
OutStoreBoxEnd
)
||
runStatus
.
Equals
(
DeviceStatus
.
InStoreEnd
))
{
boxStatus
.
status
=
(
int
)
DeviceStatus
.
Debugging
;
}
else
if
(
runStatus
.
Equals
(
DeviceStatus
.
OutStoreBoxEnd
)
||
runStatus
.
Equals
(
DeviceStatus
.
InStoreEnd
))
{
{
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
posId
,
lastPosId
);
boxStatus
.
data
.
Add
(
ParamDefine
.
barcode
,
lastBarcode
);
boxStatus
.
data
.
Add
(
ParamDefine
.
barcode
,
lastBarcode
);
...
@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -280,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
resultOperation
.
msg
);
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
resultOperation
.
msg
);
continue
;
continue
;
}
}
else
if
(
resultOperation
.
op
.
Equals
(
1
)
&&
operation
.
seq
.
Equals
(
resultOperation
.
seq
))
else
if
(
resultOperation
.
op
.
Equals
(
1
)
&&
operation
.
seq
.
Equals
(
resultOperation
.
seq
))
{
{
LogUtil
.
info
(
logName
+
" 成功"
+
$
"【{JsonHelper.SerializeObject(resultOperation)}】"
);
LogUtil
.
info
(
logName
+
" 成功"
+
$
"【{JsonHelper.SerializeObject(resultOperation)}】"
);
return
true
;
return
true
;
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
763c406
...
@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
if
(
CheckASide
())
if
(
CheckASide
())
{
{
//if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
//if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
if
(
PreInStoreCheck
(
BufferDataManager
.
BInStoreInfo
))
if
(
PreInStoreCheck
(
BufferDataManager
.
BInStoreInfo
))
{
{
inOutPosInfo
=
BufferDataManager
.
BInStoreInfo
.
ToCopy
();
inOutPosInfo
=
BufferDataManager
.
BInStoreInfo
.
ToCopy
();
return
true
;
return
true
;
...
@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -195,7 +195,7 @@ namespace OnlineStore.DeviceLibrary
PullAxisToP1
(
"入库"
);
PullAxisToP1
(
"入库"
);
break
;
break
;
case
StepEnum
.
SI_01_PullAxis_Ready
:
case
StepEnum
.
SI_01_PullAxis_Ready
:
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_01_Pull_Updown_ToPosition
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_01_Pull_Updown_ToPosition
);
if
(!
IsMoveAxisInSafePos
())
if
(!
IsMoveAxisInSafePos
())
{
{
...
@@ -329,9 +329,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -329,9 +329,9 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
break
;
break
;
case
StepEnum
.
SI_08_ToPosition
:
case
StepEnum
.
SI_08_ToPosition
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_09_ToTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_09_ToTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到抽屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到抽屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P2_P4
();
PullAxis_Inout_To_P2_P4
();
break
;
break
;
case
StepEnum
.
SI_09_ToTray
:
case
StepEnum
.
SI_09_ToTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_10_LiftTray
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_10_LiftTray
);
...
@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -440,6 +440,20 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayBColumns
[
GetPosColumn
()],
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayBColumns
[
GetPosColumn
()],
IO_VALUE
.
HIGH
));
}
}
PullAxis_Inout_To_Cam
();
PullAxis_Inout_To_Cam
();
bool
rtn
=
SServerManager
.
InstorePosCheck
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
if
(!
rtn
)
{
InOutParam
inOut
=
new
InOutParam
(
new
InOutPosInfo
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
));
LogInfo
(
$
"入库 {MoveInfo.SLog}:验证入库完成失败,将该库位出库[{inOut.PosInfo.ToStr()}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
if
(
CheckASide
())
{
waitAOutStoreList
.
Enqueue
(
inOut
);
}
else
{
waitBOutStoreList
.
Enqueue
(
inOut
);
}
}
break
;
break
;
case
StepEnum
.
SI_19_InoutBack
:
case
StepEnum
.
SI_19_InoutBack
:
if
(!
CheckInStoreOtherSideInfo
())
if
(!
CheckInStoreOtherSideInfo
())
...
...
source/XLRStoreClient/boxForm/FrmBoxEquip.Designer.cs
查看文件 @
763c406
此文件的差异被折叠,
点击展开。
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
763c406
using
System
;
using
Dolen.CV
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
System.Runtime.CompilerServices
;
using
System.Threading
;
using
System.IO
;
using
System.Runtime.InteropServices
;
using
OnlineStore.DeviceLibrary
;
using
log4net
;
using
System.Reflection
;
using
UserFromControl
;
using
UserFromControl
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.Common
;
using
Dolen.CV
;
namespace
OnlineStore.XLRStore
namespace
OnlineStore.XLRStore
{
{
...
@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore
...
@@ -57,32 +47,32 @@ namespace OnlineStore.XLRStore
/// <param name="cameraArgs"></param>
/// <param name="cameraArgs"></param>
private
void
BoxBean_camera_A_event
(
IPCameraEventArgs
cameraArgs
)
private
void
BoxBean_camera_A_event
(
IPCameraEventArgs
cameraArgs
)
{
{
if
(!
this
.
IsHandleCreated
)
return
;
//
if (!this.IsHandleCreated) return;
try
//
try
{
//
{
this
.
Invoke
(
new
Action
(()
=>
//
this.Invoke(new Action(() =>
{
//
{
if
(!
groupBox2
.
Text
.
Contains
(
"-"
))
//
if (!groupBox2.Text.Contains("-"))
groupBox2
.
Text
=
$
"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"
;
//
groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox1
.
Image
=
cameraArgs
.
Image
;
//
pictureBox1.Image = cameraArgs.Image;
}));
//
}));
}
//
}
catch
{
}
//
catch { }
}
}
private
void
BoxBean_camera_B_event
(
IPCameraEventArgs
cameraArgs
)
private
void
BoxBean_camera_B_event
(
IPCameraEventArgs
cameraArgs
)
{
{
if
(!
this
.
IsHandleCreated
)
return
;
//
if (!this.IsHandleCreated) return;
try
//
try
{
//
{
this
.
Invoke
(
new
Action
(()
=>
//
this.Invoke(new Action(() =>
{
//
{
if
(!
groupBox5
.
Text
.
Contains
(
"-"
))
//
if (!groupBox5.Text.Contains("-"))
groupBox5
.
Text
=
$
"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"
;
//
groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
pictureBox2
.
Image
=
cameraArgs
.
Image
;
//
pictureBox2.Image = cameraArgs.Image;
}));
//
}));
}
//
}
catch
{
}
//
catch { }
}
}
protected
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
protected
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
...
@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore
...
@@ -532,31 +522,25 @@ namespace OnlineStore.XLRStore
private
void
btnDebugAxis_Click
(
object
sender
,
EventArgs
e
)
private
void
btnDebugAxis_Click
(
object
sender
,
EventArgs
e
)
{
{
//boxBean.IsDebug
if
(
frmAxisMove
==
null
)
if
(
frmAxisMove
==
null
)
{
{
frmAxisMove
=
new
FrmAxisMove
(
boxBean
.
IsDebug
);
frmAxisMove
=
new
FrmAxisMove
(
true
);
frmAxisMove
.
ShowDialog
();
frmAxisMove
.
ShowDialog
();
}
}
else
else
{
{
if
(
frmAxisMove
.
IsDisposed
)
if
(
frmAxisMove
.
IsDisposed
)
{
{
frmAxisMove
=
new
FrmAxisMove
(
boxBean
.
IsDebug
);
frmAxisMove
=
new
FrmAxisMove
(
true
);
frmAxisMove
.
ShowDialog
();
frmAxisMove
.
ShowDialog
();
}
}
else
else
{
{
frmAxisMove
.
DebugStatus
(
boxBean
.
IsDebug
);
frmAxisMove
.
DebugStatus
(
true
);
frmAxisMove
.
ShowDialog
();
frmAxisMove
.
ShowDialog
();
}
}
}
}
}
}
private
void
chbDebug_CheckedChanged_1
(
object
sender
,
EventArgs
e
)
{
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论