Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e096c46d
由
刘韬
编写于
2023-01-06 09:33:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
96809aed
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
38 行增加
和
13 行删除
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/MainMachine.cs
LoadCVSLibrary/CSVAttribute.cs
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
e096c46
...
@@ -408,7 +408,7 @@ namespace DeviceLibrary
...
@@ -408,7 +408,7 @@ namespace DeviceLibrary
foreach
(
AxisBean
axis
in
axisArray
)
foreach
(
AxisBean
axis
in
axisArray
)
{
{
bool
result
=
axis
.
Open
(
false
,
out
msg
);
bool
result
=
axis
.
Open
(
false
,
out
msg
);
if
(!
result
||
(!
String
.
IsNullOrEmpty
(
msg
))
)
if
(!
result
)
{
{
//SetWarnMsg(Name + msg);
//SetWarnMsg(Name + msg);
//Alarm(AlarmType.AxisAlarm);
//Alarm(AlarmType.AxisAlarm);
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
e096c46
...
@@ -18,6 +18,7 @@ namespace DeviceLibrary
...
@@ -18,6 +18,7 @@ namespace DeviceLibrary
public
int
UpOverTimeMS
=
0
;
public
int
UpOverTimeMS
=
0
;
string
up
;
string
up
;
string
down
;
string
down
;
string
saftylight
;
string
axisbreak
;
string
axisbreak
;
AxisBean
axisBean
;
AxisBean
axisBean
;
int
upspeed
;
int
upspeed
;
...
@@ -25,9 +26,10 @@ namespace DeviceLibrary
...
@@ -25,9 +26,10 @@ namespace DeviceLibrary
int
StrokeLength
=
270000
;
int
StrokeLength
=
270000
;
MoveInfo
moveInfo1
=
new
MoveInfo
(
"升降机构"
,
false
);
MoveInfo
moveInfo1
=
new
MoveInfo
(
"升降机构"
,
false
);
bool
paused
=
false
;
bool
paused
=
false
;
public
LiftMonitor
(
string
_up
,
string
_down
,
string
_break
,
AxisBean
_axisBean
,
int
_StrokeLength
,
int
_upspeed
,
int
_downspeed
=
0
)
{
public
LiftMonitor
(
string
_up
,
string
_down
,
string
_
saftylight
,
string
_
break
,
AxisBean
_axisBean
,
int
_StrokeLength
,
int
_upspeed
,
int
_downspeed
=
0
)
{
up
=
_up
;
up
=
_up
;
down
=
_down
;
down
=
_down
;
saftylight
=
_saftylight
;
axisBean
=
_axisBean
;
axisBean
=
_axisBean
;
upspeed
=
_upspeed
;
upspeed
=
_upspeed
;
axisbreak
=
_break
;
axisbreak
=
_break
;
...
@@ -86,7 +88,12 @@ namespace DeviceLibrary
...
@@ -86,7 +88,12 @@ namespace DeviceLibrary
return
;
return
;
}
}
if
(
IOManager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
"设备急停"
);
moveInfo
.
log
(
"设备急停"
);
Pause
();
return
;
}
if
(!
string
.
IsNullOrEmpty
(
saftylight
)
&&
IOManager
.
IOValue
(
saftylight
).
Equals
(
IO_VALUE
.
LOW
))
{
moveInfo
.
log
(
"安全光栅触发停止"
);
Pause
();
Pause
();
return
;
return
;
}
}
...
@@ -171,6 +178,12 @@ namespace DeviceLibrary
...
@@ -171,6 +178,12 @@ namespace DeviceLibrary
Pause
();
Pause
();
return
;
return
;
}
}
if
(!
string
.
IsNullOrEmpty
(
saftylight
)
&&
IOManager
.
IOValue
(
saftylight
).
Equals
(
IO_VALUE
.
LOW
))
{
moveInfo
.
log
(
"安全光栅触发停止"
);
Pause
();
return
;
}
}
}
moveInfo
.
WaitList
.
Remove
(
wr
);
moveInfo
.
WaitList
.
Remove
(
wr
);
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
e096c46
...
@@ -122,8 +122,8 @@ namespace DeviceLibrary
...
@@ -122,8 +122,8 @@ namespace DeviceLibrary
{
{
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Work
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Work
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Home
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
ReelFlipDoor_Home
);
MotorFlipDoorB
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_L_Home
,
IO_Type
.
ReelFlipDoor_L_Work
,
null
,
new
AxisBean
(
Config
.
FlipDoor_L_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
);
MotorFlipDoorB
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_L_Home
,
IO_Type
.
ReelFlipDoor_L_Work
,
IO_Type
.
SafetyLightCurtains
,
null
,
new
AxisBean
(
Config
.
FlipDoor_L_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
);
MotorFlipDoorA
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_R_Home
,
IO_Type
.
ReelFlipDoor_R_Work
,
null
,
new
AxisBean
(
Config
.
FlipDoor_R_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
);
MotorFlipDoorA
=
new
LiftMonitor
(
IO_Type
.
ReelFlipDoor_R_Home
,
IO_Type
.
ReelFlipDoor_R_Work
,
IO_Type
.
SafetyLightCurtains
,
null
,
new
AxisBean
(
Config
.
FlipDoor_R_Axis
,
Name
),
Config
.
FlipDoorLength
,
Config
.
FlipDoorLength_speed
);
LogUtil
.
info
(
"加载翻板门类型为:步进"
);
LogUtil
.
info
(
"加载翻板门类型为:步进"
);
}
}
else
{
else
{
...
@@ -131,18 +131,19 @@ namespace DeviceLibrary
...
@@ -131,18 +131,19 @@ namespace DeviceLibrary
}
}
//检测料串门是否为鸣志电机控制
//检测料串门是否为鸣志电机控制
if
(
Config
.
StringDoor_Axis
!=
null
)
{
if
(
Config
.
StringDoor_Axis
!=
null
)
{
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
StringDoor_Open
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
StringDoor_Open
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
StringDoor_Close
);
RobotManage
.
Config
.
DOList
.
Remove
(
IO_Type
.
StringDoor_Close
);
StringDoor
=
new
LiftMonitor
(
IO_Type
.
StringDoor_Open
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Axis_Break
,
new
AxisBean
(
Config
.
StringDoor_Axis
,
Name
),
Config
.
StringDoorLength
,
Config
.
StringDoorLength_speed
);
var
sf
=
""
;
if
(
ConfigHelper
.
Config
.
Get
(
"Device_IO_X08IsStringDoor_SafetyLightCurtains"
,
false
))
sf
=
IO_Type
.
AGV_OnPosition
;
StringDoor
=
new
LiftMonitor
(
IO_Type
.
StringDoor_Open
,
IO_Type
.
StringDoor_Close
,
sf
,
IO_Type
.
StringDoor_Axis_Break
,
new
AxisBean
(
Config
.
StringDoor_Axis
,
Name
),
Config
.
StringDoorLength
,
Config
.
StringDoorLength_speed
);
StringDoor
.
DownOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_DownOverTimeMS"
,
0
);
StringDoor
.
DownOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_DownOverTimeMS"
,
0
);
StringDoor
.
UpOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_UpOverTimeMS"
,
0
);
StringDoor
.
UpOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_UpOverTimeMS"
,
0
);
LogUtil
.
info
(
"加载料串门类型为:步进"
);
LogUtil
.
info
(
"加载料串门类型为:步进"
);
//此版本同步删除其他IO
}
else
//RobotManage.Config.DOList.Remove(IO_Type.NitrogenValve);
}
else
LogUtil
.
info
(
"加载料串门类型为:气缸"
);
LogUtil
.
info
(
"加载料串门类型为:气缸"
);
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
{
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_DoorSafeCheck"
,
false
))
{
...
@@ -606,6 +607,11 @@ namespace DeviceLibrary
...
@@ -606,6 +607,11 @@ namespace DeviceLibrary
}
}
if
(!
lastSafeCheckStatus
&&
ok
)
if
(!
lastSafeCheckStatus
&&
ok
)
{
{
if
(!
AxisBean
.
RunMultiAxis
(
true
,
out
string
msg
,
AxisBean
.
List
))
{
ok
=
false
;
Msg
.
add
(
msg
,
MsgLevel
.
warning
);
}
SafetyDevice
.
ResumeAll
();
SafetyDevice
.
ResumeAll
();
}
}
lastSafeCheckStatus
=
ok
;
lastSafeCheckStatus
=
ok
;
...
@@ -634,6 +640,13 @@ namespace DeviceLibrary
...
@@ -634,6 +640,13 @@ namespace DeviceLibrary
public
bool
DeviceCheck
()
{
public
bool
DeviceCheck
()
{
bool
ok
=
true
;
bool
ok
=
true
;
isInSuddenDown
=
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
);
isInSuddenDown
=
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
);
var
SafetyLightStop
=
IOValue
(
IO_Type
.
DoorSafe_Disable
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
LOW
);
if
(
SafetyLightStop
)
{
lastSafeCheckStatus
=
false
;
Msg
.
add
(
crc
.
GetString
(
L
.
SafetyLight_is_block
,
"安全光栅被遮挡"
),
MsgLevel
.
warning
);
return
false
;
}
if
(
UserPause
)
if
(
UserPause
)
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
system_pause
,
"系统暂停"
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
system_pause
,
"系统暂停"
),
MsgLevel
.
warning
);
...
...
LoadCVSLibrary/CSVAttribute.cs
查看文件 @
e096c46
...
@@ -3,7 +3,6 @@ using System.Collections.Generic;
...
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
namespace
OnlineStore.LoadCSVLibrary
namespace
OnlineStore.LoadCSVLibrary
{
{
//这里利用AttributeUsage 来设置我们的自定义属性的应用范围,这里定义的可以用于类,结构和方法的声明
//这里利用AttributeUsage 来设置我们的自定义属性的应用范围,这里定义的可以用于类,结构和方法的声明
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论