Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2a72a60e
由
LN
编写于
2022-03-26 20:23:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
批量轴增加扫码点功能
1 个父辈
3fa3cb66
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
225 行增加
和
78 行删除
source/DeviceLibrary/Config/Config_InputEquip.csv
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/LoadCVSLibrary/storeConfig/config/InputEquip_Config.cs
source/XLRStoreClient/inputForm/FrmBatchMove.Designer.cs
source/XLRStoreClient/inputForm/FrmBatchMove.cs
source/XLRStoreClient/useControl/AxisPointControl.cs
source/XLRStoreClient/记录.txt
source/DeviceLibrary/Config/Config_InputEquip.csv
查看文件 @
2a72a60
...
...
@@ -18,13 +18,16 @@ PRO,0,AGV小车站号名称_B侧,AgvName_B,T1_2,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_A侧,BatchAxisP1_A,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_A侧,BatchAxisP2_A,582239,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_B侧,BatchAxisP2_B,564177,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,9999,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,30000,,,,,,,,,,,,
PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴P3速度/料盘拿走后提升轴下降速度,BatchAxis_P3Speed,20000,,,,,,,,,,,,
PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1250,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料升降轴_待机点,Updown_P1,310000,,,,,,,,,,,,
...
...
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
2a72a60
...
...
@@ -1095,37 +1095,47 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
IB07_AxisUpMove
,
/// <summary>
/// 料串入料:扫码点可用,批量轴上升到扫码点
/// </summary>
IB08_BatchAxisToP4
,
/// <summary>
/// 料串入料:等待是否可以开始扫码
/// </summary>
IB0
8
_WaitCanScan
,
IB0
9
_WaitCanScan
,
/// <summary>
/// 料串入料:扫码
/// </summary>
IB09_ScanCode
,
IB11_ScanCode
,
/// <summary>
/// 料串入库:扫码前走到了P4点,需要返回料盘位置
/// </summary>
IB12_BatchAxisToReelPosition
,
/// <summary>
/// 料串入料:扫码结束,等待取料机构拿料
/// </summary>
IB1
0
_ScanOK
,
IB1
3
_ScanOK
,
/// <summary>
/// 料串入料:当前托盘已离开
/// </summary>
IB1
1_Wait
ReelLeave
,
IB1
4_
ReelLeave
,
/// <summary>
/// 料串入料:料盘已拿走,批量轴到P2,侧高度
/// </summary>
IB1
2
_BatchAxisToP2
,
IB1
5
_BatchAxisToP2
,
/// <summary>
/// 料串入料:记录高度,判断是否还有料盘
/// </summary>
IB1
3
_SaveHight
,
IB1
6
_SaveHight
,
/// <summary>
/// 料串入料:等待夹爪离开
/// </summary>
IB1
4
_WaitReelLeave
,
IB1
7
_WaitReelLeave
,
/// <summary>
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
查看文件 @
2a72a60
...
...
@@ -38,6 +38,8 @@ namespace OnlineStore.DeviceLibrary
Name
=
"A料口 "
;
Config
.
BatchAxisP1
=
config
.
BatchAxisP1_A
;
Config
.
BatchAxisP2
=
config
.
BatchAxisP2_A
;
Config
.
BatchAxisP4
=
config
.
BatchAxisP4_A
;
Config
.
AgvName
=
config
.
AgvName_A
;
Config
.
CameraName
=
config
.
CameraNameList_A
;
Config
.
RfidIP
=
config
.
PRO_RFIP_A
;
...
...
@@ -48,6 +50,8 @@ namespace OnlineStore.DeviceLibrary
Name
=
"B料口 "
;
Config
.
BatchAxisP1
=
config
.
BatchAxisP1_B
;
Config
.
BatchAxisP2
=
config
.
BatchAxisP2_B
;
Config
.
BatchAxisP4
=
config
.
BatchAxisP4_B
;
Config
.
AgvName
=
config
.
AgvName_B
;
Config
.
CameraName
=
config
.
CameraNameList_B
;
Config
.
RfidIP
=
config
.
PRO_RFIP_B
;
...
...
@@ -626,6 +630,7 @@ namespace OnlineStore.DeviceLibrary
public
string
AgvName
=
""
;
public
int
BatchAxisP1
=
0
;
public
int
BatchAxisP2
=
0
;
public
int
BatchAxisP4
=
0
;
internal
string
RfidIP
=
""
;
#
region
左右入料口共有
IO
//伺服料盘检测
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
2a72a60
...
...
@@ -15,7 +15,14 @@ namespace OnlineStore.DeviceLibrary
public
bool
MoveStop
=
false
;
public
ShelfInfo
CurrShelf
=
new
ShelfInfo
();
#
region
入库
/// <summary>
/// 扫码前是否到了P4点
/// </summary>
private
bool
toBatchP4
=
false
;
/// <summary>
/// 扫门前料盘位置
/// </summary>
private
int
batchAxisReelPosition
=
0
;
private
List
<
string
>
preCodeList
=
new
List
<
string
>();
private
List
<
string
>
LastCodeList
=
new
List
<
string
>();
//private List<string> NextCodeList = new List<string>();
...
...
@@ -33,7 +40,7 @@ namespace OnlineStore.DeviceLibrary
if
(
AgvClient
.
GetAction
(
Config
.
AgvName
)
==
ClientAction
.
NeedLeave
||
AgvClient
.
GetAction
(
Config
.
AgvName
)
==
ClientAction
.
MayLeave
)
{
//WorkLog("料串入料 :等待AGV来取空料串1");
return
false
;
;
return
false
;
}
UpdateShelf
(
1
);
if
(
CurrShelf
.
ShelfState
.
Equals
(
3
))
...
...
@@ -204,19 +211,31 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB07_AxisUpMove
))
{
CheckHasTray
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB08_BatchAxisToP4
))
{
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB09_WaitCanScan
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
WorkLog
(
"旋转轴在料串上方,暂不能扫码,等待旋转轴离开"
);
}
else
{
IB11_ScanCode
();
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB0
8
_WaitCanScan
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB0
9
_WaitCanScan
))
{
if
(!
Robot
.
AxisIsInShelfUp
(
ShelfType
))
{
IB
09
_ScanCode
();
IB
11
_ScanCode
();
}
else
if
(
MoveInfo
.
IsTimeOut
(
10
))
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
"等待旋转轴离开料串超时"
+
"["
+
FormUtil
.
GetSpanStr
(
MoveInfo
.
StepSpan
())
+
"]"
;
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB
09
_ScanCode
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB
11
_ScanCode
))
{
//WorkLog("IB09_ScanCode");
MoveInfo
.
MoveParam
=
new
InOutParam
(
new
InOutPosInfo
(
""
,
""
));
...
...
@@ -230,24 +249,43 @@ namespace OnlineStore.DeviceLibrary
WorkLog
(
" 无有效条码NG,需要放入NG箱:"
+
MoveInfo
.
MoveParam
.
PosInfo
.
ToStr
());
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB10_ScanOK
);
//如果之前走到了扫码点,需要下降
if
(
toBatchP4
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB12_BatchAxisToReelPosition
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
BatchAxis
.
AbsMove
(
MoveInfo
,
batchAxisReelPosition
,
Robot
.
Config
.
BatchAxis_P4Speed
);
WorkLog
(
"扫码结束,扫码前走到了扫码点【"
+
Config
.
BatchAxisP4
+
"】,批量轴需要返回之前位置【"
+
batchAxisReelPosition
+
"】"
);
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
var
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
WorkLog
(
"料串入料 :扫码结束【"
+
code
+
"】,等待取料机构来取料,"
+
MoveInfo
.
MoveParam
.
PosInfo
.
ToStr
());
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB12_BatchAxisToReelPosition
))
{
string
code
=
CodeManager
.
ProcessCode
(
LastCodeList
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
var
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
WorkLog
(
"料串入料 :扫码结束【"
+
code
+
"】,等待取料机构来取料,"
+
MoveInfo
.
MoveParam
.
PosInfo
.
ToStr
());
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
1_Wait
ReelLeave
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
4_
ReelLeave
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
2
_BatchAxisToP2
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
5
_BatchAxisToP2
);
WorkLog
(
"料串入料 :料盘已拿走,批量轴到P2,测盘高 "
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
BatchAxisToP2
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
2
_BatchAxisToP2
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
5
_BatchAxisToP2
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
3
_SaveHight
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
6
_SaveHight
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LastHeight
=
GetHeight
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
4
_WaitReelLeave
))
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
7
_WaitReelLeave
))
{
CheckHasTray
();
}
...
...
@@ -288,16 +326,16 @@ namespace OnlineStore.DeviceLibrary
public
bool
IsInScanCode
()
{
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
&&
MoveInfo
.
IsStep
(
StepEnum
.
IB
09
_ScanCode
))
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
&&
MoveInfo
.
IsStep
(
StepEnum
.
IB
11
_ScanCode
))
{
return
true
;
}
return
false
;
}
private
void
IB
09
_ScanCode
()
private
void
IB
11
_ScanCode
()
{
ClearWarnMsg
(
"等待旋转轴离开料串超时"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB
09
_ScanCode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB
11
_ScanCode
);
bool
isScan
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedScanCode
).
Equals
(
1
);
LastCodeList
=
new
List
<
string
>();
...
...
@@ -372,16 +410,35 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
""
;
if
(
Robot
.
IOValue
(
Config
.
IO_ReelCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
{
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB08_WaitCanScan
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
WorkLog
(
"旋转轴在料串上方,暂不能扫码,等待旋转轴离开"
);
toBatchP4
=
false
;
//判断扫码点是否可用,可用,运动到扫码点
int
currP
=
BatchAxis
.
GetAclPosition
();
int
targetPosition
=
currP
+
Config
.
BatchAxisP4
;
if
(
Config
.
BatchAxisP4
>
0
&&(
targetPosition
<
Config
.
BatchAxisP2
))
{
batchAxisReelPosition
=
currP
;
toBatchP4
=
true
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB08_BatchAxisToP4
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Robot
.
Config
.
BatchAxis_P4Speed
);
WorkLog
(
"料盘已到位,批量轴当前位置【"
+
currP
+
"】,扫码上升高度P4【"
+
Config
.
BatchAxisP4
+
"】可用,批量轴走到扫码点【"
+
targetPosition
+
"】"
);
}
else
{
IB09_ScanCode
();
}
{
LogUtil
.
info
(
Name
+
"料盘已到位,批量轴当前位置【"
+
currP
+
"】扫码上升高度P4【"
+
Config
.
BatchAxisP4
+
"】扫码点【"
+
targetPosition
+
"】P2【"
+
Config
.
BatchAxisP2
+
"】,可直接扫码"
);
if
(
Robot
.
AxisIsInShelfUp
(
ShelfType
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB09_WaitCanScan
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
WorkLog
(
"旋转轴在料串上方,暂不能扫码,等待旋转轴离开"
);
}
else
{
IB11_ScanCode
();
}
}
}
else
{
...
...
@@ -863,7 +920,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
1_Wait
ReelLeave
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
4_
ReelLeave
);
WorkLog
(
"当前料盘已离开,清理高度,准备开始测高"
);
LastHeight
=
0
;
}
...
...
@@ -877,9 +934,9 @@ namespace OnlineStore.DeviceLibrary
{
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
{
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
3
_SaveHight
))
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB1
6
_SaveHight
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
4
_WaitReelLeave
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB1
7
_WaitReelLeave
);
WorkLog
(
"当前料盘已离开,开始判断是否有下一盘,开始扫码"
);
LastHeight
=
0
;
}
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
2a72a60
...
...
@@ -416,7 +416,7 @@ namespace OnlineStore.DeviceLibrary
//若左侧或右侧在等待扫码结束的状态,需要开始去取料
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
if
(
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
&&
moveBean
.
MoveInfo
.
IsStep
(
StepEnum
.
IB1
0
_ScanOK
))
if
(
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
&&
moveBean
.
MoveInfo
.
IsStep
(
StepEnum
.
IB1
3
_ScanOK
))
{
LogInfo
(
moveBean
.
Name
+
"开始取料:"
+
moveBean
.
GetInstoreParam
().
PosInfo
.
ToStr
());
StartInstore
(
moveBean
.
GetInstoreParam
());
...
...
source/LoadCVSLibrary/storeConfig/config/InputEquip_Config.cs
查看文件 @
2a72a60
...
...
@@ -346,6 +346,22 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"MiddleAxis_Reverse_Offset"
)]
public
int
MiddleAxis_Reverse_Offset
{
get
;
set
;
}
/// <summary>
/// PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"BatchAxisP4_A"
)]
public
int
BatchAxisP4_A
{
get
;
set
;
}
/// <summary>
/// PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,0,,,,,,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"BatchAxisP4_B"
)]
public
int
BatchAxisP4_B
{
get
;
set
;
}
/// <summary>
/// PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"BatchAxis_P4Speed"
)]
public
int
BatchAxis_P4Speed
{
get
;
set
;
}
private
List
<
string
>
CameraList
=
null
;
...
...
source/XLRStoreClient/inputForm/FrmBatchMove.Designer.cs
查看文件 @
2a72a60
...
...
@@ -31,21 +31,22 @@
this
.
lblTestMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnTestStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
batchAxisP4
=
new
OnlineStore
.
XLRStore
.
useControl
.
AxisPointControl
();
this
.
batchAxisP2
=
new
OnlineStore
.
XLRStore
.
useControl
.
AxisPointControl
();
this
.
batchAxisP1
=
new
OnlineStore
.
XLRStore
.
useControl
.
AxisPointControl
();
this
.
btnSave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panBase
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblWarnMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnResetShelf
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
btnScanTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblAgvInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnShelfOut
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbAutoOut
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblCurrInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnReset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
axisMoveControl1
=
new
OnlineStore
.
XLRStore
.
AxisMoveControl
();
this
.
chb
MoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chb
AutoOut
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
panel2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -91,9 +92,9 @@
this
.
groupBox3
.
Controls
.
Add
(
this
.
Shelf_StopDown_A
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
Shelf_StopUp_A
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
LineStart_A
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
49
9
,
380
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
49
2
,
380
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
4
44
,
120
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
4
50
,
120
);
this
.
groupBox3
.
TabIndex
=
281
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"IO操作"
;
...
...
@@ -168,9 +169,9 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnStartTest
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblTestMsg
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnTestStop
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
49
9
,
256
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
49
2
,
256
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
4
44
,
123
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
4
50
,
123
);
this
.
groupBox2
.
TabIndex
=
280
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"上料轴运动测试"
;
...
...
@@ -222,38 +223,51 @@
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
batchAxisP4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
batchAxisP2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
batchAxisP1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSave
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
49
9
,
133
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
49
2
,
133
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
4
44
,
121
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
4
50
,
121
);
this
.
groupBox1
.
TabIndex
=
280
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"上料轴点位信息"
;
//
// batchAxisP4
//
this
.
batchAxisP4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
batchAxisP4
.
Location
=
new
System
.
Drawing
.
Point
(
223
,
23
);
this
.
batchAxisP4
.
Name
=
"batchAxisP4"
;
this
.
batchAxisP4
.
PointBackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
batchAxisP4
.
PointForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
batchAxisP4
.
PointText
=
"扫码时上升高度P4:"
;
this
.
batchAxisP4
.
PointValue
=
0
;
this
.
batchAxisP4
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
41
);
this
.
batchAxisP4
.
TabIndex
=
326
;
//
// batchAxisP2
//
this
.
batchAxisP2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
batchAxisP2
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
70
);
this
.
batchAxisP2
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
70
);
this
.
batchAxisP2
.
Name
=
"batchAxisP2"
;
this
.
batchAxisP2
.
PointBackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
batchAxisP2
.
PointForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
batchAxisP2
.
PointText
=
"上料目标位置P2:"
;
this
.
batchAxisP2
.
PointValue
=
0
;
this
.
batchAxisP2
.
Size
=
new
System
.
Drawing
.
Size
(
2
33
,
41
);
this
.
batchAxisP2
.
Size
=
new
System
.
Drawing
.
Size
(
2
15
,
41
);
this
.
batchAxisP2
.
TabIndex
=
325
;
//
// batchAxisP1
//
this
.
batchAxisP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
batchAxisP1
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
23
);
this
.
batchAxisP1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
23
);
this
.
batchAxisP1
.
Name
=
"batchAxisP1"
;
this
.
batchAxisP1
.
PointBackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
batchAxisP1
.
PointForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
batchAxisP1
.
PointText
=
"待机点P1:"
;
this
.
batchAxisP1
.
PointValue
=
0
;
this
.
batchAxisP1
.
Size
=
new
System
.
Drawing
.
Size
(
2
33
,
41
);
this
.
batchAxisP1
.
Size
=
new
System
.
Drawing
.
Size
(
2
15
,
41
);
this
.
batchAxisP1
.
TabIndex
=
324
;
//
// btnSave
...
...
@@ -263,7 +277,7 @@
this
.
btnSave
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSave
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSave
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
btnSave
.
Location
=
new
System
.
Drawing
.
Point
(
2
74
,
70
);
this
.
btnSave
.
Location
=
new
System
.
Drawing
.
Point
(
2
62
,
70
);
this
.
btnSave
.
Name
=
"btnSave"
;
this
.
btnSave
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
btnSave
.
Size
=
new
System
.
Drawing
.
Size
(
118
,
34
);
...
...
@@ -289,6 +303,19 @@
this
.
panBase
.
Size
=
new
System
.
Drawing
.
Size
(
940
,
122
);
this
.
panBase
.
TabIndex
=
260
;
//
// chbMoveStop
//
this
.
chbMoveStop
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbMoveStop
.
AutoSize
=
true
;
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
322
,
86
);
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
TabIndex
=
327
;
this
.
chbMoveStop
.
Text
=
"暂停运动"
;
this
.
chbMoveStop
.
UseVisualStyleBackColor
=
true
;
this
.
chbMoveStop
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged
);
//
// lblWarnMsg
//
this
.
lblWarnMsg
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
...
@@ -368,21 +395,6 @@
this
.
btnShelfOut
.
UseVisualStyleBackColor
=
false
;
this
.
btnShelfOut
.
Click
+=
new
System
.
EventHandler
(
this
.
btnShelfOut_Click
);
//
// chbAutoOut
//
this
.
chbAutoOut
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbAutoOut
.
AutoSize
=
true
;
this
.
chbAutoOut
.
Checked
=
true
;
this
.
chbAutoOut
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
chbAutoOut
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoOut
.
Location
=
new
System
.
Drawing
.
Point
(
502
,
510
);
this
.
chbAutoOut
.
Name
=
"chbAutoOut"
;
this
.
chbAutoOut
.
Size
=
new
System
.
Drawing
.
Size
(
168
,
24
);
this
.
chbAutoOut
.
TabIndex
=
280
;
this
.
chbAutoOut
.
Text
=
"入料完成自动开始出库"
;
this
.
chbAutoOut
.
UseVisualStyleBackColor
=
true
;
this
.
chbAutoOut
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbAutoOut_CheckedChanged
);
//
// lblCurrInfo
//
this
.
lblCurrInfo
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
...
@@ -413,21 +425,23 @@
//
this
.
axisMoveControl1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
128
);
this
.
axisMoveControl1
.
Name
=
"axisMoveControl1"
;
this
.
axisMoveControl1
.
Size
=
new
System
.
Drawing
.
Size
(
4
90
,
398
);
this
.
axisMoveControl1
.
Size
=
new
System
.
Drawing
.
Size
(
4
86
,
398
);
this
.
axisMoveControl1
.
TabIndex
=
219
;
//
// chb
MoveStop
// chb
AutoOut
//
this
.
chbMoveStop
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbMoveStop
.
AutoSize
=
true
;
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
322
,
86
);
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
TabIndex
=
327
;
this
.
chbMoveStop
.
Text
=
"暂停运动"
;
this
.
chbMoveStop
.
UseVisualStyleBackColor
=
true
;
this
.
chbMoveStop
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged
);
this
.
chbAutoOut
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
chbAutoOut
.
AutoSize
=
true
;
this
.
chbAutoOut
.
Checked
=
true
;
this
.
chbAutoOut
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
chbAutoOut
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAutoOut
.
Location
=
new
System
.
Drawing
.
Point
(
502
,
510
);
this
.
chbAutoOut
.
Name
=
"chbAutoOut"
;
this
.
chbAutoOut
.
Size
=
new
System
.
Drawing
.
Size
(
168
,
24
);
this
.
chbAutoOut
.
TabIndex
=
280
;
this
.
chbAutoOut
.
Text
=
"入料完成自动开始出库"
;
this
.
chbAutoOut
.
UseVisualStyleBackColor
=
true
;
this
.
chbAutoOut
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbAutoOut_CheckedChanged
);
//
// FrmBatchMove
//
...
...
@@ -485,6 +499,7 @@
protected
System
.
Windows
.
Forms
.
CheckBox
chbDebug
;
protected
System
.
Windows
.
Forms
.
Button
btnResetShelf
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbMoveStop
;
private
useControl
.
AxisPointControl
batchAxisP4
;
}
}
source/XLRStoreClient/inputForm/FrmBatchMove.cs
查看文件 @
2a72a60
...
...
@@ -86,6 +86,8 @@ namespace OnlineStore.XLRStore
batchAxisP1
.
SetMoveData
(
moveBean
.
BatchAxis
,
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxis_P1Speed
,
moveBean
.
Config
.
BatchAxisP1
);
batchAxisP2
.
SetMoveData
(
moveBean
.
BatchAxis
,
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxis_P2Speed
,
moveBean
.
Config
.
BatchAxisP2
);
batchAxisP4
.
SetMoveData
(
moveBean
.
BatchAxis
,
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxis_P4Speed
,
moveBean
.
Config
.
BatchAxisP4
,
true
);
lblWarnMsg
.
Text
=
moveBean
.
WarnMsg
;
lblCurrInfo
.
Text
=
moveBean
.
GetMoveStr
();
lblAgvInfo
.
Text
=
"AGV "
+
moveBean
.
Config
.
AgvName
+
" :"
+
AgvClient
.
GetAction
(
moveBean
.
Config
.
AgvName
);
...
...
@@ -110,18 +112,30 @@ namespace OnlineStore.XLRStore
{
int
p1
=
batchAxisP1
.
PointValue
;
int
p2
=
batchAxisP2
.
PointValue
;
int
p4
=
batchAxisP4
.
PointValue
;
if
(
p4
<
0
)
{
MessageBox
.
Show
(
"扫码时上升高度P4不能小于0 ,请重新设置P4点位置"
,
"保存失败"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
return
;
}
moveBean
.
Config
.
BatchAxisP1
=
p1
;
moveBean
.
Config
.
BatchAxisP2
=
p2
;
moveBean
.
Config
.
BatchAxisP4
=
p4
;
if
(
moveBean
.
ShelfType
.
Equals
(
1
))
{
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxisP1_A
=
p1
;
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxisP2_A
=
p2
;
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxisP4_A
=
p4
;
}
else
{
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxisP1_B
=
p1
;
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxisP2_B
=
p2
;
StoreManager
.
XLRStore
.
inputEquip
.
Config
.
BatchAxisP4_B
=
p4
;
}
StoreManager
.
SaveInputEquipConfig
(
StoreManager
.
XLRStore
.
inputEquip
.
Config
);
MessageBox
.
Show
(
"保存成功"
);
...
...
source/XLRStoreClient/useControl/AxisPointControl.cs
查看文件 @
2a72a60
...
...
@@ -13,7 +13,7 @@ using System.Windows.Forms;
namespace
OnlineStore.XLRStore.useControl
{
public
partial
class
AxisPointControl
:
UserControl
{
{
public
AxisPointControl
()
{
InitializeComponent
();
...
...
@@ -26,7 +26,7 @@ namespace OnlineStore.XLRStore.useControl
public
int
PointValue
{
get
{
return
FormUtil
.
GetIntValue
(
txtPoint
.
Text
);
}
get
{
return
FormUtil
.
GetIntValue
(
txtPoint
.
Text
);
}
set
{
txtPoint
.
Text
=
value
.
ToString
();
}
}
public
Color
PointBackColor
...
...
@@ -41,17 +41,34 @@ namespace OnlineStore.XLRStore.useControl
}
private
int
MoveSpeed
;
private
AxisBean
MoveAxis
=
null
;
public
void
SetMoveData
(
AxisBean
axisBean
,
int
speed
,
int
pointV
)
private
bool
isRelMovePoint
=
false
;
public
void
SetMoveData
(
AxisBean
axisBean
,
int
speed
,
int
pointV
,
bool
isRelMovePoint
=
false
)
{
this
.
MoveAxis
=
axisBean
;
this
.
MoveSpeed
=
speed
;
this
.
PointValue
=
pointV
;
this
.
isRelMovePoint
=
isRelMovePoint
;
}
private
void
btnMove_Click
(
object
sender
,
EventArgs
e
)
{
int
v
=
FormUtil
.
GetIntValue
(
txtPoint
);
LogUtil
.
info
(
this
.
Name
+
" "
+
MoveAxis
.
AxisName
+
" 点击:"
+
btnMove
.
Text
);
MoveAxis
.
AbsMove
(
null
,
v
,
MoveSpeed
);
if
(
isRelMovePoint
)
{
if
(
v
<=
0
)
{
MessageBox
.
Show
(
PointText
+
"为相对运动,请正确设置点位"
,
"操作失败"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
return
;
}
int
currPosition
=
MoveAxis
.
GetAclPosition
();
int
targetPosition
=
currPosition
+
v
;
LogUtil
.
info
(
this
.
Name
+
" "
+
MoveAxis
.
AxisName
+
" 点击:"
+
btnMove
.
Text
+
",增量运动【"
+
v
+
"】,目标位置【"
+
targetPosition
+
"】"
);
MoveAxis
.
AbsMove
(
null
,
targetPosition
,
MoveSpeed
);
}
else
{
LogUtil
.
info
(
this
.
Name
+
" "
+
MoveAxis
.
AxisName
+
" 点击:"
+
btnMove
.
Text
+
",绝对运动【"
+
v
+
"】"
);
MoveAxis
.
AbsMove
(
null
,
v
,
MoveSpeed
);
}
}
}
}
source/XLRStoreClient/记录.txt
查看文件 @
2a72a60
...
...
@@ -24,3 +24,13 @@ AA:第3和第4位存储机构A面或B面,AA或者BB
Config_InputEquip.csv 配置文件需要增加一行配置:
PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
20220325
批量轴增加扫码点P4功能。扫码点P4配置时必须大于上料目标点P2。使用时必须高于当前料盘位置才会生效。
Config_InputEquip.csv 文件需要增加三行配置:
PRO,0,提升轴上料扫码点_A侧,BatchAxisP4_A,0,,,,,,,,,,,,
PRO,0,提升轴上料扫码点_B侧,BatchAxisP4_B,0,,,,,,,,,,,,
PRO,0,提升上料轴P4速度/运动到扫码点速度,BatchAxis_P4Speed,5000,,,,,,,,,,,,
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论