Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8e2fb2ea
由
LN
编写于
2020-01-08 10:54:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出料修改
1 个父辈
ccc9f6e5
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
134 行增加
和
91 行删除
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/model/TrayInfo.cs
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
查看文件 @
8e2fb2e
...
...
@@ -35,6 +35,7 @@
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
groupBox5
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnOutStopDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSwStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnFLStop1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnFLStop2Down
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -97,7 +98,6 @@
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnScan
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOutStopDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
...
@@ -362,6 +362,19 @@
this
.
groupBox5
.
TabStop
=
false
;
this
.
groupBox5
.
Text
=
"IO操作测试"
;
//
// btnOutStopDown
//
this
.
btnOutStopDown
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnOutStopDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOutStopDown
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOutStopDown
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
179
);
this
.
btnOutStopDown
.
Name
=
"btnOutStopDown"
;
this
.
btnOutStopDown
.
Size
=
new
System
.
Drawing
.
Size
(
153
,
34
);
this
.
btnOutStopDown
.
TabIndex
=
272
;
this
.
btnOutStopDown
.
Text
=
"SL出料阻挡下降"
;
this
.
btnOutStopDown
.
UseVisualStyleBackColor
=
false
;
this
.
btnOutStopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOutStopDown_Click
);
//
// btnSwStop
//
this
.
btnSwStop
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
...
...
@@ -628,9 +641,9 @@
this
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
110
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
77
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
720
,
1
09
);
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
720
,
1
55
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
@@ -734,7 +747,7 @@
this
.
lblwidth
.
AutoSize
=
true
;
this
.
lblwidth
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblwidth
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblwidth
.
Location
=
new
System
.
Drawing
.
Point
(
248
,
78
);
this
.
lblwidth
.
Location
=
new
System
.
Drawing
.
Point
(
417
,
52
);
this
.
lblwidth
.
Name
=
"lblwidth"
;
this
.
lblwidth
.
Size
=
new
System
.
Drawing
.
Size
(
92
,
17
);
this
.
lblwidth
.
TabIndex
=
279
;
...
...
@@ -756,7 +769,7 @@
this
.
lblAgvInfo
.
AutoSize
=
true
;
this
.
lblAgvInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblAgvInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblAgvInfo
.
Location
=
new
System
.
Drawing
.
Point
(
248
,
25
);
this
.
lblAgvInfo
.
Location
=
new
System
.
Drawing
.
Point
(
417
,
25
);
this
.
lblAgvInfo
.
Name
=
"lblAgvInfo"
;
this
.
lblAgvInfo
.
Size
=
new
System
.
Drawing
.
Size
(
61
,
17
);
this
.
lblAgvInfo
.
TabIndex
=
276
;
...
...
@@ -769,7 +782,7 @@
this
.
lblInstoreList
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblInstoreList
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblInstoreList
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblInstoreList
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
2
20
);
this
.
lblInstoreList
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
2
58
);
this
.
lblInstoreList
.
Name
=
"lblInstoreList"
;
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
720
,
109
);
this
.
lblInstoreList
.
TabIndex
=
277
;
...
...
@@ -1194,19 +1207,6 @@
this
.
btnScan
.
UseVisualStyleBackColor
=
false
;
this
.
btnScan
.
Click
+=
new
System
.
EventHandler
(
this
.
btnScan_Click
);
//
// btnOutStopDown
//
this
.
btnOutStopDown
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnOutStopDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOutStopDown
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOutStopDown
.
Location
=
new
System
.
Drawing
.
Point
(
168
,
179
);
this
.
btnOutStopDown
.
Name
=
"btnOutStopDown"
;
this
.
btnOutStopDown
.
Size
=
new
System
.
Drawing
.
Size
(
153
,
34
);
this
.
btnOutStopDown
.
TabIndex
=
272
;
this
.
btnOutStopDown
.
Text
=
"SL出料阻挡下降"
;
this
.
btnOutStopDown
.
UseVisualStyleBackColor
=
false
;
this
.
btnOutStopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOutStopDown_Click
);
//
// FrmFeedingEquip
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
8e2fb2e
...
...
@@ -379,18 +379,19 @@ namespace OnlineStore.DeviceLibrary
}
public
virtual
string
GetMoveStr
()
{
string
msg
=
""
;
int
tLength
=
1
5
;
msg
+=
"runS
tatus:"
.
PadRight
(
tLength
,
' '
)
+
runStatus
+
"\n"
;
msg
+=
"
lineStatus:"
.
PadRight
(
tLength
,
' '
)
+
lineStatus
+
"\n"
;
msg
+=
"MoveT
ype:"
.
PadRight
(
tLength
,
' '
)
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS
tep:"
.
PadRight
(
tLength
,
' '
)
+
MoveInfo
.
SLog
+
"\n"
;
int
tLength
=
1
0
;
msg
+=
"runS
:"
+
runStatus
+
"\n"
;
msg
+=
"
runS:"
+
lineStatus
+
"\n"
;
msg
+=
"MoveT
:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS
:"
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
"L
ine1-Move:"
.
PadRight
(
tLength
,
' '
)
+
TrayLine1
.
MoveInfo
.
MoveType
+
" "
+
TrayLine1
.
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"L
ine2-Move:"
.
PadRight
(
tLength
,
' '
)
+
TrayLine2
.
MoveInfo
.
MoveType
+
" "
+
TrayLine2
.
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"LastT
rayP:"
.
PadRight
(
tLength
,
' '
)
+
TrayLine1
.
LastTrayPosition
+
" "
+
TrayLine2
.
LastTrayPosition
+
" "
+
Line3LastTrayP
+
" "
+
"\n"
;
msg
+=
"
IsInRun:"
.
PadRight
(
tLength
,
' '
)
+
TrayLine1
.
IsInTurn
()
+
" "
+
TrayLine2
.
IsInTurn
()
+
" "
+
Line3Turn
.
InTurn
+
" "
+
"\n"
;
msg
+=
"L
ine3CanRun:"
.
PadRight
(
tLength
,
' '
)
+
TrayLine1
.
Line3CanRun
+
" "
+
TrayLine2
.
Line3CanRun
+
" "
+
"\n"
;
msg
+=
"L
1-M:"
+
TrayLine1
.
MoveInfo
.
MoveType
+
" "
+
TrayLine1
.
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"L
2-M:"
+
TrayLine2
.
MoveInfo
.
MoveType
+
" "
+
TrayLine2
.
MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"LastT
P:"
+
TrayLine1
.
LastTrayPosition
+
" "
+
TrayLine2
.
LastTrayPosition
+
" "
+
Line3LastTrayP
+
" "
+
"\n"
;
msg
+=
"
LIsRun:"
+
TrayLine1
.
IsInTurn
()
+
" "
+
TrayLine2
.
IsInTurn
()
+
" "
+
Line3Turn
.
InTurn
+
" "
+
"\n"
;
msg
+=
"L
3CanRun:"
+
TrayLine1
.
Line3CanRun
+
" "
+
TrayLine2
.
Line3CanRun
+
" "
+
"\n"
;
return
msg
;
}
public
override
bool
StartInStoreMove
(
InOutParam
param
)
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
8e2fb2e
...
...
@@ -571,15 +571,15 @@ namespace OnlineStore.DeviceLibrary
{
string
msg
=
""
;
int
tLength
=
15
;
msg
+=
"
preTrayNum:"
.
PadRight
(
tLength
,
' '
)
+
preTrayNum
+
"\n"
;
msg
+=
"
currTrayNum:"
.
PadRight
(
tLength
,
' '
)
+
currTrayNum
+
"\n"
;
msg
+=
"
上个托盘:"
+
preTrayNum
+
"\n"
;
msg
+=
"
当前托盘:"
+
currTrayNum
+
"\n"
;
msg
+=
"runS
tatus:"
.
PadRight
(
tLength
,
' '
)
+
runStatus
+
"\n"
;
msg
+=
"lineS
tatus:"
.
PadRight
(
tLength
,
' '
)
+
lineStatus
+
"\n"
;
msg
+=
"MoveT
ype:"
.
PadRight
(
tLength
,
' '
)
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS
tep:"
.
PadRight
(
tLength
,
' '
)
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
"SMoveT
ype:"
.
PadRight
(
tLength
,
' '
)
+
SecondMoveInfo
.
MoveType
+
"\n"
;
msg
+=
"SMoveS
tep:"
.
PadRight
(
tLength
,
' '
)
+
SecondMoveInfo
.
MoveStep
+
""
;
msg
+=
"runS
: "
+
runStatus
+
"\n"
;
msg
+=
"lineS
: "
+
lineStatus
+
"\n"
;
msg
+=
"MoveT
:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS
:"
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
"SMoveT
:"
+
SecondMoveInfo
.
MoveType
+
"\n"
;
msg
+=
"SMoveS
:"
+
SecondMoveInfo
.
MoveStep
+
""
;
return
msg
;
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_OutStore.cs
查看文件 @
8e2fb2e
...
...
@@ -51,15 +51,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
,
outParam
);
//可以开始出库啦
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
OutLog
(
"出库移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降指定的高度,升降轴回原点"
);
int
targetPosition
=
BatchAxis
.
GetAclPosition
()
-
outParam
.
PlateH
*
Config
.
Height_ChangeValue
;
if
(
targetPosition
<
Config
.
BatchAxisP2
)
{
targetPosition
=
Config
.
BatchAxisP2
;
}
OutLog
(
"出库移栽 "
+
MoveInfo
.
SLog
+
" :提升伺服下降指定的高度,目标:"
+
targetPosition
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
return
true
;
//UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
return
true
;
}
public
void
StartOutStoreP
()
{
...
...
@@ -353,18 +352,34 @@ namespace OnlineStore.DeviceLibrary
private
void
TrayOutProcess
()
{
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_211_AxisDownMove
))
{
if
(
MoveCylineCanTakeOrGive
())
{
//判断伺服检测信号是否亮
if
(
IOValue
(
IO_Type
.
SL_AxisLocationCheck
).
Equals
(
IO_VALUE
.
LOW
)
||
BatchAxis
.
IsInPosition
(
Config
.
BatchAxisP2
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_212_CylinderTake
);
OutLog
(
"紧急出料移栽"
+
MoveInfo
.
SLog
+
":上料横移机构取料端"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
if
(
MoveCylineCanTakeOrGive
())
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_212_CylinderTake
);
OutLog
(
"紧急出料移栽"
+
MoveInfo
.
SLog
+
":上料横移机构取料端"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
OutLog
(
"紧急出料移栽"
+
MoveInfo
.
SLog
+
":上料横移机构取料端 前先上升横移气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
}
else
{
//可以开始出库啦
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FO_211_AxisDownMove
);
OutLog
(
"紧急出料移栽"
+
MoveInfo
.
SLog
+
":上料横移机构取料端 前先上升横移气缸"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
int
targetPosition
=
BatchAxis
.
GetAclPosition
()
-
MoveInfo
.
MoveParam
.
PlateH
*
Config
.
Height_ChangeValue
;
if
(
targetPosition
<
Config
.
BatchAxisP2
)
{
targetPosition
=
Config
.
BatchAxisP2
;
}
OutLog
(
"出库移栽 "
+
MoveInfo
.
SLog
+
" :TrayOutProcess 伺服检测信号亮并且不再P2点,再次下降指定的高度,目标:"
+
targetPosition
);
BatchAxis
.
AbsMove
(
MoveInfo
,
targetPosition
,
Config
.
BatchAxis_P2Speed
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FO_212_CylinderTake
))
...
...
@@ -445,7 +460,7 @@ namespace OnlineStore.DeviceLibrary
string
msg
=
SServerManager
.
PutShelfFinished
(
Name
,
MoveInfo
.
MoveParam
.
WareCode
,
CurrShelfId
,
OutStoreCount
.
ToString
(),
out
serverShelfData
);
if
(
String
.
IsNullOrEmpty
(
msg
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
"【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】【"
+
CurrShelfId
+
"】【"
+
OutStoreCount
.
ToString
()+
"】PutShelfFinished 结果:"
+
msg
);
LogUtil
.
error
(
Name
+
"【"
+
MoveInfo
.
MoveParam
.
WareCode
+
"】【"
+
CurrShelfId
+
"】【"
+
OutStoreCount
.
ToString
()
+
"】PutShelfFinished 结果:"
+
msg
);
serverShelfData
=
null
;
}
});
...
...
@@ -459,24 +474,24 @@ namespace OnlineStore.DeviceLibrary
int
tp
=
currPositon
-
Config
.
Height_ChangeValue
*
10
;
if
(
tp
<
Config
.
BatchAxisP2
)
{
SendOutShelfOut
(
"当前提升轴位置:"
+
currPositon
+
",料架已满,需要送出料架"
);
SendOutShelfOut
(
"当前提升轴位置:"
+
currPositon
+
",料架已满,需要送出料架"
);
}
else
if
(
OutEndSendShelfOut
)
{
SendOutShelfOut
(
"当前提升轴位置:"
+
currPositon
+
",OutEndSendShelfOut,需要送出料架"
);
SendOutShelfOut
(
"当前提升轴位置:"
+
currPositon
+
",OutEndSendShelfOut,需要送出料架"
);
}
else
{
//判断是否需要送出料架
if
(
serverShelfData
!=
null
&&
serverShelfData
.
cutTask
<=
0
)
{
SendOutShelfOut
(
"服务器返回cutTask="
+
serverShelfData
.
cutTask
+
",需要送出料架"
);
{
SendOutShelfOut
(
"服务器返回cutTask="
+
serverShelfData
.
cutTask
+
",需要送出料架"
);
}
else
{
OutLog
(
"紧急出料移栽 "
+
MoveInfo
.
SLog
+
":出料结束"
);
MoveInfo
.
EndMove
();
runStatus
=
LineRunStatus
.
Runing
;
runStatus
=
LineRunStatus
.
Runing
;
}
}
}
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
8e2fb2e
...
...
@@ -981,15 +981,15 @@ namespace OnlineStore.DeviceLibrary
{
string
msg
=
""
;
// int tLength = 20;
msg
+=
"
Sw41TrayNum
: "
+
Sw41TrayNum
+
"\n"
;
msg
+=
"
Sw23TrayNum
:"
+
Sw23TrayNum
+
"\n"
;
msg
+=
"runS
tatus:
"
+
runStatus
+
"\n"
;
msg
+=
"lineS
tatus:
"
+
lineStatus
+
"\n"
;
msg
+=
"MoveT
ype:
"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS
tep:
"
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
"SW41
_Move: "
+
SW41_MoveInfo
.
MoveType
+
"
"
+
SW41_MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"SW23
_Move: "
+
SW23_MoveInfo
.
MoveType
+
"
"
+
SW23_MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"
横移41托盘
: "
+
Sw41TrayNum
+
"\n"
;
msg
+=
"
横移23托盘
:"
+
Sw23TrayNum
+
"\n"
;
msg
+=
"runS
:
"
+
runStatus
+
"\n"
;
msg
+=
"lineS
:
"
+
lineStatus
+
"\n"
;
msg
+=
"MoveT
:
"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS
:
"
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
"SW41
: "
+
SW41_MoveInfo
.
MoveType
+
"
"
+
SW41_MoveInfo
.
MoveStep
+
"\n"
;
msg
+=
"SW23
: "
+
SW23_MoveInfo
.
MoveType
+
"
"
+
SW23_MoveInfo
.
MoveStep
+
"\n"
;
return
msg
;
}
}
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
8e2fb2e
...
...
@@ -39,7 +39,7 @@ namespace OnlineStore.DeviceLibrary
string
path
=
server
+
addr
.
Trim
()
+
"?"
;
foreach
(
string
paramName
in
paramsMap
.
Keys
)
{
string
par
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
paramsMap
[
paramName
],
System
.
Text
.
Encoding
.
UTF8
);
string
par
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
paramsMap
[
paramName
],
System
.
Text
.
Encoding
.
UTF8
);
path
+=
paramName
+
"="
+
par
+
"&"
;
}
path
=
path
.
Substring
(
0
,
path
.
Length
-
1
);
...
...
@@ -78,7 +78,7 @@ namespace OnlineStore.DeviceLibrary
string
server
=
GetAddr
(
Addr_PosForPutin
,
paramMap
);
//string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
LogUtil
.
info
(
deviceName
+
"托盘【"
+
trayNum
+
"】 条码<< "
+
codeStr
+
",获取入库PosID:"
);
LogUtil
.
info
(
deviceName
+
"托盘【"
+
trayNum
+
"】 条码<< "
+
codeStr
+
",获取入库PosID:"
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
"CodeReceived 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
...
...
@@ -94,19 +94,19 @@ namespace OnlineStore.DeviceLibrary
}
if
(!
serverResult
.
pos
.
Equals
(
""
))
{
{
// 仓位命名: 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个隔板位置
//第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
posId
=
serverResult
.
pos
;
int
plateW
=
width
;
int
plateH
=
height
;
int
storeId
=
InOutParam
.
GetPosStoreId
(
posId
);
string
wareNum
=
serverResult
.
barcode
;
//根据库位号查找移栽
...
...
@@ -121,7 +121,7 @@ namespace OnlineStore.DeviceLibrary
}
LogUtil
.
info
(
"收到入库命令: "
+
param
.
ToStr
()
+
" ,更新盘空满信息,托盘号【"
+
trayNum
+
"】,有料,"
+
ReelType
.
InStore
+
""
);
TrayManager
.
UpdateTrayInfo
(
trayNum
,
true
,
ReelType
.
InStore
,
new
InOutParam
(
trayNum
,
wareNum
,
posId
,
plateH
,
plateW
,
false
));
TrayManager
.
UpdateTrayInfo
(
trayNum
,
true
,
ReelType
.
InStore
,
new
InOutParam
(
trayNum
,
wareNum
,
posId
,
plateH
,
plateW
,
false
));
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
LineServer
.
BoxCanInStore
(
moveEquip
.
DeviceID
))
...
...
@@ -131,17 +131,17 @@ namespace OnlineStore.DeviceLibrary
lock
(
moveEquip
.
waitInListLock
)
{
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil
.
info
(
moveEquip
.
Name
+
" 入库命令: "
+
param
.
ToStr
()
+
"加入等待列表中!"
);
LogUtil
.
info
(
moveEquip
.
Name
+
" 入库命令: "
+
param
.
ToStr
()
+
"加入等待列表中!"
);
moveEquip
.
waitInStoreList
.
Add
(
param
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
""
;
}
}
public
static
string
GetTraySize
(
string
deviceName
,
int
robotIndex
,
List
<
string
>
codeList
,
out
int
outSize
)
{
outSize
=
0
;
...
...
@@ -161,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
if
(
String
.
IsNullOrEmpty
(
codeStr
))
{
return
msg
=
deviceName
+
"未扫到条码"
;
}
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"robotIndex"
,
robotIndex
.
ToString
());
// 参数: robotIndex = 机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
paramMap
.
Add
(
"barcode"
,
codeStr
);
// barcode = 扫到的条码
...
...
@@ -176,7 +176,7 @@ namespace OnlineStore.DeviceLibrary
{
return
msg
=
deviceName
+
" 【"
+
robotIndex
+
"】 条码【 "
+
codeStr
+
"】没有收到服务器反馈"
;
}
else
if
(
serverResult
.
code
.
Equals
(
0
).
Equals
(
false
))
else
if
(
serverResult
.
code
.
Equals
(
0
).
Equals
(
false
))
{
// code: 0为正常,其他为异常,
// msg:消息,
...
...
@@ -192,7 +192,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
""
;
}
...
...
@@ -219,12 +219,12 @@ namespace OnlineStore.DeviceLibrary
ServerData
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ServerData
>(
resultStr
);
if
(
serverResult
==
null
)
{
msg
=
deviceName
+
"UpdateTrayLoc【 "
+
barcode
+
"】【"
+
status
+
"】【"
+
locInfo
+
"】没有收到服务器反馈"
;
msg
=
deviceName
+
"UpdateTrayLoc【 "
+
barcode
+
"】【"
+
status
+
"】【"
+
locInfo
+
"】没有收到服务器反馈"
;
}
else
if
(
serverResult
.
code
.
Equals
(
0
).
Equals
(
false
))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg
=
deviceName
+
" UpdateTrayLoc【 "
+
barcode
+
"】【"
+
status
+
"】【"
+
locInfo
+
"】 :"
+
"["
+
serverResult
.
code
+
"]"
+
serverResult
.
msg
;
msg
=
deviceName
+
" UpdateTrayLoc【 "
+
barcode
+
"】【"
+
status
+
"】【"
+
locInfo
+
"】 :"
+
"["
+
serverResult
.
code
+
"]"
+
serverResult
.
msg
;
}
if
(!
msg
.
Equals
(
""
))
{
...
...
@@ -233,7 +233,7 @@ namespace OnlineStore.DeviceLibrary
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
msg
;
}
...
...
@@ -245,6 +245,7 @@ namespace OnlineStore.DeviceLibrary
shelfData
=
null
;
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"barcode"
,
barcode
);
// 参数: barcode=料盘的条码
paramMap
.
Add
(
"rfid"
,
rfid
);
// rfid = 料架的RFID信息
...
...
@@ -254,7 +255,11 @@ namespace OnlineStore.DeviceLibrary
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
"PutShelfFinished 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
// 返回: {"code": 0, "msg":"ok", "data":{"rfid":"xxx","smallEmpty":0,"bigEmpty":0, "packageEmpty":0,"cutPackageTask":0,"packageTask":10,"cutTask":10, "smallTask":5, "bigTask":5}
ServerData
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
ServerData
>(
resultStr
);
PutFinishedData
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
PutFinishedData
>(
resultStr
);
// string str = "{"code":0,"msg":"ok","data":{"smallTask":"1","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"0","packageEmpty":"0","rfid":" - 1 - 1","cutTask":"0"}}";
//PutShelfFinished 【http://localhost/myproject/rest/api/qisda/device/putShelfFinished?barcode=R008062019120301889&rfid=-1-1&rfidLoc=4】
//【{"code":0,"msg":"ok","data":{"smallTask":"1","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"0","packageEmpty":"0","rfid":"-1-1","cutTask":"0"}}】
if
(
serverResult
==
null
)
{
return
msg
=
deviceName
+
"PutShelfFinished【 "
+
barcode
+
"】【"
+
rfid
+
"】【"
+
rfidPosId
+
"】没有收到服务器反馈"
;
...
...
@@ -263,17 +268,18 @@ namespace OnlineStore.DeviceLibrary
{
return
msg
=
deviceName
+
" PutShelfFinished【 "
+
barcode
+
"】【"
+
rfid
+
"】【"
+
rfidPosId
+
"】 :"
+
serverResult
.
msg
;
}
if
(
String
.
IsNullOrEmpty
(
serverResult
.
data
).
Equals
(
false
))
{
shelfData
=
JsonHelper
.
DeserializeJsonToObject
<
ShelfData
>(
serverResult
.
data
);
}
//if (String.IsNullOrEmpty(serverResult.data).Equals(false))
//{
// shelfData = JsonHelper.DeserializeJsonToObject<ShelfData>(serverResult.data);
//}
shelfData
=
serverResult
.
data
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
LogUtil
.
error
(
deviceName
+
" "
,
ex
);
}
return
""
;
}
}
}
public
class
LocStatus
{
...
...
@@ -299,8 +305,18 @@ namespace OnlineStore.DeviceLibrary
public
string
msg
{
get
;
set
;
}
public
string
data
{
get
;
set
;
}
//PutShelfFinished 【http://localhost/myproject/rest/api/qisda/device/putShelfFinished?barcode=R008062019120301889&rfid=-1-1&rfidLoc=4】
//【{"code":0,"msg":"ok","data":{"smallTask":"1","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"0","packageEmpty":"0","rfid":"-1-1","cutTask":"0"}}】
}
public
class
PutFinishedData
{
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
ShelfData
data
{
get
;
set
;
}
}
public
class
ShelfData
{
/// <summary>
...
...
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
8e2fb2e
...
...
@@ -194,6 +194,17 @@ namespace OnlineStore.DeviceLibrary
int
p
=
ACServerManager
.
GetActualtPosition
(
Config
);
return
p
;
}
public
bool
IsInPosition
(
int
targetP
)
{
int
currp
=
GetAclPosition
();
int
chaz
=
targetP
-
currp
;
if
(
Math
.
Abs
(
chaz
)
<
Config
.
CanErrorCountMax
)
{
return
true
;
}
return
false
;
}
/// <summary>
/// 绝对运动至点,不等待结果
/// </summary>
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
8e2fb2e
...
...
@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
InOrOutStore
.
Equals
(
2
))
{
type
=
inoutPar
.
urgentReel
?
"[紧急出料]"
:
"出料[ "
+
inoutPar
.
ToStr
()
+
" ]"
;
type
=
inoutPar
.
urgentReel
?
"[紧急出料]
[ "
+
inoutPar
.
ToStr
()
+
" ]
"
:
"出料[ "
+
inoutPar
.
ToStr
()
+
" ]"
;
}
//return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type +
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论