Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20031_TinStorage
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d28fa105
由
刘韬
编写于
2026-02-11 21:13:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正出库时急停复位变入库的问题
1 个父辈
043fa856
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
165 行增加
和
52 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/CameraPointTest.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/TheMachine.csproj
TheMachine/VisionStoreDetect.cs
TheMachine/packages.config
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
d28fa10
...
@@ -444,7 +444,7 @@ namespace DeviceLibrary
...
@@ -444,7 +444,7 @@ namespace DeviceLibrary
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
closeD01
)
&&
dataMap
[
ParamDefine
.
closeD01
].
Equals
(
ParamDefine
.
doit
))
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
closeD01
)
&&
dataMap
[
ParamDefine
.
closeD01
].
Equals
(
ParamDefine
.
doit
))
{
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:closeD01=doit"
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:closeD01=doit"
);
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
LeftDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
result
=
"D01"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
result
=
"D01"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
HIGH
);
...
@@ -459,7 +459,7 @@ namespace DeviceLibrary
...
@@ -459,7 +459,7 @@ namespace DeviceLibrary
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
closeD02
)
&&
dataMap
[
ParamDefine
.
closeD02
].
Equals
(
ParamDefine
.
doit
))
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
closeD02
)
&&
dataMap
[
ParamDefine
.
closeD02
].
Equals
(
ParamDefine
.
doit
))
{
{
LogUtil
.
info
(
StoreName
+
"收到服务器命令:closeD02=doit"
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:closeD02=doit"
);
if
(
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
RightDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
result
=
"D02"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
result
=
"D02"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
HIGH
);
...
@@ -477,6 +477,7 @@ namespace DeviceLibrary
...
@@ -477,6 +477,7 @@ namespace DeviceLibrary
{
{
result
=
"D03"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
result
=
"D03"
+
crc
.
GetString
(
"Res0188.d613f80c"
,
"已上锁"
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
HIGH
);
}
}
else
else
{
{
...
@@ -490,6 +491,7 @@ namespace DeviceLibrary
...
@@ -490,6 +491,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD01=doit"
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD01=doit"
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
LOW
);
result
=
"D01"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
result
=
"D01"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
//RobotManage.UserPause();
}
}
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openD02
)
&&
dataMap
[
ParamDefine
.
openD02
].
Equals
(
ParamDefine
.
doit
))
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openD02
)
&&
dataMap
[
ParamDefine
.
openD02
].
Equals
(
ParamDefine
.
doit
))
...
@@ -497,6 +499,7 @@ namespace DeviceLibrary
...
@@ -497,6 +499,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD02=doit"
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD02=doit"
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
LOW
);
result
=
"D02"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
result
=
"D02"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
//RobotManage.UserPause();
}
}
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openD03
)
&&
dataMap
[
ParamDefine
.
openD03
].
Equals
(
ParamDefine
.
doit
))
if
(
dataMap
.
ContainsKey
(
ParamDefine
.
openD03
)
&&
dataMap
[
ParamDefine
.
openD03
].
Equals
(
ParamDefine
.
doit
))
...
@@ -504,6 +507,7 @@ namespace DeviceLibrary
...
@@ -504,6 +507,7 @@ namespace DeviceLibrary
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD03=doit"
);
LogUtil
.
info
(
StoreName
+
"收到服务器命令:openD03=doit"
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
result
=
"D03"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
result
=
"D03"
+
crc
.
GetString
(
"Res0190.9377bdb2"
,
"已解锁"
);
//RobotManage.UserPause();
}
}
if
(!
result
.
Equals
(
""
))
if
(!
result
.
Equals
(
""
))
...
...
DeviceLibrary/theMachine/CameraPointTest.cs
查看文件 @
d28fa10
...
@@ -15,6 +15,7 @@ using System.Text;
...
@@ -15,6 +15,7 @@ using System.Text;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Xml.Linq
;
using
System.Xml.Linq
;
using
static
System
.
Windows
.
Forms
.
MonthCalendar
;
namespace
DeviceLibrary
namespace
DeviceLibrary
{
{
...
@@ -34,6 +35,8 @@ namespace DeviceLibrary
...
@@ -34,6 +35,8 @@ namespace DeviceLibrary
public
static
Dictionary
<
TestStorePointPort
,
List
<
string
>>
StoreState
=
new
Dictionary
<
TestStorePointPort
,
List
<
string
>>();
public
static
Dictionary
<
TestStorePointPort
,
List
<
string
>>
StoreState
=
new
Dictionary
<
TestStorePointPort
,
List
<
string
>>();
public
static
void
Init
()
public
static
void
Init
()
{
{
inArea
.
Clear
();
outArea
.
Clear
();
var
fd
=
File
.
ReadAllText
(
"Config\\CameraPointTest.json"
);
var
fd
=
File
.
ReadAllText
(
"Config\\CameraPointTest.json"
);
CameraData
=
JsonConvert
.
DeserializeObject
<
CameraData
>(
fd
);
CameraData
=
JsonConvert
.
DeserializeObject
<
CameraData
>(
fd
);
for
(
int
i
=
0
;
i
<
5
;
i
++)
for
(
int
i
=
0
;
i
<
5
;
i
++)
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
d28fa10
...
@@ -345,7 +345,7 @@ namespace DeviceLibrary
...
@@ -345,7 +345,7 @@ namespace DeviceLibrary
if
(!
UserPause
)
if
(!
UserPause
)
Msg
.
clear
();
Msg
.
clear
();
else
else
currnetstoreStatus
=
StoreStatus
.
Debugg
ing
;
currnetstoreStatus
=
StoreStatus
.
Warn
ing
;
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
if
(
currnetstoreStatus
!=
StoreStatus
.
None
)
ServerCM
.
storeStatus
=
currnetstoreStatus
;
ServerCM
.
storeStatus
=
currnetstoreStatus
;
...
@@ -504,6 +504,19 @@ namespace DeviceLibrary
...
@@ -504,6 +504,19 @@ namespace DeviceLibrary
bool
SafeCheck
()
{
bool
SafeCheck
()
{
bool
ok
=
true
;
bool
ok
=
true
;
var
ignorestring
=
"["
+
crc
.
GetString
(
"Res0096"
,
"已忽略"
)
+
"]"
;
var
ignorestring
=
"["
+
crc
.
GetString
(
"Res0096"
,
"已忽略"
)
+
"]"
;
//if (IOManager.IOValue(IO_Type.LeftDoor_Check).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.LeftDoor_Lock, IO_VALUE.HIGH);
//}
//if (IOManager.IOValue(IO_Type.RightDoor_Check).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.RightDoor_Lock, IO_VALUE.HIGH);
//}
//if (IOManager.IOValue(IO_Type.PrinterDoor_Check).Equals(IO_VALUE.HIGH))
//{
// IOManager.IOMove(IO_Type.PrinterDoor_Lock, IO_VALUE.HIGH);
//}
if
(
IOValue
(
IO_Type
.
PrinterDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOValue
(
IO_Type
.
PrinterDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
{
if
(!
IgnoreSafecheck
)
if
(!
IgnoreSafecheck
)
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
d28fa10
using
CodeLibrary
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
OnlineStore
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Threading
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
...
@@ -22,7 +19,7 @@ namespace DeviceLibrary
...
@@ -22,7 +19,7 @@ namespace DeviceLibrary
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
crc
.
GetString
(
"Res0108"
,
"批量"
));
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
crc
.
GetString
(
"Res0108"
,
"批量"
));
public
bool
HasJob
{
get
=>
OutStoreJobList
.
Count
>
0
;
}
public
bool
HasJob
{
get
=>
OutStoreJobList
.
Count
>
0
;
}
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
bool
ngReel
,
string
ngMsg
)
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
bool
ngReel
,
string
ngMsg
)
{
{
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
);
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
);
jobInfo
.
isNG
=
ngReel
;
jobInfo
.
isNG
=
ngReel
;
...
@@ -36,7 +33,7 @@ namespace DeviceLibrary
...
@@ -36,7 +33,7 @@ namespace DeviceLibrary
/// <summary>
/// <summary>
/// 是否新入抽屉
/// 是否新入抽屉
/// </summary>
/// </summary>
public
bool
newDrawer
=
true
;
public
bool
newDrawer
=
true
;
void
StoreDemoProcess
()
void
StoreDemoProcess
()
{
{
...
@@ -47,7 +44,15 @@ namespace DeviceLibrary
...
@@ -47,7 +44,15 @@ namespace DeviceLibrary
{
{
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
=
false
;
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
=
false
;
if
(
IOValue
(
IO_Type
.
Taking_Clamp
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
Setting_Init
.
Device_step_by_step_mode
)
{
StoreMoveInfo
.
log
(
"当前单步模式"
);
return
;
}
if
(
IOValue
(
IO_Type
.
Taking_Clamp
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
Setting_Init
.
Runtime_Step
>=
Runtime_StepE
.
LabelProcess
&&
Setting_Init
.
Runtime_Step
<=
Runtime_StepE
.
LabelPasteFinish
)
if
(
Setting_Init
.
Runtime_Step
>=
Runtime_StepE
.
LabelProcess
&&
Setting_Init
.
Runtime_Step
<=
Runtime_StepE
.
LabelPasteFinish
)
{
{
StoreMoveInfo
.
log
(
"检测到上次正在贴标:"
+
Setting_Init
.
Runtime_Step
+
","
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_FromPosid
);
StoreMoveInfo
.
log
(
"检测到上次正在贴标:"
+
Setting_Init
.
Runtime_Step
+
","
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_FromPosid
);
...
@@ -60,7 +65,7 @@ namespace DeviceLibrary
...
@@ -60,7 +65,7 @@ namespace DeviceLibrary
// return;
// return;
//}
//}
LabelingMoveInfo
.
MoveParam
.
IsNg
=
true
;
LabelingMoveInfo
.
MoveParam
.
IsNg
=
true
;
LabelingMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
"Res0182.e64e34d1"
,
"重置前物料正在贴标,NG处理"
);
LabelingMoveInfo
.
MoveParam
.
NgMsg
=
crc
.
GetString
(
"Res0182.e64e34d1"
,
"重置前物料正在贴标,NG处理"
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
//if (!string.IsNullOrEmpty(Setting_Init.Runtime_FromPosid))
//if (!string.IsNullOrEmpty(Setting_Init.Runtime_FromPosid))
//{
//{
...
@@ -75,7 +80,7 @@ namespace DeviceLibrary
...
@@ -75,7 +80,7 @@ namespace DeviceLibrary
return
;
return
;
}
}
else
if
(
Setting_Init
.
Runtime_Step
>
=
Runtime_StepE
.
LabelPasteFinish
)
else
if
(
Setting_Init
.
Runtime_Step
=
=
Runtime_StepE
.
LabelPasteFinish
)
{
{
StoreMoveInfo
.
log
(
"检测到上次已完成贴标:"
+
Setting_Init
.
Runtime_Step
+
","
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_RFID
);
StoreMoveInfo
.
log
(
"检测到上次已完成贴标:"
+
Setting_Init
.
Runtime_Step
+
","
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_RFID
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn03
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn03
);
...
@@ -107,22 +112,25 @@ namespace DeviceLibrary
...
@@ -107,22 +112,25 @@ namespace DeviceLibrary
}
}
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
if
(
ServerCM
.
selfAudit
)
{
if
(
ServerCM
.
selfAudit
)
{
selfAuditMode
=
true
;
selfAuditMode
=
true
;
}
}
return
;
return
;
}
}
if
(
Setting_Init
.
Runtime_Step
!=
Runtime_StepE
.
None
)
if
(
Setting_Init
.
Runtime_Step
!=
Runtime_StepE
.
None
)
StoreMoveInfo
.
log
(
"Runtime_Step:"
+
Setting_Init
.
Runtime_Step
);
StoreMoveInfo
.
log
(
"Runtime_Step:"
+
Setting_Init
.
Runtime_Step
);
if
(
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
InToLabel
)
{
if
(
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
InToLabel
)
StoreMoveInfo
.
log
(
"检测到上次正在准备去贴标:"
+
Setting_Init
.
Runtime_Posid
);
{
StoreMoveInfo
.
log
(
"检测到上次正在准备去贴标:"
+
Setting_Init
.
Runtime_Posid
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn02
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn02
);
var
acto
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
LabelP
);
var
acto
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
LabelP
);
StoreMoveInfo
.
MoveParam
.
PosID
=
Setting_Init
.
Runtime_Posid
;
StoreMoveInfo
.
MoveParam
.
PosID
=
Setting_Init
.
Runtime_Posid
;
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
=
true
;
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
=
true
;
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
acto
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
acto
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
acto
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
acto
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
StoreMoveInfo
.
log
(
$
"开始转运入贴标机构"
);
StoreMoveInfo
.
log
(
$
"开始转运入贴标机构"
);
}
else
if
(
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
InToStore
)
}
else
if
(
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
InToStore
)
{
{
StoreMoveInfo
.
log
(
"检测到上次正在准备去库位:"
+
Setting_Init
.
Runtime_Posid
);
StoreMoveInfo
.
log
(
"检测到上次正在准备去库位:"
+
Setting_Init
.
Runtime_Posid
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn04
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn04
);
...
@@ -132,11 +140,11 @@ namespace DeviceLibrary
...
@@ -132,11 +140,11 @@ namespace DeviceLibrary
}
}
else
if
(
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
Out
)
else
if
(
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
Out
)
{
{
StoreMoveInfo
.
log
(
"检测到上次正在出库:"
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_WareCode
);
StoreMoveInfo
.
log
(
"检测到上次正在出库:"
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_WareCode
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut10_1
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut10_1
);
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
=
true
;
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
=
true
;
StoreMoveInfo
.
MoveParam
.
PosID
=
Setting_Init
.
Runtime_Posid
;
StoreMoveInfo
.
MoveParam
.
PosID
=
Setting_Init
.
Runtime_Posid
;
StoreMoveInfo
.
MoveParam
.
WareCode
=
Setting_Init
.
Runtime_WareCode
;
StoreMoveInfo
.
MoveParam
.
WareCode
=
Setting_Init
.
Runtime_WareCode
;
}
}
break
;
break
;
case
MoveStep
.
StoreIn01
:
case
MoveStep
.
StoreIn01
:
...
@@ -174,9 +182,9 @@ namespace DeviceLibrary
...
@@ -174,9 +182,9 @@ namespace DeviceLibrary
{
{
if
(
LabelingMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
if
(
LabelingMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
LabelingMoveInfo
.
NewMove
(
MoveStep
.
Labeling01
);
LabelingMoveInfo
.
NewMove
(
MoveStep
.
Labeling01
);
StoreMoveInfo
.
log
(
$
"等待贴标完成"
);
StoreMoveInfo
.
log
(
$
"等待贴标完成"
);
if
(
Setting_Init
.
Device_step_by_step_mode
)
if
(
Setting_Init
.
Device_step_by_step_mode
)
RobotManage
.
UserPause
();
RobotManage
.
UserPause
();
}
}
...
@@ -192,7 +200,7 @@ namespace DeviceLibrary
...
@@ -192,7 +200,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
=
LabelingMoveInfo
.
MoveParam
.
clone
();
StoreMoveInfo
.
MoveParam
=
LabelingMoveInfo
.
MoveParam
.
clone
();
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
{
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn08
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn08
);
...
@@ -209,7 +217,7 @@ namespace DeviceLibrary
...
@@ -209,7 +217,7 @@ namespace DeviceLibrary
{
{
if
(
string
.
IsNullOrEmpty
(
LabelingMoveInfo
.
MoveParam
.
PosID
))
if
(
string
.
IsNullOrEmpty
(
LabelingMoveInfo
.
MoveParam
.
PosID
))
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0138"
,
"等待服务器返回库位"
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
"Res0138"
,
"等待服务器返回库位"
),
MsgLevel
.
info
);
StoreMoveInfo
.
log
(
$
"等待服务器返回库位"
);
StoreMoveInfo
.
log
(
$
"等待服务器返回库位"
);
return
;
return
;
}
}
...
@@ -233,7 +241,7 @@ namespace DeviceLibrary
...
@@ -233,7 +241,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
from
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
LabelP
);
from
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
LabelP
);
to
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
RFIDP
);
to
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
RFIDP
);
//StoreMoveInfo.MoveParam.PosID = outposid;
//StoreMoveInfo.MoveParam.PosID = outposid;
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
from
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
to
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
from
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
to
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
...
@@ -251,12 +259,12 @@ namespace DeviceLibrary
...
@@ -251,12 +259,12 @@ namespace DeviceLibrary
if
(
StoreMoveInfo
.
MoveParam
.
RFID
.
Length
>
16
)
if
(
StoreMoveInfo
.
MoveParam
.
RFID
.
Length
>
16
)
StoreMoveInfo
.
MoveParam
.
RFID
=
StoreMoveInfo
.
MoveParam
.
RFID
.
Substring
(
0
,
16
);
StoreMoveInfo
.
MoveParam
.
RFID
=
StoreMoveInfo
.
MoveParam
.
RFID
.
Substring
(
0
,
16
);
StoreMoveInfo
.
Msg
(
crc
.
GetString
(
"Res0185.7b3d057f"
,
"正在写入RFID"
),
MsgLevel
.
info
);
StoreMoveInfo
.
Msg
(
crc
.
GetString
(
"Res0185.7b3d057f"
,
"正在写入RFID"
),
MsgLevel
.
info
);
ServerCM
.
RfidMsg
=
crc
.
GetString
(
"Res0185.7b3d057f"
,
"正在写入RFID"
);
ServerCM
.
RfidMsg
=
crc
.
GetString
(
"Res0185.7b3d057f"
,
"正在写入RFID"
);
bool
writeok
=
false
;
bool
writeok
=
false
;
var
r
=
RobotManage
.
RFID
.
ReOpen
();
var
r
=
RobotManage
.
RFID
.
ReOpen
();
var
r1
=
RobotManage
.
RFID2
?.
ReOpen
();
var
r1
=
RobotManage
.
RFID2
?.
ReOpen
();
StoreMoveInfo
.
log
(
"连接rfid:"
+
r
+
"rfid2:"
+
r1
);
StoreMoveInfo
.
log
(
"连接rfid:"
+
r
+
"rfid2:"
+
r1
);
for
(
int
i
=
0
;
i
<
15
;
i
++)
for
(
int
i
=
0
;
i
<
15
;
i
++)
{
{
if
(
string
.
IsNullOrEmpty
(
StoreMoveInfo
.
MoveParam
.
RFID
))
if
(
string
.
IsNullOrEmpty
(
StoreMoveInfo
.
MoveParam
.
RFID
))
...
@@ -283,7 +291,8 @@ namespace DeviceLibrary
...
@@ -283,7 +291,8 @@ namespace DeviceLibrary
}
}
}
}
}
}
if
(!
writeok
&&
RobotManage
.
RFID2
!=
null
)
{
if
(!
writeok
&&
RobotManage
.
RFID2
!=
null
)
{
RobotManage
.
RFID2
.
WriteByte
(
550
,
new
byte
[]
{
0x40
,
0x00
});
RobotManage
.
RFID2
.
WriteByte
(
550
,
new
byte
[]
{
0x40
,
0x00
});
Thread
.
Sleep
(
300
);
Thread
.
Sleep
(
300
);
RobotManage
.
RFID2
.
WriteEPC
(
Encoding
.
ASCII
.
GetBytes
(
epc
));
RobotManage
.
RFID2
.
WriteEPC
(
Encoding
.
ASCII
.
GetBytes
(
epc
));
...
@@ -327,7 +336,7 @@ namespace DeviceLibrary
...
@@ -327,7 +336,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
log
(
$
"RFID 写入失败 NG"
);
StoreMoveInfo
.
log
(
$
"RFID 写入失败 NG"
);
ServerCM
.
cancelPutInTask
(
""
,
StoreMoveInfo
.
MoveParam
.
WareCode
);
ServerCM
.
cancelPutInTask
(
""
,
StoreMoveInfo
.
MoveParam
.
WareCode
);
Z_Axis
.
AbsMove
(
StoreMoveInfo
,
Config
.
Z_Axis_P1
,
Config
.
Z_Axis_P1_speed
);
Z_Axis
.
AbsMove
(
StoreMoveInfo
,
Config
.
Z_Axis_P1
,
Config
.
Z_Axis_P1_speed
);
StoreMoveInfo
.
Msg
(
crc
.
GetString
(
"Res0186.7faa6f6b"
,
"RFID 写入失败"
),
MsgLevel
.
info
,
5
);
StoreMoveInfo
.
Msg
(
crc
.
GetString
(
"Res0186.7faa6f6b"
,
"RFID 写入失败"
),
MsgLevel
.
info
,
5
);
ServerCM
.
RfidMsg
=
crc
.
GetString
(
"Res0186.7faa6f6b"
,
"RFID 写入失败"
);
ServerCM
.
RfidMsg
=
crc
.
GetString
(
"Res0186.7faa6f6b"
,
"RFID 写入失败"
);
if
(
Setting_Init
.
Device_step_by_step_mode
)
if
(
Setting_Init
.
Device_step_by_step_mode
)
...
@@ -336,7 +345,7 @@ namespace DeviceLibrary
...
@@ -336,7 +345,7 @@ namespace DeviceLibrary
}
}
else
else
{
{
StoreMoveInfo
.
Msg
(
crc
.
GetString
(
"Res0187.6b2d7028"
,
"RFID 写入成功"
),
MsgLevel
.
info
,
5
);
StoreMoveInfo
.
Msg
(
crc
.
GetString
(
"Res0187.6b2d7028"
,
"RFID 写入成功"
),
MsgLevel
.
info
,
5
);
ServerCM
.
RfidMsg
=
crc
.
GetString
(
"Res0187.6b2d7028"
,
"RFID 写入成功"
);
ServerCM
.
RfidMsg
=
crc
.
GetString
(
"Res0187.6b2d7028"
,
"RFID 写入成功"
);
}
}
}
}
...
@@ -406,7 +415,7 @@ namespace DeviceLibrary
...
@@ -406,7 +415,7 @@ namespace DeviceLibrary
}
}
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn10
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn10
);
StoreMoveInfo
.
log
(
$
"入库完成,开始检查库位"
);
StoreMoveInfo
.
log
(
$
"入库完成,开始检查库位"
);
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
}
}
break
;
break
;
...
@@ -416,7 +425,7 @@ namespace DeviceLibrary
...
@@ -416,7 +425,7 @@ namespace DeviceLibrary
TestStorePointPort
tspp
=
CameraPointTest
.
GetTestStorePointPort
(
posid
);
TestStorePointPort
tspp
=
CameraPointTest
.
GetTestStorePointPort
(
posid
);
ol
=
CameraPointTest
.
GetThingStoreName
(
tspp
);
ol
=
CameraPointTest
.
GetThingStoreName
(
tspp
);
StoreMoveInfo
.
log
(
$
"检测到有料库位,{tspp}: {string.Join("
,
", ol)}"
);
StoreMoveInfo
.
log
(
$
"检测到有料库位,{tspp}: {string.Join("
,
", ol)}"
);
if
(
ol
.
Contains
(
posid
))
if
(
ol
.
Contains
(
posid
))
...
@@ -425,8 +434,11 @@ namespace DeviceLibrary
...
@@ -425,8 +434,11 @@ namespace DeviceLibrary
}
}
else
else
{
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn10
);
Msg
.
add
(
string
.
Format
(
"No material detected at storage location {0} – please check."
,
posid
),
MsgLevel
.
alarm
);
Msg
.
add
(
string
.
Format
(
"No material detected at storage location {0} – please check."
,
posid
),
MsgLevel
.
alarm
);
StoreMoveInfo
.
log
(
"入库失败,请检查库位:"
+
posid
);
StoreMoveInfo
.
log
(
"入库失败,请检查库位:"
+
posid
);
RobotManage
.
UserPause
();
return
;
}
}
if
(
OutStoreJobList
.
Count
==
0
)
if
(
OutStoreJobList
.
Count
==
0
)
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
...
@@ -446,9 +458,10 @@ namespace DeviceLibrary
...
@@ -446,9 +458,10 @@ namespace DeviceLibrary
}
}
else
if
(
IOValue
(
IO_Type
.
Out_Drawer
).
Equals
(
IO_VALUE
.
LOW
))
else
if
(
IOValue
(
IO_Type
.
Out_Drawer
).
Equals
(
IO_VALUE
.
LOW
))
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0137"
,
"出库任务正在执行,请关好抽屉"
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
"Res0137"
,
"出库任务正在执行,请关好抽屉"
),
MsgLevel
.
alarm
);
}
}
else
{
else
{
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
HIGH
);
}
}
break
;
break
;
...
@@ -458,7 +471,7 @@ namespace DeviceLibrary
...
@@ -458,7 +471,7 @@ namespace DeviceLibrary
Setting_Init
.
Runtime_Posid
=
inposid
;
Setting_Init
.
Runtime_Posid
=
inposid
;
Setting_Init
.
Runtime_WareCode
=
StoreMoveInfo
.
MoveParam
.
WareCode
;
Setting_Init
.
Runtime_WareCode
=
StoreMoveInfo
.
MoveParam
.
WareCode
;
{
{
var
outposid
=
""
;
var
outposid
=
""
;
if
(!
ServerCM
.
selfAuditException
)
if
(!
ServerCM
.
selfAuditException
)
{
{
var
olist
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
出口
);
var
olist
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
出口
);
...
@@ -477,9 +490,10 @@ namespace DeviceLibrary
...
@@ -477,9 +490,10 @@ namespace DeviceLibrary
outposid
=
olist
[
0
];
outposid
=
olist
[
0
];
StoreMoveInfo
.
log
(
$
"检测到出库位有料:{outposid}, 其他有料出库位:{string.Join("
,
", olist)}"
);
StoreMoveInfo
.
log
(
$
"检测到出库位有料:{outposid}, 其他有料出库位:{string.Join("
,
", olist)}"
);
}
}
StoreMoveInfo
.
MoveParam
.
IsNg
=
false
;
StoreMoveInfo
.
MoveParam
.
IsNg
=
false
;
}
}
else
{
else
{
var
olist
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
var
olist
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
StoreMoveInfo
.
log
(
$
"检测到入库口有料库位:{string.Join("
,
", olist)}"
);
StoreMoveInfo
.
log
(
$
"检测到入库口有料库位:{string.Join("
,
", olist)}"
);
olist
=
RobotManage
.
AllPositionMapNumList
.
ToList
().
Where
(
p
=>
{
return
p
.
StartsWith
(
"L"
)
&&
!
p
.
StartsWith
(
"La"
)
&&
!
olist
.
Contains
(
p
);
}).
ToList
();
olist
=
RobotManage
.
AllPositionMapNumList
.
ToList
().
Where
(
p
=>
{
return
p
.
StartsWith
(
"L"
)
&&
!
p
.
StartsWith
(
"La"
)
&&
!
olist
.
Contains
(
p
);
}).
ToList
();
...
@@ -548,7 +562,7 @@ namespace DeviceLibrary
...
@@ -548,7 +562,7 @@ namespace DeviceLibrary
}
}
}
}
}
}
if
(!
issame
&&
RobotManage
.
RFID2
!=
null
)
if
(!
issame
&&
RobotManage
.
RFID2
!=
null
)
{
{
if
(
RobotManage
.
RFID2
.
ReadEPC
(
16
,
out
data
))
if
(
RobotManage
.
RFID2
.
ReadEPC
(
16
,
out
data
))
{
{
...
@@ -605,9 +619,10 @@ namespace DeviceLibrary
...
@@ -605,9 +619,10 @@ namespace DeviceLibrary
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreEnd
);
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreEnd
);
StoreMoveInfo
.
log
(
"出库完成"
);
StoreMoveInfo
.
log
(
"出库完成"
);
}
}
else
{
else
{
ServerCM
.
cancelAndDisable
(
StoreMoveInfo
.
MoveParam
.
PosID
);
ServerCM
.
cancelAndDisable
(
StoreMoveInfo
.
MoveParam
.
PosID
);
StoreMoveInfo
.
log
(
"出库NG,自动禁用库位:"
+
StoreMoveInfo
.
MoveParam
.
PosID
);
StoreMoveInfo
.
log
(
"出库NG,自动禁用库位:"
+
StoreMoveInfo
.
MoveParam
.
PosID
);
}
}
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
OutStoreJobList
.
ClearLastPosid
();
OutStoreJobList
.
ClearLastPosid
();
...
@@ -622,7 +637,8 @@ namespace DeviceLibrary
...
@@ -622,7 +637,8 @@ namespace DeviceLibrary
StoreMoveInfo
.
log
(
$
"出库库位已用完"
);
StoreMoveInfo
.
log
(
$
"出库库位已用完"
);
}
}
}
}
else
{
else
{
var
olist
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
var
olist
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
StoreMoveInfo
.
log
(
$
"检测到NG出库口有料库位:{string.Join("
,
", olist)}"
);
StoreMoveInfo
.
log
(
$
"检测到NG出库口有料库位:{string.Join("
,
", olist)}"
);
olist
=
RobotManage
.
AllPositionMapNumList
.
ToList
().
Where
(
p
=>
{
return
p
.
StartsWith
(
"L"
)
&&
!
p
.
StartsWith
(
"Lab"
)
&&
!
olist
.
Contains
(
p
);
}).
ToList
();
olist
=
RobotManage
.
AllPositionMapNumList
.
ToList
().
Where
(
p
=>
{
return
p
.
StartsWith
(
"L"
)
&&
!
p
.
StartsWith
(
"Lab"
)
&&
!
olist
.
Contains
(
p
);
}).
ToList
();
...
@@ -632,7 +648,7 @@ namespace DeviceLibrary
...
@@ -632,7 +648,7 @@ namespace DeviceLibrary
{
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StoreMoveInfo
.
log
(
$
"NG出库库位已完成"
);
StoreMoveInfo
.
log
(
$
"NG出库库位已完成"
);
return
;
return
;
}
}
}
}
...
@@ -641,7 +657,7 @@ namespace DeviceLibrary
...
@@ -641,7 +657,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut13
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut13
);
StoreMoveInfo
.
log
(
$
"没有出库任务了"
);
StoreMoveInfo
.
log
(
$
"没有出库任务了"
);
}
}
}
}
break
;
break
;
case
MoveStep
.
StoreOut13
:
case
MoveStep
.
StoreOut13
:
...
@@ -678,14 +694,14 @@ namespace DeviceLibrary
...
@@ -678,14 +694,14 @@ namespace DeviceLibrary
case
MoveStep
.
StoreOut17
:
case
MoveStep
.
StoreOut17
:
if
(
IOValue
(
IO_Type
.
Out_Drawer
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
Out_Drawer
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StoreMoveInfo
.
log
(
"抽屉已经上锁 newDrawer:"
+
newDrawer
);
StoreMoveInfo
.
log
(
"抽屉已经上锁 newDrawer:"
+
newDrawer
);
if
(!
newDrawer
)
if
(!
newDrawer
)
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
else
else
StoreMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
}
}
else
else
{
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut15
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut15
);
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
LOW
);
}
}
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
d28fa10
...
@@ -48,6 +48,9 @@ namespace TheMachine
...
@@ -48,6 +48,9 @@ namespace TheMachine
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
tabPage_ledtower
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage_ledtower
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
uC_LedConfig1
=
new
TheMachine
.
UC
.
UC_LedConfig
();
this
.
uC_LedConfig1
=
new
TheMachine
.
UC
.
UC_LedConfig
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
flowLayoutPanel1
.
SuspendLayout
();
this
.
flowLayoutPanel1
.
SuspendLayout
();
...
@@ -55,6 +58,7 @@ namespace TheMachine
...
@@ -55,6 +58,7 @@ namespace TheMachine
this
.
tp
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
tabPage_ledtower
.
SuspendLayout
();
this
.
tabPage_ledtower
.
SuspendLayout
();
this
.
panel2
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// timer1
// timer1
...
@@ -88,6 +92,7 @@ namespace TheMachine
...
@@ -88,6 +92,7 @@ namespace TheMachine
// flowLayoutPanel1
// flowLayoutPanel1
//
//
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
panel1
);
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
panel1
);
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
panel2
);
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
flowLayoutPanel1
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
flowLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
flowLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
flowLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
flowLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
...
@@ -103,7 +108,7 @@ namespace TheMachine
...
@@ -103,7 +108,7 @@ namespace TheMachine
this
.
panel1
.
Controls
.
Add
(
this
.
btn_testlabeling
);
this
.
panel1
.
Controls
.
Add
(
this
.
btn_testlabeling
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
473
,
460
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
473
,
247
);
this
.
panel1
.
TabIndex
=
15
;
this
.
panel1
.
TabIndex
=
15
;
//
//
// tp
// tp
...
@@ -157,7 +162,7 @@ namespace TheMachine
...
@@ -157,7 +162,7 @@ namespace TheMachine
// cb_labelingtestmoce
// cb_labelingtestmoce
//
//
this
.
cb_labelingtestmoce
.
AutoSize
=
true
;
this
.
cb_labelingtestmoce
.
AutoSize
=
true
;
this
.
cb_labelingtestmoce
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
331
);
this
.
cb_labelingtestmoce
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
253
);
this
.
cb_labelingtestmoce
.
Name
=
"cb_labelingtestmoce"
;
this
.
cb_labelingtestmoce
.
Name
=
"cb_labelingtestmoce"
;
this
.
cb_labelingtestmoce
.
Size
=
new
System
.
Drawing
.
Size
(
138
,
16
);
this
.
cb_labelingtestmoce
.
Size
=
new
System
.
Drawing
.
Size
(
138
,
16
);
this
.
cb_labelingtestmoce
.
TabIndex
=
14
;
this
.
cb_labelingtestmoce
.
TabIndex
=
14
;
...
@@ -171,7 +176,7 @@ namespace TheMachine
...
@@ -171,7 +176,7 @@ namespace TheMachine
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_printertest
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_printertest
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_labeledit
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_labeledit
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cb_labelselect
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cb_labelselect
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
1
86
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
1
12
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
340
,
126
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
340
,
126
);
this
.
groupBox1
.
TabIndex
=
12
;
this
.
groupBox1
.
TabIndex
=
12
;
...
@@ -218,7 +223,7 @@ namespace TheMachine
...
@@ -218,7 +223,7 @@ namespace TheMachine
// btn_testlabeling
// btn_testlabeling
//
//
this
.
btn_testlabeling
.
Enabled
=
false
;
this
.
btn_testlabeling
.
Enabled
=
false
;
this
.
btn_testlabeling
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
362
);
this
.
btn_testlabeling
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
275
);
this
.
btn_testlabeling
.
Name
=
"btn_testlabeling"
;
this
.
btn_testlabeling
.
Name
=
"btn_testlabeling"
;
this
.
btn_testlabeling
.
Size
=
new
System
.
Drawing
.
Size
(
201
,
38
);
this
.
btn_testlabeling
.
Size
=
new
System
.
Drawing
.
Size
(
201
,
38
);
this
.
btn_testlabeling
.
TabIndex
=
13
;
this
.
btn_testlabeling
.
TabIndex
=
13
;
...
@@ -229,7 +234,7 @@ namespace TheMachine
...
@@ -229,7 +234,7 @@ namespace TheMachine
// uC_SetUserPassword1
// uC_SetUserPassword1
//
//
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
484
,
5
);
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
258
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
482
,
309
);
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
482
,
309
);
...
@@ -256,6 +261,35 @@ namespace TheMachine
...
@@ -256,6 +261,35 @@ namespace TheMachine
this
.
uC_LedConfig1
.
TabIndex
=
7
;
this
.
uC_LedConfig1
.
TabIndex
=
7
;
this
.
uC_LedConfig1
.
Tag
=
"not"
;
this
.
uC_LedConfig1
.
Tag
=
"not"
;
//
//
// panel2
//
this
.
panel2
.
Controls
.
Add
(
this
.
button2
);
this
.
panel2
.
Controls
.
Add
(
this
.
button1
);
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
482
,
3
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
322
,
81
);
this
.
panel2
.
TabIndex
=
16
;
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
34
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button1
.
TabIndex
=
0
;
this
.
button1
.
Text
=
"入库取料"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// button2
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
95
,
34
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
button2
.
TabIndex
=
1
;
this
.
button2
.
Text
=
"扫码贴标"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// SettingControl
// SettingControl
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
@@ -272,6 +306,7 @@ namespace TheMachine
...
@@ -272,6 +306,7 @@ namespace TheMachine
this
.
tp
.
PerformLayout
();
this
.
tp
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
tabPage_ledtower
.
ResumeLayout
(
false
);
this
.
tabPage_ledtower
.
ResumeLayout
(
false
);
this
.
panel2
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -295,5 +330,8 @@ namespace TheMachine
...
@@ -295,5 +330,8 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
CheckBox
cb_labelingtestmoce
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_labelingtestmoce
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
FlowLayoutPanel
flowLayoutPanel1
;
private
System
.
Windows
.
Forms
.
FlowLayoutPanel
flowLayoutPanel1
;
private
System
.
Windows
.
Forms
.
Panel
panel2
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button2
;
}
}
}
}
TheMachine/SettingControl.cs
查看文件 @
d28fa10
using
CodeLibrary
;
using
CodeLibrary
;
using
ConfigHelper
;
using
ConfigHelper
;
using
DeviceLibrary
;
using
DeviceLibrary
;
using
Newtonsoft.Json
;
using
OnlineStore
;
using
OnlineStore
;
using
OnlineStore.ACSingleStore
;
using
OnlineStore.ACSingleStore
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
...
@@ -12,6 +13,7 @@ using System.Data;
...
@@ -12,6 +13,7 @@ using System.Data;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Security.Cryptography.X509Certificates
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
...
@@ -187,5 +189,33 @@ namespace TheMachine
...
@@ -187,5 +189,33 @@ namespace TheMachine
RobotManage
.
mainMachine
.
LabelingTestMode
=
cb_labelingtestmoce
.
Checked
;
RobotManage
.
mainMachine
.
LabelingTestMode
=
cb_labelingtestmoce
.
Checked
;
btn_testlabeling
.
Enabled
=
cb_labelingtestmoce
.
Checked
;
btn_testlabeling
.
Enabled
=
cb_labelingtestmoce
.
Checked
;
}
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
RobotManage
.
isRunning
||
RobotManage
.
mainMachine
.
runStatus
!=
RunStatus
.
Running
)
{
MessageBox
.
Show
(
"请先启动设备并完成回原"
);
}
//Setting_Init.Device_step_by_step_mode = true;
RobotManage
.
mainMachine
.
newDrawer
=
false
;
RobotManage
.
mainMachine
.
NGInfoList
=
new
List
<
ReelParam
>();
Setting_Init
.
Runtime_NGINFOLIST
=
JsonConvert
.
SerializeObject
(
RobotManage
.
mainMachine
.
NGInfoList
);
RobotManage
.
mainMachine
.
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
RobotManage
.
mainMachine
.
StoreMoveInfo
.
log
(
"手动开始取料"
);
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
RobotManage
.
isRunning
||
RobotManage
.
mainMachine
.
runStatus
!=
RunStatus
.
Running
)
{
MessageBox
.
Show
(
"请先启动设备并完成回原"
);
}
Setting_Init
.
Runtime_NGINFOLIST
=
JsonConvert
.
SerializeObject
(
RobotManage
.
mainMachine
.
NGInfoList
);
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
NewMove
(
MoveStep
.
Labeling01
);
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
log
(
"手动扫码"
);
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
TheMachine/TheMachine.csproj
查看文件 @
d28fa10
...
@@ -63,6 +63,9 @@
...
@@ -63,6 +63,9 @@
<Reference Include="Neotel.Rmaxis">
<Reference Include="Neotel.Rmaxis">
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath>
</Reference>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml.Linq" />
...
@@ -241,6 +244,7 @@
...
@@ -241,6 +244,7 @@
<DependentUpon>VisionStoreDetect.cs</DependentUpon>
<DependentUpon>VisionStoreDetect.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="app.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
...
...
TheMachine/VisionStoreDetect.cs
查看文件 @
d28fa10
...
@@ -116,6 +116,7 @@ namespace TheMachine
...
@@ -116,6 +116,7 @@ namespace TheMachine
{
{
// LogUtil.info("1");
// LogUtil.info("1");
//Common.DeepClone((Bitmap)pictureBox1.Image).Save("test.bmp");
//Common.DeepClone((Bitmap)pictureBox1.Image).Save("test.bmp");
CameraPointTest
.
Init
();
var
haslistStoreName
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
var
haslistStoreName
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
入口
);
LogUtil
.
info
(
"入口:"
+
string
.
Join
(
","
,
haslistStoreName
));
LogUtil
.
info
(
"入口:"
+
string
.
Join
(
","
,
haslistStoreName
));
haslistStoreName
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
出口
);
haslistStoreName
=
CameraPointTest
.
GetThingStoreName
(
TestStorePointPort
.
出口
);
...
...
TheMachine/packages.config
0 → 100644
查看文件 @
d28fa10
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Newtonsoft.Json"
version
=
"13.0.1"
targetFramework
=
"net472"
/>
</
packages
>
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论