Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3f2df859
由
刘韬
编写于
2022-02-28 15:13:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正入库库位格式判断
1 个父辈
5072d6b6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
94 行增加
和
34 行删除
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
source/ACSingleStore/userControl/uc_boxdebug.cs
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
3f2df85
...
...
@@ -594,11 +594,6 @@ namespace OnlineStore.AutoInOutStore
}
}
}
int
addSpeed
=
0
;
int
delSpeed
=
0
;
int
HomeHighSpeed
=
0
;
int
HomeLowSpeed
=
0
;
int
HomeAddSpeed
=
0
;
private
void
btnSavePosition_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -716,7 +711,7 @@ namespace OnlineStore.AutoInOutStore
private
void
AxisABSMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
{
moveAxis
.
TargetPosition
=
targetPosition
;
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
addSpeed
,
d
elSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
D
elSpeed
);
}
private
void
btnUpDownP1_Click
(
object
sender
,
EventArgs
e
)
{
...
...
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
3f2df85
...
...
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui
8085497464b826c220b36d5ffe07195ff287ff2a
")]
[assembly: AssemblyProduct("SO815-AutoInOutStore-newui
5072d6b64fa922fb976758170e2bcb644ff8bf92
")]
[assembly: AssemblyCopyright("edf7e3d07d3c8cafa890a08f4b855e559a36d414")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
...
...
source/ACSingleStore/userControl/uc_boxdebug.cs
查看文件 @
3f2df85
...
...
@@ -13,6 +13,7 @@ using System.IO;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
static
OnlineStore
.
AutoInOutStore
.
ResourceCulture
;
...
...
@@ -114,20 +115,53 @@ namespace OnlineStore.ACSingleStore.useControl
public
int
row
;
public
int
col
;
}
int
PosCompare
(
string
a
,
string
b
)
{
if
(
a
.
StartsWith
(
"fix"
)
||
b
.
StartsWith
(
"fix"
))
int
PosCompare
(
string
a
,
string
b
)
{
if
(
a
.
StartsWith
(
"fix"
))
return
-
1
;
if
(
b
.
StartsWith
(
"fix"
))
return
1
;
string
[]
pa
=
a
.
Split
(
'_'
);
string
[]
pb
=
b
.
Split
(
'_'
);
if
(
pa
[
1
].
Length
==
1
)
if
(
int
.
TryParse
(
pa
[
1
],
out
_
)
)
pa
[
1
]
+=
"A"
;
if
(
pb
[
1
].
Length
==
1
)
if
(
int
.
TryParse
(
pb
[
1
],
out
_
)
)
pb
[
1
]
+=
"A"
;
var
isa
=
pa
[
1
][
0
]+(
pa
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pa
[
2
][
0
]
+
pa
[
3
].
PadLeft
(
2
,
'0'
);
var
isb
=
pb
[
1
][
0
]+(
pb
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pb
[
2
][
0
]
+
pb
[
3
].
PadLeft
(
2
,
'0'
);
var
pa1
=
pa
[
1
][
0
]
+
(
pa
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
);
var
pb1
=
pb
[
1
][
0
]
+
(
pb
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
);
var
pa2
=
pa
[
2
];
var
pb2
=
pb
[
2
];
if
(
pa
[
2
].
Length
==
2
)
{
if
(
pa
[
2
][
1
].
Equals
(
'A'
)
||
pa
[
2
][
1
].
Equals
(
'B'
))
{
pa2
=
(
pa
[
2
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pa
[
2
][
0
];
}
else
if
(
pa
[
2
][
1
].
Equals
(
'1'
)
||
pa
[
2
][
1
].
Equals
(
'2'
))
{
pa2
=
(
pa
[
2
][
1
].
Equals
(
'1'
)
?
"1"
:
"2"
)
+
pa
[
2
][
0
];
}
}
if
(
pb
[
2
].
Length
==
2
)
{
if
((
pb
[
2
][
1
].
Equals
(
'A'
)
||
pb
[
2
][
1
].
Equals
(
'B'
)))
{
pb2
=
(
pb
[
2
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pb
[
2
][
0
];
}
else
if
((
pb
[
2
][
1
].
Equals
(
'1'
)
||
pb
[
2
][
1
].
Equals
(
'2'
)))
{
pb2
=
(
pb
[
2
][
1
].
Equals
(
'1'
)
?
"1"
:
"2"
)
+
pb
[
2
][
0
];
}
}
var
isa
=
Regex
.
Replace
(
pa
[
1
],
@"[^\d]*"
,
""
)
+
pa1
+
pa2
+
pa
[
3
].
PadLeft
(
2
,
'0'
);
var
isb
=
Regex
.
Replace
(
pb
[
1
],
@"[^\d]*"
,
""
)
+
pb1
+
pb2
+
pb
[
3
].
PadLeft
(
2
,
'0'
);
if
(
int
.
Parse
(
isa
)
==
int
.
Parse
(
isb
))
return
0
;
...
...
@@ -184,7 +218,10 @@ namespace OnlineStore.ACSingleStore.useControl
//store.PositionNumList.Reverse();
string
[]
posstr
=
store
.
PositionNumList
[
store
.
PositionNumList
.
Count
-
1
].
Split
(
'_'
);
int
colcount
=
int
.
Parse
(
posstr
[
1
][
0
].
ToString
())+
1
;
int
colcount
=
0
;
if
(!
int
.
TryParse
(
posstr
[
1
],
out
colcount
))
colcount
=
int
.
Parse
(
posstr
[
1
][
0
].
ToString
());
colcount
++;
for
(
int
i
=
0
;
i
<
colcount
;
i
++)
{
dataGridView1
.
Columns
.
Add
(
"Col"
+
i
+
"_A"
,
"Col"
+
i
+
"_A"
);
...
...
@@ -207,11 +244,21 @@ namespace OnlineStore.ACSingleStore.useControl
if
(
posname
.
StartsWith
(
"fix"
))
continue
;
string
[]
_posstr
=
posname
.
Split
(
'_'
);
int
col
=
int
.
Parse
(
_posstr
[
1
][
0
].
ToString
());
int
col
=
0
;
if
(!
int
.
TryParse
(
_posstr
[
1
],
out
col
))
col
=
int
.
Parse
(
_posstr
[
1
][
0
].
ToString
());
string
ab
=
"A"
;
if
(
_posstr
[
1
].
Length
>
1
)
ab
=
_posstr
[
1
][
1
].
ToString
();
if
(
_posstr
[
2
].
Length
>
1
)
ab
=
_posstr
[
2
][
1
].
ToString
();
if
(
ab
!=
"A"
&&
ab
!=
"B"
)
{
if
(
ab
==
"1"
)
ab
=
"A"
;
else
if
(
ab
==
"2"
)
ab
=
"B"
;
else
ab
=
"A"
;
}
if
(
col
!=
lastcol
||
lastAB
!=
ab
)
currentRowIndex
=
0
;
...
...
@@ -235,6 +282,24 @@ namespace OnlineStore.ACSingleStore.useControl
currentRowIndex
++;
}
dataGridView1
.
Rows
.
RemoveAt
(
dataGridView1
.
Rows
.
Count
-
1
);
for
(
int
i
=
0
;
i
<
dataGridView1
.
Columns
.
Count
;
i
++)
{
if
(
dataGridView1
.
Rows
[
0
].
Cells
[
i
].
Value
==
null
)
{
dataGridView1
.
Columns
[
i
].
Width
=
0
;
}
}
if
(
dataGridView1
.
Rows
[
0
].
Cells
[
dataGridView1
.
Columns
.
Count
-
1
].
Value
!=
null
)
{
dataGridView1
.
Rows
[
0
].
Cells
[
dataGridView1
.
Columns
.
Count
-
1
].
Selected
=
true
;
}
else
if
(
dataGridView1
.
Rows
[
0
].
Cells
[
dataGridView1
.
Columns
.
Count
-
2
].
Value
!=
null
)
{
dataGridView1
.
Rows
[
0
].
Cells
[
dataGridView1
.
Columns
.
Count
-
2
].
Selected
=
true
;
}
if
(
dataGridView1
.
SelectedCells
.
Count
>
0
)
setData
(
dataGridView1
.
SelectedCells
[
0
].
Tag
.
ToString
());
}
void
setData
(
string
posid
)
{
AutoStorePosition
ktkPosition
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
posid
);
...
...
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
3f2df85
此文件的差异太大,无法显示。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
3f2df85
...
...
@@ -2007,15 +2007,15 @@ namespace OnlineStore.DeviceLibrary
int
plateW
=
Convert
.
ToInt32
(
plateWArray
[
index
]);
int
plateH
=
Convert
.
ToInt32
(
plateHArray
[
index
]);
bool
isSingleOut
=
singleOutArray
[
index
].
ToLower
().
Equals
(
"true"
);
string
[]
posArray
=
posId
.
Split
(
'#'
);
if
(
posArray
.
Length
!=
2
)
{
//WarnMsg = StoreName + ResourceControl.GetString(ResourceControl.OutStoreError, "出库格式错误:") + "【" + posId + "】";
SetWarnMsgAndLog
(
ResourceControl
.
OutStoreError
,
posId
);
//LogUtil.error(LOGGER, "收到服务器出库命令:库位号【" + posId + "】格式错误");
continue
;
}
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//
string[] posArray = posId.Split('#');
//
if (posArray.Length != 2)
//
{
//
//WarnMsg = StoreName + ResourceControl.GetString(ResourceControl.OutStoreError, "出库格式错误:") + "【" + posId + "】";
//
SetWarnMsgAndLog(ResourceControl.OutStoreError, posId);
//
//LogUtil.error(LOGGER, "收到服务器出库命令:库位号【" + posId + "】格式错误");
//
continue;
//
}
//
int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
posId
);
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
3f2df85
...
...
@@ -576,14 +576,14 @@ namespace OnlineStore.DeviceLibrary
int
plateH
=
Convert
.
ToInt32
(
data
[
ParamDefine
.
plateH
]);
string
singleOut
=
data
[
ParamDefine
.
singleOut
];
//bool isSingleOut = singleOut.ToLower().Equals("true");
string
[]
posArray
=
posId
.
Split
(
'#'
);
if
(!(
posArray
.
Length
==
2
))
{
SetWarnMsgAndLog
(
ResourceControl
.
InStoreError
,
message
,
posId
);
return
null
;
}
//
string[] posArray = posId.Split('#');
//
if (!(posArray.Length == 2))
//
{
//
SetWarnMsgAndLog(ResourceControl.InStoreError, message, posId);
//
return null;
//
}
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//
int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
AutoStorePosition
position
=
CSVPositionReader
<
AutoStorePosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论