Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c60ccbf4
由
刘韬
编写于
2022-10-25 10:28:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
cf9f0446
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
64 行增加
和
11 行删除
Common/Setting_Init.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/MoveStep.cs
TheMachine/App.config
Common/Setting_Init.cs
查看文件 @
c60ccbf
...
...
@@ -55,6 +55,8 @@ namespace OnlineStore.Common
public
static
MyConfig
<
string
[
]>
Device_Ignore_FixtureCheck
=
new
string
[]
{
};
[
MyConfigComment
(
"屏蔽出入库时料叉检测"
)]
public
static
MyConfig
<
bool
>
Device_Disable_INOUT_FixtureCheck
=
false
;
[
MyConfigComment
(
"出库时料串检测料盘高度"
)]
public
static
MyConfig
<
bool
>
Device_OutStoreStringReelCheck
=
false
;
[
MyConfigComment
(
"管理员密码"
)]
public
static
MyConfig
<
string
>
User_AdminPassword
=
"123456"
;
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
c60ccbf
...
...
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace
DeviceLibrary
{
public
class
LiftMonitor
public
class
LiftMonitor
:
ISafetyDevice
{
string
up
;
string
down
;
...
...
@@ -28,6 +28,7 @@ namespace DeviceLibrary
if
(
downspeed
==
0
)
{
downspeed
=
upspeed
;
}
SafetyDevice
.
AddDevice
(
this
);
}
public
bool
isAtTOP
{
get
{
...
...
@@ -123,5 +124,15 @@ namespace DeviceLibrary
}
return
false
;
}
public
void
Pause
()
{
axisBean
.
SuddenStop
();
}
public
void
Resume
()
{
// throw new NotImplementedException();
}
}
}
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
c60ccbf
...
...
@@ -175,7 +175,7 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
WaitInStore
:
if
(
ClampMoveInfo
.
MoveParam
.
IsNg
)
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
info
);
Msg
.
add
(
ClampMoveInfo
.
MoveParam
.
NgMsg
,
MsgLevel
.
warning
);
else
Msg
.
add
(
crc
.
GetString
(
L
.
reel_wait_in_store
,
"料盘等待入库"
),
MsgLevel
.
info
);
break
;
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
c60ccbf
...
...
@@ -104,6 +104,11 @@ namespace DeviceLibrary
Task
TestHeightTask
=
null
;
const
bool
oldtestheight
=
true
;
/// <summary>
/// 出库下降对射触发位置高度
/// </summary>
int
LastOutDownPosition
=
0
;
void
StringProcess
()
{
if
(
CheckWait
(
StringMoveInfo
))
...
...
@@ -217,20 +222,20 @@ namespace DeviceLibrary
else
if
(
StringState
==
StringStateE
.
OutStore
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
var
tpos
3
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutStoreDownMM
;
if
(
tpos
3
<
0
)
LastOutDownPosition
=
Batch_Axis
.
GetAclPosition
();
var
tpos
4
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutStoreDownMM
;
if
(
tpos
4
<
0
)
{
tpos
3
=
0
;
tpos
4
=
0
;
}
StringMoveInfo
.
log
(
$
"料串出库模式,下降{Config.Batch_OutStoreDownMM}mm,{tpos
3
},{Batch_Axis.GetAclPosition()}"
);
if
(
tpos
3
<
Config
.
Batch_P1
)
StringMoveInfo
.
log
(
$
"料串出库模式,下降{Config.Batch_OutStoreDownMM}mm,{tpos
4
},{Batch_Axis.GetAclPosition()}"
);
if
(
tpos
4
<
Config
.
Batch_P1
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringState
=
StringStateE
.
Full
;
StringMoveInfo
.
log
(
$
"料串已满,无法出库,开始送出"
);
}
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos
3
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos
4
,
Config
.
Batch_P1_speed
);
}
break
;
case
MoveStep
.
StringLoad_07
:
...
...
@@ -304,7 +309,13 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
}
break
;
case
MoveStep
.
StringReelPut
:
case
MoveStep
.
StringReelPut
:
if
(
Setting_Init
.
Device_OutStoreStringReelCheck
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_03
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
return
;
}
var
tpos
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
(
StringMoveInfo
.
MoveParam
.
PlateH
+
Config
.
Batch_OutPlateDownMM
);
if
(
tpos
<
0
)
tpos
=
0
;
...
...
@@ -348,6 +359,33 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
BatchAxisToP2
(
StringMoveInfo
);
break
;
case
MoveStep
.
StringReelPut_03
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_04
);
var
heightcheck
=
(
LastOutDownPosition
-
Batch_Axis
.
GetAclPosition
())
/
Config
.
Batch_PoToMM
;
StringMoveInfo
.
log
(
$
"LastOutDownPosition={LastOutDownPosition},CurrentPosition={Batch_Axis.GetAclPosition()},heightcheck={heightcheck}"
);
if
(
heightcheck
<=
5
)
{
Msg
.
add
(
"出库时料盘未成功放入料串,请检查"
,
MsgLevel
.
alarm
);
RobotManage
.
UserPause
(
"出库时料盘未成功放入料串,请检查"
);
}
break
;
case
MoveStep
.
StringReelPut_04
:
LastOutDownPosition
=
Batch_Axis
.
GetAclPosition
();
var
tpos3
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutPlateDownMM
;
if
(
tpos3
<
0
)
tpos3
=
0
;
if
(
tpos3
>
Config
.
Batch_P1
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
StringMoveInfo
.
log
(
$
"料盘放入料串,下降{Config.Batch_OutPlateDownMM}cm"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos3
,
Config
.
Batch_P1_speed
);
}
else
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringState
=
StringStateE
.
Full
;
StringMoveInfo
.
log
(
$
"料串已满可以送出"
);
}
break
;
case
MoveStep
.
StringOut_01
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_Released
);
StringMoveInfo
.
log
(
$
"料串下降到P1点"
);
...
...
DeviceLibrary/theMachine/MoveStep.cs
查看文件 @
c60ccbf
...
...
@@ -50,6 +50,8 @@ namespace DeviceLibrary
StringReelPut
,
StringReelPut_01
,
StringReelPut_02
,
StringReelPut_03
,
StringReelPut_04
,
StringOut_01
,
StringOut_02
,
StringOut_03
,
...
...
TheMachine/App.config
查看文件 @
c60ccbf
...
...
@@ -10,7 +10,7 @@
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/
AutoScanAndLabel
.log"
/>
<
file
value
=
"logs/
TheMachine
.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论