Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f4831bd6
由
LN
编写于
2020-01-07 11:47:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
料仓库位格式更新
1 个父辈
02316ea9
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
90 行增加
和
60 行删除
source/ACSingleStore/App.config
source/ACSingleStore/记录.txt
source/Common/util/LogUtil.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/LoadCVSLibrary/position/CSVPositionReader.cs
source/ACSingleStore/App.config
查看文件 @
f4831bd
...
...
@@ -20,7 +20,7 @@
<
add
key
=
"Store_ConfigPath"
value
=
"\StoreConfig\AC\StoreConfig.csv"
/>
<
add
key
=
"Store_Type"
value
=
"RC_AC_SA"
/>
<
add
key
=
"Store_CID"
value
=
"line-ac-01"
/>
<
add
key
=
"Store_ID"
value
=
"
1
"
/>
<
add
key
=
"Store_ID"
value
=
"
7
"
/>
<!--
end
one
store
config
-->
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"8000"
/>
...
...
source/ACSingleStore/记录.txt
查看文件 @
f4831bd
...
...
@@ -11,9 +11,19 @@
在RC1246-ACSingleStore 项目基础上,
新建分支RC1250-ACSingleStore,作为佳世达流水线单台料仓软件
5 出库时根据StatusBean返回data中的参数决定料盘流转到哪里
5 出库时根据StatusBean返回data中的参数决定料盘流转到哪里
urgentReel: true 表示紧急料,需要出到料串上
cutReel: true 表示分盘料,需要出到料串上
smallReel: true 小料(7x8),放置到小料架上
rfid: 分配的料架RFID
rfidLoc: 料架的架位,值为-1时,可以自由分配皮带线, 小料时,架位为1-46优先走1/2号皮带线,47-92优先走3/4号皮带线, 70,71,72时只能分配到3/4号皮带线;大料时,架位1-6优先走1/2号皮带线, 7-12优先走3/4号皮带线
仓位命名: 4D01020304
第1和第2位表示楼层(4D)
第3和第4位表示料仓(01) 01-18为流水线料仓, 19-24为包装料仓
第5和第6位表示列(02)
第7和第8位表示行(03)
第9和第10位表示隔板位置(04)
例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
source/Common/util/LogUtil.cs
查看文件 @
f4831bd
...
...
@@ -20,7 +20,7 @@ namespace OnlineStore.Common
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
int
showCount
=
1
5
;
public
static
int
showCount
=
1
0
;
public
static
bool
debug_opened
=
false
;
...
...
@@ -141,7 +141,7 @@ namespace OnlineStore.Common
logBox
.
AppendText
(
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
);
//增加文本
TimeSpan
span
=
DateTime
.
Now
-
lastTime
;
if
(
span
.
TotalSeconds
>
10
)
if
(
span
.
TotalSeconds
>
10
00
)
{
lastTime
=
DateTime
.
Now
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
...
...
@@ -160,9 +160,6 @@ namespace OnlineStore.Common
if
(
logBox
!=
null
&&
logBox
.
Visible
)
{
logBox
.
Text
=
LastText
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
logBox
.
ScrollToCaret
();
//滚动到控件光标处
}
}
public
static
void
ClearLog
()
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
f4831bd
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
PRO,IO模块对应的DI数量,IO_DILength,192.168.20
0.1
1#8,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.20
0.1
1#8,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.20
1.2
1#8,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.20
1.2
1#8,,,,,,,
PRO,是否有仓门,HasDoor,1,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.20
0.1
1,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.20
1.2
1,,,,,,,
,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0,
...
...
@@ -20,17 +20,17 @@ DO,轴2刹车电源ON,Axis_Brake,4,PRO_AOI_IP_1,0,轴2刹车电源ON,Y05,DO-05,0,
DO,料仓吹气SOL,StartOrStopBlow,5,PRO_AOI_IP_1,0,料仓吹气SOL,Y06,DO-06,0,
DO,进料口门上升SOL,Door_Up,6,PRO_AOI_IP_1,0,进料口门上升SOL,Y07,DO-07,0,
DO,进料口门下降SOL,Door_Down,7,PRO_AOI_IP_1,0,进料口门下降SOL,Y08,DO-08,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM
1
,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM
1
,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM
1
,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM
1
,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,
4030
00,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,
4150
00,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,
4150
00,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,
4030
00,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,
268093
,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,
10
00,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,
10
000,,,,,,,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM
3
,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM
3
,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM
3
,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM
3
,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,
3014
00,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorIPosition_P2,
3215
00,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,
3215
00,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,
3014
00,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,
325000
,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,
79
00,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,
318
000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
...
...
@@ -39,8 +39,8 @@ PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,
8
0,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,
8
0,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,
100
0,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,
100
0,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,
...
...
@@ -63,22 +63,22 @@ PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,
25
0,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,
25
0,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,
25
0,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,
15
0,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,
25
0,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,
1
00,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,
1
00,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,
1
00,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,
12
0,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,
12
0,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,
1
00,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,
1
00,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,
10
00,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,
1
00,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,
1
00,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,
1
00,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,
100
0,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,
60
0,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,
100
0,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,
60
0,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,
100
0,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,
6
00,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,
6
00,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,
6
00,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,
50
0,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,
50
0,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,
6
00,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,
6
00,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,
6
00,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,
6
00,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,
6
00,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,
6
00,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
PRO,(轴三)进出轴停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,10,,,,,,,
...
...
@@ -99,6 +99,6 @@ PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM
2
,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM
1
,,,,,,,
,,,,,,,,, ,
,,,,,,,,, ,
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
f4831bd
此文件的差异太大,无法显示。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
f4831bd
...
...
@@ -1190,21 +1190,11 @@ namespace OnlineStore.DeviceLibrary
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
posId
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateH
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateW
))
{
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置
string
posId
=
data
[
ParamDefine
.
posId
];
string
plateW
=
data
[
ParamDefine
.
plateW
];
string
plateH
=
data
[
ParamDefine
.
plateH
];
string
[]
posArray
=
posId
.
Split
(
'#'
);
InOutPosInfo
inoutInfo
=
new
InOutPosInfo
(
message
,
posId
,
plateH
,
plateW
);
if
(!(
posArray
.
Length
==
2
))
{
WarnMsg
=
StoreName
+
"入库库位格式错误: 【"
+
inoutInfo
.
ToStr
()
+
"】"
;
LogUtil
.
error
(
LOGGER
,
"服务器反馈 入库库位格式错误:【"
+
inoutInfo
.
ToStr
()
+
"】"
);
LogUtil
.
info
(
LOGGER
,
"服务器反馈 入库库位格式错误:【"
+
inoutInfo
.
ToStr
()
+
"】"
);
return
;
}
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//根据发送的posId获取位置列表
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posId
);
if
(
position
==
null
)
...
...
@@ -1685,14 +1675,6 @@ namespace OnlineStore.DeviceLibrary
string
plateW
=
plateWArray
[
index
];
string
plateH
=
plateHArray
[
index
];
InOutPosInfo
intouInfo
=
new
InOutPosInfo
(
barcode
,
posId
,
plateW
,
plateH
,
urgentReel
,
cutReel
,
smallReel
,
rfid
,
rfidLoc
);
string
[]
posArray
=
posId
.
Split
(
'#'
);
if
(
posArray
.
Length
!=
2
)
{
WarnMsg
=
StoreName
+
"库位号格式错误: 【"
+
intouInfo
.
ToStr
()
+
"】"
;
LogUtil
.
error
(
LOGGER
,
WarnMsg
);
continue
;
}
// int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posId
);
...
...
source/LoadCVSLibrary/position/CSVPositionReader.cs
查看文件 @
f4831bd
...
...
@@ -239,12 +239,53 @@ namespace OnlineStore.LoadCSVLibrary
StorePostionBase
position
=
(
GetPositon
(
PosId
));
if
(
position
!=
null
)
{
int
jIndex
=
position
.
PositionNum
.
IndexOf
(
"#"
);
position
.
PositionNum
=
storeIndex
.
ToString
().
PadLeft
(
2
,
'0'
)
+
position
.
PositionNum
.
Substring
(
jIndex
);
try
{
// 仓位命名: 4D01020304
//第1和第2位表示楼层(4D)
//第3和第4位表示料仓(01) 01 - 18为流水线料仓, 19 - 24为包装料仓
//第5和第6位表示列(02)
//第7和第8位表示行(03)
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
string
oldPosId
=
position
.
PositionNum
;
//08#AC1_18_3_18
string
newPosId
=
""
;
int
jIndex
=
oldPosId
.
IndexOf
(
"#"
);
string
louceng
=
"4D"
;
string
storeId
=
storeIndex
.
ToString
().
PadLeft
(
2
,
'0'
);
if
(
jIndex
>
0
)
{
string
[]
hengStr
=
oldPosId
.
Split
(
'_'
);
int
lie
=
0
;
int
hang
=
0
;
int
p
=
0
;
if
(
hengStr
.
Length
==
4
)
{
lie
=
Convert
.
ToInt32
(
hengStr
[
1
]);
hang
=
Convert
.
ToInt32
(
hengStr
[
2
]);
p
=
Convert
.
ToInt32
(
hengStr
[
3
]);
}
lie
++;
newPosId
=
louceng
+
storeId
+
lie
.
ToString
().
PadLeft
(
2
,
'0'
)
+
hang
.
ToString
().
PadLeft
(
2
,
'0'
)
+
p
.
ToString
().
PadLeft
(
2
,
'0'
);
}
else
{
newPosId
=
louceng
+
storeId
+
oldPosId
.
Substring
(
4
,
oldPosId
.
Length
-
4
);
}
// position.PositionNum = storeIndex.ToString().PadLeft(2, '0') + position.PositionNum.Substring(jIndex);
position
.
PositionNum
=
newPosId
;
position
.
StoreId
=
storeIndex
;
string
newValue
=
PostionToString
(
position
,
titleIndex
,
proTitleMap
);
lines
[
index
]
=
newValue
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"更新【"
+
filePath
+
"】位置出错【"
+
line
+
"】"
+
ex
.
ToString
());
}
}
//if (value.Equals(position.PositionNum))
//{
// //更新缓存
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论