Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e7c7b2c1
由
LN
编写于
2021-04-23 11:46:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
夹爪修改
1 个父辈
3493e779
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
74 行增加
和
14 行删除
dll/Rmaxis/Neotel.Rmaxis.dll
source/AssemblyLineClient/useControl/ClampJawControl.Designer.cs
source/AssemblyLineClient/useControl/ClampJawControl.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/baan/ClampJawBean.cs
dll/Rmaxis/Neotel.Rmaxis.dll
查看文件 @
e7c7b2c
此文件类型无法预览
source/AssemblyLineClient/useControl/ClampJawControl.Designer.cs
查看文件 @
e7c7b2c
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/useControl/ClampJawControl.cs
查看文件 @
e7c7b2c
...
@@ -30,6 +30,13 @@ namespace OnlineStore.AssemblyLine.useControl
...
@@ -30,6 +30,13 @@ namespace OnlineStore.AssemblyLine.useControl
{
{
JName
=
clampJaw
.
config
.
Explain
+
"_"
+
clampJaw
.
config
.
PortName
+
"_"
+
clampJaw
.
config
.
AxisNo
;
JName
=
clampJaw
.
config
.
Explain
+
"_"
+
clampJaw
.
config
.
PortName
+
"_"
+
clampJaw
.
config
.
AxisNo
;
groupClamp
.
Text
=
JName
;
groupClamp
.
Text
=
JName
;
lblReached
.
Text
=
""
;
lblIsMoving
.
Text
=
""
;
lblErrorCode
.
Text
=
""
;
lblEmpty
.
Text
=
""
;
lblForce
.
Text
=
""
;
lblPosition
.
Text
=
""
;
lblSensor
.
Text
=
""
;
}
}
}
}
...
@@ -42,11 +49,19 @@ namespace OnlineStore.AssemblyLine.useControl
...
@@ -42,11 +49,19 @@ namespace OnlineStore.AssemblyLine.useControl
{
{
if
(
clampJaw
.
IsReached
())
if
(
clampJaw
.
IsReached
())
{
{
lbl
MoveOk
.
Text
=
"运动到位
✔"
;
lbl
Reached
.
Text
=
"到达目标
✔"
;
}
}
else
else
{
{
lblMoveOk
.
Text
=
" "
;
lblReached
.
Text
=
" "
;
}
if
(
clampJaw
.
IsMoving
())
{
lblIsMoving
.
Text
=
"运动中 ✔"
;
}
else
{
lblIsMoving
.
Text
=
" "
;
}
}
if
(
clampJaw
.
HasReel
())
if
(
clampJaw
.
HasReel
())
{
{
...
@@ -58,6 +73,7 @@ namespace OnlineStore.AssemblyLine.useControl
...
@@ -58,6 +73,7 @@ namespace OnlineStore.AssemblyLine.useControl
}
}
lblPosition
.
Text
=
"实时位置:"
+
clampJaw
.
GetPosition
();
lblPosition
.
Text
=
"实时位置:"
+
clampJaw
.
GetPosition
();
lblForce
.
Text
=
"实时出力:"
+
clampJaw
.
GetTorque
();
lblForce
.
Text
=
"实时出力:"
+
clampJaw
.
GetTorque
();
lblSensor
.
Text
=
"传感器读数:"
+
clampJaw
.
GetForceSensor
();
int
code
=
clampJaw
.
GetErrorCode
();
int
code
=
clampJaw
.
GetErrorCode
();
if
(
code
>
0
)
if
(
code
>
0
)
{
{
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
e7c7b2c
...
@@ -514,14 +514,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -514,14 +514,14 @@ namespace OnlineStore.DeviceLibrary
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] 等待"
+
NotOkMsg
+
" 超时 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
13
);
LogUtil
.
error
(
WarnMsg
,
DeviceID
*
1000
+
13
);
if
(
NoAlarm
())
if
(
NoAlarm
())
{
{
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
CheckAlarmProcess
(
moveInfo
,
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
{
{
preRWTime
=
DateTime
.
Now
;
preRWTime
=
DateTime
.
Now
;
string
msg
=
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] "
+
NotOkMsg
+
"已等待 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒,重写DO:"
;
string
msg
=
moveInfo
.
Name
+
" ["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"] "
+
NotOkMsg
+
"已等待 "
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"秒,重写DO:"
;
...
@@ -554,20 +554,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -554,20 +554,20 @@ namespace OnlineStore.DeviceLibrary
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W003_Time
))
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W003_Time
))
{
{
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W004_ClampReached
))
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W004_ClampReached
))
{
{
if
(
ClampJwa
!=
null
)
if
(
ClampJwa
!=
null
)
{
{
if
(
ClampJwa
.
IsReached
())
if
(
ClampJwa
.
IsReached
())
{
{
float
currp
=
ClampJwa
.
GetPosition
()
-
(
float
)
wait
.
TargetPosition
;
float
currp
=
ClampJwa
.
GetPosition
()
-
(
float
)
wait
.
TargetPosition
;
if
(
currp
<
1
)
if
(
currp
<
1
)
{
{
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
}
}
}
}
}
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W005_WaitHasReel
))
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W005_WaitHasReel
))
{
{
if
(
ClampJwa
!=
null
)
if
(
ClampJwa
!=
null
)
{
{
...
@@ -578,13 +578,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -578,13 +578,19 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
Name
+
" 用户点击了:忽略夹爪有料信号,继续出入库动作"
);
LogUtil
.
info
(
Name
+
" 用户点击了:忽略夹爪有料信号,继续出入库动作"
);
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
}
}
//如果出力>=0.3,且已等待5秒
//如果是运动中,且到达目标,认为有料
float
torque
=
ClampJwa
.
GetTorque
();
if
((!
wait
.
IsEnd
)
&&
ClampJwa
.
IsMoving
()
&&
ClampJwa
.
IsReached
()
&&
span
.
TotalSeconds
>
3
)
if
((!
wait
.
IsEnd
)
&&
torque
>
0.25
&&
span
.
TotalSeconds
>
5
)
{
{
LogUtil
.
info
(
Name
+
" 无料,但
力度为["
+
torque
+
"]>=0.25
认为有料"
);
LogUtil
.
info
(
Name
+
" 无料,但
在运动中,且运动到位,
认为有料"
);
wait
.
IsEnd
=
true
;
wait
.
IsEnd
=
true
;
}
}
////如果出力>=0.3,且已等待5秒
//float torque = ClampJwa.GetTorque();
//if ((!wait.IsEnd) && torque > 0.25 && span.TotalSeconds > 5)
//{
// LogUtil.info(Name + " 无料,但力度为[" + torque + "]>=0.25认为有料");
// wait.IsEnd = true;
//}
}
}
}
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W008_InStoreCheckOK
))
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W008_InStoreCheckOK
))
...
@@ -600,7 +606,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -600,7 +606,7 @@ namespace OnlineStore.DeviceLibrary
{
{
storeId
=
7
;
storeId
=
7
;
}
}
wait
.
IsEnd
=
LineServer
.
BoxCanReviceTray
(
storeId
,
out
NotOkMsg
);
wait
.
IsEnd
=
LineServer
.
BoxCanReviceTray
(
storeId
,
out
NotOkMsg
);
}
}
else
else
{
{
...
...
source/DeviceLibrary/baan/ClampJawBean.cs
查看文件 @
e7c7b2c
...
@@ -82,6 +82,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -82,6 +82,21 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
public
bool
IsMoving
()
{
try
{
if
(
rmaxis
!=
null
&&
rmaxis
.
IsPortOpen
)
{
return
rmaxis
.
IsMoving
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" IsMoving error :"
+
ex
.
ToString
());
}
return
false
;
}
public
bool
HasReel
()
public
bool
HasReel
()
{
{
try
try
...
@@ -121,7 +136,30 @@ namespace OnlineStore.DeviceLibrary
...
@@ -121,7 +136,30 @@ namespace OnlineStore.DeviceLibrary
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitClampReached
(
0
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitClampReached
(
0
));
}
}
}
}
public
float
GetForceSensor
()
{
try
{
return
rmaxis
.
GetForceSensor
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" GetForceSensor error :"
+
ex
.
ToString
());
}
return
-
1
;
}
public
float
GetVelocity
()
{
try
{
return
rmaxis
.
GetVelocity
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" GetVelocity error :"
+
ex
.
ToString
());
}
return
-
1
;
}
public
float
GetPosition
()
public
float
GetPosition
()
{
{
try
try
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论