Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
MIMO
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 28ae4782
由
张东亮
编写于
2023-01-12 10:27:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加校准库位缓存,以在复位时处理校准库位的料。出入库状态在料串动作时就开始变化
1 个父辈
52856290
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
119 行增加
和
81 行删除
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
DeviceLibrary/theMachine/BoxTransport.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Store.cs
DeviceLibrary/theMachine/MainMachine_String.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/DeviceLibrary/ServerCommunication.cs
查看文件 @
28ae478
...
@@ -14,10 +14,12 @@ namespace DeviceLibrary
...
@@ -14,10 +14,12 @@ namespace DeviceLibrary
public
class
ServerCommunication
public
class
ServerCommunication
{
{
volatile
StoreStatus
_storeStatus
=
StoreStatus
.
Debugging
;
volatile
StoreStatus
_storeStatus
=
StoreStatus
.
Debugging
;
public
StoreStatus
storeStatus
{
public
StoreStatus
storeStatus
{
get
=>
_storeStatus
;
get
=>
_storeStatus
;
set
{
set
if
(
_storeStatus
!=
value
)
{
if
(
_storeStatus
!=
value
)
LogUtil
.
info
(
$
"set storeStatus to {value}"
);
LogUtil
.
info
(
$
"set storeStatus to {value}"
);
_storeStatus
=
value
;
_storeStatus
=
value
;
}
}
...
@@ -25,13 +27,14 @@ namespace DeviceLibrary
...
@@ -25,13 +27,14 @@ namespace DeviceLibrary
static
string
server
=
Setting_Init
.
Device_Server_Address
;
static
string
server
=
Setting_Init
.
Device_Server_Address
;
static
string
CID
=
Setting_Init
.
Device_CID
;
static
string
CID
=
Setting_Init
.
Device_CID
;
int
StoreID
=
1
;
int
StoreID
=
1
;
string
StoreName
=
""
;
string
StoreName
=
""
;
string
WarnMsg
=
""
;
string
WarnMsg
=
""
;
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
object
serverclock
=
new
object
();
object
serverclock
=
new
object
();
public
ServerCommunication
()
{
public
ServerCommunication
()
{
serverConnectTimer
.
Interval
=
1000
;
serverConnectTimer
.
Interval
=
1000
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
AutoReset
=
true
;
serverConnectTimer
.
Enabled
=
true
;
serverConnectTimer
.
Enabled
=
true
;
...
@@ -62,17 +65,22 @@ namespace DeviceLibrary
...
@@ -62,17 +65,22 @@ namespace DeviceLibrary
{
{
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
}
}
finally
{
finally
{
//Monitor.Exit(serverConnectTimer);
//Monitor.Exit(serverConnectTimer);
}
}
}
}
public
void
StartConnectServer
()
{
public
void
StartConnectServer
()
{
//serverConnectTimer.Enabled = true;
//serverConnectTimer.Enabled = true;
}
public
void
StopConnectServer
()
{
}
public
void
StopConnectServer
()
{
//serverConnectTimer.Enabled = false;
//serverConnectTimer.Enabled = false;
}
}
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
{
public
void
ProcessMsg
(
List
<
Msg
>
msg
)
{
WarnMsg
=
string
.
Join
(
","
,
msg
.
Select
(
x
=>
WarnMsg
=
string
.
Join
(
","
,
msg
.
Select
(
x
=>
{
{
if
(
x
.
msgLevel
==
MsgLevel
.
warning
||
x
.
msgLevel
==
MsgLevel
.
alarm
)
if
(
x
.
msgLevel
==
MsgLevel
.
warning
||
x
.
msgLevel
==
MsgLevel
.
alarm
)
...
@@ -81,9 +89,10 @@ namespace DeviceLibrary
...
@@ -81,9 +89,10 @@ namespace DeviceLibrary
}
}
return
null
;
return
null
;
}
}
).
Where
(
x
=>
!
string
.
IsNullOrEmpty
(
x
)));
).
Where
(
x
=>
!
string
.
IsNullOrEmpty
(
x
)));
}
}
public
void
SendInStoreRequest
(
string
[]
codelist
,
ReelParam
reel
,
bool
printlog
=
false
)
{
public
void
SendInStoreRequest
(
string
[]
codelist
,
ReelParam
reel
,
bool
printlog
=
false
)
{
if
(
RobotManage
.
InoutDebugMode
)
if
(
RobotManage
.
InoutDebugMode
)
return
;
return
;
...
@@ -94,7 +103,7 @@ namespace DeviceLibrary
...
@@ -94,7 +103,7 @@ namespace DeviceLibrary
operation
.
op
=
1
;
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
code
},
{
"boxId"
,
StoreID
.
ToString
()
},
{
"doorReelSignal"
,
"1"
}
};
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
code
},
{
"boxId"
,
StoreID
.
ToString
()
},
{
"doorReelSignal"
,
"1"
}
};
if
(
reel
.
PlateH
==
100
&&
Setting_Init
.
Device_SingleInSingleOut
)
if
(
reel
.
PlateH
==
100
&&
Setting_Init
.
Device_SingleInSingleOut
)
{
{
//singleIn 单盘入库
//singleIn 单盘入库
operation
.
data
.
Add
(
"singleIn"
,
"true"
);
operation
.
data
.
Add
(
"singleIn"
,
"true"
);
...
@@ -106,7 +115,7 @@ namespace DeviceLibrary
...
@@ -106,7 +115,7 @@ namespace DeviceLibrary
int
retrytimes
=
0
;
int
retrytimes
=
0
;
retry
:
retry
:
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
15000
,
printlog
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
operation
,
15000
,
printlog
);
if
(
RobotManage
.
isRunning
&&
(
resultOperation
==
null
||
operation
.
seq
!=
resultOperation
.
seq
))
if
(
RobotManage
.
isRunning
&&
(
resultOperation
==
null
||
operation
.
seq
!=
resultOperation
.
seq
))
{
{
Thread
.
Sleep
(
1000
);
Thread
.
Sleep
(
1000
);
//SendInStoreRequest(codelist, reel, printlog);
//SendInStoreRequest(codelist, reel, printlog);
...
@@ -124,15 +133,7 @@ namespace DeviceLibrary
...
@@ -124,15 +133,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
));
if
(
RobotManage
.
InoutDebugMode
)
if
(
RobotManage
.
InoutDebugMode
)
return
true
;
return
true
;
...
@@ -143,7 +144,8 @@ namespace DeviceLibrary
...
@@ -143,7 +144,8 @@ namespace DeviceLibrary
LogUtil
.
info
(
$
"SendStoreState error,posid:{posid}, storeStatus:{storeStatus}"
);
LogUtil
.
info
(
$
"SendStoreState error,posid:{posid}, storeStatus:{storeStatus}"
);
return
false
;
return
false
;
}
}
if
(
operation
.
seq
!=
resultOperation
.
seq
)
{
if
(
operation
.
seq
!=
resultOperation
.
seq
)
{
LogUtil
.
info
(
$
"SendStoreState seq error,posid:{posid}, storeStatus:{storeStatus}"
);
LogUtil
.
info
(
$
"SendStoreState seq error,posid:{posid}, storeStatus:{storeStatus}"
);
return
false
;
return
false
;
}
}
...
@@ -157,15 +159,17 @@ namespace DeviceLibrary
...
@@ -157,15 +159,17 @@ namespace DeviceLibrary
//{
//{
// this.storeStatus = StoreStatus.StoreOnline;
// this.storeStatus = StoreStatus.StoreOnline;
//}
//}
if
(
RobotManage
.
mainMachine
.
StringMoveInfo
.
MoveStep
==
MoveStep
.
StringOut_Released
)
//if (RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.StringOut_Released
{
// || RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait)
this
.
storeStatus
=
StoreStatus
.
StoreOnline
;
//{
}
// this.storeStatus = StoreStatus.StoreOnline;
// LogUtil.info($"StringOut_Released StoreState change,storeStatus:{storeStatus}");
//}
}
}
return
true
;
return
true
;
}
}
public
string
spiltStr
=
"##"
;
public
string
spiltStr
=
"##"
;
private
string
ProcessCode
(
string
[]
codeList
,
int
reelw
,
int
reelh
)
private
string
ProcessCode
(
string
[]
codeList
,
int
reelw
,
int
reelh
)
{
{
string
message
=
""
;
string
message
=
""
;
...
@@ -183,7 +187,8 @@ namespace DeviceLibrary
...
@@ -183,7 +187,8 @@ namespace DeviceLibrary
message
=
message
+
"="
+
"1+0x0-"
+
codeSize
+
"="
+
code
+
spiltStr
;
message
=
message
+
"="
+
"1+0x0-"
+
codeSize
+
"="
+
code
+
spiltStr
;
LogUtil
.
info
(
$
"加载到fixcode,{w}x{h},remove:{rcode}"
);
LogUtil
.
info
(
$
"加载到fixcode,{w}x{h},remove:{rcode}"
);
}
else
}
else
message
=
message
+
"="
+
"1+0x0-"
+
codeSize
+
"="
+
code
+
spiltStr
;
message
=
message
+
"="
+
"1+0x0-"
+
codeSize
+
"="
+
code
+
spiltStr
;
}
}
return
message
;
return
message
;
...
@@ -235,7 +240,8 @@ namespace DeviceLibrary
...
@@ -235,7 +240,8 @@ namespace DeviceLibrary
{
{
sendmsg
=
string
.
Join
(
","
,
new
string
[]
{
WarnMsg
});
sendmsg
=
string
.
Join
(
","
,
new
string
[]
{
WarnMsg
});
}
}
else
if
(!
RobotManage
.
isRunning
){
else
if
(!
RobotManage
.
isRunning
)
{
sendmsg
=
"设备未启动"
;
sendmsg
=
"设备未启动"
;
}
}
...
@@ -287,13 +293,14 @@ namespace DeviceLibrary
...
@@ -287,13 +293,14 @@ namespace DeviceLibrary
}
}
}
}
if
(
lineOperation
.
status
!=
laststatus
)
{
if
(
lineOperation
.
status
!=
laststatus
)
{
laststatus
=
lineOperation
.
status
;
laststatus
=
lineOperation
.
status
;
printlog
=
true
;
printlog
=
true
;
}
}
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
lineOperation
,
700
,
printlog
);
Operation
resultOperation
=
HttpHelper
.
Post
(
GetPostApi
(),
lineOperation
,
700
,
printlog
);
if
(
resultOperation
!=
null
)
if
(
resultOperation
!=
null
)
getthtime
=
0
;
getthtime
=
0
;
//LogUtil.info(JsonHelper.SerializeObject(resultOperation.data));
//LogUtil.info(JsonHelper.SerializeObject(resultOperation.data));
...
@@ -305,7 +312,7 @@ namespace DeviceLibrary
...
@@ -305,7 +312,7 @@ namespace DeviceLibrary
}
}
}
}
}
}
public
int
queueTaskCount
=
-
1
;
public
int
queueTaskCount
=
-
1
;
ConcurrentQueue
<
string
>
commandResultMsg
=
new
ConcurrentQueue
<
string
>();
ConcurrentQueue
<
string
>
commandResultMsg
=
new
ConcurrentQueue
<
string
>();
void
ResultProcess
(
Operation
resultOperation
)
void
ResultProcess
(
Operation
resultOperation
)
{
{
...
@@ -482,7 +489,7 @@ namespace DeviceLibrary
...
@@ -482,7 +489,7 @@ namespace DeviceLibrary
{
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
//SetWarnMsg(ResourceControl.InStoreNoPosition, message, posId);
//SetWarnMsg(ResourceControl.InStoreNoPosition, message, posId);
WarnMsg
=
crc
.
GetString
(
L
.
in_store_nothave_position
,
"入库未找到库位:"
)
+
posId
;
//0505
WarnMsg
=
crc
.
GetString
(
L
.
in_store_nothave_position
,
"入库未找到库位:"
)
+
posId
;
//0505
LogUtil
.
info
(
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
LogUtil
.
info
(
"收到服务器入库命令:入库未找到库位:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
return
;
}
}
...
@@ -510,9 +517,10 @@ namespace DeviceLibrary
...
@@ -510,9 +517,10 @@ namespace DeviceLibrary
RobotManage
.
mainMachine
.
ClampMoveInfo
.
MoveParam
.
NgMsg
=
msg
;
RobotManage
.
mainMachine
.
ClampMoveInfo
.
MoveParam
.
NgMsg
=
msg
;
RobotManage
.
mainMachine
.
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitInStore
);
RobotManage
.
mainMachine
.
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
WaitInStore
);
//RobotManage.mainMachine.NGPuted(msg);
//RobotManage.mainMachine.NGPuted(msg);
LogUtil
.
info
(
"服务器没有正确返回库位. msg="
+
msg
);
LogUtil
.
info
(
"服务器没有正确返回库位. msg="
+
msg
);
}
}
else
{
else
{
}
}
...
@@ -533,13 +541,13 @@ namespace DeviceLibrary
...
@@ -533,13 +541,13 @@ namespace DeviceLibrary
{
{
string
maxHumidity
=
data
[
ParamDefine
.
maxHumidity
];
string
maxHumidity
=
data
[
ParamDefine
.
maxHumidity
];
string
maxTemp
=
data
[
ParamDefine
.
maxTemperature
];
string
maxTemp
=
data
[
ParamDefine
.
maxTemperature
];
LogUtil
.
info
(
"收到服务器温湿度预警值:maxHumidity="
+
maxHumidity
+
",maxTemperature="
+
maxTemp
);
LogUtil
.
info
(
"收到服务器温湿度预警值:maxHumidity="
+
maxHumidity
+
",maxTemperature="
+
maxTemp
);
try
try
{
{
this
.
Max_Humidity
=
(
float
)
Convert
.
ToDouble
(
maxHumidity
);
this
.
Max_Humidity
=
(
float
)
Convert
.
ToDouble
(
maxHumidity
);
this
.
Max_Temperature
=
(
float
)
Convert
.
ToDouble
(
maxTemp
);
this
.
Max_Temperature
=
(
float
)
Convert
.
ToDouble
(
maxTemp
);
LogUtil
.
info
(
"保存温湿度预警值:Max_Humidity="
+
Max_Humidity
+
",Max_Temperature="
+
Max_Temperature
);
LogUtil
.
info
(
"保存温湿度预警值:Max_Humidity="
+
Max_Humidity
+
",Max_Temperature="
+
Max_Temperature
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -585,7 +593,7 @@ namespace DeviceLibrary
...
@@ -585,7 +593,7 @@ namespace DeviceLibrary
{
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg
=
StoreName
+
"出库未找库位:【"
+
posId
+
"】"
;
WarnMsg
=
StoreName
+
"出库未找库位:【"
+
posId
+
"】"
;
LogUtil
.
error
(
"收到服务器出库命令:未找到【"
+
posId
+
"】的库位信息"
);
LogUtil
.
error
(
"收到服务器出库命令:未找到【"
+
posId
+
"】的库位信息"
);
continue
;
continue
;
}
}
else
else
...
...
DeviceLibrary/theMachine/BoxTransport.cs
查看文件 @
28ae478
...
@@ -30,13 +30,13 @@ namespace DeviceLibrary
...
@@ -30,13 +30,13 @@ namespace DeviceLibrary
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
public
event
Action
<
string
,
StoreMoveType
,
bool
>
InOutEndProcessEvent
;
public
bool
IsComplateOrFree
{
get
=>
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
!
movelock
;
}
public
bool
IsComplateOrFree
{
get
=>
MoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
!
movelock
;
}
public
bool
IsTakedReel
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS10
;
}
public
bool
IsTakedReel
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS10
;
}
public
bool
IsPutOnOut
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS16
;
}
public
bool
IsPutOnOut
{
get
=>
MoveInfo
.
MoveStep
>=
MoveStep
.
StoreTS16
;
}
public
ReelTransport
(
Robot_Config
_Config
,
MainMachine
_mainMachine
)
public
ReelTransport
(
Robot_Config
_Config
,
MainMachine
_mainMachine
)
{
{
Config
=
_Config
;
Config
=
_Config
;
mainMachine
=
_mainMachine
;
mainMachine
=
_mainMachine
;
MoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
L
.
transfer_equipment
,
"出入库机构"
),
false
);
MoveInfo
=
new
MoveInfo
(
crc
.
GetString
(
L
.
transfer_equipment
,
"出入库机构"
),
false
);
To
=
null
;
To
=
null
;
From
=
null
;
From
=
null
;
#
region
初始化伺服轴
#
region
初始化伺服轴
...
@@ -47,18 +47,19 @@ namespace DeviceLibrary
...
@@ -47,18 +47,19 @@ namespace DeviceLibrary
#
endregion
#
endregion
}
}
public
void
Reset
()
{
public
void
Reset
()
{
MoveInfo
.
NewMove
(
MoveStep
.
Wait
);
MoveInfo
.
NewMove
(
MoveStep
.
Wait
);
MoveInfo
.
log
(
"执行重置"
);
MoveInfo
.
log
(
"执行重置"
);
To
=
null
;
To
=
null
;
From
=
null
;
From
=
null
;
}
}
StoreMoveType
storeMoveType
=
StoreMoveType
.
None
;
StoreMoveType
storeMoveType
=
StoreMoveType
.
None
;
string
WareCode
=
""
;
string
WareCode
=
""
;
int
plateH
=
0
;
int
plateH
=
0
;
bool
PreMove
=
false
;
bool
PreMove
=
false
;
bool
ignoreFixtureCheck
=
false
;
bool
ignoreFixtureCheck
=
false
;
public
bool
Start
(
BoxStorePosition
from
,
BoxStorePosition
to
,
StoreMoveType
_storeMoveType
,
bool
premove
=
false
)
public
bool
Start
(
BoxStorePosition
from
,
BoxStorePosition
to
,
StoreMoveType
_storeMoveType
,
bool
premove
=
false
)
{
{
if
(
MoveInfo
.
MoveStep
!=
MoveStep
.
Wait
)
if
(
MoveInfo
.
MoveStep
!=
MoveStep
.
Wait
)
...
@@ -72,10 +73,12 @@ namespace DeviceLibrary
...
@@ -72,10 +73,12 @@ namespace DeviceLibrary
WareCode
=
"NG"
;
WareCode
=
"NG"
;
plateH
=
56
;
plateH
=
56
;
To
=
to
.
clone
();
To
=
to
.
clone
();
{
MoveInfo
.
NewMove
(
MoveStep
.
StoreTS10
);
MoveInfo
.
NewMove
(
MoveStep
.
StoreTS10
);
MoveInfo
.
log
(
$
"{storeMoveType}:开始运输料盘,直接到:{to.posid}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:开始运输料盘,直接到:{to.posid}"
);
MoveInfo
.
MoveParam
.
PosID
=
$
"NA=>{To.posid}"
;
MoveInfo
.
MoveParam
.
PosID
=
$
"NA=>{To.posid}"
;
}
}
}
else
else
{
{
WareCode
=
from
.
Reel
.
WareCode
;
WareCode
=
from
.
Reel
.
WareCode
;
...
@@ -100,7 +103,8 @@ namespace DeviceLibrary
...
@@ -100,7 +103,8 @@ namespace DeviceLibrary
//thread.Start();
//thread.Start();
}
}
public
bool
ReadyToTakeBox
()
{
public
bool
ReadyToTakeBox
()
{
if
(
MoveInfo
.
MoveStep
!=
MoveStep
.
StoreTS05
)
if
(
MoveInfo
.
MoveStep
!=
MoveStep
.
StoreTS05
)
return
false
;
return
false
;
...
@@ -131,7 +135,8 @@ namespace DeviceLibrary
...
@@ -131,7 +135,8 @@ namespace DeviceLibrary
}
}
break
;
break
;
case
MoveStep
.
StoreTS02
:
case
MoveStep
.
StoreTS02
:
if
(
MoveInfo
.
MoveParam
.
ReelOnFixture
)
{
if
(
MoveInfo
.
MoveParam
.
ReelOnFixture
)
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS08
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS08
);
MoveInfo
.
log
(
$
"{storeMoveType}:料盘已在料叉上,压紧轴压紧,Comp_PL:{From.Comp_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:料盘已在料叉上,压紧轴压紧,Comp_PL:{From.Comp_PL}"
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
From
.
Comp_PL
,
Config
.
Comp_P2_speed
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
From
.
Comp_PL
,
Config
.
Comp_P2_speed
);
...
@@ -173,7 +178,8 @@ namespace DeviceLibrary
...
@@ -173,7 +178,8 @@ namespace DeviceLibrary
{
{
RobotManage
.
mainMachine
.
CylinderMove
(
MoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
RobotManage
.
mainMachine
.
CylinderMove
(
MoveInfo
,
IO_Type
.
Clamping_Relax
,
IO_Type
.
Clamping_Work
,
IO_VALUE
.
LOW
);
}
}
else
{
else
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS08
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS08
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
From
.
UpDown_PH
,
Config
.
UpDown_P4_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
From
.
UpDown_PH
,
Config
.
UpDown_P4_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达取料高点"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达取料高点"
);
...
@@ -208,7 +214,8 @@ namespace DeviceLibrary
...
@@ -208,7 +214,8 @@ namespace DeviceLibrary
}
}
else
else
{
{
if
(!
ignoreFixtureCheck
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(!
ignoreFixtureCheck
&&
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
log
(
$
"忽略物料:Device_DisableStorePosition:{Setting_Init.Device_DisableStorePosition.Val},库位:{From.posid},{WareCode}"
);
MoveInfo
.
log
(
$
"忽略物料:Device_DisableStorePosition:{Setting_Init.Device_DisableStorePosition.Val},库位:{From.posid},{WareCode}"
);
if
(
Setting_Init
.
Device_DisableStorePosition
&&
From
.
posid
!=
BoxStorePosition
.
strings
&&
From
.
posid
!=
BoxStorePosition
.
ngdoor
&&
From
.
posid
!=
BoxStorePosition
.
clamp
)
if
(
Setting_Init
.
Device_DisableStorePosition
&&
From
.
posid
!=
BoxStorePosition
.
strings
&&
From
.
posid
!=
BoxStorePosition
.
ngdoor
&&
From
.
posid
!=
BoxStorePosition
.
clamp
)
{
{
...
@@ -228,6 +235,7 @@ namespace DeviceLibrary
...
@@ -228,6 +235,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StoreFIX01
:
case
MoveStep
.
StoreFIX01
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX02
);
RobotManage
.
PutReelInFixPos
(
To
.
Reel
);
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
);
...
@@ -248,9 +256,8 @@ namespace DeviceLibrary
...
@@ -248,9 +256,8 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StoreFIX04
:
case
MoveStep
.
StoreFIX04
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreFIX05
);
RobotManage
.
PutReelInFixPos
(
MoveInfo
.
MoveParam
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Comp_PL
,
Config
.
Comp_P2_speed
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
Comp_PL
,
Config
.
Comp_P2_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P3_speed
/
2
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Fix
.
UpDown_PH
,
Config
.
UpDown_P3_speed
/
2
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}"
);
break
;
break
;
...
@@ -268,7 +275,8 @@ namespace DeviceLibrary
...
@@ -268,7 +275,8 @@ namespace DeviceLibrary
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{To.UpDown_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地高点:{To.UpDown_PH}"
);
break
;
break
;
case
MoveStep
.
StoreTS11
:
case
MoveStep
.
StoreTS11
:
if
(
To
.
posid
==
BoxStorePosition
.
strings
)
{
if
(
To
.
posid
==
BoxStorePosition
.
strings
)
{
if
(!
mainMachine
.
IsPutReelReady
)
if
(!
mainMachine
.
IsPutReelReady
)
{
{
//if (MoveInfo.IsTimeOut(20))
//if (MoveInfo.IsTimeOut(20))
...
@@ -276,12 +284,13 @@ namespace DeviceLibrary
...
@@ -276,12 +284,13 @@ namespace DeviceLibrary
MoveInfo
.
log
(
$
"等待料串准备好放料"
);
MoveInfo
.
log
(
$
"等待料串准备好放料"
);
return
false
;
return
false
;
}
}
}
else
if
(
To
.
posid
==
BoxStorePosition
.
ngdoor
)
}
else
if
(
To
.
posid
==
BoxStorePosition
.
ngdoor
)
{
{
if
(
mainMachine
.
ClampMoveInfo
.
MoveStep
!=
MoveStep
.
Wait
)
if
(
mainMachine
.
ClampMoveInfo
.
MoveStep
!=
MoveStep
.
Wait
)
{
{
//if (MoveInfo.IsTimeOut(20))
//if (MoveInfo.IsTimeOut(20))
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_wait_ngdoor_ready
,
"等待单料口空闲."
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
out_store_wait_ngdoor_ready
,
"等待单料口空闲."
),
MsgLevel
.
warning
);
MoveInfo
.
log
(
$
"等待单料口空闲"
);
MoveInfo
.
log
(
$
"等待单料口空闲"
);
return
false
;
return
false
;
}
}
...
@@ -300,7 +309,8 @@ namespace DeviceLibrary
...
@@ -300,7 +309,8 @@ namespace DeviceLibrary
Comp_Axis
.
AbsMove
(
MoveInfo
,
To
.
Comp_PH
,
Config
.
Comp_P2_speed
);
Comp_Axis
.
AbsMove
(
MoveInfo
,
To
.
Comp_PH
,
Config
.
Comp_P2_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{To.Comp_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:压紧轴压紧点:{To.Comp_PH}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地低点:{To.UpDown_PL}"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴到达目的地低点:{To.UpDown_PL}"
);
if
(
To
.
posid
==
BoxStorePosition
.
ngdoor
)
{
if
(
To
.
posid
==
BoxStorePosition
.
ngdoor
)
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS_WaitOutProcess
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS_WaitOutProcess
);
MoveInfo
.
log
(
$
"{storeMoveType}:目的地为单料口,转运后等待处理"
);
MoveInfo
.
log
(
$
"{storeMoveType}:目的地为单料口,转运后等待处理"
);
}
}
...
@@ -343,11 +353,13 @@ namespace DeviceLibrary
...
@@ -343,11 +353,13 @@ namespace DeviceLibrary
// UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P5, Config.UpDown_P1_speed);
// UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P5, Config.UpDown_P1_speed);
//else
//else
// UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P2, Config.UpDown_P1_speed);
// UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P2, Config.UpDown_P1_speed);
if
(!
RobotManage
.
mainMachine
.
HasJob
)
{
if
(!
RobotManage
.
mainMachine
.
HasJob
)
{
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Config
.
UpDown_P1
,
Config
.
UpDown_P1_speed
);
UpDown_Axis
.
AbsMove
(
MoveInfo
,
Config
.
UpDown_P1
,
Config
.
UpDown_P1_speed
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_speed
);
Middle_Axis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_speed
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴,旋转返回待机点P1"
);
MoveInfo
.
log
(
$
"{storeMoveType}:上下轴,旋转返回待机点P1"
);
}
else
}
else
MoveInfo
.
log
(
$
"{storeMoveType}:后续还有任务不返回待机点"
);
MoveInfo
.
log
(
$
"{storeMoveType}:后续还有任务不返回待机点"
);
ErrMsgTxt
=
""
;
ErrMsgTxt
=
""
;
break
;
break
;
...
@@ -374,13 +386,15 @@ namespace DeviceLibrary
...
@@ -374,13 +386,15 @@ namespace DeviceLibrary
return
false
;
return
false
;
}
}
public
void
Continue
()
{
public
void
Continue
()
{
if
(
MoveInfo
.
MoveStep
==
MoveStep
.
StoreTS_WaitOutProcess
)
if
(
MoveInfo
.
MoveStep
==
MoveStep
.
StoreTS_WaitOutProcess
)
{
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS_Continue
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
StoreTS_Continue
);
MoveInfo
.
log
(
$
"{storeMoveType}:外部处理完成,继续"
);
MoveInfo
.
log
(
$
"{storeMoveType}:外部处理完成,继续"
);
}
}
else
{
else
{
MoveInfo
.
log
(
$
"{storeMoveType}:当前不在外部处理状态"
);
MoveInfo
.
log
(
$
"{storeMoveType}:当前不在外部处理状态"
);
}
}
}
}
...
@@ -399,7 +413,8 @@ namespace DeviceLibrary
...
@@ -399,7 +413,8 @@ namespace DeviceLibrary
InOutEndProcessEvent
?.
Invoke
(
posid
,
storeMoveType
,
true
);
InOutEndProcessEvent
?.
Invoke
(
posid
,
storeMoveType
,
true
);
}
}
HIKCamera
GetCamera
(
int
pos
)
{
HIKCamera
GetCamera
(
int
pos
)
{
//return pos > 0 ? RobotManage.CameraA : RobotManage.CameraB;
//return pos > 0 ? RobotManage.CameraA : RobotManage.CameraB;
return
RobotManage
.
CameraA
;
return
RobotManage
.
CameraA
;
}
}
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
28ae478
...
@@ -459,16 +459,15 @@ namespace DeviceLibrary
...
@@ -459,16 +459,15 @@ namespace DeviceLibrary
boxTransport
.
Reset
();
boxTransport
.
Reset
();
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
EndMove
();
ResetMoveInfo
.
EndMove
();
if
((
RobotManage
.
HasReelInFixPos
(
out
ReelParam
reelParam
))
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
&&
ConfigHelper
.
Config
.
Get
(
"Device_Use_Fixpos"
,
false
))
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);
}
}
runStatus
=
RunStatus
.
Running
;
runStatus
=
RunStatus
.
Running
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
...
...
DeviceLibrary/theMachine/MainMachine_Store.cs
查看文件 @
28ae478
...
@@ -15,13 +15,14 @@ namespace DeviceLibrary
...
@@ -15,13 +15,14 @@ namespace DeviceLibrary
{
{
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
"批量"
);
StoreJobList
OutStoreJobList
=
new
StoreJobList
(
"批量"
);
StoreJobList
OutSingleJobList
=
new
StoreJobList
(
"单盘"
);
StoreJobList
OutSingleJobList
=
new
StoreJobList
(
"单盘"
);
public
bool
HasJob
{
get
=>
OutStoreJobList
.
Count
>
0
||
OutSingleJobList
.
Count
>
0
;
}
public
bool
HasJob
{
get
=>
OutStoreJobList
.
Count
>
0
||
OutSingleJobList
.
Count
>
0
;
}
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
{
public
void
AddOutStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
{
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
OutStoreJobList
.
Enqueue
(
jobInfo
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
LogUtil
.
info
(
$
"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"
);
}
}
public
void
AddSingleStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
public
void
AddSingleStoreTask
(
string
warecode
,
string
posId
,
int
plateW
,
int
plateH
)
{
{
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
JobInfo
jobInfo
=
new
JobInfo
(
warecode
,
posId
,
plateW
,
plateH
);
OutSingleJobList
.
Enqueue
(
jobInfo
);
OutSingleJobList
.
Enqueue
(
jobInfo
);
...
@@ -85,7 +86,8 @@ namespace DeviceLibrary
...
@@ -85,7 +86,8 @@ namespace DeviceLibrary
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
}
}
}
else
if
(
OutStoreJobList
.
Count
>
0
&&
!
IsBatchDoorClosed
)
{
else
if
(
OutStoreJobList
.
Count
>
0
&&
!
IsBatchDoorClosed
)
{
Msg
.
add
(
"出库任务等待关闭批量舱门"
,
MsgLevel
.
warning
);
Msg
.
add
(
"出库任务等待关闭批量舱门"
,
MsgLevel
.
warning
);
}
}
//判断有没有出库任务, 需要入库空闲, 出口空闲
//判断有没有出库任务, 需要入库空闲, 出口空闲
...
@@ -120,9 +122,10 @@ namespace DeviceLibrary
...
@@ -120,9 +122,10 @@ namespace DeviceLibrary
case
MoveStep
.
StoreIn01
:
case
MoveStep
.
StoreIn01
:
if
(!
StoreMoveInfo
.
MoveParam
.
IsNg
&&
!
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
InStoreExecute
))
if
(!
StoreMoveInfo
.
MoveParam
.
IsNg
&&
!
ServerCM
.
SendStoreState
(
StoreMoveInfo
.
MoveParam
.
PosID
,
StoreStatus
.
InStoreExecute
))
{
{
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
return
;
return
;
}
}
ServerCM
.
storeStatus
=
StoreStatus
.
InStoreExecute
;
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn03
);
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
...
@@ -131,7 +134,7 @@ namespace DeviceLibrary
...
@@ -131,7 +134,7 @@ namespace DeviceLibrary
{
{
var
ac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
var
ac
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
?
StoreSide
.
NGDoor
:
StoreSide
.
Clamp
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
ac
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreMoveInfo
.
MoveParam
.
ReelOnFixture
?
StoreSide
.
NGDoor
:
StoreSide
.
Clamp
,
StoreMoveInfo
.
MoveParam
),
new
BoxStorePosition
(
Config
,
ac
,
StoreMoveInfo
.
MoveParam
),
StoreMoveType
.
InStore
,
true
);
}
}
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
StoreMoveInfo
.
log
(
$
"开始转运料盘"
);
break
;
break
;
...
@@ -185,6 +188,7 @@ namespace DeviceLibrary
...
@@ -185,6 +188,7 @@ namespace DeviceLibrary
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
Msg
.
add
(
"服务器连接异常"
,
MsgLevel
.
warning
);
return
;
return
;
}
}
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut11
);
StoreMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut11
);
var
outFrom
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
var
outFrom
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
StoreMoveInfo
.
MoveParam
.
PosID
);
BoxStorePosition
outTo
;
BoxStorePosition
outTo
;
...
@@ -241,8 +245,9 @@ namespace DeviceLibrary
...
@@ -241,8 +245,9 @@ namespace DeviceLibrary
break
;
break
;
}
}
}
}
string
StoreState
()
{
string
StoreState
()
string
state
=
crc
.
GetString
(
L
.
free
,
"空闲中"
);
{
string
state
=
crc
.
GetString
(
L
.
free
,
"空闲中"
);
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
)
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
StoreOut10
)
{
{
state
=
$
"{crc.GetString(L.reel_outting, "
出库中
")},{crc.GetString(L.posnum, "
出库中
")}:{StoreMoveInfo.MoveParam.PosID}"
;
state
=
$
"{crc.GetString(L.reel_outting, "
出库中
")},{crc.GetString(L.posnum, "
出库中
")}:{StoreMoveInfo.MoveParam.PosID}"
;
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
28ae478
...
@@ -141,6 +141,14 @@ namespace DeviceLibrary
...
@@ -141,6 +141,14 @@ namespace DeviceLibrary
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
break
;
break
;
case
MoveStep
.
StringLoad_01
:
case
MoveStep
.
StringLoad_01
:
if
(
StringState
==
StringStateE
.
OutStore
)
{
ServerCM
.
storeStatus
=
StoreStatus
.
OutStoreExecute
;
}
else
if
(
StringState
==
StringStateE
.
InStore
)
{
ServerCM
.
storeStatus
=
StoreStatus
.
InStoreExecute
;
}
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
StringMoveInfo
.
log
(
$
"批量轴到待机点"
);
StringMoveInfo
.
log
(
$
"批量轴到待机点"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
...
@@ -408,6 +416,7 @@ namespace DeviceLibrary
...
@@ -408,6 +416,7 @@ namespace DeviceLibrary
case
MoveStep
.
StringOut_Released
:
case
MoveStep
.
StringOut_Released
:
StringMoveInfo
.
log
(
$
"料串已回到待机点"
);
StringMoveInfo
.
log
(
$
"料串已回到待机点"
);
ServerCM
.
storeStatus
=
StoreStatus
.
StoreOnline
;
StringMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
StringMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
break
;
break
;
case
MoveStep
.
StringOut_07
:
case
MoveStep
.
StringOut_07
:
...
...
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
28ae478
...
@@ -186,7 +186,7 @@ namespace DeviceLibrary
...
@@ -186,7 +186,7 @@ namespace DeviceLibrary
reelParam
=
null
;
reelParam
=
null
;
try
try
{
{
string
fix
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
FixBuffInfo
,
""
)
;
string
fix
=
Setting_Init
.
FixBuffInfo
;
if
(!
string
.
IsNullOrEmpty
(
fix
))
if
(!
string
.
IsNullOrEmpty
(
fix
))
{
{
reelParam
=
JsonHelper
.
DeserializeJsonToObject
<
ReelParam
>(
fix
);
reelParam
=
JsonHelper
.
DeserializeJsonToObject
<
ReelParam
>(
fix
);
...
@@ -201,11 +201,13 @@ namespace DeviceLibrary
...
@@ -201,11 +201,13 @@ namespace DeviceLibrary
}
}
public
static
void
PutReelInFixPos
(
ReelParam
reelParam
)
public
static
void
PutReelInFixPos
(
ReelParam
reelParam
)
{
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
JsonHelper
.
SerializeObject
(
reelParam
));
string
buff
=
JsonHelper
.
SerializeObject
(
reelParam
);
Setting_Init
.
FixBuffInfo
=
buff
;
LogUtil
.
info
(
buff
);
}
}
public
static
void
ClearReelInFixPos
()
public
static
void
ClearReelInFixPos
()
{
{
ConfigHelper
.
Config
.
Set
(
Setting_Init
.
FixBuffInfo
,
""
)
;
Setting_Init
.
FixBuffInfo
=
""
;
}
}
#
endregion
#
endregion
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论