Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
SO1049-CarriageClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 52a58a0b
由
张东亮
编写于
2023-04-12 09:31:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
光栅暂停功能添加
1 个父辈
ffd8084d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
78 行增加
和
114 行删除
source/CarriageClient/robotForm/FrmRobotEquip.Designer.cs
source/CarriageClient/robotForm/FrmRobotEquip.cs
source/DeviceLibrary/Config/Config_Client.csv
source/DeviceLibrary/clientEquip/EquipBase.cs
source/DeviceLibrary/clientEquip/robotEquip/RobotEquip.cs
source/DeviceLibrary/clientEquip/robotEquip/RobotEquip_Partial.cs
source/LoadCVSLibrary/clientConfig/config/IO_Type.cs
source/CarriageClient/robotForm/FrmRobotEquip.Designer.cs
查看文件 @
52a58a0
此文件的差异被折叠,
点击展开。
source/CarriageClient/robotForm/FrmRobotEquip.cs
查看文件 @
52a58a0
...
@@ -37,7 +37,6 @@ namespace OnlineStore.CarriageClient
...
@@ -37,7 +37,6 @@ namespace OnlineStore.CarriageClient
}
}
private
void
FrmStoreIOStatus_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmStoreIOStatus_Load
(
object
sender
,
EventArgs
e
)
{
{
chbMoveStop
.
Checked
=
robotEquip
.
MoveStop
;
lblStoreStatus
.
Text
=
DeviceBase
.
GetRunStr
(
robotEquip
.
runStatus
);
lblStoreStatus
.
Text
=
DeviceBase
.
GetRunStr
(
robotEquip
.
runStatus
);
lblThisSta
.
Text
=
robotEquip
.
WarnMsg
;
lblThisSta
.
Text
=
robotEquip
.
WarnMsg
;
...
@@ -203,10 +202,6 @@ namespace OnlineStore.CarriageClient
...
@@ -203,10 +202,6 @@ namespace OnlineStore.CarriageClient
{
{
try
try
{
{
if
(!
this
.
Visible
)
{
return
;
}
ReadIOList
();
ReadIOList
();
//ReadBtnDO();
//ReadBtnDO();
// clampJawControl1.UpdateSta();
// clampJawControl1.UpdateSta();
...
@@ -217,6 +212,16 @@ namespace OnlineStore.CarriageClient
...
@@ -217,6 +212,16 @@ namespace OnlineStore.CarriageClient
{
{
FormStatus
(
true
);
FormStatus
(
true
);
}
}
if
(
robotEquip
.
MoveStop
)
{
btnMoveStop
.
Text
=
"恢复运动"
;
btnMoveStop
.
BackColor
=
Color
.
Green
;
}
else
{
btnMoveStop
.
Text
=
"暂停运动"
;
btnMoveStop
.
BackColor
=
Color
.
Yellow
;
}
}
}
else
else
{
{
...
@@ -240,7 +245,7 @@ namespace OnlineStore.CarriageClient
...
@@ -240,7 +245,7 @@ namespace OnlineStore.CarriageClient
{
{
lblInoutInfo
.
Text
=
""
;
lblInoutInfo
.
Text
=
""
;
}
}
lblrobotTaskInfo
.
Text
=
$
"{SServerManager.RobotTaskInfo}\r\n{SServerManager.BoxDoorStatus}"
;
lblrobotTaskInfo
.
Text
=
$
"{SServerManager.RobotTaskInfo}\r\n{SServerManager.BoxDoorStatus}"
;
lblMoveInfo
.
Text
=
robotEquip
.
GetMoveStr
();
//+ "料仓类型:" + (boxBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘");
lblMoveInfo
.
Text
=
robotEquip
.
GetMoveStr
();
//+ "料仓类型:" + (boxBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘");
//string canOut = boxBean.CanOutStore(boxBean.DeviceID) ? "可出库" : "不可出库";
//string canOut = boxBean.CanOutStore(boxBean.DeviceID) ? "可出库" : "不可出库";
lblStoreStatus
.
Text
=
DeviceBase
.
GetRunStr
(
robotEquip
.
runStatus
);
// + "(" + canOut + ")";
lblStoreStatus
.
Text
=
DeviceBase
.
GetRunStr
(
robotEquip
.
runStatus
);
// + "(" + canOut + ")";
...
@@ -492,17 +497,6 @@ namespace OnlineStore.CarriageClient
...
@@ -492,17 +497,6 @@ namespace OnlineStore.CarriageClient
tabcon
.
Controls
.
Add
(
lineTabPage
);
tabcon
.
Controls
.
Add
(
lineTabPage
);
}
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
IsLoad
)
{
return
;
}
robotEquip
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
robotEquip
.
Name
+
"用户切换是否暂停: "
+
robotEquip
.
MoveStop
);
}
private
void
btnCloseAll_Click
(
object
sender
,
EventArgs
e
)
private
void
btnCloseAll_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -577,9 +571,28 @@ namespace OnlineStore.CarriageClient
...
@@ -577,9 +571,28 @@ namespace OnlineStore.CarriageClient
ucRobot1
.
Update
(
jAKABean
.
RobotData
);
ucRobot1
.
Update
(
jAKABean
.
RobotData
);
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"chkManualRobot_CheckedChanged"
,
ex
);
}
}
private
void
btnMoveStop_Click
(
object
sender
,
EventArgs
e
)
{
if
(
robotEquip
.
runStatus
<=
RunStatus
.
Wait
)
{
MessageBox
.
Show
(
robotEquip
.
Name
+
"请先启动设备"
,
"提示"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
}
if
(
robotEquip
.
MoveStop
)
{
robotEquip
.
Resume
();
LogUtil
.
info
(
$
"用户点击恢复运动按钮"
);
}
else
{
{
LogUtil
.
error
(
"chkManualRobot_CheckedChanged"
,
ex
);
robotEquip
.
Pause
();
LogUtil
.
info
(
$
"用户点击暂停运动按钮"
);
}
}
}
}
...
...
source/DeviceLibrary/Config/Config_Client.csv
查看文件 @
52a58a0
...
@@ -63,6 +63,7 @@ DI,1,13寸料盘顶升下降端,Inlet_13InchJackDownSig,9,HC,X09,,,,,,,,,,,,
...
@@ -63,6 +63,7 @@ DI,1,13寸料盘顶升下降端,Inlet_13InchJackDownSig,9,HC,X09,,,,,,,,,,,,
DI,3,NG料暂存区料盘检测,NGBox_TrayCheck,10,HC,X10,,,,,,,,,,,,
DI,3,NG料暂存区料盘检测,NGBox_TrayCheck,10,HC,X10,,,,,,,,,,,,
DI,3,机械臂料盘检测,RobotArm_TrayCheck,11,HC,X11,,,,,,,,,,,,
DI,3,机械臂料盘检测,RobotArm_TrayCheck,11,HC,X11,,,,,,,,,,,,
DI,3,机械臂夹紧检测,RobotArm_ClampingSig,12,HC,X12,,,,,,,,,,,,
DI,3,机械臂夹紧检测,RobotArm_ClampingSig,12,HC,X12,,,,,,,,,,,,
DI,3,安全光栅,SafetyLightGrids,18,HC,X18,,,,,,,,,,,,
DI,2,出料线体顶升上升端,Outlet_JackUpSig,13,HC,X13,,,,,,,,,,,,
DI,2,出料线体顶升上升端,Outlet_JackUpSig,13,HC,X13,,,,,,,,,,,,
DI,2,出料线体顶升下降端,Outlet_JackDownSig,14,HC,X14,,,,,,,,,,,,
DI,2,出料线体顶升下降端,Outlet_JackDownSig,14,HC,X14,,,,,,,,,,,,
DI,2,出料线体料盘检测1,Outlet_TrayCheck1,15,HC,X15,,,,,,,,,,,,
DI,2,出料线体料盘检测1,Outlet_TrayCheck1,15,HC,X15,,,,,,,,,,,,
...
...
source/DeviceLibrary/clientEquip/EquipBase.cs
查看文件 @
52a58a0
...
@@ -75,7 +75,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -75,7 +75,6 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
RHome
))
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
RHome
))
{
{
ResetProcess
();
ResetProcess
();
...
...
source/DeviceLibrary/clientEquip/robotEquip/RobotEquip.cs
查看文件 @
52a58a0
...
@@ -470,54 +470,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -470,54 +470,21 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
#
endregion
#
endregion
#
region
门禁
#
region
门禁光栅
//门禁状态:0正常。1=安全门禁打开,已停止运动
private
int
CurrSecurityAccess
=
0
;
protected
void
SecurityAccessProcess
()
protected
void
SecurityAccessProcess
()
{
{
try
try
{
{
//if (!baseConfig.DIList.ContainsKey(IO_Type.LeftDoor_Limit))
if
(!
MoveStop
)
//{
// return;
//}
//if (!baseConfig.DIList.ContainsKey(IO_Type.RightDoor_Limit))
//{
// return;
//}
//if (!baseConfig.DIList.ContainsKey(IO_Type.BackDoor_Limit))
//{
// return;
//}
if
(
CurrSecurityAccess
.
Equals
(
0
))
{
{
//if (StoreManager.DisBoxSecurityAccess)
if
(
IOValue
(
IO_Type
.
SafetyLightGrids
).
Equals
(
IO_VALUE
.
LOW
))
//{
{
//}
Pause
();
//else if (IOValue(IO_Type.LeftDoor_Limit).Equals(IO_VALUE.LOW))
LogUtil
.
info
(
"安全光栅触发,停止行走机构和机器人运动"
);
//{
}
// SecurityAccessStop("左前门门禁");
//}
//else if (IOValue(IO_Type.RightDoor_Limit).Equals(IO_VALUE.LOW))
//{
// SecurityAccessStop("右前门门禁");
//}
//else if (IOValue(IO_Type.BackDoor_Limit).Equals(IO_VALUE.LOW))
//{
// SecurityAccessStop("后门门禁");
//}
}
else
if
(
CurrSecurityAccess
.
Equals
(
1
))
{
//if (IOValue(IO_Type.LeftDoor_Limit).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.RightDoor_Limit).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.BackDoor_Limit).Equals(IO_VALUE.HIGH))
//{
// SecurityAccessReset();
//}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -525,56 +492,19 @@ namespace OnlineStore.DeviceLibrary
...
@@ -525,56 +492,19 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
public
void
Pause
()
//private void SecurityAccessStop(string doorname)
{
//{
MoveStop
=
true
;
// if (!baseConfig.DIList.ContainsKey(IO_Type.LeftDoor_Limit))
CompressAxis
.
SuddenStop
();
// {
MoveAxis
.
SuddenStop
();
// return;
RobotPause
();
// }
MoveInfo
.
CanWhileCount
=
5
;
// if (!baseConfig.DIList.ContainsKey(IO_Type.RightDoor_Limit))
}
// {
public
void
Resume
()
// return;
{
// }
MoveStop
=
false
;
// if (!baseConfig.DIList.ContainsKey(IO_Type.BackDoor_Limit))
RobotResume
();
// {
}
// return;
// }
// CurrSecurityAccess = 1;
// if (alarmType > (AlarmType.IoSingleTimeOut))
// {
// return;
// }
// LogUtil.info($"{Name} {doorname}被打开,停止当前运动{MoveInfo.MoveType},MoveStop={MoveStop},报警急停");
// SetWarnMsg($"{doorname}被打开,报警急停");
// Alarm(AlarmType.SuddenStop);
//}
//private void SecurityAccessReset()
//{
// if (!baseConfig.DIList.ContainsKey(IO_Type.LeftDoor_Limit))
// {
// return;
// }
// if (!baseConfig.DIList.ContainsKey(IO_Type.RightDoor_Limit))
// {
// return;
// }
// if (!baseConfig.DIList.ContainsKey(IO_Type.BackDoor_Limit))
// {
// return;
// }
// CurrSecurityAccess = 0;
// MoveStop = false;
// if (alarmType > (AlarmType.IoSingleTimeOut))
// {
// return;
// }
// //光栅恢复处理
//}
#
endregion
#
endregion
...
...
source/DeviceLibrary/clientEquip/robotEquip/RobotEquip_Partial.cs
查看文件 @
52a58a0
using
CodeLibrary
;
using
CodeLibrary
;
using
log4net.Util
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
...
@@ -343,6 +344,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -343,6 +344,23 @@ namespace OnlineStore.DeviceLibrary
bean
.
MotionAbort
();
bean
.
MotionAbort
();
}
}
}
}
public
bool
RobotPause
()
{
if
(
GetRobotInfo
(
out
JAKA
.
JAKABean
bean
))
{
return
bean
.
Pause
();
}
return
false
;
}
public
bool
RobotResume
()
{
if
(
GetRobotInfo
(
out
JAKA
.
JAKABean
bean
))
{
return
bean
.
Resume
();
}
return
false
;
}
#
endregion
#
endregion
#
region
行走机构
#
region
行走机构
...
...
source/LoadCVSLibrary/clientConfig/config/IO_Type.cs
查看文件 @
52a58a0
...
@@ -3,7 +3,7 @@ using System.Collections.Generic;
...
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Text
;
using
System.Text
;
namespace
OnlineStore.LoadCSVLibrary
namespace
OnlineStore.LoadCSVLibrary
{
{
...
@@ -26,7 +26,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -26,7 +26,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
return
TypeList
;
return
TypeList
;
}
}
/// <summary>
/// <summary>
...
@@ -101,7 +101,10 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -101,7 +101,10 @@ namespace OnlineStore.LoadCSVLibrary
/// DI,2,出料线体允许送料,Outlet_AllowFeedSig,17,HC,X17,,,,,,,,,,,,
/// DI,2,出料线体允许送料,Outlet_AllowFeedSig,17,HC,X17,,,,,,,,,,,,
/// </summary>
/// </summary>
public
static
string
Outlet_AllowFeedSig
=
"Outlet_AllowFeedSig"
;
public
static
string
Outlet_AllowFeedSig
=
"Outlet_AllowFeedSig"
;
/// <summary>
/// DI,3,安全光栅,SafetyLightGrids,18,HC,X18,,,,,,,,,,,,
/// </summary>
public
static
string
SafetyLightGrids
=
"SafetyLightGrids"
;
/// <summary>
/// <summary>
/// DO,1,自动绿色指示灯,RunSign_HddLed,0,HC,Y00,,,,,,,,,,,,
/// DO,1,自动绿色指示灯,RunSign_HddLed,0,HC,Y00,,,,,,,,,,,,
/// </summary>
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论