Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3b0cd387
由
LN
编写于
2019-11-28 12:00:28 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调整料架进出逻辑
1 个父辈
2ae1c884
全部展开
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
144 行增加
和
133 行删除
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
source/DeviceLibrary/ACPackingStore/PackingStoreBean_Partial.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
source/DeviceLibrary/store/AutoInoutInfo.cs
source/DeviceLibrary/store/InOutParam.cs
source/DeviceLibrary/store/KTK_Store.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
3b0cd38
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
3b0cd38
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
deleted
100644 → 0
查看文件 @
2ae1c88
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/PackingStoreBean.cs
查看文件 @
3b0cd38
...
@@ -445,6 +445,30 @@ namespace OnlineStore.DeviceLibrary
...
@@ -445,6 +445,30 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
public
override
void
Alarm
(
StoreAlarmType
alarmType
,
string
alarmDetial
,
string
alarmMsg
,
StoreMoveType
storeMoveType
)
{
}
#
region
出库
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
{
return
true
;
}
protected
override
void
OutStoreProcess
()
{
}
#
endregion
#
region
入库
public
override
void
StartInStoreMove
(
InOutParam
param
)
{
}
protected
override
void
InStoreProcess
()
{
}
#
endregion
}
}
}
}
\ No newline at end of file
\ No newline at end of file
source/DeviceLibrary/ACPackingStore/PackingStoreBean_Partial.cs
deleted
100644 → 0
查看文件 @
2ae1c88
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
partial
class
PackingStoreBean
{
public
override
void
Alarm
(
StoreAlarmType
alarmType
,
string
alarmDetial
,
string
alarmMsg
,
StoreMoveType
storeMoveType
)
{
}
protected
override
void
ReturnHomeProcess
()
{
}
#
region
出库
public
override
bool
StartOutStoreMove
(
InOutParam
param
)
{
return
true
;
}
protected
override
void
OutStoreProcess
()
{
}
#
endregion
#
region
入库
public
override
void
StartInStoreMove
(
InOutParam
param
)
{
}
protected
override
void
InStoreProcess
()
{
}
#
endregion
}
}
\ No newline at end of file
\ No newline at end of file
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
3b0cd38
...
@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
LOGGER
.
Error
(
"出错:"
,
ex
);
LOGGER
.
Error
(
"出错:"
,
ex
);
}
return
false
;
}
return
false
;
}
}
public
static
bool
LoadInoutParam
(
InOutParam
param
,
AC_BOX_Bean
box
)
public
static
bool
LoadInoutParam
(
InOutParam
param
,
bool
needCheckShelf
,
AC_BOX_Bean
box
)
{
{
if
(
param
==
null
)
if
(
param
==
null
)
{
{
...
@@ -177,16 +177,18 @@ namespace OnlineStore.DeviceLibrary
...
@@ -177,16 +177,18 @@ namespace OnlineStore.DeviceLibrary
return
false
;
return
false
;
}
}
ShelfPosition
sp
=
CSVPositionReader
<
ShelfPosition
>.
GetPositon
(
param
.
ShelfPosID
);
ShelfPosition
sp
=
CSVPositionReader
<
ShelfPosition
>.
GetPositon
(
param
.
ShelfPosID
);
if
(
sp
==
null
)
if
(
sp
==
null
&&
needCheckShelf
)
{
{
LogUtil
.
error
(
box
.
Name
+
"GetPositon["
+
param
.
ShelfPosID
+
"]=null,没有库位不能执行出入库"
);
LogUtil
.
error
(
box
.
Name
+
"GetPositon["
+
param
.
ShelfPosID
+
"]=null,没有库位不能执行出入库"
);
return
false
;
return
false
;
}
}
if
(
sp
!=
null
)
{
p
.
InOut_P101
=
sp
.
InoutAxis_P101
;
p
.
InOut_P101
=
sp
.
InoutAxis_P101
;
p
.
UpDown_LP101
=
sp
.
UpDownAxis_LP101
;
p
.
UpDown_LP101
=
sp
.
UpDownAxis_LP101
;
p
.
UpDown_HP102
=
sp
.
UpDownAxis_HP102
;
p
.
UpDown_HP102
=
sp
.
UpDownAxis_HP102
;
p
.
Middle_P101
=
sp
.
MiddleAxis_P101
;
p
.
Middle_P101
=
sp
.
MiddleAxis_P101
;
}
p
.
ComPress_P1
=
box
.
Config
.
CompAxis_P1_Position
;
p
.
ComPress_P1
=
box
.
Config
.
CompAxis_P1_Position
;
p
.
InOut_P1
=
box
.
Config
.
InOutAxis_P1_Position
;
p
.
InOut_P1
=
box
.
Config
.
InOutAxis_P1_Position
;
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
3b0cd38
...
@@ -68,10 +68,8 @@
...
@@ -68,10 +68,8 @@
<ItemGroup>
<ItemGroup>
<Compile Include="ACPackingStore\AC_BOX_Bean.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Partial.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Partial.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Shelf.cs" />
<Compile Include="ACPackingStore\HumitureBean.cs" />
<Compile Include="ACPackingStore\HumitureBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean_Partial.cs" />
<Compile Include="ACPackingStore\StoreManager.cs" />
<Compile Include="ACPackingStore\StoreManager.cs" />
<Compile Include="agvClient\AgvClient.cs" />
<Compile Include="agvClient\AgvClient.cs" />
<Compile Include="device\halcon\CodeManager.cs" />
<Compile Include="device\halcon\CodeManager.cs" />
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
查看文件 @
3b0cd38
...
@@ -129,6 +129,6 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
...
@@ -129,6 +129,6 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,
CameraName
,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.101,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.101,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
查看文件 @
3b0cd38
...
@@ -128,7 +128,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
...
@@ -128,7 +128,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,
CameraName,,
,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.102,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.102,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
source/DeviceLibrary/store/AutoInoutInfo.cs
查看文件 @
3b0cd38
...
@@ -83,7 +83,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -83,7 +83,7 @@ namespace OnlineStore.DeviceLibrary
boxBean
.
LogInfo
(
"自动进入下一个出库:posid="
+
posid
+
",当时已经出入库"
+
CurrInOutACount
+
"次,需要重置BOX,先把出库信息存入排队列表中"
);
boxBean
.
LogInfo
(
"自动进入下一个出库:posid="
+
posid
+
",当时已经出入库"
+
CurrInOutACount
+
"次,需要重置BOX,先把出库信息存入排队列表中"
);
boxBean
.
Reset
(
false
);
boxBean
.
Reset
(
false
);
autoMsg
=
"自动出库:"
+
posid
;
autoMsg
=
"自动出库:"
+
posid
;
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
""
,
posid
,
shelfPosId
));
boxBean
.
waitOutStoreList
.
Enqueue
(
new
InOutParam
(
""
,
posid
,
shelfPosId
));
}
}
else
else
{
{
...
@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
boxBean
.
LogInfo
(
"自动进入下一个入库:posid="
+
posid
+
",当时已经出入库"
+
CurrInOutACount
+
"次,需要重置BOX,先把入库信息存入排队列表中"
);
boxBean
.
LogInfo
(
"自动进入下一个入库:posid="
+
posid
+
",当时已经出入库"
+
CurrInOutACount
+
"次,需要重置BOX,先把入库信息存入排队列表中"
);
boxBean
.
Reset
(
false
);
boxBean
.
Reset
(
false
);
autoMsg
=
"自动入库:"
+
posid
;
autoMsg
=
"自动入库:"
+
posid
;
boxBean
.
AddWaitOutInfo
(
new
InOutParam
(
"AAAA"
,
posid
,
shelfPosId
));
boxBean
.
waitOutStoreList
.
Enqueue
(
new
InOutParam
(
"AAAA"
,
posid
,
shelfPosId
));
}
}
else
else
{
{
...
...
source/DeviceLibrary/store/InOutParam.cs
查看文件 @
3b0cd38
...
@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
MoveP
=
null
;
MoveP
=
null
;
IsSolderPaste
=
false
;
IsSolderPaste
=
false
;
}
}
public
InOutParam
(
string
wareNo
,
string
posId
,
string
plateH
,
string
plateW
,
string
ShelfPosID
=
""
)
public
InOutParam
(
string
wareNo
,
string
posId
,
string
plateH
,
string
plateW
,
string
ShelfPosID
)
{
{
this
.
ShelfPosID
=
ShelfPosID
;
this
.
ShelfPosID
=
ShelfPosID
;
WareCode
=
wareNo
;
WareCode
=
wareNo
;
...
@@ -50,6 +50,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -50,6 +50,8 @@ namespace OnlineStore.DeviceLibrary
PosID
=
posId
;
PosID
=
posId
;
MoveP
=
linePosition
;
MoveP
=
linePosition
;
IsSolderPaste
=
false
;
IsSolderPaste
=
false
;
NeedEnterShelf
=
false
;
NeedOutShelf
=
false
;
}
}
/// <summary>
/// <summary>
/// 物品二维码信息
/// 物品二维码信息
...
...
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
3b0cd38
...
@@ -68,7 +68,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -68,7 +68,6 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
bool
isNoAirCheck
=
false
;
public
bool
isNoAirCheck
=
false
;
//protected int NeedCheckSafetyLight = 0;
/// <summary>
/// <summary>
/// 是否再报警中
/// 是否再报警中
/// </summary>
/// </summary>
...
@@ -142,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -142,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
isInPro
=
false
;
isInPro
=
false
;
break
;
break
;
case
StoreMoveType
.
ReturnHome
:
case
StoreMoveType
.
ReturnHome
:
Re
turnHome
Process
();
Re
set
Process
();
isInPro
=
false
;
isInPro
=
false
;
break
;
break
;
case
StoreMoveType
.
StoreReset
:
case
StoreMoveType
.
StoreReset
:
...
@@ -226,10 +225,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -226,10 +225,7 @@ namespace OnlineStore.DeviceLibrary
/// 重置处理
/// 重置处理
/// </summary>
/// </summary>
protected
abstract
void
ResetProcess
();
protected
abstract
void
ResetProcess
();
/// <summary>
/// 原点返回处理
/// </summary>
protected
abstract
void
ReturnHomeProcess
();
/// <summary>
/// <summary>
/// 松下伺服轴原点返回运动,等待收到反馈后才会返回
/// 松下伺服轴原点返回运动,等待收到反馈后才会返回
...
@@ -474,7 +470,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -474,7 +470,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 阻塞等待IO信号,等到返回true,未等到返回false
/// 阻塞等待IO信号,等到返回true,未等到返回false
/// </summary>c
/// </summary>c
p
ublic
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
p
rotected
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
{
{
return
WaitUtil
.
Wait
(
timeOut
,
delegate
()
{
return
WaitUtil
.
Wait
(
timeOut
,
delegate
()
{
return
value
.
Equals
(
IOValue
(
ioType
));
return
value
.
Equals
(
IOValue
(
ioType
));
...
@@ -484,6 +480,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -484,6 +480,12 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
info
(
Name
+
logInfo
);
LogUtil
.
info
(
Name
+
logInfo
);
}
}
protected
void
InOutStoreLog
(
string
msg
)
{
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosID
:
""
;
string
shelfId
=
MoveInfo
.
MoveParam
!=
null
?
"_"
+
MoveInfo
.
MoveParam
.
ShelfPosID
:
"_"
;
LogInfo
(
"["
+
posId
+
shelfId
+
"]"
+
MoveInfo
.
MoveStep
+
":"
+
msg
);
}
protected
int
GetAlarmCodeByAxis
(
ConfigMoveAxis
axis
)
protected
int
GetAlarmCodeByAxis
(
ConfigMoveAxis
axis
)
{
{
int
alarmCode
=
LineAlarm
.
InOutAxisAlarm
;
int
alarmCode
=
LineAlarm
.
InOutAxisAlarm
;
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
3b0cd38
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
3b0cd38
...
@@ -156,79 +156,73 @@ namespace OnlineStore.DeviceLibrary
...
@@ -156,79 +156,73 @@ namespace OnlineStore.DeviceLibrary
{
{
private
WaitResultInfo
()
private
WaitResultInfo
()
{
{
IsEnd
=
false
;
CanWhileMoveCount
=
0
;
}
}
public
static
WaitResultInfo
WaitIO
(
string
ioType
,
IO_VALUE
ioValue
)
public
static
WaitResultInfo
WaitIO
(
string
ioType
,
IO_VALUE
ioValue
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W002_IOValue
;
wait
.
WaitType
=
2
;
wait
.
IoType
=
ioType
;
wait
.
IoType
=
ioType
;
wait
.
IoValue
=
ioValue
;
wait
.
IoValue
=
ioValue
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitAxis
(
ConfigMoveAxis
axis
,
int
targetPosition
,
int
targetSpeed
)
public
static
WaitResultInfo
WaitAxis
(
ConfigMoveAxis
axis
,
int
targetPosition
,
int
targetSpeed
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W001_AxisMove
;
wait
.
WaitType
=
1
;
wait
.
AxisInfo
=
axis
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
false
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetSpeed
=
targetSpeed
;
wait
.
TargetSpeed
=
targetSpeed
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitAxis
(
ConfigMoveAxis
axis
,
bool
isHomeMove
)
public
static
WaitResultInfo
WaitAxis
(
ConfigMoveAxis
axis
,
bool
isHomeMove
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W001_AxisMove
;
wait
.
WaitType
=
1
;
wait
.
AxisInfo
=
axis
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
true
;
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitStell
(
byte
slvAddr
,
int
targetPosition
,
int
speed
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
10
;
wait
.
WaitType
=
4
;
wait
.
SlvAddr
=
slvAddr
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetSpeed
=
speed
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitStellHome
(
byte
slvAddr
,
int
targetPosition
,
int
speed
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
10
;
wait
.
WaitType
=
4
;
wait
.
SlvAddr
=
slvAddr
;
wait
.
IsHomeMove
=
true
;
wait
.
TargetPosition
=
0
;
wait
.
TargetSpeed
=
speed
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitShuoKe
(
int
slvAddr
,
int
targetPosition
,
bool
isHome
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
5
;
wait
.
SlvAddr
=(
byte
)
slvAddr
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
IsHomeMove
=
isHome
;
return
wait
;
return
wait
;
}
}
//public static WaitResultInfo WaitStell(byte slvAddr, int targetPosition, int speed)
//{
// WaitResultInfo wait = new WaitResultInfo();
// wait.CanWhileMoveCount =10;
// wait.WaitType = WaitEnum.W004_StellMove;
// wait.SlvAddr = slvAddr;
// wait.IsHomeMove = false;
// wait.TargetPosition = targetPosition;
// wait.TargetSpeed = speed;
// return wait;
//}
// public static WaitResultInfo WaitStellHome(byte slvAddr, int targetPosition, int speed)
//{
// WaitResultInfo wait = new WaitResultInfo();
// wait.CanWhileMoveCount = 10;
// wait.WaitType = WaitEnum.W004_StellMove;
// wait.SlvAddr = slvAddr;
// wait.IsHomeMove = true;
// wait.TargetPosition = 0;
// wait.TargetSpeed = speed;
// return wait;
//}
//public static WaitResultInfo WaitShuoKe(int slvAddr, int targetPosition, bool isHome)
//{
// WaitResultInfo wait = new WaitResultInfo();
// wait.CanWhileMoveCount = 0;
// wait.WaitType = WaitEnum.W005_ShuoKe;
// wait.SlvAddr =(byte) slvAddr;
// wait.TargetPosition = targetPosition;
// wait.IsHomeMove = isHome;
// return wait;
//}
public
static
WaitResultInfo
WaitTime
(
int
MScends
)
public
static
WaitResultInfo
WaitTime
(
int
MScends
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
3
;
wait
.
WaitType
=
WaitEnum
.
W003_Time
;
wait
.
TimeMSeconds
=
MScends
;
wait
.
TimeMSeconds
=
MScends
;
wait
.
IsEnd
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
...
@@ -236,8 +230,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -236,8 +230,7 @@ namespace OnlineStore.DeviceLibrary
public
static
WaitResultInfo
WaitAxisOrg
(
ConfigMoveAxis
axis
,
IO_VALUE
value
)
public
static
WaitResultInfo
WaitAxisOrg
(
ConfigMoveAxis
axis
,
IO_VALUE
value
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W006_AxisOrg
;
wait
.
WaitType
=
6
;
wait
.
AxisInfo
=
axis
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
true
;
wait
.
IsHomeMove
=
true
;
wait
.
IoValue
=
value
;
wait
.
IoValue
=
value
;
...
@@ -247,37 +240,31 @@ namespace OnlineStore.DeviceLibrary
...
@@ -247,37 +240,31 @@ namespace OnlineStore.DeviceLibrary
public
static
WaitResultInfo
WaitComAxis
(
ConfigMoveAxis
axis
,
int
targetPosition
,
int
targetSpeed
)
public
static
WaitResultInfo
WaitComAxis
(
ConfigMoveAxis
axis
,
int
targetPosition
,
int
targetSpeed
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W008_Compress
;
wait
.
WaitType
=
8
;
wait
.
AxisInfo
=
axis
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
false
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
TargetSpeed
=
targetSpeed
;
wait
.
TargetSpeed
=
targetSpeed
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
internal
static
WaitResultInfo
WaitCode
()
internal
static
WaitResultInfo
WaitCode
()
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W009_ScanCode
;
wait
.
WaitType
=
9
;
wait
.
IsHomeMove
=
false
;
wait
.
IsHomeMove
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitAgvAction
(
int
arrive
)
public
static
WaitResultInfo
WaitAgvAction
(
int
arrive
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
WaitEnum
.
W010_AgvStatus
;
wait
.
WaitType
=
10
;
wait
.
TargetPosition
=
arrive
;
wait
.
TargetPosition
=
arrive
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
public
string
ToStr
()
public
string
ToStr
()
{
{
if
(
WaitType
==
1
)
if
(
WaitType
.
Equals
(
WaitEnum
.
W001_AxisMove
)
)
{
{
if
(
IsHomeMove
)
if
(
IsHomeMove
)
{
{
...
@@ -288,35 +275,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -288,35 +275,37 @@ namespace OnlineStore.DeviceLibrary
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】绝对运动,目标位置【"
+
TargetPosition
+
"】"
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】绝对运动,目标位置【"
+
TargetPosition
+
"】"
;
}
}
}
}
else
if
(
WaitType
==
2
)
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W002_IOValue
)
)
{
{
return
"
IO信号等待,IO类型【"
+
IoType
+
"】,等待值
【"
+
IoValue
+
"】"
;
return
"
等待【"
+
IoType
+
"】=
【"
+
IoValue
+
"】"
;
}
}
else
if
(
WaitType
==
3
)
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W003_Time
)
)
{
{
return
"时间等待:【"
+
TimeMSeconds
+
"】毫秒"
;
return
"时间等待:【"
+
TimeMSeconds
+
"】毫秒"
;
}
}
else
if
(
WaitType
==
4
)
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W004_StellMove
)
)
{
{
return
"电钢目标位置:【"
+
TargetPosition
+
"】 "
;
return
"电钢目标位置:【"
+
TargetPosition
+
"】 "
;
}
}
else
if
(
WaitType
==
5
)
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W005_ShuoKe
)
)
{
{
return
"硕科电机目标位置:【"
+
TargetPosition
+
"】 "
;
return
"硕科电机目标位置:【"
+
TargetPosition
+
"】 "
;
}
}
else
if
(
WaitType
==
6
)
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W006_AxisOrg
)
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
7
)
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W007_ReelHeight
))
{
{
return
"料盘高度【"
+
TargetPosition
+
"】 "
;
return
"料盘高度【"
+
TargetPosition
+
"】 "
;
}
else
if
(
WaitType
.
Equals
(
8
))
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W008_Compress
))
{
{
return
"压紧轴压紧到位"
;
return
"压紧轴压紧到位"
;
}
else
if
(
WaitType
.
Equals
(
9
))
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W009_ScanCode
))
{
{
return
"扫码完成"
;
return
"扫码完成"
;
}
else
if
(
WaitType
.
Equals
(
10
))
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W010_AgvStatus
))
{
{
return
"agv小车状态:"
+
(
Asa
.
Actions
)
TargetPosition
;
return
"agv小车状态:"
+
(
Asa
.
Actions
)
TargetPosition
;
}
}
...
@@ -373,6 +362,49 @@ namespace OnlineStore.DeviceLibrary
...
@@ -373,6 +362,49 @@ namespace OnlineStore.DeviceLibrary
}
}
internal
class
WaitEnum
{
/// <summary>
/// 伺服运动
/// </summary>
internal
static
int
W001_AxisMove
=
1
;
/// <summary>
/// 信号到达
/// </summary>
internal
static
int
W002_IOValue
=
2
;
/// <summary>
/// 时间等待
/// </summary>
internal
static
int
W003_Time
=
3
;
/// <summary>
/// 电钢运动
/// </summary>
internal
static
int
W004_StellMove
=
4
;
/// <summary>
/// 硕科电机
/// </summary>
internal
static
int
W005_ShuoKe
=
5
;
/// <summary>
/// 轴原点信号
/// </summary>
internal
static
int
W006_AxisOrg
=
6
;
/// <summary>
/// 料盘高度
/// </summary>
internal
static
int
W007_ReelHeight
=
7
;
/// <summary>
/// 压紧轴压紧到位
/// </summary>
internal
static
int
W008_Compress
=
8
;
/// <summary>
/// 扫码完成
/// </summary>
internal
static
int
W009_ScanCode
=
9
;
/// <summary>
/// agv小车状态
/// </summary>
internal
static
int
W010_AgvStatus
=
10
;
}
public
enum
StoreMoveType
public
enum
StoreMoveType
{
{
/// <summary>
/// <summary>
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
3b0cd38
...
@@ -64,7 +64,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -64,7 +64,7 @@ namespace OnlineStore.LoadCSVLibrary
{
{
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
ProValue
))
if
(
String
.
IsNullOrEmpty
(
ProType
)
||
String
.
IsNullOrEmpty
(
ProName
)
||
String
.
IsNullOrEmpty
(
ProValue
))
{
{
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型
:ProType】【名称:ProName】【属性值:ProVale
】必须配置值!"
);
throw
new
CVSFieldNotMatchingExection
(
ToString
()
+
",【类型
】【名称】【属性值
】必须配置值!"
);
}
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论