Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-OutletEquip
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3a1eec93
由
LN
编写于
2021-04-02 16:05:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
汇川板卡增加错误码解析
1 个父辈
53a8d972
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
38 行增加
和
34 行删除
dll/HuichuanDLL/HuichuanLibrary.dll
dll/HuichuanDLL/huichuan_config/commandDef.txt
dll/HuichuanDLL/huichuan_config/errorcode.h
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/bean/EquipBean_Partial.cs
source/DeviceLibrary/huichuan_config/commandDef.txt
source/DeviceLibrary/huichuan_config/errorcode.h
dll/HuichuanDLL/HuichuanLibrary.dll
查看文件 @
3a1eec9
此文件类型无法预览
dll/HuichuanDLL/huichuan_config/commandDef.txt
0 → 100644
查看文件 @
3a1eec9
此文件的差异被折叠,
点击展开。
dll/HuichuanDLL/huichuan_config/errorcode.h
0 → 100644
查看文件 @
3a1eec9
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
3a1eec9
...
...
@@ -122,6 +122,12 @@
<Content Include="device_config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="huichuan_config\commandDef.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="huichuan_config\errorcode.h">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<Content Include="huichuan_x64\IMC_API_x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
...
...
source/DeviceLibrary/bean/EquipBean_Partial.cs
查看文件 @
3a1eec9
...
...
@@ -12,9 +12,9 @@ namespace OnlineStore.DeviceLibrary
{
#
region
自动出料参数
public
List
<
string
>
PositionNumList
=
new
List
<
string
>();
public
bool
autoNext
=
false
;
public
List
<
string
>
PositionNumList
=
new
List
<
string
>();
public
bool
autoNext
=
false
;
public
int
autoJiange
=
1
;
public
int
autoPositionIndex
=
0
;
public
string
autoMsg
=
""
;
...
...
@@ -22,9 +22,9 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
出料参数
private
int
CurrInOutCount
=
0
;
private
bool
LoadParamPosition
(
InOutParam
param
)
{
if
(
param
==
null
)
...
...
@@ -55,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
else
{
List
<
ShelfPosition
>
positionList
=
CSVPositionReader
<
ShelfPosition
>.
getPositionList
();
List
<
ShelfPosition
>
list
=
(
from
m
in
positionList
where
m
.
BagWidth
>
(
7
)
select
m
).
ToList
();
List
<
ShelfPosition
>
list
=
(
from
m
in
positionList
where
m
.
BagWidth
>
(
7
)
select
m
).
ToList
();
if
(
list
.
Count
>
0
)
{
param
.
PosInfo
.
ShelfPosId
=
list
[
0
].
PositionNum
;
...
...
@@ -67,11 +67,11 @@ namespace OnlineStore.DeviceLibrary
}
//param.PosInfo.ShelfPosId = PositionNumList[0];
}
ShelfPosition
position
=
param
.
GetACPosition
();
if
(
position
==
null
)
{
LogUtil
.
error
(
Name
+
"出料时发现param中取到的Position=null,没有库位不能执行出料"
);
LogUtil
.
error
(
Name
+
"出料时发现param中取到的Position=null,没有库位不能执行出料"
);
return
false
;
}
...
...
@@ -86,14 +86,14 @@ namespace OnlineStore.DeviceLibrary
p
.
Middle_P1
=
Config
.
MiddleAxis_P1
;
p
.
Middle_P2
=
position
.
MiddleAxis_P2
;
p
.
Middle_P3
=
Config
.
MiddleAxis_P3
;
p
.
Middle_P3
=
Config
.
MiddleAxis_P3
;
p
.
UpDown_P1
=
Config
.
UpDownAxis_DoorL_P1
;
p
.
UpDown_P2
=
Config
.
UpDownAxis_DoorH_P2
;
p
.
UpDown_P1
=
Config
.
UpDownAxis_DoorL_P1
;
p
.
UpDown_P2
=
Config
.
UpDownAxis_DoorH_P2
;
p
.
UpDown_P3
=
position
.
UpDownAxis_H_P3
;
p
.
UpDown_P4
=
position
.
UpDownAxis_L_P4
;
p
.
UpDown_P5
=
Config
.
UpDownAxis_DoorH_P5
;
p
.
UpDown_P6
=
Config
.
UpDownAxis_DoorH_P6
;
p
.
UpDown_P6
=
Config
.
UpDownAxis_DoorH_P6
;
param
.
MoveP
=
p
;
if
(
param
.
PosInfo
.
PlateH
<=
0
)
...
...
@@ -110,7 +110,7 @@ namespace OnlineStore.DeviceLibrary
ShelfPosition
position
=
param
.
GetACPosition
();
if
(
position
==
null
)
{
LogUtil
.
error
(
Name
+
"出料时发现param中取到的Position=null,没有库位不能执行出料"
);
LogUtil
.
error
(
Name
+
"出料时发现param中取到的Position=null,没有库位不能执行出料"
);
return
false
;
}
if
(
param
.
PosInfo
.
PlateH
<=
0
)
...
...
@@ -133,9 +133,9 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
出料结果验证
private
DateTime
preRWTime
=
DateTime
.
Now
;
public
void
CheckWait
(
StoreMoveInfo
checkmove
)
public
void
CheckWait
(
StoreMoveInfo
checkmove
)
{
List
<
WaitResultInfo
>
list
=
checkmove
.
WaitList
;
//当等待超过一分钟时,需要打印提示
...
...
@@ -201,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
{
ConfigIO
io
=
Config
.
getWaitIO
(
wait
.
IoType
);
...
...
@@ -213,11 +213,11 @@ namespace OnlineStore.DeviceLibrary
}
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
checkmove
.
MoveType
);
LogUtil
.
error
(
Name
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
LogUtil
.
error
(
Name
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
isOk
=
false
;
break
;
}
TimeSpan
rwSpan
=
DateTime
.
Now
-
preRWTime
;
if
(!
wait
.
IsEnd
&&
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
)
...
...
@@ -246,7 +246,7 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
if
(
wait
.
IsEnd
)
{
if
(
checkmove
.
OneWaitCanEndStep
)
...
...
@@ -277,8 +277,8 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
""
;
return
;
}
LogUtil
.
error
(
WarnMsg
,
100
);
LogUtil
.
error
(
WarnMsg
,
100
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
checkmove
.
MoveType
);
}
}
...
...
@@ -290,9 +290,9 @@ namespace OnlineStore.DeviceLibrary
#
region
出料
private
DateTime
startMoveTime
=
DateTime
.
Now
;
public
override
bool
StartOutMove
(
InOutParam
param
)
{
public
override
bool
StartOutMove
(
InOutParam
param
)
{
startMoveTime
=
DateTime
.
Now
;
string
posId
=
param
!=
null
?
param
.
PosInfo
.
ShelfPosId
:
""
;
if
(
storeRunStatus
==
StoreRunStatus
.
Runing
)
...
...
@@ -300,18 +300,18 @@ namespace OnlineStore.DeviceLibrary
if
(!
LoadParamPosition
(
param
))
{
LogUtil
.
error
(
Name
+
" 启动出料移栽【"
+
param
.
PosInfo
.
ToStr
()
+
"】出错,找不到库位"
);
return
false
;
return
false
;
}
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
Name
+
" 启动出料移栽【"
+
param
.
PosInfo
.
ToStr
()
+
"】出错,叉子料盘检测有料"
);
return
false
;
return
false
;
}
LogInfo
(
" 启动出料移栽【"
+
param
.
PosInfo
.
ToStr
()
+
"】成功"
);
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
OutStoreExecute
;
MoveInfo
.
NewMove
(
StoreMoveType
.
OutStore
,
param
);
if
(
IOValue
(
IO_Type
.
TrayCheck_Door
).
Equals
(
IO_VALUE
.
HIGH
))
{
doorCheckWatch
.
Restart
();
...
...
@@ -330,11 +330,11 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
private
void
SO_11_InOutToP1
(
LineMoveP
moveP
)
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
SO_11_InOutToP1
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
SO_11_InOutToP1
);
MoveLog
(
"进出轴到P1["
+
moveP
.
InOut_P1
+
"]"
);
int
outCount
=
AxisManager
.
instance
.
GetActualtPosition
(
Config
.
InOut_Axis
.
DeviceName
,
Config
.
InOut_Axis
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
-
moveP
.
InOut_P1
);
...
...
@@ -371,13 +371,14 @@ namespace OnlineStore.DeviceLibrary
//判断仓门是否打开
MoveInfo
.
NextMoveStep
(
MoveStep
.
SO_14_InoutToP2
);
MoveLog
(
" 叉子进入出料口,进出轴至P2(进料口取料点) "
+
movep
.
InOut_P2
);
MoveLog
(
" 叉子进入出料口,进出轴至P2(进料口取料点) "
+
movep
.
InOut_P2
);
ACAxisMove
(
Config
.
InOut_Axis
,
movep
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
}
private
void
MoveToPosition
(
LineMoveP
moveP
)
{
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
IsNg
)
{
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
MoveInfo
.
NextMoveStep
(
MoveStep
.
SO_31_MoveToNG
);
MoveLog
(
"移动到NG箱,旋转轴至P3["
+
moveP
.
Middle_P3
+
"], 升降轴至P5["
+
moveP
.
UpDown_P5
+
"] "
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P3
,
Config
.
MiddleAxis_P3_Speed
);
...
...
@@ -390,6 +391,7 @@ namespace OnlineStore.DeviceLibrary
}
private
void
SO_21_MoveToBag
()
{
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
LineMoveP
moveP
=
MoveInfo
.
MoveParam
.
MoveP
;
MoveInfo
.
NextMoveStep
(
MoveStep
.
SO_21_MoveToBag
);
MoveLog
(
" 移动到库位点,旋转轴至P2(库位点)["
+
moveP
.
Middle_P2
+
"], 升降轴至P3["
+
moveP
.
UpDown_P3
+
"] "
);
...
...
@@ -496,10 +498,6 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SO_22_InoutToP3
))
{
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosInfo
.
ShelfPosId
:
""
;
//lastPosId = posId;
//lastPosIdStatus = StoreStatus.OutStoreBoxEnd;
storeStatus
=
StoreStatus
.
OutStoreBoxEnd
;
...
...
source/DeviceLibrary/huichuan_config/commandDef.txt
0 → 100644
查看文件 @
3a1eec9
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/huichuan_config/errorcode.h
0 → 100644
查看文件 @
3a1eec9
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论