Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20031_TinStorage
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6f641e7d
由
刘韬
编写于
2025-01-16 17:18:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
适配 新款 SO21637
1 个父辈
3c7363df
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
121 行增加
和
53 行删除
Common/Setting_Init.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/CameraPointTest.cs
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
DeviceLibrary/theMachine/MainMachine_Labeling.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MoveStep.cs
SO20031_TinStorage.sln
TheMachine/UC/uc_boxdebug.cs
Common/Setting_Init.cs
查看文件 @
6f641e7
...
@@ -70,10 +70,15 @@ namespace OnlineStore.Common
...
@@ -70,10 +70,15 @@ namespace OnlineStore.Common
[
MyConfigComment
(
"是否启用库位屏蔽"
)]
[
MyConfigComment
(
"是否启用库位屏蔽"
)]
public
static
MyConfig
<
bool
>
Device_DisableStorePosition
=
false
;
public
static
MyConfig
<
bool
>
Device_DisableStorePosition
=
false
;
[
MyConfigComment
(
"是否屏蔽RFID"
)]
public
static
MyConfig
<
bool
>
Device_Disable_RFID_Check
=
false
;
[
MyConfigComment
(
"超声波传感器液位距离"
)]
[
MyConfigComment
(
"超声波传感器液位距离"
)]
public
static
MyConfig
<
int
>
Device_Liquid_level_distance
=
180
;
public
static
MyConfig
<
int
>
Device_Liquid_level_distance
=
180
;
[
MyConfigComment
(
"取料检测位置,取料低点p3-偏移量"
)]
public
static
MyConfig
<
int
>
Device_TinDetect_Offset
=
205000
;
[
MyConfigComment
(
"打印机IP地址"
)]
[
MyConfigComment
(
"打印机IP地址"
)]
public
static
MyConfig
<
string
>
Printer_IP
=
"192.168.4.21"
;
public
static
MyConfig
<
string
>
Printer_IP
=
"192.168.4.21"
;
[
MyConfigComment
(
"打印机标签模版"
)]
[
MyConfigComment
(
"打印机标签模版"
)]
...
@@ -112,5 +117,15 @@ namespace OnlineStore.Common
...
@@ -112,5 +117,15 @@ namespace OnlineStore.Common
public
static
MyConfig
<
int
>
CameraScan_QRCodeCount
=
3
;
public
static
MyConfig
<
int
>
CameraScan_QRCodeCount
=
3
;
[
MyConfigComment
(
"二维码扫码超时毫秒"
)]
[
MyConfigComment
(
"二维码扫码超时毫秒"
)]
public
static
MyConfig
<
int
>
CameraScan_CodeTimeOut
=
3000
;
public
static
MyConfig
<
int
>
CameraScan_CodeTimeOut
=
3000
;
[
MyConfigComment
(
"设备型号"
)]
public
static
MyConfig
<
Module_SO
>
Module_No
=
Module_SO
.
SO20031
;
}
public
enum
Module_SO
{
SO20031
,
SO21637
}
}
}
}
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
6f641e7
...
@@ -56,7 +56,10 @@ namespace DeviceLibrary
...
@@ -56,7 +56,10 @@ namespace DeviceLibrary
// Monitor.Exit(serverConnectTimer);
// Monitor.Exit(serverConnectTimer);
// }
// }
// return;
// return;
//}
//}\
if
(!
server
.
ToLower
().
StartsWith
(
"http"
))
return
;
try
try
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
6f641e7
...
@@ -144,11 +144,11 @@ namespace DeviceLibrary
...
@@ -144,11 +144,11 @@ namespace DeviceLibrary
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS05
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS05
);
if
(
From
.
posid
!=
MainMachine
.
LabelP
)
if
(
From
.
posid
!=
MainMachine
.
LabelP
)
{
{
var
zp2
=
From
.
Z_Axis_P3
-
205000
;
var
zp2
=
From
.
Z_Axis_P3
-
Setting_Init
.
Device_TinDetect_Offset
;
if
(
zp2
<
0
)
if
(
zp2
<
0
)
zp2
=
0
;
zp2
=
0
;
Z_Axis
.
AbsMove
(
MoveInfo
,
zp2
,
Config
.
Z_Axis_P1_speed
);
Z_Axis
.
AbsMove
(
MoveInfo
,
zp2
,
Config
.
Z_Axis_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:Z轴到达取料
前点,{From.Z_Axis_P
2}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:Z轴到达取料
检测点,{From.Z_Axis_P3}-{Setting_Init.Device_TinDetect_Offset}={zp
2}"
);
}
}
RobotManage
.
mainMachine
.
CylinderMove
(
MoveInfo
,
IO_Type
.
Taking_Release
,
IO_Type
.
Taking_Clamp
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
CylinderMove
(
MoveInfo
,
IO_Type
.
Taking_Release
,
IO_Type
.
Taking_Clamp
,
IO_VALUE
.
LOW
);
MoveInfo
.
log
(
$
"{storeMoveType}:松开夹爪"
);
MoveInfo
.
log
(
$
"{storeMoveType}:松开夹爪"
);
...
@@ -248,7 +248,7 @@ namespace DeviceLibrary
...
@@ -248,7 +248,7 @@ namespace DeviceLibrary
}
}
else
if
(
To
.
posid
!=
MainMachine
.
LabelP
)
else
if
(
To
.
posid
!=
MainMachine
.
LabelP
)
{
{
var
zp2
=
To
.
Z_Axis_P3
-
205000
;
var
zp2
=
To
.
Z_Axis_P3
-
Setting_Init
.
Device_TinDetect_Offset
;
if
(
zp2
<
0
)
if
(
zp2
<
0
)
zp2
=
0
;
zp2
=
0
;
Z_Axis
.
AbsMove
(
MoveInfo
,
zp2
,
Config
.
Z_Axis_P1_speed
);
Z_Axis
.
AbsMove
(
MoveInfo
,
zp2
,
Config
.
Z_Axis_P1_speed
);
...
...
DeviceLibrary/theMachine/CameraPointTest.cs
查看文件 @
6f641e7
...
@@ -3,6 +3,7 @@ using Newtonsoft.Json;
...
@@ -3,6 +3,7 @@ using Newtonsoft.Json;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Drawing.Imaging
;
using
System.Drawing.Imaging
;
using
System.IO
;
using
System.IO
;
...
@@ -189,6 +190,7 @@ namespace DeviceLibrary
...
@@ -189,6 +190,7 @@ namespace DeviceLibrary
var
v
=
cl
.
Average
(
cc
=>
cc
.
V
);
var
v
=
cl
.
Average
(
cc
=>
cc
.
V
);
var
has
=
s
>
CameraData
[
Name
].
S
&&
h
>
60
&&
h
<
200
;
var
has
=
s
>
CameraData
[
Name
].
S
&&
h
>
60
&&
h
<
200
;
Debug
.
WriteLine
(
$
"TestStorePoint: tp:{tp},haslist:{haslist.Count}, h:{h}, s:{s}, v:{v}"
);
haslist
.
Add
(
has
?
1
:
0
);
haslist
.
Add
(
has
?
1
:
0
);
}
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
查看文件 @
6f641e7
...
@@ -50,11 +50,11 @@ namespace DeviceLibrary
...
@@ -50,11 +50,11 @@ namespace DeviceLibrary
switch
(
AIOTMoveInfo
.
MoveStep
)
switch
(
AIOTMoveInfo
.
MoveStep
)
{
{
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
if
(
IsInStoreReady
)
//
if (IsInStoreReady)
{
//
{
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
//
AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn01);
AIOTMoveInfo
.
log
(
$
"入库料盘已准备好"
);
//
AIOTMoveInfo.log($"入库料盘已准备好");
}
//
}
break
;
break
;
case
MoveStep
.
StoreIn01
:
case
MoveStep
.
StoreIn01
:
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn02
);
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn02
);
...
...
DeviceLibrary/theMachine/MainMachine_Labeling.cs
查看文件 @
6f641e7
...
@@ -123,7 +123,7 @@ namespace DeviceLibrary
...
@@ -123,7 +123,7 @@ namespace DeviceLibrary
LabelingMoveInfo
.
log
(
$
"获取库位失败,送到NG口:{LabelingMoveInfo.MoveParam.NgMsg}"
);
LabelingMoveInfo
.
log
(
$
"获取库位失败,送到NG口:{LabelingMoveInfo.MoveParam.NgMsg}"
);
return
;
return
;
}
}
if
(
LabelingMoveInfo
.
MoveParam
.
usedCount
>=
1
)
if
(
LabelingMoveInfo
.
MoveParam
.
usedCount
>=
1
&&
Setting_Init
.
Module_No
.
Val
!=
Module_SO
.
SO21637
)
{
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling57
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling57
);
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
LabelPasteFinish
;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
LabelPasteFinish
;
...
@@ -242,10 +242,10 @@ namespace DeviceLibrary
...
@@ -242,10 +242,10 @@ namespace DeviceLibrary
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling12
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling12
);
LabelingMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
LabelingMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
LabelingMoveInfo
.
log
(
"打印成功,等待标签被取走"
);
LabelingMoveInfo
.
log
(
"打印成功,等待标签被取走"
);
Task
.
Run
(()
=>
{
//
Task.Run(() => {
Task
.
Delay
(
2000
).
Wait
();
//
Task.Delay(2000).Wait();
IOMove
(
IO_Type
.
Label_TakeBlow
,
IO_VALUE
.
HIGH
,
false
,
1000
);
//
IOMove(IO_Type.Label_TakeBlow, IO_VALUE.HIGH, false, 1000);
});
//
});
}
}
else
else
...
@@ -271,7 +271,7 @@ namespace DeviceLibrary
...
@@ -271,7 +271,7 @@ namespace DeviceLibrary
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
HIGH
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
HIGH
);
LabelingMoveInfo
.
log
(
"接标台上升"
);
LabelingMoveInfo
.
log
(
"接标台上升"
);
}
}
else
{
else
if
(
LabelingMoveInfo
.
IsTimeOut
(
2
))
{
Msg
.
add
(
crc
.
GetString
(
"Res0173.8a024375"
,
"没有检测到打印出的标签"
),
MsgLevel
.
alarm
,
ErrInfo
.
LabelInPaste
);
Msg
.
add
(
crc
.
GetString
(
"Res0173.8a024375"
,
"没有检测到打印出的标签"
),
MsgLevel
.
alarm
,
ErrInfo
.
LabelInPaste
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling10
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling10
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
LOW
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
LOW
);
...
@@ -287,7 +287,8 @@ namespace DeviceLibrary
...
@@ -287,7 +287,8 @@ namespace DeviceLibrary
case
MoveStep
.
Labeling14
:
case
MoveStep
.
Labeling14
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling15
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling15
);
IOMove
(
IO_Type
.
Label_Vacuum
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Label_Vacuum
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Label_PasteBlow
,
IO_VALUE
.
HIGH
);
if
(
Setting_Init
.
Module_No
.
Val
==
Module_SO
.
SO20031
)
IOMove
(
IO_Type
.
Label_PasteBlow
,
IO_VALUE
.
HIGH
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Labeling_Down
,
IO_Type
.
Labeling_Up
,
IO_VALUE
.
LOW
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Labeling_Down
,
IO_Type
.
Labeling_Up
,
IO_VALUE
.
LOW
);
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
...
@@ -306,6 +307,12 @@ namespace DeviceLibrary
...
@@ -306,6 +307,12 @@ namespace DeviceLibrary
case
MoveStep
.
Labeling50
:
case
MoveStep
.
Labeling50
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling51
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling51
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Labeling_Left
,
IO_Type
.
Labeling_Right
,
IO_VALUE
.
LOW
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Labeling_Left
,
IO_Type
.
Labeling_Right
,
IO_VALUE
.
LOW
);
if
(
Setting_Init
.
Module_No
.
Val
==
Module_SO
.
SO21637
)
{
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_Back
,
IO_Type
.
Label_Dock_Front
,
IO_VALUE
.
HIGH
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Label_Dock_Down
,
IO_Type
.
Label_Dock_Up
,
IO_VALUE
.
LOW
);
LabelingMoveInfo
.
log
(
"SO21637接标台前移动"
);
}
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
break
;
break
;
case
MoveStep
.
Labeling51
:
case
MoveStep
.
Labeling51
:
...
@@ -324,13 +331,22 @@ namespace DeviceLibrary
...
@@ -324,13 +331,22 @@ namespace DeviceLibrary
//IOMove(IO_Type.Label_Vacuum, IO_VALUE.LOW);
//IOMove(IO_Type.Label_Vacuum, IO_VALUE.LOW);
RobotManage
.
UserPause
(
crc
.
GetString
(
"Res0167.8453b300"
,
"取标失败"
));
RobotManage
.
UserPause
(
crc
.
GetString
(
"Res0167.8453b300"
,
"取标失败"
));
return
;
return
;
}
if
(
Setting_Init
.
Module_No
.
Val
==
Module_SO
.
SO21637
)
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling54_SO21637
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Labeling_Down
,
IO_Type
.
Labeling_Up
,
IO_VALUE
.
LOW
);
//IOMove(IO_Type.Label_PasteBlow, IO_VALUE.HIGH);
LabelingMoveInfo
.
log
(
"SO21637,贴标流程"
);
}
else
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling52
);
CylinderMove
(
null
,
IO_Type
.
Labeling_Down
,
IO_Type
.
Labeling_Up
,
IO_VALUE
.
LOW
);
LabelingMoveInfo
.
log
(
"SO20031,贴标流程"
);
}
}
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling52
);
CylinderMove
(
null
,
IO_Type
.
Labeling_Down
,
IO_Type
.
Labeling_Up
,
IO_VALUE
.
LOW
);
//IOMove(IO_Type.Label_PasteBlow, IO_VALUE.HIGH);
//Setting_Init.Runtime_Step = Runtime_StepE.LabelGot;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
LabelPaste
;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
LabelPaste
;
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
break
;
break
;
case
MoveStep
.
Labeling52
:
case
MoveStep
.
Labeling52
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling52_2
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling52_2
);
...
@@ -363,6 +379,20 @@ namespace DeviceLibrary
...
@@ -363,6 +379,20 @@ namespace DeviceLibrary
RotateEquip
.
TurnDouble
();
RotateEquip
.
TurnDouble
();
}
}
break
;
break
;
case
MoveStep
.
Labeling54_SO21637
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling54_SO21637_2
);
IOMove
(
IO_Type
.
Label_PasteBlow
,
IO_VALUE
.
HIGH
);
LabelingMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LabelingMoveInfo
.
log
(
"SO21637,贴标流程2"
);
break
;
case
MoveStep
.
Labeling54_SO21637_2
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling56
);
IOMove
(
IO_Type
.
Label_Vacuum
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
Label_PasteBlow
,
IO_VALUE
.
LOW
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Labeling_Down
,
IO_Type
.
Labeling_Up
,
IO_VALUE
.
HIGH
);
//RotateEquip.TurnDegree(90);
LabelingMoveInfo
.
log
(
"SO21637,贴标流程3"
);
break
;
case
MoveStep
.
Labeling55
:
case
MoveStep
.
Labeling55
:
if
(
RotateEquip
.
TurnWork
.
IsCompleted
)
if
(
RotateEquip
.
TurnWork
.
IsCompleted
)
{
{
...
@@ -373,7 +403,7 @@ namespace DeviceLibrary
...
@@ -373,7 +403,7 @@ namespace DeviceLibrary
}
}
break
;
break
;
case
MoveStep
.
Labeling56
:
case
MoveStep
.
Labeling56
:
if
(
RotateEquip
.
TurnWork
.
IsCompleted
)
if
(
RotateEquip
.
TurnWork
==
null
||
RotateEquip
.
TurnWork
.
IsCompleted
)
{
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling57
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling57
);
if
(
LabelingTestMode
)
if
(
LabelingTestMode
)
...
@@ -391,6 +421,8 @@ namespace DeviceLibrary
...
@@ -391,6 +421,8 @@ namespace DeviceLibrary
if
(
RotateEquip
.
WaitStatus
(
null
))
if
(
RotateEquip
.
WaitStatus
(
null
))
{
{
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling58
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Labeling58
);
RobotManage
.
mainMachine
.
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
LabelingMoveInfo
.
log
(
"夹抓释放"
);
}
}
break
;
break
;
case
MoveStep
.
Labeling58
:
case
MoveStep
.
Labeling58
:
...
@@ -399,7 +431,7 @@ namespace DeviceLibrary
...
@@ -399,7 +431,7 @@ namespace DeviceLibrary
CylinderMove
(
null
,
IO_Type
.
Labeling_Left
,
IO_Type
.
Labeling_Right
,
IO_VALUE
.
HIGH
);
CylinderMove
(
null
,
IO_Type
.
Labeling_Left
,
IO_Type
.
Labeling_Right
,
IO_VALUE
.
HIGH
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Tin_Dock_Left
,
IO_Type
.
Tin_Dock_Right
,
IO_VALUE
.
LOW
);
CylinderMove
(
LabelingMoveInfo
,
IO_Type
.
Tin_Dock_Left
,
IO_Type
.
Tin_Dock_Right
,
IO_VALUE
.
LOW
);
//CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.LOW);
//CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.LOW);
//
LabelingMoveInfo.log("锡膏横移到左侧");
LabelingMoveInfo
.
log
(
"锡膏横移到左侧"
);
break
;
break
;
case
MoveStep
.
Labeling59
:
case
MoveStep
.
Labeling59
:
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
LabelingMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
6f641e7
...
@@ -240,7 +240,7 @@ namespace DeviceLibrary
...
@@ -240,7 +240,7 @@ namespace DeviceLibrary
if
(!
boxTransport
.
IsComplateOrFree
)
if
(!
boxTransport
.
IsComplateOrFree
)
break
;
break
;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
if
(
StoreMoveInfo
.
MoveParam
.
usedCount
==
0
)
if
(
StoreMoveInfo
.
MoveParam
.
usedCount
==
0
&&
!
Setting_Init
.
Device_Disable_RFID_Check
)
{
{
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
);
...
@@ -482,48 +482,54 @@ namespace DeviceLibrary
...
@@ -482,48 +482,54 @@ namespace DeviceLibrary
//ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreBoxEnd);
//ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreBoxEnd);
bool
issame
=
false
;
bool
issame
=
false
;
string
ds
=
""
;
string
ds
=
""
;
for
(
int
i
=
0
;
i
<
15
;
i
++
)
if
(!
Setting_Init
.
Device_Disable_RFID_Check
)
{
{
if
(
RobotManage
.
RFID
.
ReadEPC
(
16
,
out
byte
[]
data
))
for
(
int
i
=
0
;
i
<
15
;
i
++)
{
if
(
data
[
0
]
!=
0xFF
)
{
ds
=
Encoding
.
ASCII
.
GetString
(
data
).
Trim
();
var
mds
=
ds
;
if
(
mds
.
StartsWith
(
"S"
))
mds
=
mds
.
Substring
(
1
);
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
mds
)
>
-
1
)
{
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
;
StoreMoveInfo
.
log
(
"读取到 RFID:"
+
ds
+
" , "
+
RobotManage
.
RFID
.
HexBuff
(
data
));
issame
=
true
;
break
;
}
}
}
if
(!
issame
)
{
{
if
(
RobotManage
.
RFID
2
.
ReadEPC
(
16
,
out
data
))
if
(
RobotManage
.
RFID
.
ReadEPC
(
16
,
out
byte
[]
data
))
{
{
if
(
data
[
0
]
!=
0xFF
)
if
(
data
[
0
]
!=
0xFF
)
{
{
ds
=
Encoding
.
ASCII
.
GetString
(
data
).
Trim
();
var
mds
=
ds
;
var
mds
=
ds
;
if
(
mds
.
StartsWith
(
"S"
))
if
(
mds
.
StartsWith
(
"S"
))
mds
=
mds
.
Substring
(
1
);
mds
=
mds
.
Substring
(
1
);
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
mds
)
>
-
1
)
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
mds
)
>
-
1
)
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
ds
)
>
-
1
)
{
{
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
;
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
;
StoreMoveInfo
.
log
(
"读取到 RFID:"
+
ds
+
" , "
+
RobotManage
.
RFID
.
HexBuff
(
data
));
StoreMoveInfo
.
log
(
"读取到 RFID2:"
+
ds
+
" , "
+
RobotManage
.
RFID2
.
HexBuff
(
data
));
issame
=
true
;
issame
=
true
;
break
;
break
;
}
}
}
}
if
(!
issame
)
{
if
(
RobotManage
.
RFID2
.
ReadEPC
(
16
,
out
data
))
{
if
(
data
[
0
]
!=
0xFF
)
{
var
mds
=
ds
;
if
(
mds
.
StartsWith
(
"S"
))
mds
=
mds
.
Substring
(
1
);
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
mds
)
>
-
1
)
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
ds
)
>
-
1
)
{
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
;
StoreMoveInfo
.
log
(
"读取到 RFID2:"
+
ds
+
" , "
+
RobotManage
.
RFID2
.
HexBuff
(
data
));
issame
=
true
;
break
;
}
}
}
}
}
}
Thread
.
Sleep
(
200
);
}
}
Thread
.
Sleep
(
200
);
}
}
else
{
issame
=
true
;
}
if
(!
issame
)
if
(!
issame
)
{
{
StoreMoveInfo
.
log
(
"读取到的RFID与物料信息不符 读取到 RFID:"
+
ds
);
StoreMoveInfo
.
log
(
"读取到的RFID与物料信息不符 读取到 RFID:"
+
ds
);
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
6f641e7
...
@@ -135,6 +135,8 @@ namespace DeviceLibrary
...
@@ -135,6 +135,8 @@ namespace DeviceLibrary
Labeling52_2
,
Labeling52_2
,
Labeling53
,
Labeling53
,
Labeling54
,
Labeling54
,
Labeling54_SO21637
,
Labeling54_SO21637_2
,
Labeling55
,
Labeling55
,
Labeling56
,
Labeling56
,
Labeling57
,
Labeling57
,
...
...
SO20031_TinStorage.sln
查看文件 @
6f641e7
...
@@ -19,6 +19,7 @@ Global
...
@@ -19,6 +19,7 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Release|Any CPU = Release|Any CPU
Description = 锡膏料仓 SO1202/SO20031 SO1540/SO21637
EndGlobalSection
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
...
...
TheMachine/UC/uc_boxdebug.cs
查看文件 @
6f641e7
...
@@ -53,8 +53,15 @@ namespace TheMachine
...
@@ -53,8 +53,15 @@ namespace TheMachine
{
{
FillBoxPos
();
FillBoxPos
();
timer1
.
Enabled
=
true
;
timer1
.
Enabled
=
true
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
return
;
return
;
}
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
FillBoxPos
();
}
private
void
Store_InOutEndProcessEvent
(
string
arg1
,
StoreMoveType
arg2
,
bool
arg3
)
private
void
Store_InOutEndProcessEvent
(
string
arg1
,
StoreMoveType
arg2
,
bool
arg3
)
{
{
//LogUtil.info($"出入库完成状态:{arg2},库位:{arg1}");
//LogUtil.info($"出入库完成状态:{arg2},库位:{arg1}");
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论