Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 047cd333
由
张东亮
编写于
2022-03-16 12:53:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
存储机构出入库一定次数复位,监控相机图片转视频
1 个父辈
ea4fd53a
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
207 行增加
和
32 行删除
source/DeviceLibrary/Config/Config_BoxEquip.csv
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/storeBean/boxBean/AutoInoutInfo.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/DeviceLibrary/Config/Config_BoxEquip.csv
查看文件 @
047cd33
...
@@ -12,6 +12,7 @@ AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,20000,150000,150000,2000,10000,20000,
...
@@ -12,6 +12,7 @@ AXIS,0,B面移栽压紧轴,ComAxis_B,9,HC,,20000,150000,150000,2000,10000,20000,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,0,,,,,,,,,,,,
PRO,0,温湿度端口号,Humiture_Port,0,,,,,,,,,,,,
PRO,0,设备出入库次数多少次时,会自动重置操作,Box_ResetCount,200,,,,,,,,,,,,
PRO,0,A面抽屉对位Mark_X坐标,FindPos_Drawer_A_X,930.03,,,,,,,,,,,,
PRO,0,A面抽屉对位Mark_X坐标,FindPos_Drawer_A_X,930.03,,,,,,,,,,,,
PRO,0,A面抽屉对位Mark_Y坐标,FindPos_Drawer_A_Y,897.49,,,,,,,,,,,,
PRO,0,A面抽屉对位Mark_Y坐标,FindPos_Drawer_A_Y,897.49,,,,,,,,,,,,
PRO,0,A面抽屉验证Mark_X坐标,Validate_Drawer_A_X,932.59,,,,,,,,,,,,
PRO,0,A面抽屉验证Mark_X坐标,Validate_Drawer_A_X,932.59,,,,,,,,,,,,
...
...
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
047cd33
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
public
int
LastPosition
=
0
;
public
int
LastPosition
=
0
;
public
string
AxisName
;
public
string
AxisName
;
public
AxisBean
(
ConfigMoveAxis
axisConfig
,
string
deviceName
,
bool
needHome
=
fals
e
)
public
AxisBean
(
ConfigMoveAxis
axisConfig
,
string
deviceName
,
bool
needHome
=
tru
e
)
{
{
this
.
IsNeedHome
=
needHome
;
this
.
IsNeedHome
=
needHome
;
this
.
Config
=
axisConfig
;
this
.
Config
=
axisConfig
;
...
...
source/DeviceLibrary/storeBean/boxBean/AutoInoutInfo.cs
查看文件 @
047cd33
...
@@ -26,7 +26,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -26,7 +26,6 @@ namespace OnlineStore.DeviceLibrary
/// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库
/// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库
/// </summary>
/// </summary>
internal
int
CurrInOutCount
=
0
;
internal
int
CurrInOutCount
=
0
;
internal
int
CurrInOutACount
=
0
;
#
endregion
#
endregion
...
@@ -47,6 +46,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -47,6 +46,12 @@ namespace OnlineStore.DeviceLibrary
{
{
try
try
{
{
CurrInOutCount
++;
if
(
CurrInOutCount
>=
boxBean
.
Config
.
Box_ResetCount
)
{
boxBean
.
LogInfo
(
$
"存储机构出入库达到{CurrInOutCount}次数,需要复位"
);
boxBean
.
Reset
();
}
//是否自动进入出库状态
//是否自动进入出库状态
if
(!
autoNext
)
if
(!
autoNext
)
{
{
...
@@ -139,7 +144,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -139,7 +144,6 @@ namespace OnlineStore.DeviceLibrary
internal
void
ClearCount
()
internal
void
ClearCount
()
{
{
CurrInOutACount
=
0
;
CurrInOutCount
=
0
;
CurrInOutCount
=
0
;
}
}
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
047cd33
...
@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
MoveType
.
Reset
);
MoveInfo
.
NewMove
(
MoveType
.
Reset
);
LogInfo
(
"开始重置: "
);
LogInfo
(
"开始重置: "
);
AutoInout
.
ClearCount
();
StartReset
();
StartReset
();
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
return
true
;
return
true
;
...
@@ -304,7 +305,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -304,7 +305,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H001_Wait
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H001_Wait
);
AutoInout
.
StopAuto
();
AutoInout
.
StopAuto
();
LogInfo
(
$
"复位 {MoveInfo.SLog} :存储机构轴开始复位"
);
LogInfo
(
$
"复位 {MoveInfo.SLog} :存储机构轴开始复位"
);
//停止记录
StopRecord
();
isInPro
=
false
;
isInPro
=
false
;
}
}
...
@@ -431,7 +433,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -431,7 +433,7 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H03_PullAxis_InoutHome
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H03_PullAxis_InoutHome
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:视觉检测确认抽屉不在轴上,抽屉拉取进出轴回原点"
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:视觉检测确认抽屉不在轴上,抽屉拉取进出轴回原点"
);
PullAxis_Inout
.
HomeMove
(
MoveInfo
);
//
PullAxis_Inout.HomeMove(MoveInfo);
}
}
}
}
break
;
break
;
...
@@ -602,27 +604,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -602,27 +604,27 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H03_PullAxis_InoutHome
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H03_PullAxis_InoutHome
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:料屉拉取进出轴回原点"
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:料屉拉取进出轴回原点"
);
PullAxis_Inout
.
HomeMove
(
MoveInfo
);
//
PullAxis_Inout.HomeMove(MoveInfo);
}
}
break
;
break
;
case
StepEnum
.
BOX_H02_PullAxis_UpDownToP1
:
case
StepEnum
.
BOX_H02_PullAxis_UpDownToP1
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H03_PullAxis_InoutHome
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H03_PullAxis_InoutHome
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:料屉拉取进出轴回原点"
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:料屉拉取进出轴回原点"
);
PullAxis_Inout
.
HomeMove
(
MoveInfo
);
//
PullAxis_Inout.HomeMove(MoveInfo);
break
;
break
;
case
StepEnum
.
BOX_H03_PullAxis_InoutHome
:
case
StepEnum
.
BOX_H03_PullAxis_InoutHome
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H04_PullAxis_Updown_ABComAxis_Home
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H04_PullAxis_Updown_ABComAxis_Home
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:料屉拉取升降轴、AB面压紧轴回原点"
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:料屉拉取升降轴、AB面压紧轴回原点"
);
if
(!
IsMoveAxisInSafePos
())
if
(!
IsMoveAxisInSafePos
())
MoveAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveAxis_SafePos
,
Config
.
MoveAxis_P1_Speed
);
MoveAxis
.
AbsMove
(
MoveInfo
,
Config
.
MoveAxis_SafePos
,
Config
.
MoveAxis_P1_Speed
);
PullAxis_
Inout
.
HomeMove
(
MoveInfo
);
PullAxis_
Updown
.
HomeMove
(
MoveInfo
);
ComAxis_A
.
HomeMove
(
MoveInfo
);
//
ComAxis_A.HomeMove(MoveInfo);
ComAxis_B
.
HomeMove
(
MoveInfo
);
//
ComAxis_B.HomeMove(MoveInfo);
break
;
break
;
case
StepEnum
.
BOX_H04_PullAxis_Updown_ABComAxis_Home
:
case
StepEnum
.
BOX_H04_PullAxis_Updown_ABComAxis_Home
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H05_XAxis_AB_UpDown_Home
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H05_XAxis_AB_UpDown_Home
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:AB面移栽X轴回原点、移栽升降轴"
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:AB面移栽X轴回原点、移栽升降轴"
);
PullAxis_Inout
.
HomeMove
(
MoveInfo
);
//
PullAxis_Inout.HomeMove(MoveInfo);
XAxis_A
.
HomeMove
(
MoveInfo
);
XAxis_A
.
HomeMove
(
MoveInfo
);
XAxis_B
.
HomeMove
(
MoveInfo
);
XAxis_B
.
HomeMove
(
MoveInfo
);
UpdownAxis
.
HomeMove
(
MoveInfo
);
UpdownAxis
.
HomeMove
(
MoveInfo
);
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
查看文件 @
047cd33
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
...
@@ -62,23 +63,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -62,23 +63,20 @@ namespace OnlineStore.DeviceLibrary
Bitmap
bmp
=
AcqImage
(
name
);
Bitmap
bmp
=
AcqImage
(
name
);
if
(
bmp
!=
null
)
if
(
bmp
!=
null
)
{
{
if
(
IsRecord
)
{
cnt
++;
Task
.
Factory
.
StartNew
(
delegate
{
SaveImage
(
"box_A"
,
cnt
);
});
Task
.
Factory
.
StartNew
(
delegate
{
SaveImage
(
"box_B"
,
cnt
);
});
}
camera_event
?.
Invoke
(
new
CameraArgs
(
name
,
bmp
));
camera_event
?.
Invoke
(
new
CameraArgs
(
name
,
bmp
));
}
}
//if (MoveInfo != null)
//{
// if (MoveInfo.MoveType.Equals(MoveType.InStore) || MoveInfo.MoveType.Equals(MoveType.OutStore))
// {
// if (CheckASide() && name.Equals("box_A"))
// {
// SaveImage(name);
// }
// else
// {
// SaveImage("box_B");
// }
// }
//}
Thread
.
Sleep
(
300
);
Thread
.
Sleep
(
300
);
}
}
}
}
...
@@ -173,6 +171,66 @@ namespace OnlineStore.DeviceLibrary
...
@@ -173,6 +171,66 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
#
region
监控保存
void
SaveImage
(
string
camName
,
int
count
)
{
try
{
if
(
inOutPosInfo
!=
null
)
{
string
path
=
Application
.
StartupPath
+
imgPath
+
camName
+
"\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
if
(!
System
.
IO
.
Directory
.
Exists
(
path
))
Directory
.
CreateDirectory
(
path
);
Task
.
Factory
.
StartNew
(()
=>
{
camera
.
SaveImage
(
camName
,
path
,
$
"{count.ToString().PadLeft(4, '0')}"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Bmp
);
});
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"保存{camName}图片失败"
,
ex
);
}
}
FFMPEG
ffmpegA
=
new
FFMPEG
();
FFMPEG
ffmpegB
=
new
FFMPEG
();
bool
IsRecord
=
false
;
int
cnt
=
0
;
InOutPosInfo
inOutPosInfo
=
null
;
/// <summary>
/// 开始记录
/// </summary>
public
void
StartRecord
(
bool
isTest
=
false
)
{
if
(
isTest
)
{
inOutPosInfo
=
new
InOutPosInfo
(
"code"
+
DateTime
.
Now
.
ToString
(
"mmssfff"
),
DateTime
.
Now
.
ToString
(
"yyyyMMddhh"
));
}
else
{
inOutPosInfo
=
MoveInfo
.
MoveParam
.
PosInfo
;
}
cnt
=
0
;
string
inputfolderA
=
Application
.
StartupPath
+
imgPath
+
"box_A\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
string
inputfolderB
=
Application
.
StartupPath
+
imgPath
+
"box_B\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
string
outputfolderA
=
Application
.
StartupPath
+
"\\Videos\\box_A\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
string
outputfolderB
=
Application
.
StartupPath
+
"\\Videos\\box_B\\"
+
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)
+
"\\"
+
inOutPosInfo
.
PosId
;
ffmpegA
.
SetParam
(
inputfolderA
,
outputfolderA
,
$
"{DateTime.Now.ToString("
hhmmss
")}_{inOutPosInfo.barcode}.mp4"
);
ffmpegB
.
SetParam
(
inputfolderB
,
outputfolderB
,
$
"{DateTime.Now.ToString("
hhmmss
")}_{inOutPosInfo.barcode}.mp4"
);
IsRecord
=
true
;
}
/// <summary>
/// 停止记录
/// </summary>
public
void
StopRecord
()
{
IsRecord
=
false
;
ffmpegA
.
ConvertImgsToMp4
();
ffmpegB
.
ConvertImgsToMp4
();
}
#
endregion
}
}
public
class
CameraArgs
:
EventArgs
public
class
CameraArgs
:
EventArgs
{
{
...
@@ -190,4 +248,88 @@ namespace OnlineStore.DeviceLibrary
...
@@ -190,4 +248,88 @@ namespace OnlineStore.DeviceLibrary
Image
=
img
;
Image
=
img
;
}
}
}
}
public
class
FFMPEG
{
public
static
string
appFolderPath
=
Application
.
StartupPath
;
static
string
imgPath
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ImagePath
);
/// <summary>
/// 帧频
/// </summary>
public
int
FrameRate
{
get
;
set
;
}
=
2
;
/// <summary>
/// 画面宽
/// </summary>
public
int
Width
{
get
;
set
;
}
=
1920
;
/// <summary>
/// 画面高
/// </summary>
public
int
Height
{
get
;
set
;
}
=
1080
;
/// <summary>
/// 输入文件夹
/// </summary>
public
string
InputFolder
{
get
;
set
;
}
=
appFolderPath
+
imgPath
;
public
string
InputFileNamePrefix
{
get
;
set
;
}
=
""
;
/// <summary>
/// 输出文件夹
/// </summary>
public
string
OutputFolder
{
get
;
set
;
}
=
appFolderPath
+
"Videos\\"
;
/// <summary>
/// 输出文件名带后缀
/// </summary>
public
string
OutputFileName
{
get
;
set
;
}
=
"test.mp4"
;
public
string
Cmd
{
get
{
return
ExportCmd
();
}
}
public
void
SetParam
(
string
inputfolder
,
string
outputfolder
,
string
outputfilename
)
{
InputFolder
=
inputfolder
;
OutputFolder
=
outputfolder
;
OutputFileName
=
outputfilename
;
if
(!
Directory
.
Exists
(
outputfolder
))
Directory
.
CreateDirectory
(
outputfolder
);
}
string
ExportCmd
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
appFolderPath
+
"\\ffmpeg "
);
sb
.
Append
(
$
" -y -r {FrameRate} -f image2 -s {Width}*{Height} -i {InputFolder}\\{InputFileNamePrefix}%04d.Bmp -vcodec libx264 -pix_fmt yuv420p "
);
sb
.
Append
(
OutputFolder
+
"\\"
+
OutputFileName
);
return
sb
.
ToString
();
}
public
void
ConvertImgsToMp4
()
{
Task
task
=
Task
.
Factory
.
StartNew
(
delegate
{
using
(
Process
p
=
new
Process
())
{
//(1)设置要启动的应用程序
p
.
StartInfo
.
FileName
=
"cmd.exe"
;
//p.StartInfo.FileName = appFolderPath + "\\ffmpeg.exe";
//p.StartInfo.Arguments = Cmd +" & exit /b";
//(2)是否使用操作系统shell启动
p
.
StartInfo
.
UseShellExecute
=
false
;
//(3)接受来自调用程序的输入信息
p
.
StartInfo
.
RedirectStandardInput
=
true
;
//(4)输出信息
p
.
StartInfo
.
RedirectStandardOutput
=
true
;
//(5)输出错误
p
.
StartInfo
.
RedirectStandardError
=
true
;
p
.
StartInfo
.
CreateNoWindow
=
true
;
p
.
Start
();
p
.
StandardInput
.
WriteLine
(
Cmd
+
"&exit"
);
p
.
StandardInput
.
AutoFlush
=
true
;
p
.
StandardInput
.
Close
();
p
.
StandardError
.
ReadToEnd
();
p
.
WaitForExit
();
try
{
System
.
IO
.
Directory
.
Delete
(
InputFolder
,
true
);
}
catch
{
}
}
});
task
.
Wait
(
120000
);
}
}
}
}
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
047cd33
...
@@ -155,7 +155,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -155,7 +155,7 @@ namespace OnlineStore.DeviceLibrary
}
}
return
lineOperation
;
return
lineOperation
;
}
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
public
void
SendLineStatus
()
public
void
SendLineStatus
()
{
{
DateTime
time
=
DateTime
.
Now
;
DateTime
time
=
DateTime
.
Now
;
...
@@ -167,7 +167,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -167,7 +167,6 @@ namespace OnlineStore.DeviceLibrary
lineOperation
.
op
=
5
;
lineOperation
.
op
=
5
;
LogUtil
.
error
(
Name
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
,
DeviceID
+
105
);
LogUtil
.
error
(
Name
+
"没有湿度预警范围,需要从服务器获取,发送OP="
+
lineOperation
.
op
,
DeviceID
+
105
);
}
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
lineOperation
);
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
lineOperation
);
//LogUtil.info("resultOperation="+ JsonHelper.SerializeObject(resultOperation));
//LogUtil.info("resultOperation="+ JsonHelper.SerializeObject(resultOperation));
//发送状态信息到服务器
//发送状态信息到服务器
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
047cd33
...
@@ -393,6 +393,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -393,6 +393,8 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
}
}
...
@@ -412,6 +414,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -412,6 +414,8 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
break
;
break
;
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
查看文件 @
047cd33
...
@@ -296,6 +296,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -296,6 +296,8 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SO_20_Finish
:
case
StepEnum
.
SO_20_Finish
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
OutStore
);
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
OutStore
);
break
;
break
;
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
查看文件 @
047cd33
...
@@ -936,8 +936,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -936,8 +936,10 @@ namespace OnlineStore.DeviceLibrary
startInStoreTime
=
DateTime
.
Now
;
startInStoreTime
=
DateTime
.
Now
;
LogInfo
(
" 启动入库【"
+
param
.
PosInfo
.
ToStr
()
+
"】 "
);
LogInfo
(
" 启动入库【"
+
param
.
PosInfo
.
ToStr
()
+
"】 "
);
param
.
MoveP
=
new
LineMoveP
(
Config
,
param
.
PosInfo
.
PosId
);
param
.
MoveP
=
new
LineMoveP
(
Config
,
param
.
PosInfo
.
PosId
);
LogInfo
(
"LoadInoutParam:"
+
JsonHelper
.
SerializeObject
(
param
.
MoveP
));
//
LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
param
);
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
param
);
///开始记录
StartRecord
();
IgnoreCamDect
=
false
;
IgnoreCamDect
=
false
;
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_00_StartInstore
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_00_StartInstore
);
...
@@ -1142,7 +1144,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1142,7 +1144,9 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus
(
DeviceStatus
.
OutStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
SetBoxStatus
(
DeviceStatus
.
OutStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
MoveInfo
.
NewMove
(
MoveType
.
OutStore
,
param
);
MoveInfo
.
NewMove
(
MoveType
.
OutStore
,
param
);
LogInfo
(
"启动出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】 "
);
LogInfo
(
"启动出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】 "
);
LogInfo
(
"LoadInoutParam:"
+
JsonHelper
.
SerializeObject
(
param
.
MoveP
));
///开始记录
StartRecord
();
//LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
IgnoreCamDect
=
false
;
IgnoreCamDect
=
false
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_00_StartOutstore
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_00_StartOutstore
);
AxisAlarmFlag
=
false
;
AxisAlarmFlag
=
false
;
...
@@ -1163,8 +1167,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1163,8 +1167,10 @@ namespace OnlineStore.DeviceLibrary
OutstoreExecute
();
OutstoreExecute
();
}
}
#
endregion
#
endregion
private
void
SaveSpecifiedImage
()
private
void
SaveSpecifiedImage
(
bool
open
=
false
)
{
{
if
(!
open
)
return
;
SaveImage
(
"box_A"
);
SaveImage
(
"box_A"
);
SaveImage
(
"box_B"
);
SaveImage
(
"box_B"
);
//if (CheckASide())
//if (CheckASide())
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_PosDebug.cs
查看文件 @
047cd33
...
@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_13_PutReel
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SP_13_PutReel
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
LogInfo
(
$
"库位调试 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
UpdownAxisToP7_P13
(
true
);
UpdownAxisToP7_P13
(
true
);
SaveSpecifiedImage
();
SaveSpecifiedImage
(
true
);
break
;
break
;
case
StepEnum
.
SP_13_PutReel
:
case
StepEnum
.
SP_13_PutReel
:
...
...
source/LoadCVSLibrary/storeConfig/config/BoxEquip_Config.cs
查看文件 @
047cd33
...
@@ -19,6 +19,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -19,6 +19,11 @@ namespace OnlineStore.LoadCSVLibrary
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
BoxEquip
,
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
BoxEquip
,
filepath
)
{
{
}
}
/// <summary>
/// 出入库一定次数后复位
/// </summary>
[
ConfigProAttribute
(
"Box_ResetCount"
)]
public
int
Box_ResetCount
{
get
;
set
;
}
#
region
轴
#
region
轴
/// <summary>
/// <summary>
/// AXIS,0,行走机构,MoveAxis,0,HC,,35000,60000,60000,1000,5000,20000,10,100,0,0
/// AXIS,0,行走机构,MoveAxis,0,HC,,35000,60000,60000,1000,5000,20000,10,100,0,0
...
...
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
047cd33
...
@@ -530,6 +530,16 @@ namespace OnlineStore.XLRStore
...
@@ -530,6 +530,16 @@ namespace OnlineStore.XLRStore
{
{
boxBean
.
IgnoreCamDect
=
true
;
boxBean
.
IgnoreCamDect
=
true
;
}
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
boxBean
.
StartRecord
(
true
);
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
boxBean
.
StopRecord
();
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论