Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0a82a1e2
由
张东亮
编写于
2023-01-13 11:52:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库状态更改,向服务端发送按钮状态
1 个父辈
1aaa0514
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
68 行增加
和
40 行删除
Common/bean/Bean.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MainMachine_String.cs
Common/bean/Bean.cs
查看文件 @
0a82a1e
...
@@ -72,6 +72,7 @@ namespace OnlineStore.Common
...
@@ -72,6 +72,7 @@ namespace OnlineStore.Common
get
{
return
_data
;
}
get
{
return
_data
;
}
set
{
_data
=
value
;
}
set
{
_data
=
value
;
}
}
}
public
Dictionary
<
String
,
Dictionary
<
String
,
String
>>
mimoOpMap
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
/// <summary>
/// <summary>
/// 整体料仓状态
/// 整体料仓状态
/// 1=正常运行中
/// 1=正常运行中
...
...
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
0a82a1e
...
@@ -132,12 +132,7 @@ namespace DeviceLibrary
...
@@ -132,12 +132,7 @@ namespace DeviceLibrary
Operation
operation
=
getLineBoxStatus
();
Operation
operation
=
getLineBoxStatus
();
if
(!
string
.
IsNullOrEmpty
(
posid
))
if
(!
string
.
IsNullOrEmpty
(
posid
))
operation
.
boxStatus
[
StoreID
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
operation
.
boxStatus
[
StoreID
].
data
.
Add
(
ParamDefine
.
posId
,
posid
);
if
(
storeStatus
==
StoreStatus
.
OutStoreEnd
||
storeStatus
==
StoreStatus
.
OutStoreBoxEnd
||
storeStatus
==
StoreStatus
.
InStoreEnd
)
{
}
else
operation
.
boxStatus
[
StoreID
].
status
=
(
int
)
storeStatus
;
operation
.
boxStatus
[
StoreID
].
status
=
(
int
)
storeStatus
;
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
...
@@ -165,10 +160,6 @@ namespace DeviceLibrary
...
@@ -165,10 +160,6 @@ namespace DeviceLibrary
//{
//{
// this.storeStatus = StoreStatus.StoreOnline;
// this.storeStatus = StoreStatus.StoreOnline;
//}
//}
if
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
this
.
storeStatus
=
StoreStatus
.
StoreOnline
;
}
}
}
return
true
;
return
true
;
}
}
...
@@ -206,7 +197,6 @@ namespace DeviceLibrary
...
@@ -206,7 +197,6 @@ namespace DeviceLibrary
lineOperation
.
data
=
lineOperation
.
data
.
Concat
(
GetBtnStatus
()).
ToDictionary
(
x
=>
x
.
Key
,
v
=>
v
.
Value
);
lineOperation
.
data
=
lineOperation
.
data
.
Concat
(
GetBtnStatus
()).
ToDictionary
(
x
=>
x
.
Key
,
v
=>
v
.
Value
);
lineOperation
.
data
=
lineOperation
.
data
.
Concat
(
AgvStatus
()).
ToDictionary
(
x
=>
x
.
Key
,
v
=>
v
.
Value
);
lineOperation
.
data
=
lineOperation
.
data
.
Concat
(
AgvStatus
()).
ToDictionary
(
x
=>
x
.
Key
,
v
=>
v
.
Value
);
lineOperation
.
status
=
(
int
)
storeStatus
;
lineOperation
.
status
=
(
int
)
storeStatus
;
//判断如果是等待料盘拿走超时,状态改为4Warning
//判断如果是等待料盘拿走超时,状态改为4Warning
//if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.MoveType.Equals(StoreMoveType.OutStore))
//if (alarmType.Equals(StoreAlarmType.IoSingleTimeOut) && StoreMove.MoveType.Equals(StoreMoveType.OutStore))
//{
//{
...
@@ -441,6 +431,11 @@ namespace DeviceLibrary
...
@@ -441,6 +431,11 @@ namespace DeviceLibrary
map
.
Add
(
ParamDefine
.
confirmReelOut
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
confirmReelOut
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
singleReelIn
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
singleReelIn
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
SendEmptyShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
SendFullShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedEmptySHelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedFullShelf
,
ParamDefine
.
disable
);
if
(
storeStatus
==
StoreStatus
.
ResetMove
if
(
storeStatus
==
StoreStatus
.
ResetMove
||
storeStatus
==
StoreStatus
.
SuddenStop
||
storeStatus
==
StoreStatus
.
SuddenStop
||
storeStatus
==
StoreStatus
.
Debugging
||
storeStatus
==
StoreStatus
.
Debugging
...
@@ -473,17 +468,16 @@ namespace DeviceLibrary
...
@@ -473,17 +468,16 @@ namespace DeviceLibrary
{
{
map
[
ParamDefine
.
singleReelIn
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
singleReelIn
]
=
ParamDefine
.
enable
;
}
}
//mimo呼叫agv按钮
map
.
Add
(
ParamDefine
.
SendEmptyShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
SendEmptyShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
SendFullShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
SendFullShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedEmptySHelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedEmptySHelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedFullShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedFullShelf
,
ParamDefine
.
disable
);
if
(
RobotManage
.
mainMachine
.
StringState
==
MainMachine
.
StringStateE
.
None
)
if
(
RobotManage
.
mainMachine
?
.
StringState
==
MainMachine
.
StringStateE
.
None
)
{
{
map
[
ParamDefine
.
NeedEmptySHelf
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
NeedEmptySHelf
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
enable
;
}
}
if
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
if
(
RobotManage
.
mainMachine
?
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
{
if
(
RobotManage
.
mainMachine
.
StringState
==
MainMachine
.
StringStateE
.
Full
)
if
(
RobotManage
.
mainMachine
.
StringState
==
MainMachine
.
StringStateE
.
Full
)
{
{
...
@@ -494,7 +488,33 @@ namespace DeviceLibrary
...
@@ -494,7 +488,33 @@ namespace DeviceLibrary
map
[
ParamDefine
.
SendEmptyShelf
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
SendEmptyShelf
]
=
ParamDefine
.
enable
;
}
}
}
}
return
map
;
}
public
Dictionary
<
string
,
string
>
GetAgvBtnStatus
()
{
//mimo呼叫agv按钮
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
map
.
Add
(
ParamDefine
.
SendEmptyShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
SendFullShelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedEmptySHelf
,
ParamDefine
.
disable
);
map
.
Add
(
ParamDefine
.
NeedFullShelf
,
ParamDefine
.
disable
);
if
(
RobotManage
.
mainMachine
?.
StringState
==
MainMachine
.
StringStateE
.
None
)
{
map
[
ParamDefine
.
NeedEmptySHelf
]
=
ParamDefine
.
enable
;
map
[
ParamDefine
.
NeedFullShelf
]
=
ParamDefine
.
enable
;
}
if
(
RobotManage
.
mainMachine
?.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
if
(
RobotManage
.
mainMachine
.
StringState
==
MainMachine
.
StringStateE
.
Full
)
{
map
[
ParamDefine
.
SendFullShelf
]
=
ParamDefine
.
enable
;
}
else
{
map
[
ParamDefine
.
SendEmptyShelf
]
=
ParamDefine
.
enable
;
}
}
return
map
;
return
map
;
}
}
/// <summary>
/// <summary>
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
0a82a1e
...
@@ -190,6 +190,7 @@ namespace DeviceLibrary
...
@@ -190,6 +190,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StoreFIX01
:
case
MoveStep
.
StoreFIX01
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
RobotManage
.
PutReelInFixPos
(
MoveInfo
.
MoveParam
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Middle_P2
,
Config
.
Middle_P2_speed
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Middle_P2
,
Config
.
Middle_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走机构到达目的地:{Fix.Middle_P2}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:行走机构到达目的地:{Fix.Middle_P2}"
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P1_speed
);
...
@@ -210,7 +211,6 @@ namespace DeviceLibrary
...
@@ -210,7 +211,6 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StoreFIX04
:
case
MoveStep
.
StoreFIX04
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
RobotManage
.
PutReelInFixPos
(
MoveInfo
.
MoveParam
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
break
;
break
;
case
MoveStep
.
StoreFIX05
:
case
MoveStep
.
StoreFIX05
:
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
0a82a1e
...
@@ -535,15 +535,15 @@ namespace DeviceLibrary
...
@@ -535,15 +535,15 @@ namespace DeviceLibrary
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
CloseFlipDoor
(
StoreMoveInfo
);
CloseFlipDoor
(
StoreMoveInfo
);
}
}
else
if
((
RobotManage
.
HasReelInFixPos
(
out
ReelParam
reelParam
))
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
))
else
if
((
RobotManage
.
HasReelInFixPos
(
out
ReelParam
reelParam
))
{
&&
boxTransport
.
IsComplateOrFree
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut_NGPre
);
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
)
StoreMoveInfo
.
MoveParam
=
reelParam
.
clone
();
&&
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
StoreMoveInfo
.
MoveParam
.
PosID
=
"NG"
;
{
StoreMoveInfo
.
MoveParam
.
IsNg
=
true
;
var
pos
=
BoxStorePosition
.
GetFixPos
(
Config
,
reelParam
)
;
StoreMoveInfo
.
MoveParam
.
NgMsg
=
"检测到校准库位有料盘信息,请人工确认"
;
LogUtil
.
info
(
$
"复位完成,校准库位出库:{pos.posid}"
)
;
StoreMoveInfo
.
log
(
$
"开始校准库位料盘出库"
);
RobotManage
.
mainMachine
.
AddSingleStoreTask
(
pos
.
posid
,
reelParam
.
PlateW
,
reelParam
.
PlateH
);
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
RobotManage
.
ClearReelInFixPos
()
;
CloseFlipDoor
(
StoreMoveInfo
);
CloseFlipDoor
(
StoreMoveInfo
);
}
}
runStatus
=
RunStatus
.
Running
;
runStatus
=
RunStatus
.
Running
;
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
0a82a1e
...
@@ -55,6 +55,7 @@ namespace DeviceLibrary
...
@@ -55,6 +55,7 @@ namespace DeviceLibrary
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn01
);
StoreMoveInfo
.
MoveParam
=
ClampMoveInfo
.
MoveParam
.
clone
();
StoreMoveInfo
.
MoveParam
=
ClampMoveInfo
.
MoveParam
.
clone
();
StoreMoveInfo
.
log
(
$
"入库料盘已准备好"
);
StoreMoveInfo
.
log
(
$
"入库料盘已准备好"
);
ServerCM
.
storeStatus
=
StoreStatus
.
InStoreExecute
;
}
}
//判断有没有单盘出库任务, 需要入库空闲, 出口空闲
//判断有没有单盘出库任务, 需要入库空闲, 出口空闲
else
if
(
OutSingleJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
else
if
(
OutSingleJobList
.
Count
>
0
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
0a82a1e
...
@@ -59,9 +59,10 @@ namespace DeviceLibrary
...
@@ -59,9 +59,10 @@ namespace DeviceLibrary
/// <summary>
/// <summary>
/// 强制转换料串为出库模式
/// 强制转换料串为出库模式
/// </summary>
/// </summary>
public
bool
TurnToOut
()
{
public
bool
TurnToOut
()
{
if
(
StringState
==
StringStateE
.
OutStore
&&
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
if
(
StringState
==
StringStateE
.
OutStore
&&
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
{
{
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
log
(
$
"升起待机料串"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_03
);
...
@@ -173,7 +174,7 @@ namespace DeviceLibrary
...
@@ -173,7 +174,7 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
BatchAxisToP2
(
StringMoveInfo
,
StringState
==
StringStateE
.
OutStore
);
BatchAxisToP2
(
StringMoveInfo
,
StringState
==
StringStateE
.
OutStore
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0009"
,
"料串正在上升"
),
MsgLevel
.
warning
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0009"
,
"料串正在上升"
),
MsgLevel
.
warning
));
}
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
{
{
...
@@ -197,11 +198,11 @@ namespace DeviceLibrary
...
@@ -197,11 +198,11 @@ namespace DeviceLibrary
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
)
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
)
{
{
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
StringMoveInfo
.
log
(
$
"当
钱
空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
log
(
$
"当
前
空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
}
}
}
}
else
if
(
StringState
!=
StringStateE
.
OutStore
)
else
if
(
StringState
!=
StringStateE
.
OutStore
)
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04a
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04a
);
StringState
=
StringStateE
.
InStore
;
StringState
=
StringStateE
.
InStore
;
...
@@ -244,7 +245,7 @@ namespace DeviceLibrary
...
@@ -244,7 +245,7 @@ namespace DeviceLibrary
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyGet
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyGet
);
StringMoveInfo
.
log
(
$
"料串有盘上升5mm"
);
StringMoveInfo
.
log
(
$
"料串有盘上升5mm"
);
var
tpos4
=
Batch_Axis
.
GetAclPosition
()
+
Config
.
Batch_PoToMM
*
(
Config
.
Batch_DetectDownMM
+
2
);
var
tpos4
=
Batch_Axis
.
GetAclPosition
()
+
Config
.
Batch_PoToMM
*
(
Config
.
Batch_DetectDownMM
+
2
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos4
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos4
,
Config
.
Batch_P1_speed
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
//OpenFlipDoor(StringMoveInfo);
//OpenFlipDoor(StringMoveInfo);
...
@@ -291,7 +292,7 @@ namespace DeviceLibrary
...
@@ -291,7 +292,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StringReelPut
:
case
MoveStep
.
StringReelPut
:
LastStringState
=
StringStateE
.
OutStore
;
LastStringState
=
StringStateE
.
OutStore
;
if
(
ConfigHelper
.
Config
.
Get
(
"Device_OutStoreStringReelCheck"
,
false
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_OutStoreStringReelCheck"
,
false
))
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_03
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_03
);
StringMoveInfo
.
log
(
$
"检测阻挡工作"
);
StringMoveInfo
.
log
(
$
"检测阻挡工作"
);
...
@@ -340,12 +341,12 @@ namespace DeviceLibrary
...
@@ -340,12 +341,12 @@ namespace DeviceLibrary
case
MoveStep
.
StringReelPut_02
:
case
MoveStep
.
StringReelPut_02
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04b
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04b
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
break
;
break
;
case
MoveStep
.
StringReelPut_03
:
case
MoveStep
.
StringReelPut_03
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_04
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_04
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
BatchAxisToP2
(
StringMoveInfo
,
true
);
break
;
break
;
case
MoveStep
.
StringReelPut_04
:
case
MoveStep
.
StringReelPut_04
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_05
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_05
);
...
@@ -379,7 +380,7 @@ namespace DeviceLibrary
...
@@ -379,7 +380,7 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"料串下降到P1点"
);
StringMoveInfo
.
log
(
$
"料串下降到P1点"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0010"
,
"料串正在下降"
),
MsgLevel
.
warning
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
crc
.
GetString
(
"Res0010"
,
"料串正在下降"
),
MsgLevel
.
warning
));
break
;
break
;
case
MoveStep
.
StringOut_02
:
case
MoveStep
.
StringOut_02
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_03
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_03
);
...
@@ -392,6 +393,7 @@ namespace DeviceLibrary
...
@@ -392,6 +393,7 @@ namespace DeviceLibrary
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
break
;
break
;
case
MoveStep
.
StringOut_Released
:
case
MoveStep
.
StringOut_Released
:
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
if
(
StringState
==
StringStateE
.
Full
)
if
(
StringState
==
StringStateE
.
Full
)
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0427
Msg
.
add
(
crc
.
GetString
(
L
.
string_full_takeout
,
"料串已满请取出"
),
MsgLevel
.
warning
);
//0427
else
else
...
@@ -445,7 +447,8 @@ namespace DeviceLibrary
...
@@ -445,7 +447,8 @@ namespace DeviceLibrary
}
}
}
}
string
StringProcessState
()
{
string
StringProcessState
()
{
string
state
=
""
;
string
state
=
""
;
if
(
StringState
==
StringStateE
.
OutStore
)
if
(
StringState
==
StringStateE
.
OutStore
)
...
@@ -488,14 +491,14 @@ namespace DeviceLibrary
...
@@ -488,14 +491,14 @@ namespace DeviceLibrary
int
targetSpeed
=
Config
.
Batch_P2_speed
;
int
targetSpeed
=
Config
.
Batch_P2_speed
;
if
(
isFirstMove
)
if
(
isFirstMove
)
{
{
targetSpeed
=
Config
.
Batch_P1_speed
;
targetSpeed
=
Config
.
Batch_P1_speed
;
}
}
moveInfo
.
log
(
"BatchAxisToP2 目标P2: "
+
targetP2
);
moveInfo
.
log
(
"BatchAxisToP2 目标P2: "
+
targetP2
);
moveInfo
.
TimeOutSeconds
=
200
;
moveInfo
.
TimeOutSeconds
=
200
;
moveInfo
.
CanWhileCount
=
0
;
moveInfo
.
CanWhileCount
=
0
;
Batch_Axis
.
SuddenStop
();
Batch_Axis
.
SuddenStop
();
// 需要增加定时器,获取验证信号并停止伺服
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition
=
Batch_Axis
.
GetAclPosition
()-
(
Config
.
Batch_PoToMM
*
2
);
StartMovePosition
=
Batch_Axis
.
GetAclPosition
()
-
(
Config
.
Batch_PoToMM
*
2
);
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisMove
(
Config
.
Batch_Axis
,
targetP2
,
targetSpeed
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisMove
(
Config
.
Batch_Axis
,
targetP2
,
targetSpeed
));
Config
.
Batch_Axis
.
TargetPosition
=
targetP2
;
Config
.
Batch_Axis
.
TargetPosition
=
targetP2
;
Batch_Axis
.
AbsMove
(
null
,
targetP2
,
targetSpeed
);
Batch_Axis
.
AbsMove
(
null
,
targetP2
,
targetSpeed
);
...
@@ -568,7 +571,8 @@ namespace DeviceLibrary
...
@@ -568,7 +571,8 @@ namespace DeviceLibrary
return
LastHeight
;
return
LastHeight
;
}
}
public
void
StringDoorOpen
(
MoveInfo
moveInfo
)
{
public
void
StringDoorOpen
(
MoveInfo
moveInfo
)
{
if
(
StringDoor
!=
null
)
if
(
StringDoor
!=
null
)
{
{
StringDoor
.
LiftUp
(
moveInfo
);
StringDoor
.
LiftUp
(
moveInfo
);
...
@@ -580,10 +584,12 @@ namespace DeviceLibrary
...
@@ -580,10 +584,12 @@ namespace DeviceLibrary
}
}
public
void
StringDoorClose
(
MoveInfo
moveInfo
)
public
void
StringDoorClose
(
MoveInfo
moveInfo
)
{
{
if
(
StringDoor
!=
null
)
{
if
(
StringDoor
!=
null
)
{
StringDoor
.
LiftDown
(
moveInfo
);
StringDoor
.
LiftDown
(
moveInfo
);
}
}
else
{
else
{
CylinderMove
(
moveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
LOW
);
CylinderMove
(
moveInfo
,
IO_Type
.
StringDoor_Close
,
IO_Type
.
StringDoor_Open
,
IO_VALUE
.
LOW
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论