Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0baee6b2
由
刘韬
编写于
2022-07-15 16:07:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
4680b92b
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
35 行增加
和
19 行删除
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MainMachine_String.cs
TheMachine/UC/ConfigControl.cs
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
0baee6b
...
@@ -116,7 +116,7 @@ namespace DeviceLibrary
...
@@ -116,7 +116,7 @@ namespace DeviceLibrary
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
break
;
break
;
case
MoveStep
.
StoreTS01
:
case
MoveStep
.
StoreTS01
:
if
(!
MoveInfo
.
MoveParam
.
ReelOnFixture
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
if
(!
IgnoreX09
&&
!
MoveInfo
.
MoveParam
.
ReelOnFixture
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(!
IgnoreX09
&&
IOMonitor
.
IODebound
(
IO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
if
(!
IgnoreX09
&&
IOMonitor
.
IODebound
(
IO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_detect_material
,
"出库时料叉X23检测到有物料无法继续,请检查."
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_detect_material
,
"出库时料叉X23检测到有物料无法继续,请检查."
),
MsgLevel
.
alarm
,
ErrInfo
.
X09_BoxNotDetect
);
...
...
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
查看文件 @
0baee6b
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
L
.
not_detect_airpressure
,
"未检测到气压信号."
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
not_detect_airpressure
,
"未检测到气压信号."
),
MsgLevel
.
warning
);
}
}
if
(
StringState
==
StringStateE
.
OutStore
&&
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
(
StringState
==
StringStateE
.
OutStore
||
StringState
==
StringStateE
.
Full
)
&&
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
StringState
=
StringStateE
.
None
;
StringState
=
StringStateE
.
None
;
}
}
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
0baee6b
...
@@ -69,8 +69,11 @@ namespace DeviceLibrary
...
@@ -69,8 +69,11 @@ namespace DeviceLibrary
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
}
}
}
else
if
(
OutStoreJobList
.
Count
>
0
&&
!
IsBatchDoorClosed
)
{
Msg
.
add
(
"出库任务等待关闭批量舱门"
,
MsgLevel
.
warning
);
}
//判断有没有出库任务, 需要入库空闲, 出口空闲
//判断有没有出库任务, 需要入库空闲, 出口空闲
else
if
(
OutStoreJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
)
else
if
(
OutStoreJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
)
{
{
TurnToOut
();
TurnToOut
();
if
(
IsPutReelReady
&&
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
if
(
IsPutReelReady
&&
OutStoreJobList
.
Dequeue
(
out
JobInfo
jobInfo
))
...
@@ -79,7 +82,7 @@ namespace DeviceLibrary
...
@@ -79,7 +82,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PosID
=
jobInfo
.
PosId
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateH
=
jobInfo
.
plateH
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
MoveParam
.
PlateW
=
jobInfo
.
plateW
;
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
StoreMoveInfo
.
log
(
$
"开始出库任务:"
+
jobInfo
.
ToStr
());
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
0baee6b
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
...
@@ -20,7 +20,7 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
public
bool
IsGetReelReady
public
bool
IsGetReelReady
{
{
get
=>
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringReadyGet
&&
(
boxTransport
.
To
==
null
||
boxTransport
.
To
.
posid
!=
BoxStorePosition
.
ngdoor
);
get
=>
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringReadyGet
&&
(
boxTransport
.
To
==
null
||
boxTransport
.
To
.
posid
!=
BoxStorePosition
.
ngdoor
);
}
}
/// <summary>
/// <summary>
/// 返回料串是否准备好放料盘
/// 返回料串是否准备好放料盘
...
@@ -60,7 +60,10 @@ namespace DeviceLibrary
...
@@ -60,7 +60,10 @@ namespace DeviceLibrary
/// </summary>
/// </summary>
public
bool
TurnToOut
()
{
public
bool
TurnToOut
()
{
if
(
StringMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
if
(!
IsBatchDoorClosed
)
{
return
false
;
}
if
(
StringMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
{
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringState
=
StringStateE
.
OutStore
;
StringState
=
StringStateE
.
OutStore
;
...
@@ -72,7 +75,7 @@ namespace DeviceLibrary
...
@@ -72,7 +75,7 @@ namespace DeviceLibrary
}
}
public
string
StartBatchIn
()
public
string
StartBatchIn
()
{
{
if
(
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
)
)
if
(
!
IsBatchDoorClosed
)
{
{
LogUtil
.
info
(
"批量门未关闭无法锁门X07=High"
);
LogUtil
.
info
(
"批量门未关闭无法锁门X07=High"
);
return
crc
.
GetString
(
L
.
batch_door_not_close_cant_lock
,
"批量门未关闭无法锁门X07=High"
);
//0704
return
crc
.
GetString
(
L
.
batch_door_not_close_cant_lock
,
"批量门未关闭无法锁门X07=High"
);
//0704
...
@@ -87,7 +90,7 @@ namespace DeviceLibrary
...
@@ -87,7 +90,7 @@ namespace DeviceLibrary
}
}
return
"系统忙碌,无法批量入库"
;
return
"系统忙碌,无法批量入库"
;
}
}
bool
IsBatchDoorClosed
=>
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
BatchDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
);
//StringStateE LastStringState { get => ConfigHelper.Config.Get("Status_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Status_LastStringState", value); }
//StringStateE LastStringState { get => ConfigHelper.Config.Get("Status_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Status_LastStringState", value); }
bool
newreel
=
true
;
bool
newreel
=
true
;
bool
downCheck1
=
false
;
bool
downCheck1
=
false
;
...
@@ -95,6 +98,8 @@ namespace DeviceLibrary
...
@@ -95,6 +98,8 @@ namespace DeviceLibrary
bool
downCheck3
=
false
;
bool
downCheck3
=
false
;
int
ReelGetFail
=
0
;
int
ReelGetFail
=
0
;
Task
TestHeightTask
=
null
;
Task
TestHeightTask
=
null
;
const
bool
oldtestheight
=
true
;
void
StringProcess
()
void
StringProcess
()
{
{
if
(
CheckWait
(
StringMoveInfo
))
if
(
CheckWait
(
StringMoveInfo
))
...
@@ -106,7 +111,16 @@ namespace DeviceLibrary
...
@@ -106,7 +111,16 @@ namespace DeviceLibrary
if
(
StringState
==
StringStateE
.
Full
)
if
(
StringState
==
StringStateE
.
Full
)
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0704
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0704
else
if
(
StringState
==
StringStateE
.
OutStore
)
else
if
(
StringState
==
StringStateE
.
OutStore
)
{
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_free
,
"舱内有出库料盘"
),
MsgLevel
.
warning
);
//0704
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_free
,
"舱内有出库料盘"
),
MsgLevel
.
warning
);
//0704
}
if
(
StringState
!=
StringStateE
.
Full
&&
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
&&
IsBatchDoorClosed
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01
);
StringState
=
StringStateE
.
OutStore
;
StringMoveInfo
.
log
(
$
"有料盘在出库, 强制转为出库料串"
);
}
break
;
break
;
case
MoveStep
.
StringLoad_01
:
case
MoveStep
.
StringLoad_01
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
...
@@ -125,7 +139,7 @@ namespace DeviceLibrary
...
@@ -125,7 +139,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StringLoad_03
:
case
MoveStep
.
StringLoad_03
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04
);
if
(
true
||
newreel
)
if
(
oldtestheight
||
newreel
)
{
{
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
BatchAxisToP2
(
StringMoveInfo
);
BatchAxisToP2
(
StringMoveInfo
);
...
@@ -137,7 +151,7 @@ namespace DeviceLibrary
...
@@ -137,7 +151,7 @@ namespace DeviceLibrary
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
"料串正在上升"
,
MsgLevel
.
warning
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
"料串正在上升"
,
MsgLevel
.
warning
));
break
;
break
;
case
MoveStep
.
StringLoad_04
:
case
MoveStep
.
StringLoad_04
:
if
(
true
)
if
(
oldtestheight
)
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_05
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_05
);
if
(
Batch_Axis
.
IsInPosition
(
Config
.
Batch_P2
)
&&
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(
Batch_Axis
.
IsInPosition
(
Config
.
Batch_P2
)
&&
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
...
@@ -184,13 +198,14 @@ namespace DeviceLibrary
...
@@ -184,13 +198,14 @@ namespace DeviceLibrary
else
if
(
StringState
==
StringStateE
.
OutStore
)
else
if
(
StringState
==
StringStateE
.
OutStore
)
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
StringMoveInfo
.
log
(
$
"料串出库模式,下降5cm"
);
var
tpos2
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutStoreDownMM
;
var
tpos2
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutStoreDownMM
;
if
(
tpos2
<
0
)
if
(
tpos2
<
0
)
{
{
tpos2
=
0
;
tpos2
=
0
;
}
}
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1
);
StringMoveInfo
.
log
(
$
"料串出库模式,下降{Config.Batch_OutStoreDownMM}mm,{tpos2},{Batch_Axis.GetAclPosition()}"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1_speed
);
}
}
break
;
break
;
case
MoveStep
.
StringLoad_07
:
case
MoveStep
.
StringLoad_07
:
...
@@ -398,12 +413,7 @@ namespace DeviceLibrary
...
@@ -398,12 +413,7 @@ namespace DeviceLibrary
Task
TestReelHeight
()
{
Task
TestReelHeight
()
{
return
Task
.
Run
(()=>
{
return
Task
.
Run
(()=>
{
int
upmm
=
0
;
int
upmm
=
0
;
//upmm += 8;
//LogUtil.info($"上升,{8}mm");
//if (TestUp(8)==1) {
// SetReelHeight(CalcHeight(8));
// return;
//}
for
(
int
i
=
0
;
i
<
56
/
2
;
i
++)
{
for
(
int
i
=
0
;
i
<
56
/
2
;
i
++)
{
upmm
+=
2
;
upmm
+=
2
;
LogUtil
.
info
(
$
"上升:{2}mm,累计:{upmm}mm"
);
LogUtil
.
info
(
$
"上升:{2}mm,累计:{upmm}mm"
);
...
@@ -427,11 +437,12 @@ namespace DeviceLibrary
...
@@ -427,11 +437,12 @@ namespace DeviceLibrary
if
(
currPosition
+
Config
.
Batch_PoToMM
*
mm
>=
Config
.
Batch_P2
)
if
(
currPosition
+
Config
.
Batch_PoToMM
*
mm
>=
Config
.
Batch_P2
)
{
{
Batch_Axis
.
AbsMove
(
null
,
Config
.
Batch_P2
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
null
,
Config
.
Batch_P2
,
Config
.
Batch_P1_speed
);
Task
.
Delay
(
2
0
).
Wait
();
Task
.
Delay
(
5
0
).
Wait
();
while
(
Batch_Axis
.
IsBusy
)
while
(
Batch_Axis
.
IsBusy
)
{
{
Task
.
Delay
(
20
).
Wait
();
Task
.
Delay
(
20
).
Wait
();
}
}
Task
.
Delay
(
160
).
Wait
();
if
(
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
))
return
1
;
return
1
;
else
else
...
...
TheMachine/UC/ConfigControl.cs
查看文件 @
0baee6b
...
@@ -250,6 +250,8 @@ namespace TheMachine
...
@@ -250,6 +250,8 @@ namespace TheMachine
private
void
ConfigControl_Load
(
object
sender
,
EventArgs
e
)
private
void
ConfigControl_Load
(
object
sender
,
EventArgs
e
)
{
{
if
(
DesignMode
)
return
;
OnlineStore
.
CodeResourceControl
.
LanguageChangeEvent
+=
CodeResourceControl_LanguageChange
;
OnlineStore
.
CodeResourceControl
.
LanguageChangeEvent
+=
CodeResourceControl_LanguageChange
;
CodeResourceControl_LanguageChange
(
null
,
null
);
CodeResourceControl_LanguageChange
(
null
,
null
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论