Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO775-DUOStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8887225f
由
刘韬
编写于
2021-01-28 09:03:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
7寸机,基本通过
1 个父辈
44f88ec1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
317 行增加
和
146 行删除
source/Common/util/HttpHelper.cs
source/Common/util/LogUtil.cs
source/Common/util/WaitUtil.cs
source/DUOStore/DUOStore.csproj
source/DUOStore/FrmAxisMove.cs
source/DUOStore/FrmBox.cs
source/DUOStore/FrmStore.cs
source/DUOStore/positionTool/FrmPositionTool.cs
source/DUOStore/useControl/AxisMoveControl.cs
source/DeviceLibrary/AXIS/HC/HCAxisManager.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
source/DeviceLibrary/StoreConfig/FixPositions.csv
source/DeviceLibrary/StoreConfig/StoreConfig.csv
source/DeviceLibrary/StoreConfig/linePositions_1.csv
source/DeviceLibrary/StoreConfig/linePositions_2.csv
source/DeviceLibrary/device/halcon/CodeManager.cs
source/DeviceLibrary/duoStore/BoxBean.cs
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
source/DeviceLibrary/duoStore/BoxBean_Shelf.cs
source/DeviceLibrary/duoStore/DUOStoreBean.cs
source/DeviceLibrary/duoStore/DUOStoreBean_Partial.cs
source/DeviceLibrary/duoStore/DUOStoreBean_RaiseStation.cs
source/DeviceLibrary/duoStore/ElectricGripper.cs
source/DeviceLibrary/duoStore/StoreManager.cs
source/DeviceLibrary/store/KTK_Store.cs
source/DeviceLibrary/store/StoreStep.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/LoadCVSLibrary/storeConfig/config/Store_Config.cs
source/Common/util/HttpHelper.cs
查看文件 @
8887225
...
@@ -94,8 +94,9 @@ namespace OnlineStore.Common
...
@@ -94,8 +94,9 @@ namespace OnlineStore.Common
Operation
reOP
=
JsonHelper
.
DeserializeJsonToObject
<
Operation
>(
result
);
Operation
reOP
=
JsonHelper
.
DeserializeJsonToObject
<
Operation
>(
result
);
if
(
isLog
==
1
||
reOP
.
op
>
0
)
if
(
isLog
==
1
||
reOP
.
op
>
0
)
{
{
LogUtil
.
info
(
"【"
+
url
+
"】发送【"
+
json
+
"】收到【"
+
result
+
"】"
);
//
LogUtil.info("【"+url+"】发送【" + json + "】收到【" + result + "】");
}
}
return
reOP
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
source/Common/util/LogUtil.cs
查看文件 @
8887225
...
@@ -112,16 +112,13 @@ namespace OnlineStore.Common
...
@@ -112,16 +112,13 @@ namespace OnlineStore.Common
{
{
logList
.
RemoveAt
(
0
);
logList
.
RemoveAt
(
0
);
}
}
string
text
=
""
;
string
text
=
string
.
Join
(
""
,
logList
);
foreach
(
string
str
in
logList
)
{
text
+=
str
;
}
System
.
DateTime
now
=
System
.
DateTime
.
Now
;
System
.
DateTime
now
=
System
.
DateTime
.
Now
;
string
newmsg
=
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
;
string
newmsg
=
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
;
logList
.
Add
(
newmsg
);
logList
.
Add
(
newmsg
);
showLogEvent
?.
Invoke
(
text
+
newmsg
,
Color
.
Black
);
showLogEvent
?.
Invoke
(
text
+
newmsg
,
color
);
if
(
logBox
==
null
)
if
(
logBox
==
null
)
{
{
...
...
source/Common/util/WaitUtil.cs
查看文件 @
8887225
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading
;
using
System.Threading
;
using
System.Threading.Tasks
;
namespace
OnlineStore.Common
namespace
OnlineStore.Common
{
{
...
@@ -18,6 +19,21 @@ namespace OnlineStore.Common
...
@@ -18,6 +19,21 @@ namespace OnlineStore.Common
/// <param name="isOk"></param>
/// <param name="isOk"></param>
public
static
bool
Wait
(
int
timeout
,
IsOk
isOk
,
string
waitName
=
""
)
public
static
bool
Wait
(
int
timeout
,
IsOk
isOk
,
string
waitName
=
""
)
{
{
Task
w
=
Task
.
Delay
(
timeout
);
Task
p
=
Task
.
Run
(()
=>
{
while
(
isOk
.
Invoke
())
{
Task
.
Delay
(
100
).
Wait
();
}
});
Task
.
WaitAny
(
w
,
p
);
return
true
;
//p.Wait();
//return p.Result;
/*
DateTime startTime = System.DateTime.Now;
DateTime startTime = System.DateTime.Now;
TimeSpan timoutSpan = TimeSpan.FromMilliseconds(timeout);
TimeSpan timoutSpan = TimeSpan.FromMilliseconds(timeout);
TimeSpan waitSpan = TimeSpan.FromMilliseconds(0);
TimeSpan waitSpan = TimeSpan.FromMilliseconds(0);
...
@@ -50,6 +66,7 @@ namespace OnlineStore.Common
...
@@ -50,6 +66,7 @@ namespace OnlineStore.Common
Thread.Sleep(sleepTime);
Thread.Sleep(sleepTime);
waitSpan = System.DateTime.Now.Subtract(startTime);
waitSpan = System.DateTime.Now.Subtract(startTime);
}
}
*/
}
}
}
}
}
}
source/DUOStore/DUOStore.csproj
查看文件 @
8887225
...
@@ -42,9 +42,6 @@
...
@@ -42,9 +42,6 @@
<SpecificVersion>False</SpecificVersion>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HuichuanLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="HuichuanLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
...
...
source/DUOStore/FrmAxisMove.cs
查看文件 @
8887225
...
@@ -34,6 +34,10 @@ namespace OnlineStore.DUOStore
...
@@ -34,6 +34,10 @@ namespace OnlineStore.DUOStore
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
{
StoreManager
.
Store
.
Config
.
T1_Batch_Axis
=
StoreManager
.
Store
.
T1_BatchAxis
.
Config
;
StoreManager
.
Store
.
Config
.
T2_Middle_Axis
=
StoreManager
.
Store
.
T2_MiddleAxis
.
Config
;
StoreManager
.
Store
.
Config
.
T3_Updown_Axis
=
StoreManager
.
Store
.
T3_UpdownAxis
.
Config
;
StoreManager
.
Store
.
Config
.
T4_InOut_Axis
=
StoreManager
.
Store
.
T4_InOut_Axis
.
Config
;
axisMoveControl1
.
LoadData
(
StoreManager
.
Store
);
axisMoveControl1
.
LoadData
(
StoreManager
.
Store
);
//new AxisBean[] { StoreManager.Store.T1_BatchAxis, StoreManager.Store.T2_MiddleAxis, StoreManager.Store.T3_UpdownAxis, StoreManager.Store.T4_InOut_Axis }
//new AxisBean[] { StoreManager.Store.T1_BatchAxis, StoreManager.Store.T2_MiddleAxis, StoreManager.Store.T3_UpdownAxis, StoreManager.Store.T4_InOut_Axis }
LoadPostion
();
LoadPostion
();
...
...
source/DUOStore/FrmBox.cs
查看文件 @
8887225
...
@@ -70,8 +70,7 @@ namespace OnlineStore.DUOStore
...
@@ -70,8 +70,7 @@ namespace OnlineStore.DUOStore
txtUpDownP2
.
Text
=
BoxBean
.
Config
.
UpDownAxis_P2
.
ToString
();
txtUpDownP2
.
Text
=
BoxBean
.
Config
.
UpDownAxis_P2
.
ToString
();
txtMiddleP11
.
Text
=
BoxBean
.
Config
.
MiddleAxis_P11
.
ToString
();
txtMiddleP11
.
Text
=
BoxBean
.
Config
.
MiddleAxis_P11
.
ToString
();
txtInoutP11
.
Text
=
BoxBean
.
Config
.
InOutAxis_P11
.
ToString
();
txtInoutP11
.
Text
=
BoxBean
.
Config
.
InOutAxis_P11
.
ToString
();
//txtComP3.Text = BoxBean.Config.CompAxis_P3.ToString();
txtInOutP2
.
Text
=
BoxBean
.
Config
.
InOutAxis_P2
.
ToString
();
//txtInOutP2.Text = BoxBean.Config.InOutAxis_P2.ToString();
LoadPData
(
acPosition
);
LoadPData
(
acPosition
);
chbDebug
.
Checked
=
BoxBean
.
IsDebug
;
chbDebug
.
Checked
=
BoxBean
.
IsDebug
;
...
@@ -280,8 +279,7 @@ namespace OnlineStore.DUOStore
...
@@ -280,8 +279,7 @@ namespace OnlineStore.DUOStore
txtMiddleP2
.
Text
=
acPosition
.
MiddleAxis_P2
.
ToString
();
txtMiddleP2
.
Text
=
acPosition
.
MiddleAxis_P2
.
ToString
();
txtComP2
.
Text
=
acPosition
.
ComAxis_P2
.
ToString
();
txtComP2
.
Text
=
acPosition
.
ComAxis_P2
.
ToString
();
txtComP3
.
Text
=
acPosition
.
ComAxis_P3
.
ToString
();
txtComP3
.
Text
=
acPosition
.
ComAxis_P3
.
ToString
();
//int comP2 = BoxBean.Config.GetComP2(acPosition.BagHigh);
//txtComP2.Text = comP2.ToString();
lblSize
.
Text
=
"尺寸:"
+
acPosition
.
BagWidth
+
"*"
+
acPosition
.
BagHigh
;
lblSize
.
Text
=
"尺寸:"
+
acPosition
.
BagWidth
+
"*"
+
acPosition
.
BagHigh
;
}
}
}
}
...
@@ -478,7 +476,7 @@ namespace OnlineStore.DUOStore
...
@@ -478,7 +476,7 @@ namespace OnlineStore.DUOStore
private
void
btnMiddleP11_Click
(
object
sender
,
EventArgs
e
)
private
void
btnMiddleP11_Click
(
object
sender
,
EventArgs
e
)
{
{
AxisAbsMove
(
BoxBean
.
Config
.
UpDown
_Axis
,
txtMiddleP11
,
BoxBean
.
Config
.
MiddleAxis_P11_Speed
);
AxisAbsMove
(
BoxBean
.
Config
.
Middle
_Axis
,
txtMiddleP11
,
BoxBean
.
Config
.
MiddleAxis_P11_Speed
);
}
}
private
void
btnMiddleP1_Click
(
object
sender
,
EventArgs
e
)
private
void
btnMiddleP1_Click
(
object
sender
,
EventArgs
e
)
...
@@ -723,7 +721,7 @@ namespace OnlineStore.DUOStore
...
@@ -723,7 +721,7 @@ namespace OnlineStore.DUOStore
ioIP
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_Check
].
IO_IP
;
ioIP
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_Check
].
IO_IP
;
ioIndex
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_Laser
].
GetIOAddr
();
ioIndex
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_Laser
].
GetIOAddr
();
}
}
FrmPositionTool
frm
=
new
FrmPositionTool
(
PortName
,
slvAddr
,
ioIP
,
ioIndex
,
Text
,
BoxBean
.
ID
);
FrmPositionTool
frm
=
new
FrmPositionTool
(
BoxBean
.
Config
.
UpDown_Axis
,
ioIndex
,
Text
,
BoxBean
.
ID
);
frm
.
ShowDialog
();
frm
.
ShowDialog
();
}
}
...
...
source/DUOStore/FrmStore.cs
查看文件 @
8887225
...
@@ -152,6 +152,7 @@ namespace OnlineStore.DUOStore
...
@@ -152,6 +152,7 @@ namespace OnlineStore.DUOStore
foreach
(
EquipBase
equip
in
eqList
)
foreach
(
EquipBase
equip
in
eqList
)
{
{
if
(
i
.
Equals
(
0
))
if
(
i
.
Equals
(
0
))
{
{
}
}
...
@@ -166,7 +167,11 @@ namespace OnlineStore.DUOStore
...
@@ -166,7 +167,11 @@ namespace OnlineStore.DUOStore
if
(!
equip
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
))
if
(!
equip
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
))
{
{
s
=
StoreRunStatus
.
Busy
;
s
=
StoreRunStatus
.
Busy
;
trayInfo
=
equip
.
MoveInfo
.
MoveParam
.
ToStr
();
//BoxBean _equip = (BoxBean)equip;
//LogUtil.info(_equip.MoveInfo.ToString());
//LogUtil.info(_equip.MoveInfo.MoveParam.ToString());
if
(
equip
.
MoveInfo
.
MoveParam
!=
null
)
trayInfo
=
equip
.
MoveInfo
.
MoveParam
.
ToStr
();
}
}
SetItemText
(
i
,
item_move_info_index
,
trayInfo
);
SetItemText
(
i
,
item_move_info_index
,
trayInfo
);
SetItemColor
(
i
,
s
,
equip
.
alarmType
);
SetItemColor
(
i
,
s
,
equip
.
alarmType
);
...
@@ -282,8 +287,11 @@ namespace OnlineStore.DUOStore
...
@@ -282,8 +287,11 @@ namespace OnlineStore.DUOStore
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllConnection
();
IOManager
.
instance
.
CloseAllConnection
();
HumitureController
.
CloseAllPort
();
HumitureController
.
CloseAllPort
();
AxisManager
.
instance
.
CloseAllPort
();
if
(
AxisManager
.
instance
!=
null
)
AxisManager
.
instance
.
CloseCard
();
{
AxisManager
.
instance
.
CloseAllPort
();
AxisManager
.
instance
.
CloseCard
();
}
if
(
Camera
.
_cam
!=
null
)
if
(
Camera
.
_cam
!=
null
)
{
{
Camera
.
_cam
.
CloseAll
();
Camera
.
_cam
.
CloseAll
();
...
...
source/DUOStore/positionTool/FrmPositionTool.cs
查看文件 @
8887225
...
@@ -29,14 +29,16 @@ namespace OnlineStore.DUOStore
...
@@ -29,14 +29,16 @@ namespace OnlineStore.DUOStore
public
int
ptpAcc
=
0
;
public
int
ptpAcc
=
0
;
public
int
ptpDec
=
0
;
public
int
ptpDec
=
0
;
private
string
boxName
=
""
;
private
string
boxName
=
""
;
public
FrmPositionTool
(
string
protName
,
short
slvAddr
,
string
ioIp
,
int
ioIndex
,
string
text
,
int
ioSubType
)
public
FrmPositionTool
(
ConfigMoveAxis
configMoveAxis
,
int
ioIndex
,
string
text
,
int
ioSubType
)
{
{
InitializeComponent
();
InitializeComponent
();
this
.
PortName
=
prot
Name
;
this
.
PortName
=
configMoveAxis
.
Pro
Name
;
this
.
SlvAddr
=
slvAddr
;
this
.
SlvAddr
=
configMoveAxis
.
SlaveID
;
this
.
IoIp
=
ioIp
;
this
.
IoIp
=
""
;
this
.
IoIndex
=
ioIndex
;
this
.
IoIndex
=
ioIndex
;
this
.
subType
=
ioSubType
;
this
.
subType
=
ioSubType
;
this
.
ptpAcc
=
configMoveAxis
.
AddSpeed
;
this
.
ptpDec
=
configMoveAxis
.
DelSpeed
;
boxName
=
text
.
Trim
().
Replace
(
"料仓"
,
""
);
boxName
=
text
.
Trim
().
Replace
(
"料仓"
,
""
);
this
.
Text
=
boxName
+
"_升降轴位置调试"
;
this
.
Text
=
boxName
+
"_升降轴位置调试"
;
LogName
=
boxName
+
"_升降轴调试:"
;
LogName
=
boxName
+
"_升降轴调试:"
;
...
...
source/DUOStore/useControl/AxisMoveControl.cs
查看文件 @
8887225
...
@@ -72,8 +72,8 @@ namespace OnlineStore.DUOStore
...
@@ -72,8 +72,8 @@ namespace OnlineStore.DUOStore
}
}
//如果是取料升降轴,取料旋转轴,如果进出轴不在待机点,不能运动
//如果是取料升降轴,取料旋转轴,如果进出轴不在待机点,不能运动
if
(
boxBean
.
Config
.
UpDown_Axis
.
IsSameAxis
(
PortName
,
SlvAddr
)
if
(
boxBean
.
Config
!=
null
&&
(
boxBean
.
Config
.
UpDown_Axis
.
IsSameAxis
(
PortName
,
SlvAddr
)
||
(
boxBean
.
Config
.
Middle_Axis
.
IsSameAxis
(
PortName
,
SlvAddr
)))
||
(
boxBean
.
Config
.
Middle_Axis
.
IsSameAxis
(
PortName
,
SlvAddr
)))
)
{
{
int
InOutDefaultPosition
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
InOutDefaultPosition
);
int
InOutDefaultPosition
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
InOutDefaultPosition
);
int
currValue
=
AxisManager
.
instance
.
GetActualtPosition
(
boxBean
.
Config
.
InOut_Axis
.
DeviceName
,
boxBean
.
Config
.
InOut_Axis
.
GetAxisValue
());
int
currValue
=
AxisManager
.
instance
.
GetActualtPosition
(
boxBean
.
Config
.
InOut_Axis
.
DeviceName
,
boxBean
.
Config
.
InOut_Axis
.
GetAxisValue
());
...
...
source/DeviceLibrary/AXIS/HC/HCAxisManager.cs
查看文件 @
8887225
...
@@ -21,7 +21,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -21,7 +21,8 @@ namespace OnlineStore.DeviceLibrary
}
}
public
override
void
AbsMove
(
string
portName
,
short
slvAddr
,
int
targetPosition
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
)
public
override
void
AbsMove
(
string
portName
,
short
slvAddr
,
int
targetPosition
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
)
{
{
HCBoardManager
.
AbsMove
((
short
)
slvAddr
,
targetPosition
,
targetSpeed
,
ptpAcc
,
ptpDec
);
HCLogUtil
.
LOGGER
.
Info
(
$
"slvAddr={slvAddr},targetPosition={targetPosition},targetSpeed={targetSpeed},ptpAcc={ptpAcc},ptpDec={ptpDec}"
);
HCBoardManager
.
AbsMove
((
short
)
slvAddr
,
targetPosition
,
targetSpeed
,
ptpAcc
,
ptpDec
);
}
}
public
override
void
AlarmClear
(
string
portName
,
short
slvAddr
)
public
override
void
AlarmClear
(
string
portName
,
short
slvAddr
)
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
8887225
...
@@ -47,8 +47,9 @@
...
@@ -47,8 +47,9 @@
<SpecificVersion>False</SpecificVersion>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
</Reference>
<Reference Include="halcondotnet">
<Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\SO815-AutoInOutStore\dll\halcondotnet.dll</HintPath>
</Reference>
</Reference>
<Reference Include="HuichuanLibrary">
<Reference Include="HuichuanLibrary">
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
...
@@ -128,6 +129,9 @@
...
@@ -128,6 +129,9 @@
</ItemGroup>
</ItemGroup>
<ItemGroup />
<ItemGroup />
<ItemGroup>
<ItemGroup>
<None Include="StoreConfig\FixPositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\linePositions_2.csv">
<None Include="StoreConfig\linePositions_2.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
查看文件 @
8887225
...
@@ -10,8 +10,6 @@ PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,10,,,,,,,,,,,,
...
@@ -10,8 +10,6 @@ PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,10,,,,,,,,,,,,
PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,10,,,,,,,,,,,,
PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,10,,,,,,,,,,,,
PRO,,L3_进出轴_P1待机点,InOutAxis_P1,10,,,,,,,,,,,,
PRO,,L3_进出轴_P1待机点,InOutAxis_P1,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P1待机点,CompAxis_P1,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P1待机点,CompAxis_P1,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=42835;12=38557;16=34550;20=30540;24=26030;,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,10,,,,,,,,,,,,
PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,10,,,,,,,,,,,,
PRO,,L2_上下轴_P12-出料口-高点,UpDownAxis_P12,10,,,,,,,,,,,,
PRO,,L2_上下轴_P12-出料口-高点,UpDownAxis_P12,10,,,,,,,,,,,,
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
查看文件 @
8887225
...
@@ -10,8 +10,6 @@ PRO,,R2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,10,,,,,,,,,,,,
...
@@ -10,8 +10,6 @@ PRO,,R2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,10,,,,,,,,,,,,
PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,10,,,,,,,,,,,,
PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,10,,,,,,,,,,,,
PRO,,R3_进出轴_P1待机点,InOutAxis_P1,10,,,,,,,,,,,,
PRO,,R3_进出轴_P1待机点,InOutAxis_P1,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P1待机点,CompAxis_P1,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P1待机点,CompAxis_P1,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P3压紧前点,CompAxis_P3,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=42835;12=38557;16=34550;20=30540;24=26030;,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,10,,,,,,,,,,,,
PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,10,,,,,,,,,,,,
PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,10,,,,,,,,,,,,
PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,10,,,,,,,,,,,,
...
...
source/DeviceLibrary/StoreConfig/FixPositions.csv
0 → 100644
查看文件 @
8887225
位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3
fix_1#7,1,8,7,1,306200,1290614,1299614,1299614,1290614,110692,10,10
fix_2#11,2,8,7,2,306200,1290614,1299614,1299614,1290614,110692,10,10
fix_2#13,3,8,7,2,306200,1290614,1299614,1299614,1290614,110692,10,10
source/DeviceLibrary/StoreConfig/StoreConfig.csv
查看文件 @
8887225
...
@@ -123,7 +123,8 @@ PRO,0,T3_升降轴P2速度/快速度,UpdownAxis_P2Speed,501,,,,,,,,,,,,
...
@@ -123,7 +123,8 @@ PRO,0,T3_升降轴P2速度/快速度,UpdownAxis_P2Speed,501,,,,,,,,,,,,
PRO,0,T3_升降轴P3速度/慢速度,UpdownAxis_P3Speed,502,,,,,,,,,,,,
PRO,0,T3_升降轴P3速度/慢速度,UpdownAxis_P3Speed,502,,,,,,,,,,,,
PRO,0,T3_升降轴P4速度/快速度,UpdownAxis_P4Speed,503,,,,,,,,,,,,
PRO,0,T3_升降轴P4速度/快速度,UpdownAxis_P4Speed,503,,,,,,,,,,,,
PRO,0,T3_升降轴P5速度/慢速度,UpdownAxis_P5Speed,504,,,,,,,,,,,,
PRO,0,T3_升降轴P5速度/慢速度,UpdownAxis_P5Speed,504,,,,,,,,,,,,
PRO,0,T32_升降轴P6速度/快速度,UpdownAxis_P6Speed,505,,,,,,,,,,,,
PRO,0,T3_升降轴P6速度/快速度,UpdownAxis_P6Speed,505,,,,,,,,,,,,
PRO,0,T3_升降轴高度转换系数(1mm对应的脉冲),UpdownAxis_ChangeValue,11000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,T4_进出轴待机点 P1,InOutAxis_P1,5000,,,,,,,,,,,,
PRO,0,T4_进出轴待机点 P1,InOutAxis_P1,5000,,,,,,,,,,,,
PRO,0,T4_进出轴7寸取料点P2,InOutAxis_P2,5000,,,,,,,,,,,,
PRO,0,T4_进出轴7寸取料点P2,InOutAxis_P2,5000,,,,,,,,,,,,
...
...
source/DeviceLibrary/StoreConfig/linePositions_1.csv
查看文件 @
8887225
位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3
位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3
1#AC1_1_1_4,259,32,15,1,306200,1290614,1299614,1299614,1290614,140800,,
1#AC1_1_1_4,259,32,15,1,306200,1290614,1299614,1299614,1290614,140800,20,20
1#AC1_1_1_5,258,32,15,1,306200,1334970,1343970,1343970,1334970,140800,,
1#AC1_1_1_5,258,32,15,1,306200,1334970,1343970,1343970,1334970,140800,20,20
1#AC1_1_1_6,257,32,15,1,306200,1381622,1392122,1392122,1381622,140800,,
1#AC1_1_1_6,257,32,15,1,306200,1381622,1392122,1392122,1381622,140800,20,20
1#AC1_1_1_7,256,32,15,1,306200,1424390,1433390,1433390,1424390,140800,,
1#AC1_1_1_7,256,32,15,1,306200,1424390,1433390,1433390,1424390,140800,20,20
1#AC1_1_1_8,255,32,15,1,306200,1471088,1481488,1481488,1471088,140800,,
1#AC1_1_1_8,255,32,15,1,306200,1471088,1481488,1481488,1471088,140800,20,20
1#AC1_1_1_9,254,32,15,1,306200,1514627,1525627,1525627,1514627,140800,,
1#AC1_1_1_9,254,32,15,1,306200,1514627,1525627,1525627,1514627,140800,20,20
1#AC1_1_1_10,253,32,15,1,306200,1561503,1570503,1570503,1561503,140800,,
1#AC1_1_1_10,253,32,15,1,306200,1561503,1570503,1570503,1561503,140800,20,20
1#AC1_1_1_11,252,32,15,1,306200,1603404,1612404,1612404,1603404,140800,,
1#AC1_1_1_11,252,32,15,1,306200,1603404,1612404,1612404,1603404,140800,20,20
1#AC1_1_1_12,251,32,15,1,306200,1650000,1660593,1660593,1650000,140800,,
1#AC1_1_1_12,251,32,15,1,306200,1650000,1660593,1660593,1650000,140800,20,20
1#AC1_1_1_13,250,32,15,1,306200,1693078,1702078,1702078,1693078,140800,,
1#AC1_1_1_13,250,32,15,1,306200,1693078,1702078,1702078,1693078,140800,20,20
1#AC1_1_1_14,249,32,15,1,306200,1738576,1747576,1747576,1738576,140800,,
1#AC1_1_1_14,249,32,15,1,306200,1738576,1747576,1747576,1738576,140800,20,20
1#AC1_1_1_15,248,32,15,1,306200,1785295,1794295,1794295,1785295,140800,,
1#AC1_1_1_15,248,32,15,1,306200,1785295,1794295,1794295,1785295,140800,20,20
1#AC1_1_1_16,247,12,15,1,436077,9671,20171,20171,9671,140800,,
1#AC1_1_1_16,247,12,15,1,436077,9671,20171,20171,9671,140800,20,20
1#AC1_1_1_17,246,12,15,1,436077,39893,50393,50393,39893,140800,,
1#AC1_1_1_17,246,12,15,1,436077,39893,50393,50393,39893,140800,20,20
1#AC1_1_1_18,245,12,15,1,436077,70661,81161,81161,70661,140800,,
1#AC1_1_1_18,245,12,15,1,436077,70661,81161,81161,70661,140800,20,20
1#AC1_1_1_19,244,12,15,1,436077,98713,109213,109213,98713,140800,,
1#AC1_1_1_19,244,12,15,1,436077,98713,109213,109213,98713,140800,20,20
1#AC1_1_1_20,243,12,15,1,436077,128728,139228,139228,128728,140800,,
1#AC1_1_1_20,243,12,15,1,436077,128728,139228,139228,128728,140800,20,20
1#AC1_1_1_21,242,12,15,1,436077,159195,169695,169695,159195,140800,,
1#AC1_1_1_21,242,12,15,1,436077,159195,169695,169695,159195,140800,20,20
1#AC1_1_2_4,241,12,15,1,436077,189134,199634,199634,189134,140800,,
1#AC1_1_2_4,241,12,15,1,436077,189134,199634,199634,189134,140800,20,20
1#AC1_1_2_5,240,12,15,1,436077,219845,230345,230345,219845,140800,,
1#AC1_1_2_5,240,12,15,1,436077,219845,230345,230345,219845,140800,20,20
1#AC1_1_2_6,239,12,15,1,436077,252000,262500,262500,252000,140800,,
1#AC1_1_2_6,239,12,15,1,436077,252000,262500,262500,252000,140800,20,20
1#AC1_1_2_7,238,12,15,1,436077,280421,290921,290921,280421,140800,,
1#AC1_1_2_7,238,12,15,1,436077,280421,290921,290921,280421,140800,20,20
1#AC1_1_2_8,237,12,15,1,436077,312224,322724,322724,312224,140800,,
1#AC1_1_2_8,237,12,15,1,436077,312224,322724,322724,312224,140800,20,20
1#AC1_1_2_9,236,12,15,1,436077,342256,352756,352756,342256,140800,,
1#AC1_1_2_9,236,12,15,1,436077,342256,352756,352756,342256,140800,20,20
1#AC1_1_2_10,235,12,15,1,436077,369382,379882,379882,369382,140800,,
1#AC1_1_2_10,235,12,15,1,436077,369382,379882,379882,369382,140800,20,20
1#AC1_1_2_11,234,12,15,1,436077,399751,410251,410251,399751,140800,,
1#AC1_1_2_11,234,12,15,1,436077,399751,410251,410251,399751,140800,20,20
1#AC1_1_2_12,233,12,15,1,436200,430923,441423,441423,430923,140800,,
1#AC1_1_2_12,233,12,15,1,436200,430923,441423,441423,430923,140800,20,20
1#AC1_1_2_13,232,12,15,1,436157,459859,470359,470359,459859,140800,,
1#AC1_1_2_13,232,12,15,1,436157,459859,470359,470359,459859,140800,20,20
1#AC1_1_2_14,231,12,15,1,436214,489685,500185,500185,489685,140800,,
1#AC1_1_2_14,231,12,15,1,436214,489685,500185,500185,489685,140800,20,20
1#AC1_1_2_15,230,12,15,1,436271,522581,533081,533081,522581,140800,,
1#AC1_1_2_15,230,12,15,1,436271,522581,533081,533081,522581,140800,20,20
1#AC1_1_2_16,229,12,15,1,435628,550105,560605,560605,550105,140800,,
1#AC1_1_2_16,229,12,15,1,435628,550105,560605,560605,550105,140800,20,20
1#AC1_1_2_17,228,12,15,1,435585,583474,593974,593974,583474,140800,,
1#AC1_1_2_17,228,12,15,1,435585,583474,593974,593974,583474,140800,20,20
1#AC1_1_2_18,227,12,15,1,435542,612943,623443,623443,612943,140800,,
1#AC1_1_2_18,227,12,15,1,435542,612943,623443,623443,612943,140800,20,20
1#AC1_1_2_19,226,12,15,1,435499,642389,652889,652889,642389,140800,,
1#AC1_1_2_19,226,12,15,1,435499,642389,652889,652889,642389,140800,20,20
1#AC1_1_2_20,225,12,15,1,435456,670221,680721,680721,670221,140800,,
1#AC1_1_2_20,225,12,15,1,435456,670221,680721,680721,670221,140800,20,20
1#AC1_1_2_21,224,12,15,1,435413,700236,713736,713736,700236,140800,,
1#AC1_1_2_21,224,12,15,1,435413,700236,713736,713736,700236,140800,20,20
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
source/DeviceLibrary/StoreConfig/linePositions_2.csv
查看文件 @
8887225
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/device/halcon/CodeManager.cs
查看文件 @
8887225
...
@@ -106,6 +106,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -106,6 +106,7 @@ namespace OnlineStore.DeviceLibrary
{
{
codeCount
=
1
;
codeCount
=
1
;
}
}
LogUtil
.
info
(
$
"Task=>cameraList={cameraList.Count()}"
);
List
<
string
>
codeList
=
new
List
<
string
>();
List
<
string
>
codeList
=
new
List
<
string
>();
if
(
cameraList
==
null
||
cameraList
.
Count
<=
0
)
if
(
cameraList
==
null
||
cameraList
.
Count
<=
0
)
{
{
...
@@ -114,29 +115,33 @@ namespace OnlineStore.DeviceLibrary
...
@@ -114,29 +115,33 @@ namespace OnlineStore.DeviceLibrary
try
try
{
{
Task
[]
cameraTask
=
new
Task
[
cameraList
.
Count
()];
Task
[]
cameraTask
=
new
Task
[
cameraList
.
Count
()];
for
(
int
i
=
0
;
i
<
cameraList
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
cameraList
.
Count
();
i
++)
{
{
var
cameraName
=
cameraList
[
i
];
var
cameraName
=
cameraList
[
i
];
cameraTask
[
i
]
=
Task
.
Run
(()
=>
{
//cameraTask[i] = Task.Run(() =>
//{
if
(
cameraName
.
Trim
().
Equals
(
""
))
if
(
cameraName
.
Trim
().
Equals
(
""
))
{
{
return
;
continue
;
}
}
DateTime
startTime
=
DateTime
.
Now
;
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片"
);
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片"
);
HalconDotNet
.
HObject
ho_Image
=
null
;
HalconDotNet
.
HObject
ho_Image
=
null
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片2"
);
Bitmap
bmp
=
null
;
Bitmap
bmp
=
null
;
try
try
{
{
bool
nohalcon
=
true
;
bool
nohalcon
=
true
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片3"
);
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bmp
,
nohalcon
);
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bmp
,
nohalcon
);
if
(
ho_Image
==
null
&&
!
nohalcon
)
if
(
ho_Image
==
null
&&
!
nohalcon
)
{
{
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
CloseCamera
(
cameraName
);
return
;
continue
;
}
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
string
r
=
""
;
string
r
=
""
;
...
@@ -211,10 +216,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -211,10 +216,10 @@ namespace OnlineStore.DeviceLibrary
bmp
.
Dispose
();
bmp
.
Dispose
();
}
}
});
//
});
//
cameraTask[i].Wait();
//
cameraTask[i].Wait();
}
}
Task
.
WaitAll
(
cameraTask
);
//
Task.WaitAll(cameraTask);
}
}
catch
(
AccessViolationException
e
)
catch
(
AccessViolationException
e
)
{
{
...
...
source/DeviceLibrary/duoStore/BoxBean.cs
查看文件 @
8887225
...
@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H03_OtherAxisHome
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H03_OtherAxisHome
_wait
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
LogInfo
(
MoveInfo
.
MoveType
+
": 压紧轴,旋转轴,上下轴开始 原点返回,关闭NG门"
);
LogInfo
(
MoveInfo
.
MoveType
+
": 压紧轴,旋转轴,上下轴开始 原点返回,关闭NG门"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
OutDoor_Up
,
IO_Type
.
OutDoor_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
OutDoor_Up
,
IO_Type
.
OutDoor_Down
);
...
@@ -239,6 +239,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -239,6 +239,10 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis
.
HomeMove
(
MoveInfo
);
UpdownAxis
.
HomeMove
(
MoveInfo
);
break
;
break
;
case
StoreMoveStep
.
BOX_H03_OtherAxisHome_wait
:
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H03_OtherAxisHome
);
break
;
case
StoreMoveStep
.
BOX_H03_OtherAxisHome
:
case
StoreMoveStep
.
BOX_H03_OtherAxisHome
:
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H04_OtherAxisBack
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BOX_H04_OtherAxisBack
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
...
...
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
查看文件 @
8887225
...
@@ -333,7 +333,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -333,7 +333,8 @@ namespace OnlineStore.DeviceLibrary
InOutBackToP1
(
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
);
InOutBackToP1
(
MoveInfo
.
MoveParam
.
MoveP
.
InOut_P1
);
return
true
;
return
true
;
}
}
//修正库位
LineMoveP
fixMoveP
=
new
LineMoveP
();
protected
override
void
OutStoreProcess
()
protected
override
void
OutStoreProcess
()
{
{
string
outType
=
"出库:"
;
string
outType
=
"出库:"
;
...
@@ -404,23 +405,82 @@ namespace OnlineStore.DeviceLibrary
...
@@ -404,23 +405,82 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06_ToDoor
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06_ToDoor
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_07_FixtureCheck
);
var
fixposid
=
$
"fix_{this.ID}#{MoveInfo.MoveParam.PlateW}"
;
var
fixposition
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
fixposid
);
InOutStoreLog
(
outType
+
$
"获取修正库位置{fixposid}={fixposition}"
);
if
(
fixposition
==
null
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_07_FixtureCheck
);
}
else
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_06A_01_FixDisk
);
fixMoveP
.
ComPress_P1
=
Config
.
CompAxis_P1
;
fixMoveP
.
InOut_P1
=
Config
.
InOutAxis_P1
;
fixMoveP
.
Middle_P1
=
Config
.
MiddleAxis_P1
;
fixMoveP
.
InOut_P2
=
Config
.
InOutAxis_P2
;
fixMoveP
.
UpDown_P1
=
Config
.
UpDownAxis_P1
;
fixMoveP
.
UpDown_P2
=
Config
.
UpDownAxis_P2
;
fixMoveP
.
ComPress_P2
=
fixposition
.
ComAxis_P2
;
fixMoveP
.
ComPress_P3
=
fixposition
.
ComAxis_P3
;
fixMoveP
.
InOut_P3
=
fixposition
.
InoutAxis_P3
;
fixMoveP
.
Middle_P2
=
fixposition
.
MiddleAxis_P2
;
fixMoveP
.
UpDown_P3
=
fixposition
.
UpdownAxis_IH_P3
;
fixMoveP
.
UpDown_P4
=
fixposition
.
UpdownAxis_IL_P4
;
fixMoveP
.
UpDown_P5
=
fixposition
.
UpdownAxis_OH_P5
;
fixMoveP
.
UpDown_P6
=
fixposition
.
UpdownAxis_OL_P6
;
}
InOutStoreLog
(
outType
+
"等待料叉检测信号 "
);
InOutStoreLog
(
outType
+
"等待料叉检测信号 "
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Fixture_Check
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Fixture_Check
,
IO_VALUE
.
HIGH
));
//if (StoreManager.Store.BoxDoorFree(ID))
//{
}
// MoveInfo.NextMoveStep(StoreMoveStep.SO_08_InoutToP2);
#
region
修正料盘
// InOutStoreLog(outType + "进出轴到P2 [" + moveP.InOut_P2 + "]");
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06A_01_FixDisk
))
// InoutAxis.AbsMove(MoveInfo, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
{
// ClearTimeoutAlarm("进出轴可以到P2");
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_06A_02_FixDisk
);
//}
InOutStoreLog
(
outType
+
"[修正]升降轴到P3["
+
moveP
.
UpDown_P3
+
"]"
);
//else if (MoveInfo.IsTimeOut(60))
UpdownAxis
.
AbsMove
(
MoveInfo
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P4_Speed
);
//{
// WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待 进出轴可以到P2 超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
}
// LogUtil.error(WarnMsg, ID * 1000 + 30);
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06A_02_FixDisk
))
// Alarm(AlarmType.IoSingleTimeOut);
{
//}
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_06A_03_FixDisk
);
InOutStoreLog
(
outType
+
"[修正]进出轴到P3 ["
+
moveP
.
InOut_P3
+
"] "
);
InoutAxis
.
AbsMove
(
MoveInfo
,
moveP
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06A_03_FixDisk
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_06A_04_FixDisk
);
InOutStoreLog
(
outType
+
"[修正]升降轴到P4["
+
moveP
.
UpDown_P4
+
"],压紧轴到P3["
+
moveP
.
ComPress_P3
+
"]"
);
ComAxis
.
AbsMove
(
MoveInfo
,
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
moveP
.
UpDown_P4
,
Config
.
UpDownAxis_P4_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06A_04_FixDisk
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_06A_05_FixDisk
);
InOutStoreLog
(
outType
+
"[修正]升降轴到P6["
+
fixMoveP
.
UpDown_P6
+
"],压紧轴到P2["
+
fixMoveP
.
ComPress_P2
+
"]"
);
ComAxis
.
AbsMove
(
MoveInfo
,
fixMoveP
.
ComPress_P2
,
Config
.
CompAxis_P2_Speed
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
fixMoveP
.
UpDown_P6
,
Config
.
UpDownAxis_P6_Speed
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06A_05_FixDisk
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_06A_06_FixDisk
);
InOutStoreLog
(
outType
+
"[修正]进出轴返回P1["
+
fixMoveP
.
InOut_P1
+
"]"
);
InOutBackToP1
(
fixMoveP
.
InOut_P1
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_06A_06_FixDisk
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_07_FixtureCheck
);
InOutStoreLog
(
outType
+
"[修正]升降轴到P2["
+
moveP
.
UpDown_P2
+
"] "
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
moveP
.
UpDown_P2
,
Config
.
UpDownAxis_P1_Speed
);
}
#
endregion
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_07_FixtureCheck
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_07_FixtureCheck
))
{
{
if
(
StoreManager
.
Store
.
BoxDoorFree
(
ID
))
if
(
StoreManager
.
Store
.
BoxDoorFree
(
ID
))
...
@@ -517,7 +577,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -517,7 +577,7 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_22_FixtureCheck
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_22_FixtureCheck
);
InOutStoreLog
(
outType
+
"等待料叉检测信号 "
);
InOutStoreLog
(
outType
+
"等待料叉检测信号 "
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Fixture_Check
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Fixture_Check
,
IO_VALUE
.
HIGH
));
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_22_FixtureCheck
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
SO_22_FixtureCheck
))
{
{
...
...
source/DeviceLibrary/duoStore/BoxBean_Shelf.cs
查看文件 @
8887225
...
@@ -168,7 +168,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -168,7 +168,7 @@ namespace OnlineStore.DeviceLibrary
}
}
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
StoreManager
.
GetPostApi
(
server
),
lineOperation
);
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
StoreManager
.
GetPostApi
(
server
),
lineOperation
);
//LogUtil.info("resultOperation="+ JsonHelper.SerializeObject(resultOperation));
//发送状态信息到服务器
//发送状态信息到服务器
if
(
resultOperation
==
null
||
(
resultOperation
.
op
<=
0
))
if
(
resultOperation
==
null
||
(
resultOperation
.
op
<=
0
))
{
{
...
...
source/DeviceLibrary/duoStore/DUOStoreBean.cs
查看文件 @
8887225
...
@@ -106,12 +106,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -106,12 +106,7 @@ namespace OnlineStore.DeviceLibrary
HasT4Axis
=
Convert
.
ToBoolean
(
ConfigAppSettings
.
GetValue
(
Setting_Init
.
HasT4Axis
));
HasT4Axis
=
Convert
.
ToBoolean
(
ConfigAppSettings
.
GetValue
(
Setting_Init
.
HasT4Axis
));
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
if
(!
electricClamp
.
OpenPort
(
Config
.
Clamp1Port
))
throw
new
Exception
(
$
"电动夹爪打开失败 端口:{Config.Clamp1Port}"
);
else
{
LogUtil
.
info
(
Name
+
$
"加载电夹爪成功:{Config.Clamp1Port}"
);
electricClamp
.
HomeReset
();
}
//RFIDManager.RfidReader.Open(rfidList.ToArray());
//RFIDManager.RfidReader.Open(rfidList.ToArray());
IOManager
.
instance
.
ConnectionIOList
(
ioList
);
IOManager
.
instance
.
ConnectionIOList
(
ioList
);
AxisManager
.
Init
();
AxisManager
.
Init
();
...
@@ -120,12 +115,27 @@ namespace OnlineStore.DeviceLibrary
...
@@ -120,12 +115,27 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
mainTimer
.
Enabled
=
true
;
mainTimer
.
Enabled
=
true
;
if
(!
electricClamp
.
OpenPort
(
Config
.
Clamp1Port
))
{
Thread
.
Sleep
(
1000
);
electricClamp
.
ClosePort
();
if
(!
electricClamp
.
OpenPort
(
Config
.
Clamp1Port
))
{
LogUtil
.
info
(
Name
+
$
"电动夹爪打开失败 端口:{Config.Clamp1Port}"
);
return
;
}
}
LogUtil
.
info
(
Name
+
$
"加载电夹爪成功:{Config.Clamp1Port}"
);
electricClamp
.
HomeReset
();
canStart
=
true
;
canStart
=
true
;
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
if
(
isAuto
==
1
)
if
(
isAuto
==
1
)
{
{
IoCheckTimer
.
Enabled
=
true
;
IoCheckTimer
.
Enabled
=
true
;
}
}
LogUtil
.
info
(
Name
+
"初始化完成.等待启动."
);
});
});
}
}
...
@@ -253,19 +263,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -253,19 +263,24 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_02_LineRun
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_02_LineRun
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_03_BatchAxisHome
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_03_BatchAxisHome
_wait
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :夹爪回原点,提升轴回原点,上下轴回原点,流水线停止"
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :夹爪回原点,提升轴回原点,上下轴回原点,流水线停止"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
electricClamp
.
HomeReset
(
MoveInfo
);
electricClamp
.
HomeReset
(
MoveInfo
);
T1_BatchAxis
.
HomeMove
(
MoveInfo
);
T1_BatchAxis
.
HomeMove
(
MoveInfo
);
T3_UpdownAxis
.
HomeMove
(
MoveInfo
);
T3_UpdownAxis
.
HomeMove
(
MoveInfo
);
LineStop
(
MoveInfo
);
LineStop
(
MoveInfo
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_03_BatchAxisHome_wait
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_03_BatchAxisHome
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_03_BatchAxisHome
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_03_BatchAxisHome
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_04_BatchToP1
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_04_BatchToP1
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :夹爪放松,提升轴到P1点["
+
Config
.
BatchAxis_P1
+
"],上下轴到待机点P2["
+
Config
.
UpdownAxis_P2
+
"]"
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :夹爪放松,提升轴到P1点["
+
Config
.
BatchAxis_P1
+
"],上下轴到待机点P2["
+
Config
.
UpdownAxis_P2
+
"]"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
T1_BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1Speed
);
T1_BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P2
,
Config
.
UpdownAxis_P2Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P2
,
Config
.
UpdownAxis_P2Speed
);
...
@@ -285,7 +300,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -285,7 +300,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_05_Hoister_Back
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_05_Hoister_Back
))
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_06_TopDown
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_06_TopDown
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :顶升气缸下降,旋转轴到待机点P1["
+
Config
.
MiddleAxis_P1
+
"]"
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :顶升气缸下降,旋转轴到待机点P1["
+
Config
.
MiddleAxis_P1
+
"]"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_Up
,
IO_Type
.
TopCylinder_Down
);
T2_MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P1
,
Config
.
MiddleAxis_P1Speed
);
T2_MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P1
,
Config
.
MiddleAxis_P1Speed
);
...
@@ -307,7 +322,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -307,7 +322,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
box
.
alarmType
.
Equals
(
AlarmType
.
None
))
if
(
box
.
alarmType
.
Equals
(
AlarmType
.
None
))
{
{
msg
=
"等待"
+
box
.
Name
+
"复位完成超时"
;
msg
=
"等待"
+
box
.
Name
+
"复位完成超时"
;
isOk
=
false
;
isOk
=
false
;
break
;
break
;
}
}
...
@@ -327,8 +342,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -327,8 +342,8 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsTimeOut
(
120
))
else
if
(
MoveInfo
.
IsTimeOut
(
120
))
{
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
msg
+
" ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] "
+
msg
+
" ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
logType
+
21
);
LogUtil
.
error
(
WarnMsg
,
logType
+
21
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
Alarm
(
AlarmType
.
IoSingleTimeOut
);
}
}
}
}
...
@@ -628,7 +643,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -628,7 +643,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreManager
.
checkWatch
(
lowWatch
,
3000
))
if
(
StoreManager
.
checkWatch
(
lowWatch
,
3000
))
{
{
//左侧下层需要放个料架
//左侧下层需要放个料架
Task
.
Factory
.
StartNew
(
delegate
Task
.
Run
(()=>
{
{
LowProcess
=
true
;
LowProcess
=
true
;
LogUtil
.
info
(
Name
+
"从料架堆积处放一个料架到后端"
);
LogUtil
.
info
(
Name
+
"从料架堆积处放一个料架到后端"
);
...
...
source/DeviceLibrary/duoStore/DUOStoreBean_Partial.cs
查看文件 @
8887225
...
@@ -471,25 +471,32 @@ namespace OnlineStore.DeviceLibrary
...
@@ -471,25 +471,32 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
Line_WaitCheck
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
Line_WorkCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
Line_WaitCheck
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
Line_WorkCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StartInStoreMove
(
null
);
StartInStoreMove
(
null
);
}
}
if
(
IOValue
(
IO_Type
.
RaiseStation_FrontCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
RaiseStation_BackendCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
StartInStoreMove
(
null
);
}
return
false
;
return
false
;
}
}
private
void
ShelfEnterProcess
()
private
void
ShelfEnterProcess
()
{
{
//入口有料架,需要转动链条
//入口有料架,需要转动链条
Task
.
Factory
.
StartNew
(
delegate
Task
.
Run
(()=>
{
{
InShelfInProcess
=
true
;
InShelfInProcess
=
true
;
try
try
{
{
InOutStoreLog
(
"检测到入口(X03-Line_InCheck)有料"
);
InShelfInProcess
=
true
;
InShelfInProcess
=
true
;
LineRun
(
null
);
LineRun
(
null
);
//等待进料检测信号
//等待进料检测信号
bool
result
=
WaitIo
(
IO_Type
.
Line_InCheck
,
IO_VALUE
.
LOW
,
10000
);
//bool result = WaitIo(IO_Type.Line_InCheck, IO_VALUE.LOW, 10000);
bool
result
=
WaitIo
(
IO_Type
.
Line_WaitCheck
,
IO_VALUE
.
HIGH
,
10000
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
InOutStoreLog
(
"检测到入口(X03-Line_InCheck)有料:"
+
ex
.
ToString
());
}
}
finally
finally
{
{
...
@@ -544,10 +551,18 @@ namespace OnlineStore.DeviceLibrary
...
@@ -544,10 +551,18 @@ namespace OnlineStore.DeviceLibrary
public
override
bool
StartInStoreMove
(
InOutParam
param
)
public
override
bool
StartInStoreMove
(
InOutParam
param
)
{
{
if
(
IOValue
(
IO_Type
.
RaiseStation_FrontCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
RaiseStation_BackendCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
runStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
InStoreExecute
;
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
new
InOutParam
(
MoveType
.
InStore
));
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_06_TopUp
);
return
true
;
}
//判断是哪个工位有料架
//判断是哪个工位有料架
if
(
IOValue
(
IO_Type
.
Line_WorkCheck
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
Line_WorkCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
//InOutStoreLog($"CurrShelfNum:{CurrShelfNum},CurrShelfType={CurrShelfType}");
if
(
CurrShelfNum
<
0
||
CurrShelfType
.
Equals
(
1
))
if
(
CurrShelfNum
<
0
||
CurrShelfType
.
Equals
(
1
))
{
{
runStatus
=
StoreRunStatus
.
Busy
;
runStatus
=
StoreRunStatus
.
Busy
;
...
@@ -640,6 +655,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -640,6 +655,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_07_HoisterForward_2
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_07_HoisterForward_2
);
InOutStoreLog
(
"入料检测:定位销上升"
);
InOutStoreLog
(
"入料检测:定位销上升"
);
InOutStation_LocationUp
();
InOutStation_LocationUp
();
InOutStation_Stop
();
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_07_HoisterForward_2
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_07_HoisterForward_2
))
{
{
...
@@ -686,7 +702,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -686,7 +702,10 @@ namespace OnlineStore.DeviceLibrary
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_15_WaitNoCheck
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_15_WaitNoCheck
);
InOutStoreLog
(
"取料:等待没有提升机构料盘检测"
);
InOutStoreLog
(
"取料:等待没有提升机构料盘检测"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchAxis_Check
,
IO_VALUE
.
HIGH
));
if
(
Math
.
Abs
(
T1_BatchAxis
.
GetAclPosition
()
-
Config
.
BatchAxis_P2
)
>
T1_BatchAxis
.
Config
.
CanErrorCountMin
)
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchAxis_Check
,
IO_VALUE
.
HIGH
));
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_15_WaitNoCheck
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_15_WaitNoCheck
))
{
{
...
@@ -745,8 +764,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -745,8 +764,13 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_21_WaitToBox
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_21_WaitToBox
))
{
{
int
storeId
=
LastPosParam
.
GetStoreId
();
int
storeId
=
LastPosParam
.
GetStoreId
();
InOutStoreLog
(
$
"料盘移栽:storeId :{storeId}"
);
BoxBean
box
=
BoxMap
[
storeId
];
BoxBean
box
=
BoxMap
[
storeId
];
if
(
IOManager
.
IOValue
(
IO_Type
.
InDoor_Check
,
storeId
).
Equals
(
IO_VALUE
.
LOW
)
&&
box
.
waitInStoreParam
==
null
)
bool
waitRightLeave
=
false
;
if
(
HasT4Axis
&&
storeId
==
1
&&
IOManager
.
IOValue
(
IO_Type
.
InDoor_Check
,
2
).
Equals
(
IO_VALUE
.
HIGH
))
{
waitRightLeave
=
true
;
}
if
(
IOManager
.
IOValue
(
IO_Type
.
InDoor_Check
,
storeId
).
Equals
(
IO_VALUE
.
LOW
)
&&
box
.
waitInStoreParam
==
null
&&
!
waitRightLeave
)
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_22_ToBoxDoor
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_22_ToBoxDoor
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
...
@@ -754,18 +778,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -754,18 +778,20 @@ namespace OnlineStore.DeviceLibrary
if
(
LastPosParam
.
TargetBox
.
Equals
(
1
))
if
(
LastPosParam
.
TargetBox
.
Equals
(
1
))
{
{
InOutStoreLog
(
"料盘移栽:获取库位号完成, BOX "
+
storeId
+
" 升降轴到料门口高点P4["
+
Config
.
UpdownAxis_P4
+
"],旋转轴到料仓门口 P2["
+
Config
.
MiddleAxis_P2
+
"]"
);
InOutStoreLog
(
"料盘移栽:获取库位号完成, BOX "
+
storeId
+
" 升降轴到料门口高点P4["
+
Config
.
UpdownAxis_P4
+
"],旋转轴到料仓门口 P2["
+
Config
.
MiddleAxis_P2
+
"]"
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P4
,
Config
.
UpdownAxis_P4Speed
);
T2_MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P2
,
Config
.
MiddleAxis_P2Speed
);
if
(
HasT4Axis
)
if
(
HasT4Axis
)
T4_InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOutAxis_P2
,
Config
.
InOutAxis_P2Speed
);
T4_InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOutAxis_P2
,
Config
.
InOutAxis_P2Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P4
,
Config
.
UpdownAxis_P4Speed
);
T2_MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P2
,
Config
.
MiddleAxis_P2Speed
);
}
}
else
else
{
{
InOutStoreLog
(
"料盘移栽:获取库位号完成, BOX "
+
storeId
+
" 升降轴到料门口高点P6["
+
Config
.
UpdownAxis_P6
+
"],旋转轴到料仓门口 P3["
+
Config
.
MiddleAxis_P3
+
"]"
);
InOutStoreLog
(
"料盘移栽:获取库位号完成, BOX "
+
storeId
+
" 升降轴到料门口高点P6["
+
Config
.
UpdownAxis_P6
+
"],旋转轴到料仓门口 P3["
+
Config
.
MiddleAxis_P3
+
"]"
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P6
,
Config
.
UpdownAxis_P6Speed
);
T2_MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P3
,
Config
.
MiddleAxis_P3Speed
);
if
(
HasT4Axis
)
if
(
HasT4Axis
)
T4_InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOutAxis_P3
,
Config
.
InOutAxis_P3Speed
);
T4_InOut_Axis
.
AbsMove
(
MoveInfo
,
Config
.
InOutAxis_P3
,
Config
.
InOutAxis_P3Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P6
,
Config
.
UpdownAxis_P6Speed
);
T2_MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_P3
,
Config
.
MiddleAxis_P3Speed
);
}
}
ClearTimeoutAlarm
(
"入料口无料盘"
);
ClearTimeoutAlarm
(
"入料口无料盘"
);
...
@@ -783,13 +809,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -783,13 +809,13 @@ namespace OnlineStore.DeviceLibrary
YuScanCode
();
YuScanCode
();
if
(
LastPosParam
.
TargetBox
.
Equals
(
1
))
if
(
LastPosParam
.
TargetBox
.
Equals
(
1
))
{
{
InOutStoreLog
(
"料盘移栽: 升降轴到料门口低点P3["
+
Config
.
UpdownAxis_P3
+
"
],开始预扫码"
);
InOutStoreLog
(
$
"料盘移栽: 升降轴到料门口低点P3[{Config.UpdownAxis_P3},补偿:{(LastHeight - 8) * Config.UpdownAxis_ChangeValue}
],开始预扫码"
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P3
,
Config
.
UpdownAxis_P3Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P3
-(
LastHeight
-
8
)*
Config
.
UpdownAxis_ChangeValue
,
Config
.
UpdownAxis_P3Speed
);
}
}
else
else
{
{
InOutStoreLog
(
"料盘移栽: 升降轴到料门口低点P5["
+
Config
.
UpdownAxis_P5
+
"
],开始预扫码"
);
InOutStoreLog
(
$
"料盘移栽: 升降轴到料门口低点P5[{Config.UpdownAxis_P5},补偿:{(LastHeight - 8) * Config.UpdownAxis_ChangeValue}
],开始预扫码"
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P5
,
Config
.
UpdownAxis_P5Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P5
-
(
LastHeight
-
8
)
*
Config
.
UpdownAxis_ChangeValue
,
Config
.
UpdownAxis_P5Speed
);
}
}
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_23_UpdownDown
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_23_UpdownDown
))
...
@@ -882,7 +908,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -882,7 +908,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_35_WaitShelfGo
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_35_WaitShelfGo
);
InOutStoreLog
(
"送出料架:等待上料无料架"
);
InOutStoreLog
(
"送出料架:等待上料无料架"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1500
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Line_W
ait
Check
,
IO_VALUE
.
LOW
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Line_W
ork
Check
,
IO_VALUE
.
LOW
));
}
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_35_WaitShelfGo
))
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_35_WaitShelfGo
))
{
{
...
@@ -965,6 +991,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -965,6 +991,9 @@ namespace OnlineStore.DeviceLibrary
else
if
(!
result
.
Msg
.
Equals
(
""
))
else
if
(!
result
.
Msg
.
Equals
(
""
))
{
{
LastPosParam
=
result
.
Param
;
LastPosParam
=
result
.
Param
;
LastPosParam
.
PosID
=
"2#2"
;
LastPosParam
.
TargetBox
=
2
;
LastPosParam
.
InStoreNg
=
true
;
LogUtil
.
error
(
Name
+
"【"
+
code
+
"】第["
+
count
+
"]次 LI_18_GetPosID 入库NG:"
+
result
.
Msg
);
LogUtil
.
error
(
Name
+
"【"
+
code
+
"】第["
+
count
+
"]次 LI_18_GetPosID 入库NG:"
+
result
.
Msg
);
break
;
break
;
}
}
...
@@ -1017,12 +1046,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1017,12 +1046,15 @@ namespace OnlineStore.DeviceLibrary
{
{
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
{
{
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
Task
.
Delay
(
10
).
Wait
();
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
);
if
(
LastCodeList
.
Count
<=
0
)
if
(
LastCodeList
.
Count
<=
0
)
{
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
,
3000
);
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
(),
Name
,
3000
);
}
}
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
LOW
);
return
LastCodeList
;
return
LastCodeList
;
});
});
}
}
...
...
source/DeviceLibrary/duoStore/DUOStoreBean_RaiseStation.cs
查看文件 @
8887225
...
@@ -46,8 +46,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -46,8 +46,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
void
InOutStation_LocationUp
()
public
void
InOutStation_LocationUp
()
{
{
IOMove
(
IO_Type
.
RaiseStation_LocationUp
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
RaiseStation_LocationDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RaiseStation_LocationDown
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RaiseStation_LocationUp
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RaiseStation_UpLocation1
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RaiseStation_UpLocation1
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RaiseStation_UpLocation2
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RaiseStation_UpLocation2
,
IO_VALUE
.
HIGH
));
}
}
...
...
source/DeviceLibrary/duoStore/ElectricGripper.cs
查看文件 @
8887225
...
@@ -58,9 +58,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -58,9 +58,8 @@ namespace OnlineStore.DeviceLibrary
axis
.
ResetError
();
axis
.
ResetError
();
axis
.
GoHome
();
axis
.
GoHome
();
// }
// }
if
(
moveInfo
!=
null
)
//if (moveInfo != null)
//moveInfo.WaitList.Add(WaitResultInfo.WaitElectricClamp());
// moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction)));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAction
(
new
Func
<
WaitResultInfo
,
bool
>(
WaitAction
)));
}
}
public
bool
IsBusy
{
public
bool
IsBusy
{
get
{
get
{
...
...
source/DeviceLibrary/duoStore/StoreManager.cs
查看文件 @
8887225
...
@@ -104,6 +104,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -104,6 +104,7 @@ namespace OnlineStore.DeviceLibrary
{
{
CSVPositionReader
<
ACBoxPosition
>.
AddCSVFile
(
positionConfigFile
);
CSVPositionReader
<
ACBoxPosition
>.
AddCSVFile
(
positionConfigFile
);
}
}
CSVPositionReader
<
ACBoxPosition
>.
AddCSVFile
(
Path
.
Combine
(
appPath
,
@"StoreConfig\FixPositions.csv"
));
LogUtil
.
info
(
"加载料仓完成!"
);
LogUtil
.
info
(
"加载料仓完成!"
);
}
}
...
...
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
8887225
...
@@ -390,9 +390,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -390,9 +390,24 @@ namespace OnlineStore.DeviceLibrary
protected
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
protected
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
{
{
return
WaitUtil
.
Wait
(
timeOut
,
delegate
()
{
return
value
.
Equals
(
IOValue
(
ioType
));
Task
w
=
Task
.
Delay
(
timeOut
);
},
errName
);
Task
p
=
Task
.
Run
(()
=>
{
while
(!
IOValue
(
ioType
).
Equals
(
value
))
{
Task
.
Delay
(
100
).
Wait
();
}
});
Task
.
WaitAny
(
w
,
p
);
return
true
;
//return WaitUtil.Wait(timeOut, delegate () {
// return value.Equals(IOValue(ioType));
//}, errName);
}
}
public
void
LogInfo
(
string
logInfo
)
public
void
LogInfo
(
string
logInfo
)
{
{
...
@@ -528,7 +543,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -528,7 +543,9 @@ namespace OnlineStore.DeviceLibrary
internal
void
SetWarnMsg
(
string
msg
)
internal
void
SetWarnMsg
(
string
msg
)
{
{
if
(
String
.
IsNullOrEmpty
(
WarnMsg
).
Equals
(
false
))
if
(
String
.
IsNullOrEmpty
(
WarnMsg
))
WarnMsg
=
msg
;
{
{
if
(
WarnMsg
.
Equals
(
msg
))
if
(
WarnMsg
.
Equals
(
msg
))
{
{
...
@@ -541,7 +558,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -541,7 +558,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
msg
,
105
);
LogUtil
.
error
(
Name
+
msg
,
105
);
}
}
}
}
else
else
if
(!
String
.
IsNullOrEmpty
(
WarnMsg
))
{
{
if
(
msg
.
StartsWith
(
Name
))
if
(
msg
.
StartsWith
(
Name
))
{
{
...
@@ -554,7 +571,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -554,7 +571,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
WarnMsg
=
msg
;
}
}
}
}
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
8887225
...
@@ -132,7 +132,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -132,7 +132,7 @@ namespace OnlineStore.DeviceLibrary
/// BOX复位:其他轴回原点
/// BOX复位:其他轴回原点
/// </summary>
/// </summary>
BOX_H03_OtherAxisHome
,
BOX_H03_OtherAxisHome
,
BOX_H03_OtherAxisHome_wait
,
/// <summary>
/// <summary>
/// BOX复位:升降轴,旋转轴,压紧轴原点返回
/// BOX复位:升降轴,旋转轴,压紧轴原点返回
/// </summary>
/// </summary>
...
@@ -251,6 +251,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -251,6 +251,15 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
SO_06_ToDoor
,
SO_06_ToDoor
,
/// <summary>
/// <summary>
/// 料仓出库:修正盘位
/// </summary>
SO_06A_01_FixDisk
,
SO_06A_02_FixDisk
,
SO_06A_03_FixDisk
,
SO_06A_04_FixDisk
,
SO_06A_05_FixDisk
,
SO_06A_06_FixDisk
,
/// <summary>
/// 检测叉子是否有物料
/// 检测叉子是否有物料
/// </summary>
/// </summary>
SO_07_FixtureCheck
,
SO_07_FixtureCheck
,
...
@@ -321,6 +330,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -321,6 +330,7 @@ namespace OnlineStore.DeviceLibrary
/// 复位:夹爪放松,提升轴回原点,上下轴回原点
/// 复位:夹爪放松,提升轴回原点,上下轴回原点
/// </summary>
/// </summary>
LR_03_BatchAxisHome
,
LR_03_BatchAxisHome
,
LR_03_BatchAxisHome_wait
,
/// <summary>
/// <summary>
/// 复位:提升轴到P1点,上下轴到待机点P1
/// 复位:提升轴到P1点,上下轴到待机点P1
/// </summary>
/// </summary>
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
8887225
...
@@ -76,10 +76,10 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -76,10 +76,10 @@ namespace OnlineStore.LoadCSVLibrary
[
CSVAttribute
(
"加速时间"
)]
[
CSVAttribute
(
"加速时间"
)]
public
shor
t
AddSpeed
{
get
;
set
;
}
public
in
t
AddSpeed
{
get
;
set
;
}
[
CSVAttribute
(
"减速时间"
)]
[
CSVAttribute
(
"减速时间"
)]
public
shor
t
DelSpeed
{
get
;
set
;
}
public
in
t
DelSpeed
{
get
;
set
;
}
[
CSVAttribute
(
"原点低速度"
)]
[
CSVAttribute
(
"原点低速度"
)]
public
int
HomeLowSpeed
{
get
;
set
;
}
public
int
HomeLowSpeed
{
get
;
set
;
}
...
...
source/LoadCVSLibrary/storeConfig/config/Store_Config.cs
查看文件 @
8887225
...
@@ -228,6 +228,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -228,6 +228,11 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"UpdownAxis_P6"
)]
[
ConfigProAttribute
(
"UpdownAxis_P6"
)]
public
int
UpdownAxis_P6
{
get
;
set
;
}
public
int
UpdownAxis_P6
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,0,T3_升降轴高度转换系数(1mm对应的脉冲),UpdownAxis_ChangeValue,11000
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_ChangeValue"
)]
public
int
UpdownAxis_ChangeValue
{
get
;
set
;
}
/// <summary>
/// PRO,0,T2_升降轴P1速度/慢速度,UpdownAxis_P1Speed,500
/// PRO,0,T2_升降轴P1速度/慢速度,UpdownAxis_P1Speed,500
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_P1Speed"
)]
[
ConfigProAttribute
(
"UpdownAxis_P1Speed"
)]
...
@@ -297,10 +302,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -297,10 +302,11 @@ namespace OnlineStore.LoadCSVLibrary
private
List
<
string
>
CameraList
=
new
List
<
string
>();
private
List
<
string
>
CameraList
=
new
List
<
string
>();
public
List
<
string
>
GetCameraList
()
public
List
<
string
>
GetCameraList
()
{
{
if
(
CameraList
==
null
)
if
(
CameraList
.
Count
==
0
)
{
{
CameraList
=
new
List
<
string
>();
CameraList
=
new
List
<
string
>();
string
[]
arrayList
=
CameraNameList
.
Split
(
'#'
);
string
[]
arrayList
=
CameraNameList
.
Split
(
'#'
);
foreach
(
string
str
in
arrayList
)
foreach
(
string
str
in
arrayList
)
{
{
string
camera
=
str
.
Trim
();
string
camera
=
str
.
Trim
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论