Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS200
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5243dba7
由
张东亮
编写于
2025-09-25 11:51:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
料串状态上报smf
1 个父辈
efb8006c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
13 行删除
DeviceLibrary/AutoScanAndLabel/MainMachine _LeftProcess.cs
DeviceLibrary/AutoScanAndLabel/MoveInfo.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _LeftProcess.cs
查看文件 @
5243dba
...
@@ -13,7 +13,7 @@ namespace DeviceLibrary
...
@@ -13,7 +13,7 @@ namespace DeviceLibrary
{
{
partial
class
MainMachine
partial
class
MainMachine
{
{
bool
LeftShelfNoTray
=
false
;
public
bool
LeftShelfNoTray
=
false
;
int
LeftCount
=
0
;
int
LeftCount
=
0
;
public
bool
SafeReleaseLeftShelf
=
false
;
public
bool
SafeReleaseLeftShelf
=
false
;
...
@@ -93,6 +93,7 @@ namespace DeviceLibrary
...
@@ -93,6 +93,7 @@ namespace DeviceLibrary
case
MoveStep
.
L01
:
case
MoveStep
.
L01
:
LeftCount
=
0
;
LeftCount
=
0
;
LeftShelfNoTray
=
false
;
LeftShelfNoTray
=
false
;
LeftMoveInfo
.
CurShelfType
=
""
;
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L02
);
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
L02
);
CylinderMove
(
null
,
IO_Type
.
LeftStopDown
,
IO_Type
.
LeftStopUP
);
CylinderMove
(
null
,
IO_Type
.
LeftStopDown
,
IO_Type
.
LeftStopUP
);
LeftBatchAxisToP2
(
Config
.
Left_Batch_P2
,
Config
.
Left_Batch_P1_speed
,
IO_VALUE
.
HIGH
);
LeftBatchAxisToP2
(
Config
.
Left_Batch_P2
,
Config
.
Left_Batch_P1_speed
,
IO_VALUE
.
HIGH
);
...
@@ -111,7 +112,7 @@ namespace DeviceLibrary
...
@@ -111,7 +112,7 @@ namespace DeviceLibrary
int
currpoint
=
Left_Batch_Axis
.
GetAclPosition
();
int
currpoint
=
Left_Batch_Axis
.
GetAclPosition
();
int
countPleHight
=
PlwHight
/
Config
.
Right_Batch_ChangeValue
*
Config
.
Left_Batch_ChangeValue
;
int
countPleHight
=
PlwHight
/
Config
.
Right_Batch_ChangeValue
*
Config
.
Left_Batch_ChangeValue
;
targetP1
=
currpoint
-
countPleHight
+
5000
;
targetP1
=
currpoint
-
countPleHight
+
5000
;
LeftMoveInfo
.
log
(
$
"出料提升机构,获取到料盘高度脉冲{PlwHight},当前位置{currpoint},计算盘高{countPleHight/ Config.Left_Batch_ChangeValue}"
);
LeftMoveInfo
.
log
(
$
"出料提升机构,获取到料盘高度脉冲{PlwHight},当前位置{currpoint},计算盘高{countPleHight
/ Config.Left_Batch_ChangeValue}"
);
}
}
int
targetSpeed
=
Config
.
Left_Batch_P1_speed
;
int
targetSpeed
=
Config
.
Left_Batch_P1_speed
;
if
(
targetP1
<=
0
)
if
(
targetP1
<=
0
)
...
@@ -154,6 +155,18 @@ namespace DeviceLibrary
...
@@ -154,6 +155,18 @@ namespace DeviceLibrary
LabelMoveInfo
.
MoveParam
=
LeftMoveInfo
.
MoveParam
.
clone
();
LabelMoveInfo
.
MoveParam
=
LeftMoveInfo
.
MoveParam
.
clone
();
LeftMoveInfo
.
log
(
$
"左侧料盘已放入,批量轴下降固定值"
);
LeftMoveInfo
.
log
(
$
"左侧料盘已放入,批量轴下降固定值"
);
}
}
if
(
LeftMoveInfo
.
MoveParam
.
PlateW
==
7
)
{
LeftMoveInfo
.
CurShelfType
=
ShelfType
.
smallReel
.
ToString
();
}
else
if
(
LeftMoveInfo
.
MoveParam
.
PlateW
==
13
)
{
LeftMoveInfo
.
CurShelfType
=
ShelfType
.
bigReel
.
ToString
();
}
else
if
(
LeftMoveInfo
.
MoveParam
.
PlateW
==
15
)
{
LeftMoveInfo
.
CurShelfType
=
ShelfType
.
bigReel
.
ToString
();
}
//else
//else
//{
//{
// LeftMoveInfo.NextMoveStep(MoveStep.L11_ReelPutted);
// LeftMoveInfo.NextMoveStep(MoveStep.L11_ReelPutted);
...
@@ -344,7 +357,9 @@ namespace DeviceLibrary
...
@@ -344,7 +357,9 @@ namespace DeviceLibrary
{
{
state
+=
string
.
Format
(
crc
.
GetString
(
"Res0069"
,
"有料串,已放置{0}张料盘"
),
LeftCount
);
state
+=
string
.
Format
(
crc
.
GetString
(
"Res0069"
,
"有料串,已放置{0}张料盘"
),
LeftCount
);
if
(
LeftShelfNoTray
)
if
(
LeftShelfNoTray
)
{
state
+=
","
+
crc
.
GetString
(
"Res0043"
,
"料串已满"
);
state
+=
","
+
crc
.
GetString
(
"Res0043"
,
"料串已满"
);
}
else
else
state
+=
"."
;
state
+=
"."
;
state
+=
crc
.
GetString
(
"Res0045"
,
"当前ReelID:"
)
+
LeftMoveInfo
.
MoveParam
.
WareCode
;
state
+=
crc
.
GetString
(
"Res0045"
,
"当前ReelID:"
)
+
LeftMoveInfo
.
MoveParam
.
WareCode
;
...
...
DeviceLibrary/AutoScanAndLabel/MoveInfo.cs
查看文件 @
5243dba
...
@@ -37,10 +37,12 @@ namespace DeviceLibrary
...
@@ -37,10 +37,12 @@ namespace DeviceLibrary
delegate
string
StateDelegate
();
delegate
string
StateDelegate
();
StateDelegate
stateDelegate
;
StateDelegate
stateDelegate
;
public
void
SetStateDelegate
(
Func
<
string
>
target
)
{
public
void
SetStateDelegate
(
Func
<
string
>
target
)
{
stateDelegate
=
new
StateDelegate
(
target
);
stateDelegate
=
new
StateDelegate
(
target
);
}
}
public
String
GetStateStr
()
{
public
String
GetStateStr
()
{
if
(
stateDelegate
!=
null
)
if
(
stateDelegate
!=
null
)
return
stateDelegate
.
Invoke
();
return
stateDelegate
.
Invoke
();
...
@@ -50,7 +52,10 @@ namespace DeviceLibrary
...
@@ -50,7 +52,10 @@ namespace DeviceLibrary
{
{
get
{
return
moveStep
;
}
get
{
return
moveStep
;
}
}
}
/// <summary>
/// 当前料串类型
/// </summary>
public
string
CurShelfType
{
get
;
set
;
}
=
""
;
public
void
NewMove
(
MoveStep
step
)
public
void
NewMove
(
MoveStep
step
)
{
{
this
.
MoveParam
=
new
LabelParam
();
this
.
MoveParam
=
new
LabelParam
();
...
@@ -106,10 +111,11 @@ namespace DeviceLibrary
...
@@ -106,10 +111,11 @@ namespace DeviceLibrary
return
span
;
return
span
;
}
}
public
string
lastmsg
=
""
;
public
string
lastmsg
=
""
;
public
void
log
(
string
msg
)
{
public
void
log
(
string
msg
)
{
msg
=
$
"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}"
;
msg
=
$
"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}"
;
if
(
String
.
Compare
(
lastmsg
,
msg
,
StringComparison
.
Ordinal
)!=
0
)
if
(
String
.
Compare
(
lastmsg
,
msg
,
StringComparison
.
Ordinal
)
!=
0
)
{
{
lastmsg
=
msg
;
lastmsg
=
msg
;
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
...
@@ -201,7 +207,7 @@ namespace DeviceLibrary
...
@@ -201,7 +207,7 @@ namespace DeviceLibrary
wait
.
IsHomeMove
=
false
;
wait
.
IsHomeMove
=
false
;
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitAction
(
Func
<
WaitResultInfo
,
bool
>
a
,
string
msg
)
public
static
WaitResultInfo
WaitAction
(
Func
<
WaitResultInfo
,
bool
>
a
,
string
msg
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
WaitEnum
.
W013_Action
;
wait
.
WaitType
=
WaitEnum
.
W013_Action
;
...
@@ -245,11 +251,11 @@ namespace DeviceLibrary
...
@@ -245,11 +251,11 @@ namespace DeviceLibrary
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W008_BatchAxis
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W008_BatchAxis
))
{
{
return
crc
.
GetString
(
"Res0124.84e7c741"
,
"批量轴上升到上料点"
);
return
crc
.
GetString
(
"Res0124.84e7c741"
,
"批量轴上升到上料点"
);
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
{
{
return
crc
.
GetString
(
"Res0125.ed4de1c6"
,
"扫码完成"
);
return
crc
.
GetString
(
"Res0125.ed4de1c6"
,
"扫码完成"
);
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W013_Action
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W013_Action
))
{
{
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
5243dba
...
@@ -494,16 +494,21 @@ namespace DeviceLibrary
...
@@ -494,16 +494,21 @@ namespace DeviceLibrary
//msg.msgParams = new string[] { addressValue.GetStateStr() };
//msg.msgParams = new string[] { addressValue.GetStateStr() };
msg
.
msg
=
addressValue
.
GetStateStr
();
msg
.
msg
=
addressValue
.
GetStateStr
();
equipMsgs
.
Add
(
msg
);
equipMsgs
.
Add
(
msg
);
if
(
RobotManage
.
mainMachine
.
runStatus
==
RunStatus
.
Running
)
if
(
RobotManage
.
mainMachine
.
runStatus
==
RunStatus
.
Running
)
{
{
if
(
addressValue
.
Name
==
crc
.
GetString
(
"Res0039"
,
"右侧取料"
))
if
(
addressValue
.
Name
==
crc
.
GetString
(
"Res0039"
,
"右侧取料"
))
{
{
dic
.
Add
(
"inShelfType"
,
ShelfType
.
smallReel
.
ToString
()
);
dic
.
Add
(
"inShelfType"
,
$
"{ShelfType.smallReel.ToString()},{ShelfType.bigReel.ToString()}"
);
dic
.
Add
(
"inShelfStatus"
,
ShelfStatus
(
true
,
Convert
.
ToInt32
(
addressValue
.
MoveStep
)));
dic
.
Add
(
"inShelfStatus"
,
ShelfStatus
(
true
,
Convert
.
ToInt32
(
addressValue
.
MoveStep
)));
}
}
if
(
addressValue
.
Name
==
crc
.
GetString
(
"Res0051"
,
"左侧放料"
))
if
(
addressValue
.
Name
==
crc
.
GetString
(
"Res0051"
,
"左侧放料"
))
{
{
dic
.
Add
(
"outShelfType"
,
ShelfType
.
smallReel
.
ToString
());
if
(
RobotManage
.
mainMachine
.
LeftShelfNoTray
)
dic
.
Add
(
"outShelfType"
,
addressValue
.
CurShelfType
);
else
{
dic
.
Add
(
"outShelfType"
,
""
);
}
dic
.
Add
(
"outShelfStatus"
,
ShelfStatus
(
false
,
Convert
.
ToInt32
(
addressValue
.
MoveStep
)));
dic
.
Add
(
"outShelfStatus"
,
ShelfStatus
(
false
,
Convert
.
ToInt32
(
addressValue
.
MoveStep
)));
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论