Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20031_TinStorage
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0a13027d
由
刘韬
编写于
2024-04-08 13:21:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
8fbd789e
全部展开
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
312 行增加
和
90 行删除
Common/Runtime_Step.cs
DeviceLibrary/DeviceLibrary/LimitedRotary.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/JobList.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Labeling.cs
DeviceLibrary/theMachine/MainMachine_RFIDSelftest.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MoveStep.cs
DeviceLibrary/userControl/AxisMoveControl.cs
TheMachine/Form1.cs
TheMachine/IOControls.Designer.cs
TheMachine/IOControls.cs
TheMachine/Program.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/UC/CylinderButton.cs
Common/Runtime_Step.cs
查看文件 @
0a13027
...
@@ -24,7 +24,7 @@ namespace OnlineStore
...
@@ -24,7 +24,7 @@ namespace OnlineStore
/// <summary>
/// <summary>
/// 标签已获取
/// 标签已获取
/// </summary>
/// </summary>
LabelGot
,
//
LabelGot,
/// <summary>
/// <summary>
/// 标签中
/// 标签中
/// </summary>
/// </summary>
...
...
DeviceLibrary/DeviceLibrary/LimitedRotary.cs
查看文件 @
0a13027
...
@@ -49,7 +49,7 @@ namespace DeviceLibrary
...
@@ -49,7 +49,7 @@ namespace DeviceLibrary
}
}
}
}
Task
<
bool
>
work
;
Task
<
bool
>
work
;
public
Task
<
bool
>
TurnToEnd
(
bool
isHorizontal
,
bool
needclamp
=
false
)
public
Task
<
bool
>
TurnToEnd
(
bool
isHorizontal
,
bool
needclamp
=
false
,
double
speedratio
=
1
)
{
{
return
work
=
Task
.
Run
(()
=>
return
work
=
Task
.
Run
(()
=>
{
{
...
@@ -79,6 +79,7 @@ namespace DeviceLibrary
...
@@ -79,6 +79,7 @@ namespace DeviceLibrary
}
}
}
}
else
{
else
{
speedratio
=
1
;
RobotManage
.
mainMachine
.
CylinderMove
(
null
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
CylinderMove
(
null
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
while
(!
IOManager
.
IOValue
(
IO_Type
.
Tin_Dock_Rotate_Clamp
).
Equals
(
IO_VALUE
.
LOW
))
while
(!
IOManager
.
IOValue
(
IO_Type
.
Tin_Dock_Rotate_Clamp
).
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -90,7 +91,7 @@ namespace DeviceLibrary
...
@@ -90,7 +91,7 @@ namespace DeviceLibrary
len
=
len
*
-
1
;
len
=
len
*
-
1
;
if
(!
axisBean
.
IsServeoOn
)
if
(!
axisBean
.
IsServeoOn
)
axisBean
.
Open
(
true
,
out
string
msg
);
axisBean
.
Open
(
true
,
out
string
msg
);
axisBean
.
RelMove
(
len
,
(
double
)
upspeed
);
axisBean
.
RelMove
(
len
,
(
double
)
upspeed
*
speedratio
);
//moveInfo.log($"{checkio}");
//moveInfo.log($"{checkio}");
while
(!
IOManager
.
IOValue
(
checkio
).
Equals
(
IO_VALUE
.
HIGH
))
while
(!
IOManager
.
IOValue
(
checkio
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
...
@@ -127,7 +128,7 @@ namespace DeviceLibrary
...
@@ -127,7 +128,7 @@ namespace DeviceLibrary
});
});
}
}
public
Task
TurnWork
;
public
Task
TurnWork
;
public
Task
TurnDegree
(
int
degree
)
{
public
Task
TurnDegree
(
int
degree
,
double
speedratio
=
1
)
{
return
TurnWork
=
Task
.
Run
(()=>
return
TurnWork
=
Task
.
Run
(()=>
{
{
...
@@ -149,7 +150,7 @@ namespace DeviceLibrary
...
@@ -149,7 +150,7 @@ namespace DeviceLibrary
TurnToEnd
(
true
).
Wait
();
TurnToEnd
(
true
).
Wait
();
}
}
//moveInfo.log($"len:{len}");
//moveInfo.log($"len:{len}");
axisBean
.
RelMove
(
len
*-
1
,
(
double
)
upspeed
);
axisBean
.
RelMove
(
len
*-
1
,
(
double
)
upspeed
*
speedratio
);
Task
.
Delay
(
50
).
Wait
();
Task
.
Delay
(
50
).
Wait
();
while
(
axisBean
.
IsBusy
)
{
while
(
axisBean
.
IsBusy
)
{
Task
.
Delay
(
50
).
Wait
();
Task
.
Delay
(
50
).
Wait
();
...
@@ -202,7 +203,7 @@ namespace DeviceLibrary
...
@@ -202,7 +203,7 @@ namespace DeviceLibrary
TurnToEnd
(
false
).
Wait
();
TurnToEnd
(
false
).
Wait
();
});
});
}
}
public
void
TurnDouble
()
public
void
TurnDouble
(
double
speedratio
=
1
)
{
{
TurnWork
=
Task
.
Run
(()
=>
TurnWork
=
Task
.
Run
(()
=>
{
{
...
@@ -226,9 +227,9 @@ namespace DeviceLibrary
...
@@ -226,9 +227,9 @@ namespace DeviceLibrary
{
{
Task
.
Delay
(
100
).
Wait
();
Task
.
Delay
(
100
).
Wait
();
}
}
TurnToEnd
(
true
,
true
).
Wait
();
TurnToEnd
(
true
,
true
,
speedratio
).
Wait
();
TurnToEnd
(
false
,
false
).
Wait
();
TurnToEnd
(
false
,
false
).
Wait
();
TurnToEnd
(
true
,
true
).
Wait
();
TurnToEnd
(
true
,
true
,
speedratio
).
Wait
();
//TurnToEnd(false, false).Wait();
//TurnToEnd(false, false).Wait();
//TurnDegree(-20).Wait();
//TurnDegree(-20).Wait();
RobotManage
.
mainMachine
.
CylinderMove
(
null
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
CylinderMove
(
null
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
0a13027
...
@@ -471,6 +471,9 @@ namespace DeviceLibrary
...
@@ -471,6 +471,9 @@ namespace DeviceLibrary
//postId格式BoxId#位置
//postId格式BoxId#位置
string
posId
=
data
[
ParamDefine
.
posId
].
ToString
();
string
posId
=
data
[
ParamDefine
.
posId
].
ToString
();
string
usedCountstr
=
data
[
"usedCount"
].
ToString
();
string
usedCountstr
=
data
[
"usedCount"
].
ToString
();
string
expireDate
=
data
[
"expiredDate"
].
ToString
();
string
exposureStartDate
=
data
[
"exposureStartDate"
].
ToString
();
string
stabilizationEndDate
=
data
[
"stabilizationEndDate"
].
ToString
();
//int storeId = int.Parse(posArray[0]);
//int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
//根据发送的posId获取位置列表
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posId
);
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posId
);
...
@@ -488,8 +491,11 @@ namespace DeviceLibrary
...
@@ -488,8 +491,11 @@ namespace DeviceLibrary
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
);
JobInfo
inStoreJob
=
new
JobInfo
(
message
,
posId
);
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
PosID
=
inStoreJob
.
PosId
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
PosID
=
inStoreJob
.
PosId
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
usedCount
=
usedCount
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
usedCount
=
usedCount
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
Time1
=
exposureStartDate
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
Time2
=
stabilizationEndDate
;
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveParam
.
Time3
=
expireDate
;
//如果当前正在出入库中,需要记录下来,等待空闲时执行
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
",usedCount"
+
usedCount
+
"】二维码【"
+
message
+
"】 开始入库!"
);
LogUtil
.
info
(
StoreName
+
" 收到服务器入库命令:库位号【"
+
posId
+
",usedCount"
+
usedCount
+
"
,exposureStartDate="
+
exposureStartDate
+
",stabilizationEndDate="
+
stabilizationEndDate
+
",expireDate"
+
expireDate
+
"
】二维码【"
+
message
+
"】 开始入库!"
);
}
}
else
else
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
0a13027
...
@@ -263,7 +263,7 @@ namespace DeviceLibrary
...
@@ -263,7 +263,7 @@ namespace DeviceLibrary
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0064"
,
"放料时发现库位已经有料,请检查."
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
"Res0064"
,
"放料时发现库位已经有料,请检查."
),
MsgLevel
.
alarm
);
MoveInfo
.
log
(
$
"放料时发现库位已经有料,请检查."
);
MoveInfo
.
log
(
$
"放料时发现库位已经有料,请检查."
);
//RobotManage.UserPause(crc.GetString("Res006
5
", "放料时发现库位已经有料,请检查"));
//RobotManage.UserPause(crc.GetString("Res006
4
", "放料时发现库位已经有料,请检查"));
}
}
else
else
{
{
...
...
DeviceLibrary/theMachine/JobList.cs
查看文件 @
0a13027
...
@@ -49,6 +49,12 @@ namespace DeviceLibrary
...
@@ -49,6 +49,12 @@ namespace DeviceLibrary
public
void
ClearLastPosid
()
{
public
void
ClearLastPosid
()
{
lastoutpos
=
""
;
lastoutpos
=
""
;
}
}
public
void
ClearAll
()
{
LogUtil
.
info
(
$
"清除所有缓存出库任务"
);
lastoutpos
=
""
;
jobInfos
=
new
ConcurrentQueue
<
JobInfo
>();
}
}
}
public
class
JobInfo
public
class
JobInfo
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
0a13027
...
@@ -174,6 +174,9 @@ namespace DeviceLibrary
...
@@ -174,6 +174,9 @@ namespace DeviceLibrary
private
(
bool
,
string
)
Y_Axis_interference
(
int
from
,
int
to
)
private
(
bool
,
string
)
Y_Axis_interference
(
int
from
,
int
to
)
{
{
if
(!
IsAllDoorClosed
())
return
(
true
,
"Safe door was not closed, and this axis cannot be moved"
);
if
(
Z_Axis
.
IsInPosition
(
Config
.
Z_Axis_P1
))
{
if
(
Z_Axis
.
IsInPosition
(
Config
.
Z_Axis_P1
))
{
return
(
false
,
""
);
return
(
false
,
""
);
}
}
...
@@ -183,6 +186,9 @@ namespace DeviceLibrary
...
@@ -183,6 +186,9 @@ namespace DeviceLibrary
private
(
bool
,
string
)
X_Axis_interference
(
int
from
,
int
to
)
private
(
bool
,
string
)
X_Axis_interference
(
int
from
,
int
to
)
{
{
if
(!
IsAllDoorClosed
())
return
(
true
,
"Safe door was not closed, and this axis cannot be moved"
);
if
(
Z_Axis
.
IsInPosition
(
Config
.
Z_Axis_P1
))
if
(
Z_Axis
.
IsInPosition
(
Config
.
Z_Axis_P1
))
{
{
return
(
false
,
""
);
return
(
false
,
""
);
...
@@ -193,6 +199,10 @@ namespace DeviceLibrary
...
@@ -193,6 +199,10 @@ namespace DeviceLibrary
private
(
bool
,
string
)
Z_Axis_interference
(
int
arg1
,
int
arg2
)
private
(
bool
,
string
)
Z_Axis_interference
(
int
arg1
,
int
arg2
)
{
{
if
(!
IsAllDoorClosed
())
return
(
true
,
"Safe door was not closed, and this axis cannot be moved"
);
if
(
X_Axis
.
IsBusy
)
if
(
X_Axis
.
IsBusy
)
return
(
true
,
"The other axes are moving, and this axis cannot be moved"
);
return
(
true
,
"The other axes are moving, and this axis cannot be moved"
);
if
(
Y_Axis
.
IsBusy
)
if
(
Y_Axis
.
IsBusy
)
...
@@ -200,6 +210,22 @@ namespace DeviceLibrary
...
@@ -200,6 +210,22 @@ namespace DeviceLibrary
return
(
false
,
""
);
return
(
false
,
""
);
}
}
public
bool
IsAllDoorClosed
()
{
if
(
IOValue
(
IO_Type
.
PrinterDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
return
false
;
}
if
(
IOValue
(
IO_Type
.
LeftDoor_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
if
(
IOValue
(
IO_Type
.
RightDoor_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
false
;
}
return
true
;
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
{
StoreMoveInfo
.
Name
=
crc
.
GetString
(
"Res0088"
,
"进出库调度"
);
StoreMoveInfo
.
Name
=
crc
.
GetString
(
"Res0088"
,
"进出库调度"
);
...
@@ -234,12 +260,15 @@ namespace DeviceLibrary
...
@@ -234,12 +260,15 @@ namespace DeviceLibrary
if
(
runStatus
==
RunStatus
.
Running
)
if
(
runStatus
==
RunStatus
.
Running
)
{
{
boxTransport
.
Process
();
boxTransport
.
Process
();
if
(!
LabelingTestMode
)
{
if
(
RobotManage
.
InoutDebugMode
)
if
(
RobotManage
.
InoutDebugMode
)
AutoInOutTestProcess
();
AutoInOutTestProcess
();
else
if
(
selfAuditMode
)
else
if
(
selfAuditMode
)
TFIDSelfTestProcess
();
TFIDSelfTestProcess
();
else
else
StoreDemoProcess
();
StoreDemoProcess
();
}
LabelingProcess
();
LabelingProcess
();
}
}
...
@@ -316,6 +345,7 @@ namespace DeviceLibrary
...
@@ -316,6 +345,7 @@ namespace DeviceLibrary
Alarm
(
AlarmType
.
None
);
Alarm
(
AlarmType
.
None
);
StopMove
(
true
);
StopMove
(
true
);
LedProcess
(
null
);
LedProcess
(
null
);
OutStoreJobList
.
ClearAll
();
Msg
.
add
(
""
,
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
Msg
.
add
(
""
,
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
}
}
...
@@ -359,7 +389,7 @@ namespace DeviceLibrary
...
@@ -359,7 +389,7 @@ namespace DeviceLibrary
ResetMoveInfo
.
log
(
"锁定抽屉"
);
ResetMoveInfo
.
log
(
"锁定抽屉"
);
IOMove
(
IO_Type
.
Entry_Drawer_Lock
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Entry_Drawer_Lock
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
Label_PasteBlow
,
IO_VALUE
.
LOW
);
//
IOMove(IO_Type.Label_PasteBlow, IO_VALUE.LOW);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
Tin_Dock_Rotate_Release
,
IO_Type
.
Tin_Dock_Rotate_Clamp
,
IO_VALUE
.
LOW
);
Msg
.
add
(
""
,
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
Msg
.
add
(
""
,
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
break
;
break
;
...
@@ -489,7 +519,10 @@ namespace DeviceLibrary
...
@@ -489,7 +519,10 @@ namespace DeviceLibrary
{
{
Msg
.
add
(
crc
.
GetString
(
"Res0172.8f1fa034"
,
"自检测到有错误物料,请处理"
),
MsgLevel
.
alarm
);
Msg
.
add
(
crc
.
GetString
(
"Res0172.8f1fa034"
,
"自检测到有错误物料,请处理"
),
MsgLevel
.
alarm
);
}
}
if
(
LabelingTestMode
)
{
Msg
.
add
(
"Labelling test mode"
,
MsgLevel
.
warning
);
}
if
(!
lastSafeCheckStatus
&&
ok
)
if
(!
lastSafeCheckStatus
&&
ok
)
{
{
...
...
DeviceLibrary/theMachine/MainMachine_Labeling.cs
查看文件 @
0a13027
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/MainMachine_RFIDSelftest.cs
查看文件 @
0a13027
...
@@ -87,11 +87,6 @@ namespace DeviceLibrary
...
@@ -87,11 +87,6 @@ namespace DeviceLibrary
RobotManage
.
mainMachine
.
TPMove
.
ToHigh
(
StoreMoveInfo
);
RobotManage
.
mainMachine
.
TPMove
.
ToHigh
(
StoreMoveInfo
);
StoreMoveInfo
.
log
(
$
"{job.WareNum},上层库位移至右侧"
);
StoreMoveInfo
.
log
(
$
"{job.WareNum},上层库位移至右侧"
);
}
}
}
}
break
;
break
;
case
MoveStep
.
StoreIn03
:
case
MoveStep
.
StoreIn03
:
...
@@ -142,9 +137,10 @@ namespace DeviceLibrary
...
@@ -142,9 +137,10 @@ namespace DeviceLibrary
ds
=
Encoding
.
ASCII
.
GetString
(
data
).
Trim
();
ds
=
Encoding
.
ASCII
.
GetString
(
data
).
Trim
();
if
(!
string
.
IsNullOrEmpty
(
ds
))
if
(!
string
.
IsNullOrEmpty
(
ds
))
{
{
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
;
StoreMoveInfo
.
log
(
"读取到 RFID:"
+
ds
+
" , "
+
RobotManage
.
RFID
.
HexBuff
(
data
));
StoreMoveInfo
.
log
(
"读取到 RFID:"
+
ds
+
" , "
+
RobotManage
.
RFID
.
HexBuff
(
data
));
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
ds
)
>
-
1
)
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
.
TrimStart
(
'S'
);
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
StoreMoveInfo
.
MoveParam
.
RFID
)
>
-
1
)
{
{
issame
=
true
;
issame
=
true
;
break
;
break
;
...
@@ -160,9 +156,9 @@ namespace DeviceLibrary
...
@@ -160,9 +156,9 @@ namespace DeviceLibrary
ds
=
Encoding
.
ASCII
.
GetString
(
data
).
Trim
();
ds
=
Encoding
.
ASCII
.
GetString
(
data
).
Trim
();
if
(!
string
.
IsNullOrEmpty
(
ds
))
if
(!
string
.
IsNullOrEmpty
(
ds
))
{
{
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
;
StoreMoveInfo
.
MoveParam
.
RFID
=
ds
.
TrimStart
(
'S'
)
;
StoreMoveInfo
.
log
(
"读取到 RFID2:"
+
ds
+
" , "
+
RobotManage
.
RFID
.
HexBuff
(
data
));
StoreMoveInfo
.
log
(
"读取到 RFID2:"
+
ds
+
" , "
+
RobotManage
.
RFID
.
HexBuff
(
data
));
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
ds
)
>
-
1
)
if
(
StoreMoveInfo
.
MoveParam
.
WareCode
.
IndexOf
(
StoreMoveInfo
.
MoveParam
.
RFID
)
>
-
1
)
{
{
issame
=
true
;
issame
=
true
;
break
;
break
;
...
@@ -184,6 +180,7 @@ namespace DeviceLibrary
...
@@ -184,6 +180,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreOut13
:
case
MoveStep
.
StoreOut13
:
if
(
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsComplateOrFree
)
{
{
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
if
(!
issame
)
if
(!
issame
)
{
{
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
0a13027
...
@@ -48,23 +48,34 @@ namespace DeviceLibrary
...
@@ -48,23 +48,34 @@ 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
(
IOValue
(
IO_Type
.
Taking_Clamp
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
false
&&
Setting_Init
.
Runtime_Step
==
Runtime_StepE
.
LabelProcess
)
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
);
if
(!
string
.
IsNullOrEmpty
(
Setting_Init
.
Runtime_FromPosid
))
{
//if (Setting_Init.Runtime_Step >= Runtime_StepE.Printed && Setting_Init.Runtime_Step < Runtime_StepE.LabelPasteFinish)
LabelingMoveInfo
.
NewMove
(
MoveStep
.
Labeling01
);
//{
// StoreMoveInfo.log("检测到上次正在贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid + "," + Setting_Init.Runtime_FromPosid);
// Msg.add(crc.GetString("Res0133", "重置前物料正在贴标,无法继续,请手动处理"), MsgLevel.warning, ErrInfo.LabelInPaste);
// RobotManage.UserPause(crc.GetString("Res0133", "重置前物料正在贴标,无法继续,请手动处理"));
// return;
//}
LabelingMoveInfo
.
MoveParam
.
IsNg
=
true
;
LabelingMoveInfo
.
MoveParam
.
NgMsg
=
"重置前物料正在贴标,NG处理"
;
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
}
//if (!string.IsNullOrEmpty(Setting_Init.Runtime_FromPosid))
else
//{
{
// LabelingMoveInfo.NewMove(MoveStep.Labeling01);
Msg
.
add
(
crc
.
GetString
(
"Res0133"
,
"重置前物料正在贴标,无法继续,请手动处理"
),
MsgLevel
.
warning
,
ErrInfo
.
LabelInPaste
);
// StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
RobotManage
.
UserPause
(
crc
.
GetString
(
"Res0133"
,
"重置前物料正在贴标,无法继续,请手动处理"
));
//}
}
//else
//{
// Msg.add(crc.GetString("Res0133", "重置前物料正在贴标,无法继续,请手动处理"), MsgLevel.warning, ErrInfo.LabelInPaste);
// RobotManage.UserPause(crc.GetString("Res0133", "重置前物料正在贴标,无法继续,请手动处理"));
//}
return
;
return
;
}
}
else
if
(
Setting_Init
.
Runtime_Step
>=
Runtime_StepE
.
LabelP
rocess
&&
Setting_Init
.
Runtime_Step
<=
Runtime_StepE
.
LabelP
asteFinish
)
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
);
...
@@ -76,13 +87,6 @@ namespace DeviceLibrary
...
@@ -76,13 +87,6 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
RFID
=
Setting_Init
.
Runtime_RFID
;
StoreMoveInfo
.
MoveParam
.
RFID
=
Setting_Init
.
Runtime_RFID
;
return
;
return
;
}
}
else
if
(
Setting_Init
.
Runtime_Step
>=
Runtime_StepE
.
Printed
&&
Setting_Init
.
Runtime_Step
<
Runtime_StepE
.
LabelPasteFinish
)
{
StoreMoveInfo
.
log
(
"检测到上次正在贴标:"
+
Setting_Init
.
Runtime_Step
+
","
+
Setting_Init
.
Runtime_Posid
+
","
+
Setting_Init
.
Runtime_FromPosid
);
Msg
.
add
(
crc
.
GetString
(
"Res0133"
,
"重置前物料正在贴标,无法继续,请手动处理"
),
MsgLevel
.
warning
,
ErrInfo
.
LabelInPaste
);
RobotManage
.
UserPause
(
crc
.
GetString
(
"Res0133"
,
"重置前物料正在贴标,无法继续,请手动处理"
));
return
;
}
else
if
(
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
else
if
(
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
{
{
...
@@ -134,8 +138,6 @@ namespace DeviceLibrary
...
@@ -134,8 +138,6 @@ namespace DeviceLibrary
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
:
string
inposid
;
string
inposid
;
...
@@ -237,6 +239,7 @@ namespace DeviceLibrary
...
@@ -237,6 +239,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn05
:
case
MoveStep
.
StoreIn05
:
if
(!
boxTransport
.
IsComplateOrFree
)
if
(!
boxTransport
.
IsComplateOrFree
)
break
;
break
;
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
if
(
StoreMoveInfo
.
MoveParam
.
usedCount
==
0
)
if
(
StoreMoveInfo
.
MoveParam
.
usedCount
==
0
)
{
{
if
(
StoreMoveInfo
.
MoveParam
.
RFID
.
Length
>
16
)
if
(
StoreMoveInfo
.
MoveParam
.
RFID
.
Length
>
16
)
...
@@ -372,6 +375,7 @@ namespace DeviceLibrary
...
@@ -372,6 +375,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn09
:
case
MoveStep
.
StoreIn09
:
if
(
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsComplateOrFree
)
{
{
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
if
(!
StoreMoveInfo
.
MoveParam
.
IsNg
)
if
(!
StoreMoveInfo
.
MoveParam
.
IsNg
)
{
{
if
(!
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
InStoreEnd
))
if
(!
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
InStoreEnd
))
...
@@ -475,7 +479,7 @@ namespace DeviceLibrary
...
@@ -475,7 +479,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreOut11
:
case
MoveStep
.
StoreOut11
:
if
(
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsComplateOrFree
)
{
{
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
++)
for
(
int
i
=
0
;
i
<
15
;
i
++)
...
@@ -542,6 +546,7 @@ namespace DeviceLibrary
...
@@ -542,6 +546,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreOut12
:
case
MoveStep
.
StoreOut12
:
if
(
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsComplateOrFree
)
{
{
Setting_Init
.
Runtime_Step
=
Runtime_StepE
.
None
;
if
(
StoreMoveInfo
.
MoveParam
.
OutPosID
!=
StoreMoveInfo
.
MoveParam
.
PosID
)
if
(
StoreMoveInfo
.
MoveParam
.
OutPosID
!=
StoreMoveInfo
.
MoveParam
.
PosID
)
{
{
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreBoxEnd
);
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
OutStoreBoxEnd
);
...
@@ -575,6 +580,7 @@ namespace DeviceLibrary
...
@@ -575,6 +580,7 @@ namespace DeviceLibrary
{
{
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StoreMoveInfo
.
log
(
$
"NG出库库位已完成"
);
StoreMoveInfo
.
log
(
$
"NG出库库位已完成"
);
return
;
return
;
}
}
}
}
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
0a13027
...
@@ -121,6 +121,7 @@ namespace DeviceLibrary
...
@@ -121,6 +121,7 @@ namespace DeviceLibrary
Labeling08
,
Labeling08
,
Labeling09
,
Labeling09
,
WaitInStore
,
WaitInStore
,
Labeling10_Reset
,
Labeling10
,
Labeling10
,
Labeling11
,
Labeling11
,
Labeling12
,
Labeling12
,
...
...
DeviceLibrary/userControl/AxisMoveControl.cs
查看文件 @
0a13027
...
@@ -82,7 +82,11 @@ namespace DeviceLibrary
...
@@ -82,7 +82,11 @@ namespace DeviceLibrary
MessageBox
.
Show
(
crc
.
GetString
(
"Res0122"
,
"请先选择运动轴"
),
crc
.
GetString
(
"Res0123"
,
"警告 "
),
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0122"
,
"请先选择运动轴"
),
crc
.
GetString
(
"Res0123"
,
"警告 "
),
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
return
false
;
return
false
;
}
}
if
(!
currentAxis
.
IsSafe
(
0
,
out
string
msg
))
{
MessageBox
.
Show
(
msg
);
return
false
;
}
return
true
;
return
true
;
}
}
private
void
btnOpenAxis_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenAxis_Click
(
object
sender
,
EventArgs
e
)
...
...
TheMachine/Form1.cs
查看文件 @
0a13027
...
@@ -166,6 +166,16 @@ namespace TheMachine
...
@@ -166,6 +166,16 @@ namespace TheMachine
var
loadtask
=
Task
.
Run
(()
=>
var
loadtask
=
Task
.
Run
(()
=>
{
{
RobotManage
.
Init
();
RobotManage
.
Init
();
}).
ContinueWith
(
delegate
{
CylinderButton
.
IsSafe
+=
()
=>
{
if
(
RobotManage
.
isRunning
)
return
(
false
,
"Device is in automatic"
);
if
(!
RobotManage
.
mainMachine
.
IsAllDoorClosed
())
return
(
false
,
"Safe door was not closed"
);
return
(
true
,
""
);
};
});
});
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
DateTime
.
Now
.
ToString
(),
crc
.
GetString
(
"Res0006"
,
"设备加载中,请稍后..."
)
});
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
DateTime
.
Now
.
ToString
(),
crc
.
GetString
(
"Res0006"
,
"设备加载中,请稍后..."
)
});
...
@@ -431,7 +441,7 @@ namespace TheMachine
...
@@ -431,7 +441,7 @@ namespace TheMachine
else
if
(
msg
.
errInfo
==
ErrInfo
.
LabelInPaste
)
else
if
(
msg
.
errInfo
==
ErrInfo
.
LabelInPaste
)
{
{
RobotManage
.
mainMachine
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
if
(
FrmAlarm
.
ShowAlarmDialog
(
crc
.
GetString
(
"Res0143"
,
"贴标区内可能有物料未完成贴标,请手动取出"
)
)
==
DialogResult
.
OK
)
if
(
FrmAlarm
.
ShowAlarmDialog
(
"Labeling Exceptions:"
+
"\r\n"
+
msg
.
msgtxt
)
==
DialogResult
.
OK
)
{
{
LogUtil
.
info
(
"用户确认已处理"
);
LogUtil
.
info
(
"用户确认已处理"
);
//Setting_Init.Runtime_Step = Runtime_StepE.None;
//Setting_Init.Runtime_Step = Runtime_StepE.None;
...
@@ -710,28 +720,39 @@ namespace TheMachine
...
@@ -710,28 +720,39 @@ namespace TheMachine
private
void
button4_Click_1
(
object
sender
,
EventArgs
e
)
private
void
button4_Click_1
(
object
sender
,
EventArgs
e
)
{
{
if
(!
SafeTest
())
return
;
IOManager
.
IOMove
(
IO_Type
.
Entry_Drawer_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
Entry_Drawer_Lock
,
IO_VALUE
.
LOW
);
}
}
private
void
button3_Click_1
(
object
sender
,
EventArgs
e
)
private
void
button3_Click_1
(
object
sender
,
EventArgs
e
)
{
{
if
(!
SafeTest
())
return
;
IOManager
.
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
Out_Drawer_Lock
,
IO_VALUE
.
LOW
);
}
}
private
void
button5_Click_1
(
object
sender
,
EventArgs
e
)
private
void
button5_Click_1
(
object
sender
,
EventArgs
e
)
{
{
if
(!
SafeTest
())
return
;
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
LeftDoor_Lock
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
LeftDoorOpen
=
true
;
RobotManage
.
mainMachine
.
LeftDoorOpen
=
true
;
}
}
private
void
button2_Click_1
(
object
sender
,
EventArgs
e
)
private
void
button2_Click_1
(
object
sender
,
EventArgs
e
)
{
{
if
(!
SafeTest
())
return
;
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
RightDoor_Lock
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
RightDoorOpen
=
true
;
RobotManage
.
mainMachine
.
RightDoorOpen
=
true
;
}
}
private
void
button2_Click_2
(
object
sender
,
EventArgs
e
)
private
void
button2_Click_2
(
object
sender
,
EventArgs
e
)
{
{
if
(!
SafeTest
())
return
;
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
PrinterDoor_Lock
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
PrintDoorOpen
=
true
;
RobotManage
.
mainMachine
.
PrintDoorOpen
=
true
;
}
}
...
@@ -743,7 +764,13 @@ namespace TheMachine
...
@@ -743,7 +764,13 @@ namespace TheMachine
RobotManage
.
mainMachine
.
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
RobotManage
.
mainMachine
.
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
else
if
(!
cb_cycledemo
.
Checked
)
else
if
(!
cb_cycledemo
.
Checked
)
RobotManage
.
mainMachine
.
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
RobotManage
.
mainMachine
.
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
}
bool
SafeTest
()
{
if
(
RobotManage
.
mainMachine
.
StoreMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
return
true
;
MessageBox
.
Show
(
"The device is moving and cannot be unlocked"
);
return
false
;
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
TheMachine/IOControls.Designer.cs
查看文件 @
0a13027
...
@@ -57,6 +57,7 @@ namespace TheMachine
...
@@ -57,6 +57,7 @@ namespace TheMachine
this
.
cylinderButton13
=
new
TheMachine
.
CylinderButton
();
this
.
cylinderButton13
=
new
TheMachine
.
CylinderButton
();
this
.
cylinderButton11
=
new
TheMachine
.
CylinderButton
();
this
.
cylinderButton11
=
new
TheMachine
.
CylinderButton
();
this
.
ioControl1
=
new
TheMachine
.
IOControl
();
this
.
ioControl1
=
new
TheMachine
.
IOControl
();
this
.
cylinderButton9
=
new
TheMachine
.
CylinderButton
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
...
@@ -64,7 +65,7 @@ namespace TheMachine
...
@@ -64,7 +65,7 @@ namespace TheMachine
//
//
this
.
btn_FlipEquip
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btn_FlipEquip
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btn_FlipEquip
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn_FlipEquip
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn_FlipEquip
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
474
);
this
.
btn_FlipEquip
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
515
);
this
.
btn_FlipEquip
.
Name
=
"btn_FlipEquip"
;
this
.
btn_FlipEquip
.
Name
=
"btn_FlipEquip"
;
this
.
btn_FlipEquip
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
btn_FlipEquip
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
btn_FlipEquip
.
TabIndex
=
2
;
this
.
btn_FlipEquip
.
TabIndex
=
2
;
...
@@ -96,6 +97,7 @@ namespace TheMachine
...
@@ -96,6 +97,7 @@ namespace TheMachine
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton3
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton3
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton14
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton14
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton4
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton4
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton9
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton16
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton16
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton7
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton7
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton15
);
this
.
panel1
.
Controls
.
Add
(
this
.
cylinderButton15
);
...
@@ -112,7 +114,7 @@ namespace TheMachine
...
@@ -112,7 +114,7 @@ namespace TheMachine
//
//
this
.
button10
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button10
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button10
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button10
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button10
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
679
);
this
.
button10
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
720
);
this
.
button10
.
Name
=
"button10"
;
this
.
button10
.
Name
=
"button10"
;
this
.
button10
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button10
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button10
.
TabIndex
=
6
;
this
.
button10
.
TabIndex
=
6
;
...
@@ -124,7 +126,7 @@ namespace TheMachine
...
@@ -124,7 +126,7 @@ namespace TheMachine
//
//
this
.
button9
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button9
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button9
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button9
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button9
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
679
);
this
.
button9
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
720
);
this
.
button9
.
Name
=
"button9"
;
this
.
button9
.
Name
=
"button9"
;
this
.
button9
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button9
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button9
.
TabIndex
=
6
;
this
.
button9
.
TabIndex
=
6
;
...
@@ -136,7 +138,7 @@ namespace TheMachine
...
@@ -136,7 +138,7 @@ namespace TheMachine
//
//
this
.
button8
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button8
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button8
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button8
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button8
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
6
38
);
this
.
button8
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
6
79
);
this
.
button8
.
Name
=
"button8"
;
this
.
button8
.
Name
=
"button8"
;
this
.
button8
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button8
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button8
.
TabIndex
=
5
;
this
.
button8
.
TabIndex
=
5
;
...
@@ -148,7 +150,7 @@ namespace TheMachine
...
@@ -148,7 +150,7 @@ namespace TheMachine
//
//
this
.
button4
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button4
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button4
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button4
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
5
56
);
this
.
button4
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
5
97
);
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Name
=
"button4"
;
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button4
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button4
.
TabIndex
=
3
;
this
.
button4
.
TabIndex
=
3
;
...
@@ -160,7 +162,7 @@ namespace TheMachine
...
@@ -160,7 +162,7 @@ namespace TheMachine
//
//
this
.
button7
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button7
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button7
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button7
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button7
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
597
);
this
.
button7
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
638
);
this
.
button7
.
Name
=
"button7"
;
this
.
button7
.
Name
=
"button7"
;
this
.
button7
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button7
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button7
.
TabIndex
=
4
;
this
.
button7
.
TabIndex
=
4
;
...
@@ -172,7 +174,7 @@ namespace TheMachine
...
@@ -172,7 +174,7 @@ namespace TheMachine
//
//
this
.
button6
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button6
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button6
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button6
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button6
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
597
);
this
.
button6
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
638
);
this
.
button6
.
Name
=
"button6"
;
this
.
button6
.
Name
=
"button6"
;
this
.
button6
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button6
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button6
.
TabIndex
=
4
;
this
.
button6
.
TabIndex
=
4
;
...
@@ -184,7 +186,7 @@ namespace TheMachine
...
@@ -184,7 +186,7 @@ namespace TheMachine
//
//
this
.
button5
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button5
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button5
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button5
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
5
56
);
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
5
97
);
this
.
button5
.
Name
=
"button5"
;
this
.
button5
.
Name
=
"button5"
;
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button5
.
TabIndex
=
4
;
this
.
button5
.
TabIndex
=
4
;
...
@@ -196,7 +198,7 @@ namespace TheMachine
...
@@ -196,7 +198,7 @@ namespace TheMachine
//
//
this
.
button1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
474
);
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
515
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button1
.
TabIndex
=
2
;
this
.
button1
.
TabIndex
=
2
;
...
@@ -208,7 +210,7 @@ namespace TheMachine
...
@@ -208,7 +210,7 @@ namespace TheMachine
//
//
this
.
button3
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button3
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button3
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button3
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
5
15
);
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
5
56
);
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button3
.
TabIndex
=
2
;
this
.
button3
.
TabIndex
=
2
;
...
@@ -220,7 +222,7 @@ namespace TheMachine
...
@@ -220,7 +222,7 @@ namespace TheMachine
//
//
this
.
button2
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button2
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button2
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button2
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
5
15
);
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
5
56
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
button2
.
TabIndex
=
2
;
this
.
button2
.
TabIndex
=
2
;
...
@@ -374,7 +376,7 @@ namespace TheMachine
...
@@ -374,7 +376,7 @@ namespace TheMachine
this
.
cylinderButton16
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton16
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton16
.
IO_HIGH
=
"Label_Vacuum"
;
this
.
cylinderButton16
.
IO_HIGH
=
"Label_Vacuum"
;
this
.
cylinderButton16
.
IO_LOW
=
""
;
this
.
cylinderButton16
.
IO_LOW
=
""
;
this
.
cylinderButton16
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
433
);
this
.
cylinderButton16
.
Location
=
new
System
.
Drawing
.
Point
(
542
,
474
);
this
.
cylinderButton16
.
Name
=
"cylinderButton16"
;
this
.
cylinderButton16
.
Name
=
"cylinderButton16"
;
this
.
cylinderButton16
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
cylinderButton16
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
cylinderButton16
.
TabIndex
=
1
;
this
.
cylinderButton16
.
TabIndex
=
1
;
...
@@ -449,6 +451,20 @@ namespace TheMachine
...
@@ -449,6 +451,20 @@ namespace TheMachine
this
.
ioControl1
.
Tag
=
"not"
;
this
.
ioControl1
.
Tag
=
"not"
;
this
.
ioControl1
.
Load
+=
new
System
.
EventHandler
(
this
.
ioControl1_Load
);
this
.
ioControl1
.
Load
+=
new
System
.
EventHandler
(
this
.
ioControl1_Load
);
//
//
// cylinderButton9
//
this
.
cylinderButton9
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
cylinderButton9
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
cylinderButton9
.
IO_HIGH
=
"Label_PasteBlow"
;
this
.
cylinderButton9
.
IO_LOW
=
""
;
this
.
cylinderButton9
.
Location
=
new
System
.
Drawing
.
Point
(
739
,
474
);
this
.
cylinderButton9
.
Name
=
"cylinderButton9"
;
this
.
cylinderButton9
.
Size
=
new
System
.
Drawing
.
Size
(
191
,
35
);
this
.
cylinderButton9
.
TabIndex
=
1
;
this
.
cylinderButton9
.
Tag
=
"not"
;
this
.
cylinderButton9
.
Text
=
"Label_PasteBlow"
;
this
.
cylinderButton9
.
UseVisualStyleBackColor
=
false
;
//
// IOControls
// IOControls
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
@@ -491,5 +507,6 @@ namespace TheMachine
...
@@ -491,5 +507,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
Button
button8
;
private
System
.
Windows
.
Forms
.
Button
button8
;
private
System
.
Windows
.
Forms
.
Button
button9
;
private
System
.
Windows
.
Forms
.
Button
button9
;
private
System
.
Windows
.
Forms
.
Button
button10
;
private
System
.
Windows
.
Forms
.
Button
button10
;
private
CylinderButton
cylinderButton9
;
}
}
}
}
TheMachine/IOControls.cs
查看文件 @
0a13027
...
@@ -39,53 +39,118 @@ namespace TheMachine
...
@@ -39,53 +39,118 @@ namespace TheMachine
private
void
btn_FlipEquip_Click
(
object
sender
,
EventArgs
e
)
private
void
btn_FlipEquip_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
FlipEquip
.
LiftUp
(
null
);
RobotManage
.
mainMachine
.
FlipEquip
.
LiftUp
(
null
);
LogUtil
.
info
(
"手动点击:FlipEquip.LiftUp"
);
LogUtil
.
info
(
"手动点击:FlipEquip.LiftUp"
);
}
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
FlipEquip
.
LiftDown
(
null
);
RobotManage
.
mainMachine
.
FlipEquip
.
LiftDown
(
null
);
LogUtil
.
info
(
"手动点击:FlipEquip.LiftDown"
);
LogUtil
.
info
(
"手动点击:FlipEquip.LiftDown"
);
}
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
RotateEquip
.
TurnToEnd
(
true
);
RobotManage
.
mainMachine
.
RotateEquip
.
TurnToEnd
(
true
);
LogUtil
.
info
(
"手动点击:RotateEquip.TurnToEnd 水平"
);
LogUtil
.
info
(
"手动点击:RotateEquip.TurnToEnd 水平"
);
}
}
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
RotateEquip
.
TurnToEnd
(
false
);
RobotManage
.
mainMachine
.
RotateEquip
.
TurnToEnd
(
false
);
LogUtil
.
info
(
"手动点击:RotateEquip.TurnToEnd 垂直"
);
LogUtil
.
info
(
"手动点击:RotateEquip.TurnToEnd 垂直"
);
}
}
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
TPMove
.
ToLow
(
null
);
RobotManage
.
mainMachine
.
TPMove
.
ToLow
(
null
);
}
}
private
void
button4_Click
(
object
sender
,
EventArgs
e
)
private
void
button4_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
TPMove
.
ToHigh
(
null
);
RobotManage
.
mainMachine
.
TPMove
.
ToHigh
(
null
);
}
}
private
void
button6_Click
(
object
sender
,
EventArgs
e
)
private
void
button6_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
RotateEquip
.
TurnDegree
(
45
);
RobotManage
.
mainMachine
.
RotateEquip
.
TurnDegree
(
45
);
}
}
private
void
button7_Click
(
object
sender
,
EventArgs
e
)
private
void
button7_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
RotateEquip
.
TurnDegree
(-
45
);
RobotManage
.
mainMachine
.
RotateEquip
.
TurnDegree
(-
45
);
}
}
private
void
button8_Click
(
object
sender
,
EventArgs
e
)
private
void
button8_Click
(
object
sender
,
EventArgs
e
)
{
{
var
result
=
IsSafe
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
RobotManage
.
mainMachine
.
RotateEquip
.
TurnRound
();
RobotManage
.
mainMachine
.
RotateEquip
.
TurnRound
();
}
}
public
(
bool
,
string
)
IsSafe
()
{
if
(
RobotManage
.
isRunning
)
return
(
false
,
"Device is in automatic"
);
if
(!
RobotManage
.
mainMachine
.
IsAllDoorClosed
())
return
(
false
,
"Safe door was not closed"
);
return
(
true
,
""
);
}
private
void
button9_Click
(
object
sender
,
EventArgs
e
)
private
void
button9_Click
(
object
sender
,
EventArgs
e
)
{
{
var
r
=
RobotManage
.
RFID
.
ReOpen
();
var
r
=
RobotManage
.
RFID
.
ReOpen
();
...
...
TheMachine/Program.cs
查看文件 @
0a13027
...
@@ -25,6 +25,8 @@ namespace TheMachine
...
@@ -25,6 +25,8 @@ namespace TheMachine
[
STAThread
]
[
STAThread
]
static
void
Main
()
static
void
Main
()
{
{
CameraPointTest
.
Init
();
CameraPointTest
.
Init
();
CameraPointTest
.
TestHasLabelOnDock
(
true
);
CameraPointTest
.
TestHasLabelOnDock
(
true
);
//CameraPointTest.ScanRectangle();
//CameraPointTest.ScanRectangle();
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
0a13027
...
@@ -38,17 +38,19 @@ namespace TheMachine
...
@@ -38,17 +38,19 @@ namespace TheMachine
this
.
btn_printertest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_printertest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_labeledit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_labeledit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_labelselect
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cb_labelselect
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
t
abPage_ledtower
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
t
p
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
lbl_Liquidstatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbl_Liquidstatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
chbAutoRun
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbAutoRun
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tabPage_ledtower
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
btn_testlabeling
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_labelingtestmoce
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
uC_LedConfig1
=
new
TheMachine
.
UC
.
UC_LedConfig
();
this
.
uC_LedConfig1
=
new
TheMachine
.
UC
.
UC_LedConfig
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
tabPage_ledtower
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
tabPage_ledtower
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// timer1
// timer1
...
@@ -69,6 +71,8 @@ namespace TheMachine
...
@@ -69,6 +71,8 @@ namespace TheMachine
//
//
// tabPage_set
// tabPage_set
//
//
this
.
tabPage_set
.
Controls
.
Add
(
this
.
cb_labelingtestmoce
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
btn_testlabeling
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
tp
);
this
.
tabPage_set
.
Controls
.
Add
(
this
.
tp
);
...
@@ -131,16 +135,29 @@ namespace TheMachine
...
@@ -131,16 +135,29 @@ namespace TheMachine
this
.
cb_labelselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
20
);
this
.
cb_labelselect
.
Size
=
new
System
.
Drawing
.
Size
(
198
,
20
);
this
.
cb_labelselect
.
TabIndex
=
0
;
this
.
cb_labelselect
.
TabIndex
=
0
;
//
//
// t
abPage_ledtower
// t
p
//
//
this
.
tabPage_ledtower
.
Controls
.
Add
(
this
.
uC_LedConfig1
);
this
.
tp
.
AutoSize
=
true
;
this
.
tabPage_ledtower
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tp
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
AutoSizeMode
.
GrowAndShrink
;
this
.
tabPage_ledtower
.
Name
=
"tabPage_ledtower"
;
this
.
tp
.
ColumnCount
=
2
;
this
.
tabPage_ledtower
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tabPage_ledtower
.
Size
=
new
System
.
Drawing
.
Size
(
1016
,
714
);
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tabPage_ledtower
.
TabIndex
=
1
;
this
.
tp
.
Controls
.
Add
(
this
.
chbAutoRun
,
0
,
7
);
this
.
tabPage_ledtower
.
Text
=
"灯塔设置"
;
this
.
tp
.
Controls
.
Add
(
this
.
lbl_Liquidstatus
,
0
,
4
);
this
.
tabPage_ledtower
.
UseVisualStyleBackColor
=
true
;
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
18
);
this
.
tp
.
Name
=
"tp"
;
this
.
tp
.
RowCount
=
9
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
136
,
68
);
this
.
tp
.
TabIndex
=
6
;
//
//
// lbl_Liquidstatus
// lbl_Liquidstatus
//
//
...
@@ -166,29 +183,38 @@ namespace TheMachine
...
@@ -166,29 +183,38 @@ namespace TheMachine
this
.
chbAutoRun
.
Text
=
"开机自启动"
;
this
.
chbAutoRun
.
Text
=
"开机自启动"
;
this
.
chbAutoRun
.
UseVisualStyleBackColor
=
true
;
this
.
chbAutoRun
.
UseVisualStyleBackColor
=
true
;
//
//
// t
p
// t
abPage_ledtower
//
//
this
.
tp
.
AutoSize
=
true
;
this
.
tabPage_ledtower
.
Controls
.
Add
(
this
.
uC_LedConfig1
);
this
.
tp
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
AutoSizeMode
.
GrowAndShrink
;
this
.
tabPage_ledtower
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
22
);
this
.
tp
.
ColumnCount
=
2
;
this
.
tabPage_ledtower
.
Name
=
"tabPage_ledtower"
;
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tabPage_ledtower
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tp
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tabPage_ledtower
.
Size
=
new
System
.
Drawing
.
Size
(
1016
,
714
);
this
.
tp
.
Controls
.
Add
(
this
.
chbAutoRun
,
0
,
7
);
this
.
tabPage_ledtower
.
TabIndex
=
1
;
this
.
tp
.
Controls
.
Add
(
this
.
lbl_Liquidstatus
,
0
,
4
);
this
.
tabPage_ledtower
.
Text
=
"灯塔设置"
;
this
.
tp
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
18
);
this
.
tabPage_ledtower
.
UseVisualStyleBackColor
=
true
;
this
.
tp
.
Name
=
"tp"
;
//
this
.
tp
.
RowCount
=
9
;
// btn_testlabeling
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
//
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
Enabled
=
false
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
377
);
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
Name
=
"btn_testlabeling"
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
Size
=
new
System
.
Drawing
.
Size
(
201
,
38
);
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
TabIndex
=
13
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
Text
=
"Test the labeling once"
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
UseVisualStyleBackColor
=
true
;
this
.
tp
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
btn_testlabeling
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_testlabeling_Click
);
this
.
tp
.
Size
=
new
System
.
Drawing
.
Size
(
136
,
68
);
//
this
.
tp
.
TabIndex
=
6
;
// cb_labelingtestmoce
//
this
.
cb_labelingtestmoce
.
AutoSize
=
true
;
this
.
cb_labelingtestmoce
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
346
);
this
.
cb_labelingtestmoce
.
Name
=
"cb_labelingtestmoce"
;
this
.
cb_labelingtestmoce
.
Size
=
new
System
.
Drawing
.
Size
(
138
,
16
);
this
.
cb_labelingtestmoce
.
TabIndex
=
14
;
this
.
cb_labelingtestmoce
.
Text
=
"Labelling test mode"
;
this
.
cb_labelingtestmoce
.
UseVisualStyleBackColor
=
true
;
this
.
cb_labelingtestmoce
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_labelingtestmoce_CheckedChanged
);
//
//
// uC_SetUserPassword1
// uC_SetUserPassword1
//
//
...
@@ -220,9 +246,9 @@ namespace TheMachine
...
@@ -220,9 +246,9 @@ namespace TheMachine
this
.
tabPage_set
.
ResumeLayout
(
false
);
this
.
tabPage_set
.
ResumeLayout
(
false
);
this
.
tabPage_set
.
PerformLayout
();
this
.
tabPage_set
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
tabPage_ledtower
.
ResumeLayout
(
false
);
this
.
tp
.
ResumeLayout
(
false
);
this
.
tp
.
ResumeLayout
(
false
);
this
.
tp
.
PerformLayout
();
this
.
tp
.
PerformLayout
();
this
.
tabPage_ledtower
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -242,5 +268,7 @@ namespace TheMachine
...
@@ -242,5 +268,7 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
private
System
.
Windows
.
Forms
.
CheckBox
chbAutoRun
;
private
System
.
Windows
.
Forms
.
CheckBox
chbAutoRun
;
private
System
.
Windows
.
Forms
.
Label
lbl_Liquidstatus
;
private
System
.
Windows
.
Forms
.
Label
lbl_Liquidstatus
;
private
System
.
Windows
.
Forms
.
Button
btn_testlabeling
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_labelingtestmoce
;
}
}
}
}
TheMachine/SettingControl.cs
查看文件 @
0a13027
...
@@ -166,5 +166,26 @@ namespace TheMachine
...
@@ -166,5 +166,26 @@ namespace TheMachine
{
{
}
}
private
void
btn_testlabeling_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
RobotManage
.
isRunning
||
RobotManage
.
mainMachine
.
runStatus
!=
RunStatus
.
Running
)
{
MessageBox
.
Show
(
"Please start the device first and complete the home reset"
);
return
;
}
if
(
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
MoveStep
!=
MoveStep
.
Wait
)
{
MessageBox
.
Show
(
"Please wait for the labeling action to end"
);
return
;
}
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
NewMove
(
MoveStep
.
Labeling01
);
RobotManage
.
mainMachine
.
LabelingMoveInfo
.
log
(
"开始一次贴标测试"
);
}
private
void
cb_labelingtestmoce_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
RobotManage
.
mainMachine
.
LabelingTestMode
=
cb_labelingtestmoce
.
Checked
;
btn_testlabeling
.
Enabled
=
cb_labelingtestmoce
.
Checked
;
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
TheMachine/UC/CylinderButton.cs
查看文件 @
0a13027
...
@@ -16,6 +16,7 @@ namespace TheMachine
...
@@ -16,6 +16,7 @@ namespace TheMachine
using
crc
=
OnlineStore
.
CodeResourceControl
;
using
crc
=
OnlineStore
.
CodeResourceControl
;
public
class
CylinderButton
:
Button
public
class
CylinderButton
:
Button
{
{
public
static
event
Func
<(
bool
,
string
)>
IsSafe
;
Timer
timer
;
Timer
timer
;
public
CylinderButton
()
public
CylinderButton
()
{
{
...
@@ -142,6 +143,13 @@ namespace TheMachine
...
@@ -142,6 +143,13 @@ namespace TheMachine
}
}
private
void
CylinderButton_Click
(
object
sender
,
EventArgs
e
)
private
void
CylinderButton_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
IsSafe
!=
null
)
{
var
result
=
IsSafe
.
Invoke
();
if
(!
result
.
Item1
)
{
MessageBox
.
Show
(
result
.
Item2
);
return
;
}
}
if
(
io_state
.
Equals
(
IO_VALUE
.
LOW
))
if
(
io_state
.
Equals
(
IO_VALUE
.
LOW
))
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论