Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
NS200
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7dc12ba0
由
张东亮
编写于
2024-11-22 18:07:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
agv对接滚筒停止根据停止接口,不按照信号
1 个父辈
62275c92
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
19 行删除
DeviceLibrary/AGVService/Controllers/stopRollerController.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _Common_.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _LeftProcess.cs
DeviceLibrary/AutoScanAndLabel/MainMachine _RightProcess.cs
DeviceLibrary/AGVService/Controllers/stopRollerController.cs
查看文件 @
7dc12ba
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Security.Cryptography
;
using
System.Web.Http
;
...
...
@@ -56,6 +57,8 @@ namespace WebApi.Controllers
}
else
{
RobotManage
.
mainMachine
.
IOMove
(
IO_Type
.
RightMoto_Reverse
,
IO_VALUE
.
HIGH
,
false
,
500
);
RobotManage
.
mainMachine
.
RightMoveInfo
.
log
(
$
"电滚停止"
);
result
.
status
=
"IDLE"
;
}
break
;
...
...
@@ -72,6 +75,8 @@ namespace WebApi.Controllers
}
else
{
RobotManage
.
mainMachine
.
IOMove
(
IO_Type
.
LeftMoto_Reverse
,
IO_VALUE
.
HIGH
,
false
,
500
);
RobotManage
.
mainMachine
.
LeftMoveInfo
.
log
(
$
"电滚停止"
);
result
.
status
=
"IDLE"
;
}
break
;
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _Common_.cs
查看文件 @
7dc12ba
...
...
@@ -12,10 +12,10 @@ namespace DeviceLibrary
{
partial
class
MainMachine
{
public
void
StopMove
(
bool
ServoOff
=
false
)
public
void
StopMove
(
bool
ServoOff
=
false
)
{
runStatus
=
RunStatus
.
Stop
;
MoveInfo
.
List
.
ForEach
((
m
)=>
{
m
.
EndMove
();
});
MoveInfo
.
List
.
ForEach
((
m
)
=>
{
m
.
EndMove
();
});
AxisBean
.
StopMultiAxis
(
AxisBean
.
List
);
if
(
ServoOff
)
...
...
@@ -76,7 +76,7 @@ namespace DeviceLibrary
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W002_IOValue
))
{
ConfigIO
io
=
RobotManage
.
Config
.
getWaitIO
(
wait
.
IoType
);
NotOkMsg
=
crc
.
GetString
(
"Res0104"
,
"等待"
)+
"【"
+
io
.
DisplayStr
+
"】=【"
+
wait
.
IoValue
+
"】"
;
NotOkMsg
=
crc
.
GetString
(
"Res0104"
,
"等待"
)
+
"【"
+
io
.
DisplayStr
+
"】=【"
+
wait
.
IoValue
+
"】"
;
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
if
(!
wait
.
IsEnd
)
{
...
...
@@ -84,8 +84,8 @@ namespace DeviceLibrary
if
(
span
.
TotalMilliseconds
>
timeOutMs
&&
NoAlarm
())
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
crc
.
GetString
(
"Res0104"
,
"等待"
)+
"("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") "
+
crc
.
GetString
(
"Res0105"
,
"超时"
);
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
crc
.
GetString
(
"Res0104"
,
"等待"
)
+
"("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") "
+
crc
.
GetString
(
"Res0105"
,
"超时"
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
warning
);
if
(
NoAlarm
())
{
...
...
@@ -128,7 +128,7 @@ namespace DeviceLibrary
{
axisBean
.
SuddenStop
();
}
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
}
else
{
...
...
@@ -151,7 +151,7 @@ namespace DeviceLibrary
}
}
if
(
wait
.
IsEnd
)
{
{
if
(
MoveInfo
.
OneWaitCanEndStep
)
{
isOk
=
true
;
...
...
@@ -175,7 +175,7 @@ namespace DeviceLibrary
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
{
LogUtil
.
error
(
$
"MoveInfo.MoveStep:{span.TotalSeconds}>{MoveInfo.TimeOutSeconds}"
);
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]"
+
crc
.
GetString
(
"Res0104"
,
"等待"
)
+
NotOkMsg
+
crc
.
GetString
(
"Res0105"
,
"超时"
)+
"["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]"
+
crc
.
GetString
(
"Res0106"
,
"秒"
);
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"]"
+
crc
.
GetString
(
"Res0104"
,
"等待"
)
+
NotOkMsg
+
crc
.
GetString
(
"Res0105"
,
"超时"
)
+
"["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]"
+
crc
.
GetString
(
"Res0106"
,
"秒"
);
int
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
if
(
second
>
120
)
...
...
@@ -188,7 +188,7 @@ namespace DeviceLibrary
}
LogUtil
.
error
(
WarnMsg
,
logType
+
100
,
second
);
//MoveInfo.errlog(WarnMsg);
Alarm
(
AlarmType
.
IoSingleTimeOut
,
WarnMsg
);
Alarm
(
AlarmType
.
IoSingleTimeOut
,
WarnMsg
);
Msg
.
add
(
WarnMsg
,
MsgLevel
.
alarm
);
}
return
true
;
...
...
@@ -213,7 +213,8 @@ namespace DeviceLibrary
LogUtil
.
error
(
Name
+
" 报警,报警类型:"
+
_alarmType
);
if
(
this
.
alarmType
==
AlarmType
.
SuddenStop
&&
_alarmType
==
AlarmType
.
None
)
{
if
(
this
.
alarmType
==
AlarmType
.
SuddenStop
&&
_alarmType
==
AlarmType
.
None
)
{
clampTool
.
Close
();
clampTool
.
Open
();
}
...
...
@@ -258,10 +259,11 @@ namespace DeviceLibrary
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IoHighType
,
IO_VALUE
.
HIGH
));
}
}
public
IO_VALUE
IOValue
(
string
ioType
)
{
public
IO_VALUE
IOValue
(
string
ioType
)
{
return
IOManager
.
IOValue
(
ioType
);
}
void
IOMove
(
string
IoType
,
IO_VALUE
value
,
bool
isCheck
=
false
,
int
msTime
=
0
)
public
void
IOMove
(
string
IoType
,
IO_VALUE
value
,
bool
isCheck
=
false
,
int
msTime
=
0
)
{
if
(
msTime
<=
0
)
{
...
...
@@ -273,7 +275,7 @@ namespace DeviceLibrary
}
else
{
Task
.
Run
(()=>
Task
.
Run
(()
=>
{
IOManager
.
IOMove
(
IoType
,
value
);
Thread
.
Sleep
(
msTime
);
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _LeftProcess.cs
查看文件 @
7dc12ba
...
...
@@ -29,7 +29,7 @@ namespace DeviceLibrary
{
int
hight
=
0
;
//if (Uppre != -1000 && Uplast != -1000&&step==3)
if
(
Uppre
!=
-
1000
&&
Uplast
!=
-
1000
&&
step
==
2
)
if
(
Uppre
!=
-
1000
&&
Uplast
!=
-
1000
&&
step
==
2
)
{
hight
=
Math
.
Abs
(
Uplast
-
Uppre
)
+
2000
;
RightMoveInfo
.
log
(
$
"料盘高度计算:hight:{hight},Uppre:{Uppre},Uplast:{Uplast}"
);
...
...
@@ -201,8 +201,8 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
L55
:
LeftMoveInfo
.
NextMoveStep
(
MoveStep
.
LEND
);
IOMove
(
IO_Type
.
LeftMoto_Reverse
,
IO_VALUE
.
HIGH
,
false
,
500
);
LeftMoveInfo
.
log
(
$
"电滚停止"
);
//
IOMove(IO_Type.LeftMoto_Reverse, IO_VALUE.HIGH, false, 500);
//
LeftMoveInfo.log($"电滚停止");
break
;
//}
//料串入料流程,轴下降到p1,挡停下降,滚筒正转到后端检测高电平后再转60秒,再转1秒,再转0.5秒停止,进入上料流程
...
...
@@ -332,7 +332,7 @@ namespace DeviceLibrary
if
(
PlwHight
>
5000
)
{
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
;
LeftMoveInfo
.
log
(
$
"出料提升机构,获取到料盘高度脉冲{PlwHight},当前位置{currpoint},计算盘高{countPleHight}"
);
}
...
...
DeviceLibrary/AutoScanAndLabel/MainMachine _RightProcess.cs
查看文件 @
7dc12ba
...
...
@@ -210,8 +210,8 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
R34
:
RightMoveInfo
.
NextMoveStep
(
MoveStep
.
REND
);
IOMove
(
IO_Type
.
RightMoto_Reverse
,
IO_VALUE
.
HIGH
,
false
,
500
);
RightMoveInfo
.
log
(
$
"电滚停止"
);
////
IOMove(IO_Type.RightMoto_Reverse, IO_VALUE.HIGH, false, 500);
//
RightMoveInfo.log($"电滚停止");
break
;
//}
//料串入料流程,轴下降到P1点,阻挡下降,滚筒正转,等待后端到位检测高电平延时5秒,0.5秒后滚筒正转停,阻挡上升,进入上料料流程
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论