Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1131-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 20ca437b
由
张东亮
编写于
2022-12-06 10:03:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1、入料机构机器人取完料等待问题。2、fr331和fr336兼容问题。3、存储机构入库时移栽x轴动作不同步
1 个父辈
6563da7e
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
34 个修改的文件
包含
568 行增加
和
276 行删除
source/AGVLib/AGVLib.csproj
source/Common/Setting_Init.cs
source/DeviceLibrary/Config/Camera.json
source/DeviceLibrary/Config/Config_InputEquip.csv
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/Settings/param.config
source/DeviceLibrary/deviceLibrary/RFID/RFIDManagercs.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/deviceLibrary/label/Label_LZ.cs
source/DeviceLibrary/deviceLibrary/label/PrinterBean.cs
source/DeviceLibrary/manager/SServerManager.cs
source/DeviceLibrary/manager/model/InOutParam.cs
source/DeviceLibrary/storeBean/EquipBase.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_LineA.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_LineB.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_OutStore.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_TurnoverBox.cs
source/DeviceLibrary/storeBean/inputBean/PrintLabelBean.cs
source/DeviceLibrary/storeBean/inputBean/TurnoverBox.cs.cs
source/XLRStoreClient/App.config
source/XLRStoreClient/FrmXLRStore.Designer.cs
source/XLRStoreClient/FrmXLRStore.cs
source/XLRStoreClient/Program.cs
source/XLRStoreClient/Properties/Settings.Designer.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/XLRStoreClient/inputForm/FrmTurnoverBox.Designer.cs
source/XLRStoreClient/inputForm/FrmTurnoverBox.cs
source/AGVLib/AGVLib.csproj
查看文件 @
20ca437
...
...
@@ -12,6 +12,7 @@
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
...
...
source/Common/Setting_Init.cs
查看文件 @
20ca437
...
...
@@ -135,5 +135,6 @@ namespace OnlineStore.Common
public
const
string
LabelInImgAngle_CamA
=
"LabelInImgAngle_CamA"
;
public
const
string
LabelInImgAngle_CamB
=
"LabelInImgAngle_CamB"
;
public
const
string
UseLabelCheck
=
"UseLabelCheck"
;
public
const
string
UseFR336P
=
"UseFR336P"
;
}
}
source/DeviceLibrary/Config/Camera.json
0 → 100644
查看文件 @
20ca437
{
"CodeOrder"
:
"HalconOnly"
,
"Halcon"
:
{
"CodeType"
:
"All"
,
"Zoom1DCode"
:
1.5
,
"Zoom2DCode"
:
1.5
},
"EyemLib"
:
{
"CodeType"
:
"All"
,
"BlockSize"
:
11
,
"RangeC"
:
5
,
"SymbolMin"
:
128
,
"SymbolMax"
:
215
},
"Region"
:
{
"monitor"
:
{
"Aplan"
:
[{
"RegionName"
:
"one"
,
"X"
:
133
,
"Y"
:
167
,
"Width"
:
396
,
"Height"
:
456
,
"Ratio"
:
0.5
},
{
"RegionName"
:
"two"
,
"X"
:
555
,
"Y"
:
170
,
"Width"
:
390
,
"Height"
:
450
,
"Ratio"
:
0.6
}],
"Bplan"
:
[{
"RegionName"
:
"one"
,
"X"
:
927
,
"Y"
:
278
,
"Width"
:
396
,
"Height"
:
456
,
"Ratio"
:
0.5
},
{
"RegionName"
:
"two"
,
"X"
:
1353
,
"Y"
:
276
,
"Width"
:
396
,
"Height"
:
456
,
"Ratio"
:
0.5
}],
"C计划"
:
[{
"RegionName"
:
"name1"
,
"X"
:
940
,
"Y"
:
320
,
"Width"
:
410
,
"Height"
:
410
,
"Ratio"
:
0.4
}]
},
"monitor2"
:
{
"key1"
:
[{
"RegionName"
:
"one"
,
"X"
:
967
,
"Y"
:
288
,
"Width"
:
396
,
"Height"
:
456
,
"Ratio"
:
0.5
}]
}
},
"HIKIPCamera"
:
[
{
"Name"
:
"box_A"
,
"IP"
:
"192.168.120.122"
,
"User"
:
"admin"
,
"Password"
:
"Acc123456"
,
"Port"
:
8000
},
{
"Name"
:
"box_B"
,
"IP"
:
"192.168.108.22"
,
"User"
:
"admin"
,
"Password"
:
"Acc123456"
,
"Port"
:
8000
}
]
}
\ No newline at end of file
source/DeviceLibrary/Config/Config_InputEquip.csv
查看文件 @
20ca437
...
...
@@ -5,7 +5,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,
PRO,0,是否使用夹爪(1=使用夹爪,0=用吸盘),UseClampJaw,0,,,,,,,,,,,,
PRO,0,上料口扫码的相机名称(多个用#分隔),CameraNameList_Shelf,GigE:MV-CE200-10GC (00E70964538),,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,周转箱-RFID-IP,PRO_RFIP_001,192.168.10
1.103
#192.168.101.104,,,,,,,,,,,,
PRO,0,周转箱-RFID-IP,PRO_RFIP_001,192.168.10
7.7
#192.168.101.104,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,AGV小车站号名称_靠近电器板侧,AgvName_A,2#A-1-2,,,,,,,,,,,,
PRO,0,AGV小车站号名称_靠近墙侧,AgvName_B,1#A-1-1,,,,,,,,,,,,
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
20ca437
...
...
@@ -38,6 +38,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib">
<HintPath>..\..\dll\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
...
...
@@ -66,6 +69,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<None Include="Config\Camera.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Config\slidePos.data">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
...
...
source/DeviceLibrary/Settings/param.config
查看文件 @
20ca437
...
...
@@ -12,7 +12,7 @@
<
item
key
=
"LabelName"
ver
=
"10"
value
=
"lizhen"
/>
<
item
key
=
"AngleChange "
ver
=
"10"
value
=
"83"
/>
<!--二维码类型列表配置,用
#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<
item
key
=
"CodeType"
value
=
"Data Matrix ECC 200
#QR Code
"
/>
<
item
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
item
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<!--有效码数量-->
...
...
source/DeviceLibrary/deviceLibrary/RFID/RFIDManagercs.cs
查看文件 @
20ca437
...
...
@@ -85,7 +85,7 @@ namespace OnlineStore.DeviceLibrary
}
return
new
List
<
string
>();
}
static
bool
useFR336P
=
ConfigAppSettings
.
GetBoolValue
(
Setting_Init
.
UseFR336P
,
false
);
public
static
RFIDData
ReadRFID
(
string
ip
)
{
try
...
...
@@ -99,7 +99,12 @@ namespace OnlineStore.DeviceLibrary
RFIDData
data
;
if
(
rtn
)
{
val
=
Encoding
.
UTF8
.
GetString
(
new
byte
[]
{
outValue
[
0
],
outValue
[
1
],
outValue
[
2
],
outValue
[
3
],
outValue
[
8
],
outValue
[
9
],
outValue
[
10
]
})?.
Trim
()
??
""
;
if
(
useFR336P
)
{
val
=
Encoding
.
UTF8
.
GetString
(
new
byte
[]
{
outValue
[
0
],
outValue
[
1
],
outValue
[
2
],
outValue
[
3
],
outValue
[
4
],
outValue
[
5
],
outValue
[
6
]
})?.
Trim
()
??
""
;
}
else
val
=
Encoding
.
UTF8
.
GetString
(
new
byte
[]
{
outValue
[
0
],
outValue
[
1
],
outValue
[
2
],
outValue
[
3
],
outValue
[
8
],
outValue
[
9
],
outValue
[
10
]
})?.
Trim
()
??
""
;
data
=
new
RFIDData
(
val
);
data
.
ReadResult
=
rtn
?
RfidResult
.
读取成功
:
RfidResult
.
读取失败
;
return
data
;
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
20ca437
...
...
@@ -149,30 +149,30 @@ namespace OnlineStore.DeviceLibrary
string
r
=
""
;
bool
eyemNoCode
=
false
;
Task
eyemtask
=
Task
.
Factory
.
StartNew
(
delegate
{
List
<
CodeInfo
>
tlci
=
EyemDecode
.
ModelDecoder
(
ref
bmp
);
foreach
(
CodeInfo
code
in
tlci
)
{
//LogUtil.info(deviceName + " 【" + cameraName + "】[eyemDecode]" + code.CodeType + "(X: " + code.X + ",Y: " + code.Y + ") " + code.CodeStr);
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
if
(!
codeList
.
Contains
(
str
))
{
codeList
.
Add
(
str
);
r
=
r
+
"##eyem|"
+
code
.
CodeType
+
"|"
+
str
;
if
(!
findRightCode
)
{
findRightCode
=
HasRightCode
(
str
);
}
}
}
});
//最多等待60秒
bool
taskResult
=
eyemtask
.
Wait
(
60000
);
if
(!
taskResult
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】eyem扫码超时"
);
eyemNoCode
=
true
;
}
//
Task eyemtask = Task.Factory.StartNew(delegate {
//
List<CodeInfo> tlci = EyemDecode.ModelDecoder(ref bmp);
//
foreach (CodeInfo code in tlci)
//
{
//
//LogUtil.info(deviceName + " 【" + cameraName + "】[eyemDecode]" + code.CodeType + "(X: " + code.X + ",Y: " + code.Y + ") " + code.CodeStr);
//
string str = CodeManager.ReplaceCode(code.CodeStr);
//
if (!codeList.Contains(str))
//
{
//
codeList.Add(str);
//
r = r + "##eyem|" + code.CodeType + "|" + str;
//
if (!findRightCode)
//
{
//
findRightCode = HasRightCode(str);
//
}
//
}
//
}
//
});
//
//
最多等待60秒
//
bool taskResult = eyemtask.Wait(60000);
//
if (!taskResult)
//
{
//
LogUtil.error(deviceName + " 【" + cameraName + "】eyem扫码超时");
//
eyemNoCode = true;
//
}
if
(!
isPreScan
)
{
...
...
@@ -181,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
try
{
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
eyemNoCode
=
true
;
//
eyemNoCode = true;
RemoteDecodeHelper
.
RemoteDecodeParam
remoteDecodeParam
=
new
RemoteDecodeHelper
.
RemoteDecodeParam
{
...
...
@@ -255,10 +255,10 @@ namespace OnlineStore.DeviceLibrary
nameStr
=
"eyem"
;
}
if
(!
taskResult
)
{
nameStr
=
"eyemTimeOut"
;
}
//
if (!taskResult)
//
{
//
nameStr = "eyemTimeOut";
//
}
SaveImageToFile
(
deviceName
,
cameraName
+
nameStr
,
bmp
);
}
...
...
source/DeviceLibrary/deviceLibrary/label/Label_LZ.cs
查看文件 @
20ca437
...
...
@@ -11,12 +11,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
class
Label_LZ
{
public
Label_LZ
(
string
liaohao
,
string
mianbie
,
string
jitai
,
string
line
)
public
Label_LZ
(
string
liaohao
,
string
mianbie
,
string
jitai
,
string
line
,
string
slot
=
"slot"
,
string
subslot
=
"subslot"
)
{
this
.
pn
=
$
"料 号:{liaohao}"
;
this
.
side
=
$
"{mianbie}"
;
this
.
line
=
$
"线 别:{line} /{this.side}"
;
this
.
station
=
$
"机 台:{jitai}"
;
this
.
slot
=
$
"站 别:{slot}{subslot}"
;
this
.
shijian
=
$
"时 间:{DateTime.Now.ToString()}"
;
}
public
Label_LZ
()
{
}
...
...
@@ -24,6 +25,14 @@ namespace OnlineStore.DeviceLibrary
public
string
pn
{
get
;
set
;
}
=
""
;
public
string
line
{
get
;
set
;
}
=
""
;
/// <summary>
/// 站位
/// </summary>
public
string
slot
{
get
;
set
;
}
/// <summary>
/// 点位
/// </summary>
public
string
subslot
{
get
;
set
;
}
/// <summary>
/// 线别
/// </summary>
public
string
side
{
get
;
set
;
}
=
""
;
...
...
@@ -42,7 +51,21 @@ namespace OnlineStore.DeviceLibrary
public
string
ToStr
()
{
return
$
"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line}"
;
return
$
"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line},站位:{slot},点位:{subslot}"
;
}
/// <summary>
/// 拷贝一个新的实例
/// </summary>
/// <returns></returns>
public
Label_LZ
ToCopy
()
{
Label_LZ
posInfo
=
new
Label_LZ
();
System
.
Reflection
.
PropertyInfo
[]
info1
=
posInfo
.
GetType
().
GetProperties
();
System
.
Reflection
.
PropertyInfo
[]
info2
=
this
.
GetType
().
GetProperties
();
for
(
int
i
=
0
;
i
<
info1
.
Length
;
i
++)
info1
[
i
].
SetValue
(
posInfo
,
info2
[
i
].
GetValue
(
this
));
return
posInfo
;
}
}
}
source/DeviceLibrary/deviceLibrary/label/PrinterBean.cs
查看文件 @
20ca437
...
...
@@ -73,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
text
.
Add
(
"jt"
,
content
.
station
);
text
.
Add
(
"sj"
,
content
.
shijian
);
text
.
Add
(
"xb"
,
content
.
line
);
text
.
Add
(
"zb"
,
content
.
slot
);
return
print
.
PrintPreview
(
text
);
}
public
bool
IsReadyPrint
(
out
string
msg
)
...
...
source/DeviceLibrary/manager/SServerManager.cs
查看文件 @
20ca437
...
...
@@ -16,6 +16,51 @@ namespace OnlineStore.DeviceLibrary
public
class
SServerManager
{
#
region
立臻料仓接口
static
string
Addr_getOutStateInfo
=
"/service/store/innerBox/getOutStateInfo"
;
/// <summary>
/// 根据料仓编号获取料仓两个出料口料箱信息
/// </summary>
/// <param name="cid">料仓cid</param>
/// <returns></returns>
public
static
List
<
BoxTaskInfo
>
GetOutStateInfo
()
{
try
{
string
msg
=
""
;
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
map
.
Add
(
"cid"
,
StoreManager
.
XLRStore
.
Config
.
CID
);
string
server
=
GetAddr
(
Addr_getOutStateInfo
,
map
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Get
(
server
);
ServerData4
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ServerData4
>(
resultStr
);
if
(
serverResult
==
null
)
{
msg
=
$
"GetOutStateInfo"
+
"没有收到服务器反馈"
;
}
else
if
(
serverResult
.
code
.
Equals
(
0
).
Equals
(
false
))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg
=
$
" GetOutStateInfo【{JsonHelper.SerializeObject(serverResult)}】"
;
if
(!
msg
.
Equals
(
""
))
{
LogUtil
.
error
(
msg
);
return
null
;
}
}
else
{
msg
=
$
" GetOutStateInfo【{JsonHelper.SerializeObject(serverResult)}】"
;
LogUtil
.
debug
(
msg
);
return
serverResult
.
data
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"GetOutStateInfo"
,
ex
);
}
return
null
;
}
static
string
Addr_UploadLocInfo
=
"/service/store/innerBox/updateLocInfo"
;
/// <summary>
/// A 出库更新任务状态 -OK
...
...
@@ -23,15 +68,19 @@ namespace OnlineStore.DeviceLibrary
/// <param name="barcode">料盘条码</param>
/// <param name="status"></param>
/// <returns></returns>
public
static
BoxTaskInfo
UploadLocInfo
(
string
barcode
,
string
status
,
string
loc
=
""
)
public
static
BoxTaskInfo
UploadLocInfo
(
string
barcode
,
string
status
,
string
loc
=
""
,
string
hSerial
=
""
,
string
outlet
=
""
,
string
boxSide
=
""
)
{
try
{
string
msg
=
""
;
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
map
.
Add
(
"cid"
,
StoreManager
.
XLRStore
.
Config
.
CID
);
map
.
Add
(
"barcode"
,
barcode
);
map
.
Add
(
"status"
,
status
);
map
.
Add
(
"loc"
,
loc
);
map
.
Add
(
"hSerial"
,
hSerial
);
map
.
Add
(
"outlet"
,
outlet
);
map
.
Add
(
"boxSide"
,
boxSide
);
string
server
=
GetAddr
(
Addr_UploadLocInfo
,
map
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Get
(
server
);
...
...
@@ -969,9 +1018,9 @@ namespace OnlineStore.DeviceLibrary
//private static string Addr_ShelfFinish = "/rest/api/qisda/device/putShelfFinished";
public
static
BoxTaskInfo
ShelfFinish
(
string
rfid
,
string
barcode
=
""
,
BoxTaskInfo
boxTaskInfo
=
null
)
public
static
BoxTaskInfo
ShelfFinish
(
string
rfid
,
string
barcode
=
""
,
Label_LZ
label_LZ
=
null
,
string
outlet
=
""
,
string
boxside
=
""
,
int
remainTaskCount
=-
1
)
{
LogUtil
.
info
(
$
"BoxFinish rifd【{rfid}】barcode【{barcode}】
hSerial【{boxTaskInfo?.hSerial ?? ""}】remainTaskCount【{boxTaskInfo?.remainTaskCount ?? -1
}】"
);
LogUtil
.
info
(
$
"BoxFinish rifd【{rfid}】barcode【{barcode}】
outlet【{outlet}】boxside【{boxside}】 hSerial【{label_LZ?.hSerial ?? ""}】remainTaskCount【{remainTaskCount
}】"
);
BoxTaskInfo
task
=
new
BoxTaskInfo
();
//task.boxLoc = rfid;
...
...
@@ -1091,26 +1140,69 @@ namespace OnlineStore.DeviceLibrary
/// 目的地
/// </summary>
public
string
line
{
get
;
set
;
}
=
""
;
public
string
cid
{
get
;
set
;
}
/// <summary>
///
当前料箱隔口内侧已放入
///
出口位置,A或者B
/// </summary>
public
int
inCount
{
get
;
set
;
}
=
-
1
;
public
int
outCount
{
get
;
set
;
}
=
-
1
;
//public bool IsValid()
//{
// if (bigEmpty != -1 && smallEmpty != -1)
// {
// return true;
// }
// return false;
//}
public
string
outlet
{
get
;
set
;
}
/// <summary>
/// 当前料箱隔口内侧T
/// </summary>
public
int
boxTCount
{
get
;
set
;
}
=
-
1
;
/// <summary>
/// 当前料箱隔口外侧B
/// </summary>
public
int
boxBCount
{
get
;
set
;
}
=
-
1
;
/// <summary>
/// 料箱rfid
/// </summary>
public
string
rfid
{
get
;
set
;
}
public
string
ToStr
()
{
return
$
"内侧
格口已有数量:{inCount},外侧格口已有数量;{out
Count}; 需求单:{hSerial},剩余任务数={remainTaskCount},"
+
return
$
"内侧
T已有数量:{boxTCount},外侧B已有数量;{boxB
Count}; 需求单:{hSerial},剩余任务数={remainTaskCount},"
+
$
"剩余料架数:{rackTaskCount},目的地:{line}"
;
}
}
/// <summary>
/// 出口料箱信息
/// </summary>
public
class
BoxInfo
{
/// <summary>
/// 出口位置,A或者B
/// </summary>
public
string
outlet
{
get
;
set
;
}
/// <summary>
/// 料仓cid
/// </summary>
public
string
cid
{
get
;
set
;
}
/// <summary>
/// 料箱rfid
/// </summary>
public
string
rfid
{
get
;
set
;
}
/// <summary>
/// 需求单号
/// </summary>
public
string
hSerial
{
get
;
set
;
}
=
""
;
/// <summary>
/// 目的线体
/// </summary>
public
string
line
{
get
;
set
;
}
=
""
;
/// <summary>
/// 当前料箱隔口内侧T
/// </summary>
public
int
boxTCount
{
get
;
set
;
}
=
-
1
;
/// <summary>
/// 当前料箱隔口外侧B
/// </summary>
public
int
boxBCount
{
get
;
set
;
}
=
-
1
;
public
string
ToStr
()
{
return
$
"出口位置:{outlet},箱号:{rfid},需求单:{hSerial},内侧T已有数量:{boxTCount},外侧B已有数量;{boxBCount},"
+
$
"目的地:{line}"
;
}
}
public
class
AlarmMsg
{
...
...
@@ -1207,6 +1299,14 @@ namespace OnlineStore.DeviceLibrary
public
List
<
Label_LZ
>
data
{
get
;
set
;
}
}
public
class
ServerData4
{
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
List
<
BoxTaskInfo
>
data
{
get
;
set
;
}
}
public
class
AfterPutData
{
//>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
...
...
source/DeviceLibrary/manager/model/InOutParam.cs
查看文件 @
20ca437
...
...
@@ -63,6 +63,7 @@ namespace OnlineStore.DeviceLibrary
/// 3=B侧周转箱内侧,4=B侧周转箱外
/// </summary>
public
int
ShelfType
{
get
;
set
;
}
=
1
;
public
Label_LZ
Label_LZ
{
get
;
set
;
}
}
/// <summary>
/// 出入库料盘信息
...
...
source/DeviceLibrary/storeBean/EquipBase.cs
查看文件 @
20ca437
...
...
@@ -17,7 +17,6 @@ namespace OnlineStore.DeviceLibrary
{
public
bool
IsDebug
=
false
;
public
bool
MoveStop
=
false
;
protected
int
TimerMaxSeconds
=
3
;
public
bool
AxisAlarmFlag
=
false
;
//轴报警异常标识
protected
void
SetAllTimer
(
bool
open
)
...
...
@@ -152,10 +151,10 @@ namespace OnlineStore.DeviceLibrary
}
BaseTimerProcess
();
if
(
TimerMaxSeconds
>
3
&&
runStatus
>=
RunStatus
.
Runing
)
{
TimerMaxSeconds
=
3
;
}
//
if (TimerMaxSeconds > 3 && runStatus >= RunStatus.Runing)
//
{
//
TimerMaxSeconds = 3;
//
}
}
catch
(
Exception
ex
)
{
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
20ca437
...
...
@@ -263,8 +263,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
bool
rtn
=
false
;
Task
task
=
Task
.
Factory
.
StartNew
(
new
Action
(()
=>
{
rtn
=
OpenAllAxis
();
}));
task
.
Wait
();
rtn
=
OpenAllAxis
();
if
(!
rtn
)
{
CloseAllAxis
();
...
...
@@ -287,8 +286,7 @@ namespace OnlineStore.DeviceLibrary
{
StopMove
();
bool
rtn
=
false
;
Task
task
=
Task
.
Factory
.
StartNew
(
new
Action
(()
=>
{
rtn
=
OpenAllAxis
();
}));
task
.
Wait
();
rtn
=
OpenAllAxis
();
if
(!
rtn
)
{
CloseAllAxis
();
...
...
@@ -318,6 +316,7 @@ namespace OnlineStore.DeviceLibrary
private
void
StartReset
()
{
if
(!
CanReset
())
{
if
(
System
.
Windows
.
Forms
.
MessageBox
.
Show
(
"检测到可能的撞机风险,抽屉没有挂在进出轴上才能复位,是否继续?"
,
"警告"
,
System
.
Windows
.
Forms
.
MessageBoxButtons
.
YesNo
).
Equals
(
System
.
Windows
.
Forms
.
DialogResult
.
No
))
{
...
...
@@ -326,6 +325,8 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
$
"复位 {MoveInfo.SLog} :确认取消"
);
return
;
}
}
if
(!
CheckTrayState
(
out
string
msg
))
{
System
.
Windows
.
Forms
.
MessageBox
.
Show
(
$
"{msg},不允许启动/复位"
,
"警告"
,
...
...
@@ -343,8 +344,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H001_Wait
);
AutoInout
.
StopAuto
();
LogInfo
(
$
"复位 {MoveInfo.SLog} :存储机构轴开始复位"
);
//停止记录
StopRecord
();
isInPro
=
false
;
}
...
...
@@ -760,7 +759,7 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
waitAOutStoreList
.
TryDequeue
(
out
param
);
if
(
result
&&
param
!=
null
)
{
LogInfo
(
"执行A面排队的出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】"
);
//
LogInfo("执行A面排队的出库【" + param.PosInfo.ToStr() + "】");
StartExecuctOut
(
param
);
return
;
}
...
...
@@ -771,7 +770,7 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
waitAOutStoreList
.
TryDequeue
(
out
param
);
if
(
result
&&
param
!=
null
)
{
LogInfo
(
"执行A面排队的出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】"
);
//
LogInfo("执行A面排队的出库【" + param.PosInfo.ToStr() + "】");
StartExecuctOut
(
param
);
return
;
}
...
...
@@ -789,7 +788,7 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
waitBOutStoreList
.
TryDequeue
(
out
param
);
if
(
result
&&
param
!=
null
)
{
LogInfo
(
"执行B面排队的出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】"
);
//
LogInfo("执行B面排队的出库【" + param.PosInfo.ToStr() + "】");
StartExecuctOut
(
param
);
return
;
}
...
...
@@ -800,7 +799,7 @@ namespace OnlineStore.DeviceLibrary
bool
result
=
waitBOutStoreList
.
TryDequeue
(
out
param
);
if
(
result
&&
param
!=
null
)
{
LogInfo
(
"执行B面排队的出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】"
);
//
LogInfo("执行B面排队的出库【" + param.PosInfo.ToStr() + "】");
StartExecuctOut
(
param
);
return
;
}
...
...
@@ -888,7 +887,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"启动完成,A皮带线有料盘,启动线体处理"
);
StartLineARun
(
new
InOutParam
(
BufferDataManager
.
ALineStoreInfo
));
}
else
if
(
BufferDataManager
.
BLineStoreInfo
!=
null
)
if
(
BufferDataManager
.
BLineStoreInfo
!=
null
)
{
LogInfo
(
"启动完成,B皮带线有料盘,启动线体处理"
);
StartLineBRun
(
new
InOutParam
(
BufferDataManager
.
BLineStoreInfo
));
...
...
@@ -959,8 +958,6 @@ namespace OnlineStore.DeviceLibrary
ComAxis_A
.
SuddenStop
();
CloseAllAxis
();
//停止记录
StopRecord
();
}
...
...
@@ -1031,7 +1028,7 @@ namespace OnlineStore.DeviceLibrary
string
outMsg
=
""
;
if
(!
axis
.
Open
(
true
,
out
outMsg
))
{
LogUtil
.
error
(
outMsg
);
SetWarnMsg
(
Name
+
outMsg
);
return
false
;
}
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
查看文件 @
20ca437
...
...
@@ -16,45 +16,141 @@ namespace OnlineStore.DeviceLibrary
{
partial
class
BoxEquip
{
public
const
string
boxACamName
=
"box_A"
;
public
const
string
boxBCamName
=
"box_B"
;
public
const
string
boxACamName
=
"box_A"
;
public
const
string
boxBCamName
=
"box_B"
;
Thread
[]
camerathread
;
bool
IsOpen
=
false
;
Asa
.
Camera
.
VisionLib
camera
;
bool
loadCameraState
=
false
;
public
delegate
void
CameraAcqEventHandler
(
CameraArgs
cameraArgs
);
public
event
CameraAcqEventHandler
camera_event
;
public
void
RegisterCameraGrabImage
(
CameraAcqEventHandler
grabbedEventHandler
)
{
camera_event
+=
grabbedEventHandler
;
}
void
LoadCameraConfig
(
string
id
=
""
)
{
if
(
loadCameraState
)
return
;
string
path
=
Application
.
StartupPath
+
@"\Config\IPCamera.json"
;
if
(!
File
.
Exists
(
path
))
Task
.
Factory
.
StartNew
(
new
Action
(()
=>
{
LogUtil
.
error
(
Name
+
"找不到监控相机配置文件:"
+
path
);
}
if
(
loadCameraState
)
return
;
string
path
=
@".\Config\Camera.json"
;
if
(!
File
.
Exists
(
path
))
{
LogUtil
.
error
(
Name
+
"找不到监控相机配置文件"
+
path
);
}
camera
=
new
Asa
.
Camera
.
VisionLib
(
path
);
camerathread
=
new
Thread
[
2
];
//pictureBox1.Image = bmp;
StartCamera
();
loadCameraState
=
true
;
}));
IPCameraManager
.
LoadConfig
(
path
);
loadCameraState
=
true
;
}
public
void
RegisterCameraAGrabImage
(
ImageGrabbedEventHandler
grabbedEventHandler
)
void
StartCamera
(
)
{
IPCameraManager
.
GetCamera
(
boxACamName
).
ImageGrabbed
+=
grabbedEventHandler
;
IPCameraManager
.
GetCamera
(
boxACamName
).
StartLive
();
camera
.
Open
(
boxACamName
);
camera
.
Open
(
boxBCamName
);
IsOpen
=
true
;
camerathread
[
0
]
=
new
Thread
(
new
ParameterizedThreadStart
(
startMonitor
));
camerathread
[
0
].
IsBackground
=
true
;
camerathread
[
0
].
Start
(
boxACamName
);
camerathread
[
1
]
=
new
Thread
(
new
ParameterizedThreadStart
(
startMonitor
));
camerathread
[
1
].
IsBackground
=
true
;
camerathread
[
1
].
Start
(
boxBCamName
);
}
void
startMonitor
(
object
obj
)
{
if
(!
loadCameraState
)
{
LogUtil
.
error
(
obj
+
" 监控相机初始化失败,无法开启"
);
return
;
}
string
name
=
(
string
)
obj
;
try
{
while
(
IsOpen
)
{
Bitmap
bmp
=
AcqImage
(
name
);
if
(
bmp
!=
null
)
camera_event
?.
Invoke
(
new
CameraArgs
(
name
,
bmp
));
Thread
.
Sleep
(
300
);
}
}
catch
{
}
}
public
void
RegisterCameraBGrabImage
(
ImageGrabbedEventHandler
grabbedEventHandler
)
void
StopCamera
(
)
{
IPCameraManager
.
GetCamera
(
boxBCamName
).
ImageGrabbed
+=
grabbedEventHandler
;
IPCameraManager
.
GetCamera
(
boxBCamName
).
StartLive
();
IsOpen
=
false
;
camera
.
Close
();
camera
.
Dispose
();
}
public
void
UnRegisterCameraAGrabImage
(
ImageGrabbedEventHandler
grabbedEventHandler
)
public
Bitmap
AcqImage
(
string
camName
)
{
IPCameraManager
.
GetCamera
(
boxACamName
).
ImageGrabbed
-=
grabbedEventHandler
;
IPCameraManager
.
GetCamera
(
boxACamName
).
StopLive
()
;
Bitmap
bitmap
=
camera
.
GetImage
(
camName
)
;
return
bitmap
;
}
public
void
UnRegisterCameraBGrabImage
(
ImageGrabbedEventHandler
grabbedEventHandler
)
}
public
class
CameraArgs
:
EventArgs
{
/// <summary>
/// 相机名
/// </summary>
public
string
CamName
{
get
;
set
;
}
/// <summary>
/// 相机采集的图片
/// </summary>
public
Bitmap
Image
{
get
;
set
;
}
public
CameraArgs
(
string
name
,
Bitmap
img
)
{
IPCameraManager
.
GetCamera
(
boxBCamName
).
ImageGrabbed
-=
grabbedEventHandler
;
I
PCameraManager
.
GetCamera
(
boxBCamName
).
StopLive
()
;
CamName
=
name
;
I
mage
=
img
;
}
void
StartRecord
()
{
}
void
StopRecord
()
{
}
}
//partial class BoxEquip
//{
// public const string boxACamName = "box_A";
// public const string boxBCamName = "box_B";
// bool loadCameraState = false;
// void LoadCameraConfig(string id = "")
// {
// if (loadCameraState)
// return;
// string path = Application.StartupPath+@"\Config\IPCamera.json";
// if (!File.Exists(path))
// {
// LogUtil.error(Name + "找不到监控相机配置文件:" + path);
// }
// IPCameraManager.LoadConfig(path);
// loadCameraState = true;
// }
// public void RegisterCameraAGrabImage(ImageGrabbedEventHandler grabbedEventHandler)
// {
// IPCameraManager.GetCamera(boxACamName).ImageGrabbed += grabbedEventHandler;
// IPCameraManager.GetCamera(boxACamName).StartLive();
// }
// public void RegisterCameraBGrabImage(ImageGrabbedEventHandler grabbedEventHandler)
// {
// IPCameraManager.GetCamera(boxBCamName).ImageGrabbed += grabbedEventHandler;
// IPCameraManager.GetCamera(boxBCamName).StartLive();
// }
// public void UnRegisterCameraAGrabImage(ImageGrabbedEventHandler grabbedEventHandler)
// {
// IPCameraManager.GetCamera(boxACamName).ImageGrabbed -= grabbedEventHandler;
// IPCameraManager.GetCamera(boxACamName).StopLive();
// }
// public void UnRegisterCameraBGrabImage(ImageGrabbedEventHandler grabbedEventHandler)
// {
// IPCameraManager.GetCamera(boxBCamName).ImageGrabbed -= grabbedEventHandler;
// IPCameraManager.GetCamera(boxBCamName).StopLive();
// }
// void StartRecord() { }
// void StopRecord() { }
//}
}
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
20ca437
...
...
@@ -444,15 +444,14 @@ namespace OnlineStore.DeviceLibrary
MoveAxisToP1
();
PullAxis_UpdownToP1
();
UpdownAxisTo_P3_P9
();
XAxis_To_P1
();
//XAxis_To_P1();
BothXAxis_To_P1
();
}
else
{
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
}
...
...
@@ -472,8 +471,6 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
break
;
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_LineA.cs
查看文件 @
20ca437
...
...
@@ -161,13 +161,10 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
$
"出库 {MoveInfoLineA.SLog}:料盘到达线体末端,出库完成[{MoveInfoLineA.MoveParam.PosInfo.GetPosSide()}面]"
);
break
;
case
StepEnum
.
Line_08_Finish
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfoLineA
.
EndMove
();
break
;
default
:
LogUtil
.
error
(
$
"MoveInfoLineA 未找到处理:{MoveInfoLineA.SLog}"
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfoLineA
.
EndMove
();
break
;
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_LineB.cs
查看文件 @
20ca437
...
...
@@ -156,12 +156,10 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
$
"出库 {MoveInfoLineB.SLog}:料盘到达线体末端,出库完成[{MoveInfoLineB.MoveParam.PosInfo.GetPosSide()}面]"
);
break
;
case
StepEnum
.
Line_08_Finish
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfoLineB
.
EndMove
();
break
;
default
:
LogUtil
.
error
(
$
"MoveInfoLineB 未找到处理:{MoveInfoLineB.SLog}"
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfoLineB
.
EndMove
();
break
;
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
查看文件 @
20ca437
...
...
@@ -302,6 +302,7 @@ namespace OnlineStore.DeviceLibrary
//if (MoveInfo.MoveParam.PosInfoBack == null)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_20_Finish
);
BothXAxis_To_P1
();
LogInfo
(
$
"出库 {MoveInfo.SLog}:出库结束[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//另一面料叉无料,
}
//else
...
...
@@ -320,8 +321,6 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SO_20_Finish
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
OutStore
);
break
;
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
查看文件 @
20ca437
...
...
@@ -752,6 +752,11 @@ namespace OnlineStore.DeviceLibrary
msg
+=
$
"B侧拉取机构拉钩检测信号亮,"
;
hookB
=
true
;
}
if
(
hookA
||
hookB
)
{
return
false
;
}
bool
atBside
=
false
;
bool
atAside
=
false
;
for
(
int
i
=
1
;
i
<=
trayBColumns
.
Length
;
i
++)
...
...
@@ -949,7 +954,7 @@ namespace OnlineStore.DeviceLibrary
break
;
}
if
(
res
==
0
)
LogInfo
(
$
"列{
res
}信号已屏蔽"
);
LogInfo
(
$
"列{
name
}信号已屏蔽"
);
return
res
==
0
?
true
:
false
;
}
#
endregion
...
...
@@ -1043,8 +1048,6 @@ namespace OnlineStore.DeviceLibrary
param
.
MoveP
=
new
LineMoveP
(
Config
,
param
.
PosInfo
.
PosId
);
// LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
param
);
///开始记录
StartRecord
();
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
if
(
param
.
PosInfoBack
!=
null
)
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_00_StartInstore
);
...
...
@@ -1244,7 +1247,7 @@ namespace OnlineStore.DeviceLibrary
reviceList
=
(
from
m
in
reviceList
where
m
.
PosInfo
.
PosId
.
Equals
(
param
.
PosInfo
.
PosId
)
select
m
).
ToList
<
InOutParam
>();
if
(
reviceList
.
Count
==
0
)
{
LogInfo
(
" 执行出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】失败,加入等待队列"
);
//
LogInfo(" 执行出库【" + param.PosInfo.ToStr() + "】失败,加入等待队列");
if
(
param
.
PosInfo
.
GetPosSide
().
Equals
(
"A"
))
{
waitAOutStoreList
.
Enqueue
(
param
);
...
...
@@ -1292,8 +1295,6 @@ namespace OnlineStore.DeviceLibrary
SetBoxStatus
(
DeviceStatus
.
OutStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
MoveInfo
.
NewMove
(
MoveType
.
OutStore
,
param
);
LogInfo
(
"启动出库【"
+
param
.
PosInfo
.
ToStr
()
+
"】 "
);
///开始记录
StartRecord
();
//LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_00_StartOutstore
);
AxisAlarmFlag
=
false
;
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
20ca437
...
...
@@ -66,6 +66,9 @@ namespace OnlineStore.DeviceLibrary
//加载周转箱
BoxA
=
new
TurnoverBox
(
"周转箱A"
,
RFIDIP
[
0
],
config
);
BoxB
=
new
TurnoverBox
(
"周转箱B"
,
RFIDIP
[
1
],
config
);
turnoverBoxes
=
new
List
<
TurnoverBox
>();
turnoverBoxes
.
Add
(
BoxA
);
turnoverBoxes
.
Add
(
BoxB
);
initRobot
();
MoveInfo
=
new
DeviceMoveInfo
(
Name
);
BatchMove
=
new
BatchMoveBean
(
Config
,
BatchAxis
,
1
);
...
...
@@ -274,7 +277,6 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS:"
+
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"StepMsg:"
+
StepMsg
+
"\n"
;
msg
+=
"BoxInfo:"
+
boxTaskInfo
?.
ToStr
()
+
"\n"
;
msg
+=
"ReelInfo:"
+
PrintLabel
?.
LabelInfo
?.
ToStr
()
+
"\n"
;
return
msg
;
}
...
...
@@ -300,7 +302,7 @@ namespace OnlineStore.DeviceLibrary
{
}
PrintLabel
.
PrinteLabelProcess
();
//
PrintLabel.PrinteLabelProcess();
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
)
&&
NoErrorAlarm
())
{
if
(
IsDebug
)
return
;
...
...
@@ -632,11 +634,11 @@ namespace OnlineStore.DeviceLibrary
private
void
SecurityAccessReset
()
{
if
(!
baseConfig
.
DIList
.
ContainsKey
(
IO_Type
.
NGDoor_Limit
))
if
(!
baseConfig
.
DIList
.
ContainsKey
(
IO_Type
.
Shelf_SafetyRasterSignal
))
{
return
;
}
if
(!
baseConfig
.
DIList
.
ContainsKey
(
IO_Type
.
FrontDoor_Limit
))
if
(!
baseConfig
.
DIList
.
ContainsKey
(
IO_Type
.
TurnoverBox_SafetyRasterSignal
))
{
return
;
}
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
查看文件 @
20ca437
...
...
@@ -82,7 +82,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
II64_UpdownToP11
);
MoveLog
(
$
"入料->A侧"
);
}
#
region
入库
private
DateTime
startInTime
=
DateTime
.
Now
;
public
override
bool
StartInstore
(
InOutParam
param
)
...
...
@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
runStatus
=
RunStatus
.
Busy
;
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
param
);
startInTime
=
DateTime
.
Now
;
if
(
IsInSafePos
())
if
(
IsInSafePos
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II00_ToShelfArea
);
To
入料口
();
...
...
@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II06_WaitHeight
))
{
BatchMoveBean
moveBean
=
BatchMove
;
if
(
moveBean
.
LastHeight
>
0
)
//
if (moveBean.LastHeight > 0)
{
ClearTimeoutAlarm
(
"获取料盘高度完成超时"
);
int
Height
=
8
;
//moveBean.LastHeight;
...
...
@@ -180,10 +180,10 @@ namespace OnlineStore.DeviceLibrary
MoveLog
(
$
"入库取料{shelf}{MoveInfo.SLog}: 料盘尺寸{width}X{Height}"
);
II13_GetPosId
();
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
MoveTimeOut
(
MoveInfo
,
""
+
moveBean
.
Name
+
"获取料盘高度完成"
);
}
//
else if (MoveInfo.IsTimeOut(60))
//
{
//
MoveTimeOut(MoveInfo, "" + moveBean.Name + "获取料盘高度完成");
//
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II08_GetPosId
))
{
...
...
@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(
CheckOutStore
())
if
(
CheckOutStore
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II81_ToNgArea
);
ToNG
箱
();
...
...
@@ -346,7 +346,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II85_BackToP1
))
{
// if (shelf.Equals(1))
// if (shelf.Equals(1))
{
MoveLog
(
$
" 入料->NG箱放料结束"
);
MoveInfo
.
EndMove
();
...
...
@@ -360,7 +360,7 @@ namespace OnlineStore.DeviceLibrary
///
/// </summary>
/// <returns></returns>
bool
CheckLineEnd
(
InOutPosInfo
posInfo
,
string
ioType
)
bool
CheckLineEnd
(
InOutPosInfo
posInfo
,
string
ioType
)
{
return
(
posInfo
!=
null
&&
IOValue
(
ioType
).
Equals
(
IO_VALUE
.
HIGH
));
}
...
...
@@ -411,7 +411,7 @@ namespace OnlineStore.DeviceLibrary
//判断是A还是B
if
(
lastPosInfo
.
IsNG
)
{
if
(
NGBox
.
CanPutIn
(
out
string
msg
))
if
(
NGBox
.
CanPutIn
(
out
string
msg
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II81_ToNgArea
);
ClearSpecifiedAlarm
(
"无法放料"
);
...
...
@@ -537,16 +537,16 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
II05_WaitAxisCheck
);
MoveLog
(
$
"入库取料, 等待定位料盘信号消失,通知料串料盘已离开"
);
if
(
IOValue
(
IO_Type
.
Shelf_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II06_WaitHeight
);
BatchMove
.
GetTrayOK
();
}
else
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shelf_ReelCheck
,
IO_VALUE
.
LOW
));
}
if
(
IOValue
(
IO_Type
.
Shelf_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II06_WaitHeight
);
BatchMove
.
GetTrayOK
();
}
else
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Shelf_ReelCheck
,
IO_VALUE
.
LOW
));
}
}
#
endregion
}
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_OutStore.cs
查看文件 @
20ca437
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/storeBean/inputBean/InputEquip_TurnoverBox.cs
查看文件 @
20ca437
...
...
@@ -12,8 +12,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
partial
class
InputEquip
{
public
TurnoverBox
BoxA
;
public
TurnoverBox
BoxB
;
public
TurnoverBox
BoxA
;
public
TurnoverBox
BoxB
;
public
List
<
TurnoverBox
>
turnoverBoxes
;
/// <summary>
/// 周转箱A的编号
/// </summary>
...
...
source/DeviceLibrary/storeBean/inputBean/PrintLabelBean.cs
查看文件 @
20ca437
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/storeBean/inputBean/TurnoverBox.cs.cs
查看文件 @
20ca437
...
...
@@ -48,11 +48,13 @@ namespace OnlineStore.DeviceLibrary
/// 周转箱线体反转
/// </summary>
string
DO_LineBackRun
=
"TurnoverBoxA_LineBackRun"
;
public
string
outLet
=
"A"
;
public
TurnoverBox
(
string
name
,
string
rfidIp
,
InputEquip_Config
inputEquip_Config
)
{
Name
=
name
;
if
(
name
.
Contains
(
"B"
))
{
outLet
=
"B"
;
DI_SafetyRasterSignal
=
"TurnoverBoxB_SafetyRasterSignal"
;
DI_FrontCheck
=
"TurnoverBoxB_FrontCheck"
;
DI_InPlaceCheck
=
"TurnoverBoxB_InPlaceCheck"
;
...
...
@@ -66,20 +68,17 @@ namespace OnlineStore.DeviceLibrary
}
public
string
GetMoveStr
()
{
return
$
"料箱:{BoxId} "
+
$
"【格口最大数量:{MaxCntOnSide}】
"
+
BoxTaskInfo
?.
ToStr
()
??
"
"
;
return
$
"料箱:{BoxId} "
+
$
"【格口最大数量:{MaxCntOnSide}】
【"
+
(
BoxTaskInfo
?.
ToStr
()
??
""
)
+
"】
"
;
}
public
void
StartReset
()
{
WarnMsg
=
""
;
bool
needLeave
=
false
;
if
(
ReadBoxId
())
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
resetCnt
();
ReadBoxId
();
GetBoxTaskInfo
();
if
(
BoxTaskInfo
!=
null
)
{
CntInSideA
=
BoxTaskInfo
.
inCount
>
0
?
BoxTaskInfo
.
inCount
:
0
;
CntInSideB
=
BoxTaskInfo
.
outCount
>
0
?
BoxTaskInfo
.
outCount
:
0
;
needLeave
=
CntInSideA
>=
MaxCntOnSide
||
CntInSideB
>=
MaxCntOnSide
||
(!
string
.
IsNullOrEmpty
(
BoxTaskInfo
.
hSerial
)
&&
BoxTaskInfo
.
remainTaskCount
==
0
);
needLeave
=
(
BoxTaskInfo
.
boxTCount
>=
MaxCntOnSide
||
BoxTaskInfo
.
boxBCount
>=
MaxCntOnSide
||
BoxTaskInfo
.
remainTaskCount
<=
0
);
}
ProcessShelfOut
=
false
;
ProcessShelfEnter
=
false
;
...
...
@@ -94,16 +93,12 @@ namespace OnlineStore.DeviceLibrary
if
(
needLeave
)
{
NeedLeave
();
LogUtil
.
info
(
$
"复位 {Name}已满/无剩余任务,需要离开。{BoxTaskInfo?.ToStr()??""}"
);
}
});
}
void
resetCnt
()
{
CntInSideA
=
0
;
CntInSideB
=
0
;
}
public
void
LineRun
(
DeviceMoveInfo
moveInfo
=
null
)
{
IOManager
.
IOMove
(
DO_LineBackRun
,
IO_VALUE
.
LOW
,
config
.
Id
);
...
...
@@ -187,7 +182,7 @@ namespace OnlineStore.DeviceLibrary
}
//再转动8000
//Thread.Sleep(8000);
// Complete();
while
(!
AgvNode
.
status
.
Equals
(
NodeStatus
.
Complete
))
{
...
...
@@ -279,17 +274,17 @@ namespace OnlineStore.DeviceLibrary
FinishEnter
();
//等待200毫秒后停止转动
//Thread.Sleep(3000);
resetCnt
();
LogUtil
.
info
(
logName
+
"等待3000后,停止链条转动"
);
LineStopRun
();
GetBoxTaskInfo
();
//if (ReadBoxId())
//{
// //SServerManager.BoxTakeAway(BoxId);
// //Thread.Sleep(1000);
// // BoxTaskInfo = SServerManager.GetBoxStatusInfo(config.CID, BoxId);
//}
if
(
ReadBoxId
())
{
SServerManager
.
BoxTakeAway
(
BoxId
);
Thread
.
Sleep
(
1000
);
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
}
ProcessShelfEnter
=
false
;
LogUtil
.
info
(
logName
+
" 结束"
);
}
...
...
@@ -321,34 +316,34 @@ namespace OnlineStore.DeviceLibrary
}
public
Node
AgvNode
{
get
;
set
;
}
/// <summary>
///
A侧数量
///
是否有空位置
/// </summary>
public
int
CntInSideA
{
get
;
set
;
}
/// <summary>
/// B侧数量
/// </summary>
public
int
CntInSideB
{
get
;
set
;
}
public
bool
CanPutIn
(
out
string
msg
)
/// <returns></returns>
public
bool
HasEmptyPos
(
int
boxT
,
int
boxB
)
{
msg
=
""
;
if
(
InHandlingAGVSig
())
{
msg
=
Name
+
" 正在进出料,不允许放料"
;
return
false
;
}
if
(!
BoxId
.
StartsWith
(
"CN"
))
{
msg
=
Name
+
" 未读到rfid,不允许放料"
;
return
false
;
}
bool
rtn
=
CntInSideA
<
MaxCntOnSide
&&
CntInSideB
<
MaxCntOnSide
;
if
(!
rtn
)
{
msg
=
Name
+
$
" 格口数量已满,不允许放料。当前数量:【内侧={CntInSideA}】【外侧={CntInSideB}】"
;
NeedLeave
();
}
return
rtn
;
return
boxT
<
MaxCntOnSide
&&
boxB
<
MaxCntOnSide
;
}
//public bool CanPutIn(out string msg)
//{
// msg = "";
// if (InHandlingAGVSig())
// {
// msg = Name + " 正在进出料,不允许放料";
// return false;
// }
// if (!BoxId.StartsWith("CN"))
// {
// msg = Name + " 未读到rfid,不允许放料";
// return false;
// }
// bool rtn = CntInSideT < MaxCntOnSide && CntInSideB < MaxCntOnSide;
// if (!rtn)
// {
// msg = Name + $" 格口数量已满,不允许放料。当前数量:【内侧={CntInSideT}】【外侧={CntInSideB}】";
// NeedLeave();
// }
// return rtn;
//}
//public bool CheckState(Label_LZ labelInfo, InOutParam param, out BoxTaskInfo boxTaskInfo, out string warnMsg)
//{
// boxTaskInfo = BoxTaskInfo;
...
...
@@ -485,19 +480,12 @@ namespace OnlineStore.DeviceLibrary
public
void
PutReelIn
(
int
side
)
{
WarnMsg
=
""
;
if
(
side
%
2
!=
0
)
{
CntInSideA
++;
}
else
{
CntInSideB
++;
}
bool
rtn
=
CntInSideA
>=
MaxCntOnSide
||
CntInSideB
>=
MaxCntOnSide
;
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
bool
rtn
=
false
;
//BoxTaskInfo = SServerManager.GetBoxStatusInfo(config.CID, BoxId);
bool
hasRemain
=
true
;
if
(
BoxTaskInfo
!=
null
)
{
rtn
=
BoxTaskInfo
.
boxBCount
>=
MaxCntOnSide
||
BoxTaskInfo
.
boxTCount
>=
MaxCntOnSide
;
hasRemain
=
(
BoxTaskInfo
.
remainTaskCount
>
0
?
true
:
false
);
}
if
(
AutoClearBoxBind
)
...
...
@@ -512,16 +500,25 @@ namespace OnlineStore.DeviceLibrary
else
if
(
rtn
||
!
hasRemain
)
{
NeedLeave
();
LogUtil
.
info
(
$
"{Name}已满/无剩余任务,需要离开。{BoxTaskInfo?.ToStr()??""}"
);
}
}
public
void
GetBoxTaskInfo
()
{
if
(
ReadBoxId
())
BoxTaskInfo
=
SServerManager
.
GetBoxStatusInfo
(
config
.
CID
,
BoxId
);
{
List
<
BoxTaskInfo
>
boxInfos
=
SServerManager
.
GetOutStateInfo
();
UpdateBoxInfo
(
boxInfos
);
}
}
public
void
UpdateBoxInfo
(
List
<
BoxTaskInfo
>
boxInfos
)
{
if
(
boxInfos
==
null
)
return
;
BoxTaskInfo
=
boxInfos
.
Find
(
s
=>
outLet
.
Equals
(
s
.
outlet
));
}
/// <summary>
///
箱子
任务信息
/// 任务信息
/// </summary>
public
BoxTaskInfo
BoxTaskInfo
{
get
;
set
;
}
...
...
source/XLRStoreClient/App.config
查看文件 @
20ca437
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configSections
>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
</
configSections
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/main/XLR-SO1131.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/main/XLR-SO1131.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"TheRFID"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/rfid/TheRFID-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/rfid/TheRFID-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"jaka"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
@@ -55,12 +55,12 @@
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"all"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
level
value
=
"all"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
logger
>
<
logger
name
=
"TheRFID"
>
<
level
value
=
"all"
/>
<
appender
-
ref
ref
=
"TheRFID"
/>
<
level
value
=
"all"
/>
<
appender
-
ref
ref
=
"TheRFID"
/>
</
logger
>
<
logger
name
=
"jaka"
>
<
level
value
=
"info"
/>
...
...
@@ -76,20 +76,20 @@
</
logger
>
</
log4net
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
</
startup
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Newtonsoft.Json"
publicKeyToken
=
"30ad4fe6b2a6aeed"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-13.0.0.0"
newVersion
=
"13.0.0.0"
/>
<
assemblyIdentity
name
=
"Newtonsoft.Json"
publicKeyToken
=
"30ad4fe6b2a6aeed"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-13.0.0.0"
newVersion
=
"13.0.0.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
</
configuration
>
\ No newline at end of file
</
configuration
>
source/XLRStoreClient/FrmXLRStore.Designer.cs
查看文件 @
20ca437
此文件的差异被折叠,
点击展开。
source/XLRStoreClient/FrmXLRStore.cs
查看文件 @
20ca437
...
...
@@ -46,14 +46,7 @@ namespace OnlineStore.XLRStore
Application
.
Exit
();
return
;
}
LoadStoreData
();
this
.
Opacity
=
100
;
this
.
Visible
=
true
;
this
.
notifyIcon1
.
Visible
=
false
;
this
.
ShowInTaskbar
=
true
;
this
.
Cursor
=
Cursors
.
Default
;
if
(
StoreManager
.
DisSecurityAccess
)
{
禁用安全光栅
ToolStripMenuItem
.
Text
=
gouStr
+
"禁用安全光栅"
;
...
...
@@ -72,6 +65,11 @@ namespace OnlineStore.XLRStore
}
//tabControl1.TabPages.Remove(tabPage5);
timer1
.
Start
();
this
.
Opacity
=
100
;
this
.
Visible
=
true
;
this
.
notifyIcon1
.
Visible
=
false
;
this
.
ShowInTaskbar
=
true
;
this
.
Cursor
=
Cursors
.
Default
;
}
private
FrmInputEquip
inputEquip
=
null
;
private
FrmBoxEquip
box
=
null
;
...
...
@@ -544,7 +542,7 @@ namespace OnlineStore.XLRStore
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"XLRStore timer"
,
ex
);
LogUtil
.
error
(
"XLRStore timer"
,
ex
);
}
}
...
...
source/XLRStoreClient/Program.cs
查看文件 @
20ca437
...
...
@@ -11,6 +11,7 @@ using System.Threading.Tasks;
using
System.Windows.Forms
;
using
OnlineStore.DeviceLibrary
;
using
System.Runtime.ExceptionServices
;
using
System.ComponentModel
;
namespace
OnlineStore.XLRStore
{
...
...
@@ -56,6 +57,8 @@ namespace OnlineStore.XLRStore
[
HandleProcessCorruptedStateExceptions
]
static
void
Main
(
string
[]
Args
)
{
Application
.
SetUnhandledExceptionMode
(
UnhandledExceptionMode
.
CatchException
);
Application
.
ThreadException
+=
new
System
.
Threading
.
ThreadExceptionEventHandler
(
Application_ThreadException
);
AppDomain
.
CurrentDomain
.
UnhandledException
+=
new
UnhandledExceptionEventHandler
(
CurrentDomain_UnhandledException
);
...
...
@@ -105,7 +108,6 @@ namespace OnlineStore.XLRStore
Application
.
Run
(
new
FrmXLRStore
());
}
}
private
static
void
CurrentDomain_FirstChanceException
(
object
sender
,
System
.
Runtime
.
ExceptionServices
.
FirstChanceExceptionEventArgs
e
)
{
// LogUnhandledException("CurrentDomain_FirstChanceException", e);
...
...
source/XLRStoreClient/Properties/Settings.Designer.cs
查看文件 @
20ca437
...
...
@@ -12,7 +12,7 @@ namespace OnlineStore.XLRStore.Properties {
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"17.
2
.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator"
,
"17.
3
.0.0"
)]
internal
sealed
partial
class
Settings
:
global
::
System
.
Configuration
.
ApplicationSettingsBase
{
private
static
Settings
defaultInstance
=
((
Settings
)(
global
::
System
.
Configuration
.
ApplicationSettingsBase
.
Synchronized
(
new
Settings
())));
...
...
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
20ca437
...
...
@@ -43,48 +43,52 @@ namespace OnlineStore.XLRStore
chbDebug
.
Checked
=
boxBean
.
IsDebug
;
FrmPosDebug
frmPosDebug
=
new
FrmPosDebug
();
AddForm
(
tabControl1
,
" 库位调试 "
,
frmPosDebug
);
boxBean
.
RegisterCameraAGrabImage
(
BoxBean_camera_A_event
);
boxBean
.
RegisterCameraBGrabImage
(
BoxBean_camera_B_event
);
boxBean
.
RegisterCameraGrabImage
(
BoxBean_camera_event
);
IsLoad
=
true
;
}
/// <summary>
/// 监控相机A采集图像事件
/// </summary>
/// <param name="cameraArgs"></param>
private
void
BoxBean_camera_
A_event
(
IPCameraEvent
Args
cameraArgs
)
private
void
BoxBean_camera_
event
(
Camera
Args
cameraArgs
)
{
if
(!
this
.
IsHandleCreated
)
return
;
try
{
this
.
Invoke
(
new
Action
(()
=>
{
if
(!
groupBox2
.
Text
.
Contains
(
"-"
))
groupBox2
.
Text
=
$
"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"
;
//
if (!groupBox2.Text.Contains("-"))
//
groupBox2.Text = $"A相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
//pictureBox1.Image = null;
pictureBox1
.
Image
=
(
Image
)
cameraArgs
.
Image
.
Clone
();
if
(
BoxEquip
.
boxACamName
.
Equals
(
cameraArgs
.
CamName
))
pictureBox1
.
Image
=
(
Image
)
cameraArgs
.
Image
.
Clone
();
else
{
pictureBox2
.
Image
=
(
Image
)
cameraArgs
.
Image
.
Clone
();
}
}));
}
catch
{
}
}
private
void
BoxBean_camera_B_event
(
IPCameraEventArgs
cameraArgs
)
{
if
(!
this
.
IsHandleCreated
)
return
;
try
{
this
.
Invoke
(
new
Action
(()
=>
{
if
(!
groupBox5
.
Text
.
Contains
(
"-"
))
groupBox5
.
Text
=
$
"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}"
;
//pictureBox2.Image = null;
pictureBox2
.
Image
=
(
Image
)
cameraArgs
.
Image
.
Clone
();
}));
}
catch
{
}
}
//private void BoxBean_camera_B_event(IPCameraEventArgs cameraArgs)
//{
// if (!this.IsHandleCreated) return;
// try
// {
// this.Invoke(new Action(() =>
// {
// if (!groupBox5.Text.Contains("-"))
// groupBox5.Text = $"B相机-{cameraArgs.IP}-ch{cameraArgs.ChannelNum}";
// //pictureBox2.Image = null;
// pictureBox2.Image = (Image)cameraArgs.Image.Clone();
// }));
// }
// catch { }
//}
protected
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
protected
Dictionary
<
string
,
IOTextControl
>
DOControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
protected
void
ReadIOList
()
...
...
source/XLRStoreClient/inputForm/FrmTurnoverBox.Designer.cs
查看文件 @
20ca437
...
...
@@ -35,7 +35,6 @@
this
.
panBase
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnResetShelf
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblAgvInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnShelfOut
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -238,7 +237,6 @@
this
.
panBase
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
panBase
.
Controls
.
Add
(
this
.
chbMoveStop
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblWarnMsg
);
this
.
panBase
.
Controls
.
Add
(
this
.
btnResetShelf
);
this
.
panBase
.
Controls
.
Add
(
this
.
chbDebug
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblAgvInfo
);
this
.
panBase
.
Controls
.
Add
(
this
.
btnShelfOut
);
...
...
@@ -277,20 +275,6 @@
this
.
lblWarnMsg
.
Text
=
"等待启动"
;
this
.
lblWarnMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// btnResetShelf
//
this
.
btnResetShelf
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnResetShelf
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnResetShelf
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnResetShelf
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnResetShelf
.
Location
=
new
System
.
Drawing
.
Point
(
680
,
251
);
this
.
btnResetShelf
.
Name
=
"btnResetShelf"
;
this
.
btnResetShelf
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
40
);
this
.
btnResetShelf
.
TabIndex
=
326
;
this
.
btnResetShelf
.
Text
=
"重置料箱信息"
;
this
.
btnResetShelf
.
UseVisualStyleBackColor
=
false
;
this
.
btnResetShelf
.
Click
+=
new
System
.
EventHandler
(
this
.
btnResetShelf_Click
);
//
// chbDebug
//
this
.
chbDebug
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
...
...
@@ -395,7 +379,6 @@
private
System
.
Windows
.
Forms
.
Button
LineBack_A
;
private
System
.
Windows
.
Forms
.
Button
LineStart_A
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbDebug
;
protected
System
.
Windows
.
Forms
.
Button
btnResetShelf
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbMoveStop
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
...
...
source/XLRStoreClient/inputForm/FrmTurnoverBox.cs
查看文件 @
20ca437
...
...
@@ -143,11 +143,11 @@ namespace OnlineStore.XLRStore
}
private
void
btnResetShelf_Click
(
object
sender
,
EventArgs
e
)
{
moveBean
.
ClearBoxInfo
(
true
);
LogUtil
.
info
(
moveBean
.
Name
+
"点击:"
+
btnResetShelf
.
Text
+
";【"
+
moveBean
.
BoxId
+
"】"
);
}
//
private void btnResetShelf_Click(object sender, EventArgs e)
//
{
//
moveBean.ClearBoxInfo(true);
//
LogUtil.info(moveBean.Name + "点击:" + btnResetShelf.Text + ";【" + moveBean.BoxId + "】");
//
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论