Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c25d1b3f
由
LN
编写于
2019-10-31 14:33:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上料装置移栽料盘后需要扫码
1 个父辈
e6215305
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
248 行增加
和
256 行删除
source/AssemblyLineClient/FrmFeedingEquip.cs
source/AssemblyLineClient/FrmMoveEquip.cs
source/Common/Common.csproj
source/Common/util/ScanCodeManager.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/LineConfig/Config_FeedingEquip_1.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_2.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_02.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_03.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_04.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_05.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_06.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_07.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_08.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_09.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_10.csv
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblyLine/ALineManager.cs → source/DeviceLibrary/assemblymanager/ALineManager.cs
source/DeviceLibrary/assemblymanager/StoreServerManager.cs
source/DeviceLibrary/assemblyLine/TrayManager.cs → source/DeviceLibrary/assemblymanager/TrayManager.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/model/LineMoveInfo.cs
source/DeviceLibrary/model/StoreStep.cs
source/DeviceLibrary/model/TrayInfo.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
c25d1b3
...
@@ -211,7 +211,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -211,7 +211,7 @@ namespace OnlineStore.AssemblyLine
portName
=
equipBean
.
Config
.
Batch_Axis
.
DeviceName
;
portName
=
equipBean
.
Config
.
Batch_Axis
.
DeviceName
;
SlvAddr
=
equipBean
.
Config
.
Batch_Axis
.
GetAxisValue
();
SlvAddr
=
equipBean
.
Config
.
Batch_Axis
.
GetAxisValue
();
txtAxisDeviceName
.
Text
=
portName
;
txtAxisDeviceName
.
Text
=
portName
;
txtSlaveId
.
Text
=
SlvAddr
.
ToString
();
//
txtSlaveId.Text = SlvAddr.ToString();
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
comboBox1
.
Items
.
Clear
();
comboBox1
.
Items
.
Clear
();
comboBox1
.
Items
.
Add
(
equipBean
.
Config
.
Batch_Axis
.
Explain
);
comboBox1
.
Items
.
Add
(
equipBean
.
Config
.
Batch_Axis
.
Explain
);
...
@@ -596,20 +596,20 @@ namespace OnlineStore.AssemblyLine
...
@@ -596,20 +596,20 @@ namespace OnlineStore.AssemblyLine
private
void
comboBox1_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
private
void
comboBox1_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
{
if
(
comboBox1
.
SelectedIndex
.
Equals
(
1
))
if
(
comboBox1
.
SelectedIndex
.
Equals
(
0
))
{
{
portName
=
equipBean
.
Config
.
UpDown
_Axis
.
DeviceName
;
portName
=
equipBean
.
Config
.
Batch
_Axis
.
DeviceName
;
SlvAddr
=
equipBean
.
Config
.
UpDown
_Axis
.
GetAxisValue
();
SlvAddr
=
equipBean
.
Config
.
Batch
_Axis
.
GetAxisValue
();
txtAxisDeviceName
.
Text
=
portName
;
txtAxisDeviceName
.
Text
=
portName
;
txtSlaveId
.
Text
=
SlvAddr
.
ToString
();
//
txtSlaveId.Text = SlvAddr.ToString();
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
}
}
else
if
(
comboBox1
.
SelectedIndex
.
Equals
(
1
))
else
if
(
comboBox1
.
SelectedIndex
.
Equals
(
1
))
{
{
portName
=
equipBean
.
Config
.
Batch
_Axis
.
DeviceName
;
portName
=
equipBean
.
Config
.
UpDown
_Axis
.
DeviceName
;
SlvAddr
=
equipBean
.
Config
.
Batch
_Axis
.
GetAxisValue
();
SlvAddr
=
equipBean
.
Config
.
UpDown
_Axis
.
GetAxisValue
();
txtAxisDeviceName
.
Text
=
portName
;
txtAxisDeviceName
.
Text
=
portName
;
txtSlaveId
.
Text
=
SlvAddr
.
ToString
();
//
txtSlaveId.Text = SlvAddr.ToString();
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
}
}
...
...
source/AssemblyLineClient/FrmMoveEquip.cs
查看文件 @
c25d1b3
...
@@ -198,13 +198,12 @@ namespace OnlineStore.AssemblyLine
...
@@ -198,13 +198,12 @@ namespace OnlineStore.AssemblyLine
{
{
portName
=
equipBean
.
Config
.
UpDown_Axis
.
DeviceName
;
portName
=
equipBean
.
Config
.
UpDown_Axis
.
DeviceName
;
SlvAddr
=
equipBean
.
Config
.
UpDown_Axis
.
GetAxisValue
();
SlvAddr
=
equipBean
.
Config
.
UpDown_Axis
.
GetAxisValue
();
txtAxisDeviceName
.
Text
=
portName
;
txtAxisDeviceName
.
Text
=
portName
;
txt
SlaveId
.
Text
=
SlvAddr
.
ToString
();
txt
AxisValue
.
Text
=
SlvAddr
.
ToString
();
comboBox1
.
Items
.
Clear
();
comboBox1
.
Items
.
Clear
();
comboBox1
.
Items
.
Add
(
equipBean
.
Config
.
UpDown_Axis
.
Explain
);
comboBox1
.
Items
.
Add
(
equipBean
.
Config
.
UpDown_Axis
.
Explain
);
comboBox1
.
SelectedIndex
=
0
;
comboBox1
.
SelectedIndex
=
0
;
txtAxisValue
.
Text
=
SlvAddr
.
ToString
();
btnUpDownUp
.
Visible
=
false
;
btnUpDownUp
.
Visible
=
false
;
}
}
else
else
...
...
source/Common/Common.csproj
查看文件 @
c25d1b3
...
@@ -68,7 +68,6 @@
...
@@ -68,7 +68,6 @@
<Compile Include="util\NetTCPServer.cs">
<Compile Include="util\NetTCPServer.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
<Compile Include="util\ScanCodeManager.cs" />
<Compile Include="util\TcpClient.cs" />
<Compile Include="util\TcpClient.cs" />
<Compile Include="util\TcpServer.cs" />
<Compile Include="util\TcpServer.cs" />
<Compile Include="util\UdpServer.cs" />
<Compile Include="util\UdpServer.cs" />
...
...
source/Common/util/ScanCodeManager.cs
deleted
100644 → 0
查看文件 @
e621530
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
namespace
OnlineStore.Common
{
/// <summary>
/// 扫码枪管理类
/// </summary>
public
class
ScanCodeManager
{
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
/// <summary>
/// 处理接收后的二维码
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public
static
string
ReplaceCode
(
string
message
)
{
message
=
message
.
Trim
();
message
=
message
.
Replace
(
"\r"
,
""
);
message
=
message
.
Replace
(
"\n"
,
""
);
char
a
=
(
char
)
02
;
message
=
message
.
Replace
(
a
.
ToString
(),
""
);
message
=
message
.
Trim
();
System
.
Text
.
ASCIIEncoding
asciiEncoding
=
new
System
.
Text
.
ASCIIEncoding
();
byte
[]
bytes
=
asciiEncoding
.
GetBytes
(
message
);
List
<
byte
>
newBytes
=
new
List
<
byte
>
();
foreach
(
byte
by
in
bytes
)
{
if
(!
by
.
Equals
(
24
))
{
newBytes
.
Add
(
by
);
}
}
message
=
asciiEncoding
.
GetString
(
newBytes
.
ToArray
());
//if (message.Length == 1)
//{
// try
// {
// int intAsciiCode = (int)asciiEncoding.GetBytes(message)[0];
// if (intAsciiCode.Equals(24))
// {
// return "";
// }
// }
// catch (Exception ex)
// {
// LOGGER.Error(ex);
// }
//}
return
message
;
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
c25d1b3
...
@@ -62,14 +62,15 @@
...
@@ -62,14 +62,15 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="assembly
Line
\ALineManager.cs" />
<Compile Include="assembly
manager
\ALineManager.cs" />
<Compile Include="assemblyLine\DischargeLine.cs" />
<Compile Include="assemblyLine\DischargeLine.cs" />
<Compile Include="assemblyLine\DischargeLine_Partial.cs" />
<Compile Include="assemblyLine\DischargeLine_Partial.cs" />
<Compile Include="assemblyLine\ProvidingEquip_Partial.cs" />
<Compile Include="assemblyLine\ProvidingEquip_Partial.cs" />
<Compile Include="assemblyLine\FeedingEquip_Partial.cs" />
<Compile Include="assemblyLine\FeedingEquip_Partial.cs" />
<Compile Include="assemblyLine\ProvidingEquip.cs" />
<Compile Include="assemblyLine\ProvidingEquip.cs" />
<Compile Include="assemblyLine\FeedingEquip.cs" />
<Compile Include="assemblyLine\FeedingEquip.cs" />
<Compile Include="assemblyLine\TrayManager.cs" />
<Compile Include="assemblymanager\StoreServerManager.cs" />
<Compile Include="assemblymanager\TrayManager.cs" />
<Compile Include="deviceLibrary\halcon\CodeManager.cs" />
<Compile Include="deviceLibrary\halcon\CodeManager.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="deviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="deviceLibrary\IO\IOManager.cs" />
<Compile Include="deviceLibrary\IO\IOManager.cs" />
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_1.csv
查看文件 @
c25d1b3
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,1,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,提升上料轴,Batch_Axis,
2,COM1,1
,,,
AXIS,0,提升上料轴,Batch_Axis,
1,COM1,0
,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,
1,COM1,2
,,,
AXIS,0,移栽上下轴,UpDown_Axis,
2,COM1,0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_2.csv
查看文件 @
c25d1b3
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,0,,,,,
PRO,0,对应的横移模块,SidesWayNum,0,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,提升上料轴,Batch_Axis,
2,COM1,3
,,,
AXIS,0,提升上料轴,Batch_Axis,
3,COM1,0
,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,
1,COM1,4
,,,
AXIS,0,移栽上下轴,UpDown_Axis,
4,COM1,0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
查看文件 @
c25d1b3
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,2,,,,,
PRO,0,对应的横移模块,SidesWayNum,2,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,,
PRO,0,是否是用来出料,IsCanOut,0,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,提升上料轴,Batch_Axis,
2,COM1,5
,,,
AXIS,0,提升上料轴,Batch_Axis,
5,COM1,0
,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,
1,COM1,6
,,,
AXIS,0,移栽上下轴,UpDown_Axis,
6,COM1,0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
查看文件 @
c25d1b3
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
...
@@ -5,7 +5,7 @@ PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,对应的横移模块,SidesWayNum,3,,,,,
PRO,0,对应的横移模块,SidesWayNum,3,,,,,
PRO,0,是否是用来出料,IsCanOut,1,,,,,
PRO,0,是否是用来出料,IsCanOut,1,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,提升上料轴,Batch_Axis,
2,COM1,7
,,,
AXIS,0,提升上料轴,Batch_Axis,
7,COM1,0
,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴原位待机点 P1,BatchAxisP1,1000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,10000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,500,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
...
@@ -20,7 +20,7 @@ PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,400,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,
1,COM1,8
,,,
AXIS,0,移栽上下轴,UpDown_Axis,
8,COM1,0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownPositionsP2,0=180000;,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_02.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,2,COM2,
2
,,,
AXIS,0,移栽上下轴,UpDown_Axis,2,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_03.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,3,COM2,
3
,,,
AXIS,0,移栽上下轴,UpDown_Axis,3,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_04.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,4,COM2,
4
,,,
AXIS,0,移栽上下轴,UpDown_Axis,4,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_05.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,5,COM2,
5
,,,
AXIS,0,移栽上下轴,UpDown_Axis,5,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_06.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,6,COM2,
6
,,,
AXIS,0,移栽上下轴,UpDown_Axis,6,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_07.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,7,COM2,
7
,,,
AXIS,0,移栽上下轴,UpDown_Axis,7,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_08.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,COM2,
8
,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_09.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,9,COM2,
9
,,,
AXIS,0,移栽上下轴,UpDown_Axis,9,COM2,
0
,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_10.csv
查看文件 @
c25d1b3
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
...
@@ -4,7 +4,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在移栽上下降的位置,UpDownPositions,0=180000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
PRO,0,移栽上下轴在料仓门口下降的位置,UpDownBoxPositions,0=116000;,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,10,COM2,
1
0,,,
AXIS,0,移栽上下轴,UpDown_Axis,10,COM2,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
查看文件 @
c25d1b3
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
c25d1b3
...
@@ -824,105 +824,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -824,105 +824,12 @@ namespace OnlineStore.DeviceLibrary
}
}
return
true
;
return
true
;
}
}
private
void
onCodeReceived
(
string
message
,
int
height
,
int
width
)
{
try
{
message
=
ScanCodeManager
.
ReplaceCode
(
message
);
if
(
String
.
IsNullOrEmpty
(
message
))
{
isNotScanCode
=
true
;
LogUtil
.
info
(
Name
+
"没有收到二维码信息,请重新放入料盘"
);
return
;
}
isNotScanCode
=
false
;
if
(
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
LogUtil
.
info
(
Name
+
"收到二维码<< "
+
message
+
",暂未开启,不需要发送服务器"
);
return
;
}
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
)
+
"?cids="
+
LineServer
.
GetAllCID
()
+
"&code=%3D"
+
message
;
LogUtil
.
info
(
Name
+
"收到二维码<< "
+
message
+
",获取入库PosID:"
+
server
);
//发送扫码内容到服务器进行入库操作
// Operation operation =LineServer.GetInStoreOperation(message);
// LineGetPosOp op = new LineGetPosOp(LineServer.GetAllCID(), message);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LineOperation
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
LineOperation
>(
resultStr
);
if
(
serverResult
==
null
)
{
LogUtil
.
info
(
Name
+
"二维码【"
+
message
+
"】没有收到服务器反馈!"
);
return
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
//如果有提示消息,直接显示提示
LogUtil
.
error
(
"服务器反馈 二维码【"
+
message
+
"】 :"
+
serverResult
.
msg
);
return
;
}
if
(!
serverResult
.
pos
.
Equals
(
""
))
{
string
posId
=
serverResult
.
pos
;
int
plateW
=
width
;
int
plateH
=
height
;
string
[]
posArray
=
posId
.
Split
(
'#'
);
if
(!(
posArray
.
Length
==
2
))
{
WarnMsg
=
Name
+
"入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
;
LogUtil
.
error
(
"服务器反馈 入库库位格式错误:二维码【"
+
message
+
"】库位【"
+
posId
+
"】"
);
return
;
}
//判断盘是否过高(7*8的盘需要判断,如果盘过高,不让盘通过,直接显示报警信息)
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//根据库位号查找移栽
MoveEquip
moveEquip
=
MoveEquipMap
[
storeId
];
//取盘号
string
wareNum
=
serverResult
.
barcode
;
int
trayCode
=
TrayManager
.
GetTrayNum
(
0
);
LogUtil
.
info
(
"更新盘空满信息,托盘号【"
+
trayCode
+
"】,是否有料盘【"
+
true
+
"】,出库入库【"
+
1
+
"】"
);
TrayManager
.
UpdateFixtureValue
(
trayCode
,
true
,
ReelType
.
InStore
,
wareNum
,
posId
,
plateH
,
plateW
);
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
LineServer
.
BoxCanInStore
(
moveEquip
.
DeviceID
))
{
InOutParam
param
=
new
InOutParam
(
trayCode
,
wareNum
,
posId
,
plateH
,
plateW
);
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
if
(
IsReviceInPosId
(
moveEquip
,
posId
))
{
WarnMsg
=
moveEquip
.
Name
+
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
;
moveEquip
.
WarnMsg
=
WarnMsg
;
LogUtil
.
info
(
"收到服务器入库命令 "
+
WarnMsg
);
return
;
}
LineServer
.
CheckInStorePos
(
storeId
,
param
);
StartInStoreMove
(
param
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" "
+
ex
.
ToString
());
}
}
/// <summary>
/// <summary>
///是否已经接收到过出库信息
///是否已经接收到过出库信息
///</summary>
///</summary>
p
rivate
bool
IsReviceInPosId
(
MoveEquip
moveEquip
,
string
posId
)
p
ublic
bool
IsReviceInPosId
(
MoveEquip
moveEquip
,
string
posId
)
{
{
bool
isReviceInfo
=
false
;
bool
isReviceInfo
=
false
;
if
(
moveEquip
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
)
&&
moveEquip
.
MoveInfo
.
MoveParam
!=
null
&&
moveEquip
.
MoveInfo
.
MoveParam
.
PosId
.
Equals
(
posId
))
if
(
moveEquip
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
)
&&
moveEquip
.
MoveInfo
.
MoveParam
!=
null
&&
moveEquip
.
MoveInfo
.
MoveParam
.
PosId
.
Equals
(
posId
))
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
c25d1b3
...
@@ -547,6 +547,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -547,6 +547,7 @@ namespace OnlineStore.DeviceLibrary
//}
//}
}
}
#
endregion
#
endregion
#
region
IO
操作
#
region
IO
操作
...
@@ -623,24 +624,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -623,24 +624,7 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
LOW
);
}
}
///// <summary>
///// 判断横移轨道23是否有托盘
///// </summary>
///// <returns></returns>
//public bool SideWay23HasTray()
//{
// //正在横移中,且托盘顶升气缸未下降
// if (SW23_MoveInfo.MoveType.Equals(LineMoveType.None).Equals(false) && SW23_MoveInfo.MoveStep <= LineMoveStep.SW07_TopCylinderDown)
// {
// return true;
// }
// if (IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.HIGH)&&IOValue(IO_Type.SW3_TrayCheck).Equals(IO_VALUE.LOW))
// {
// return true;
// }
// return false;
//}
private
DateTime
SideWay41Ntime
=
DateTime
.
Now
;
private
DateTime
SideWay41Ntime
=
DateTime
.
Now
;
private
bool
SideWay41IsWait
=
false
;
private
bool
SideWay41IsWait
=
false
;
private
DateTime
SideWay23Ntime
=
DateTime
.
Now
;
private
DateTime
SideWay23Ntime
=
DateTime
.
Now
;
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
c25d1b3
...
@@ -143,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -143,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
int
bagWidth
=
MoveInfo
.
MoveParam
.
PlateW
;
int
bagWidth
=
MoveInfo
.
MoveParam
.
PlateW
;
LogInfo
(
"【"
+
posId
+
"】出库时,更新盘空满信息 托盘号【"
+
MoveInfo
.
MoveParam
.
TrayNumber
+
"】,是否有料盘【"
+
true
+
"】,出库入库【"
+
2
+
"】"
);
LogInfo
(
"【"
+
posId
+
"】出库时,更新盘空满信息 托盘号【"
+
MoveInfo
.
MoveParam
.
TrayNumber
+
"】,是否有料盘【"
+
true
+
"】,出库入库【"
+
2
+
"】"
);
TrayManager
.
Update
FixtureValue
(
MoveInfo
.
MoveParam
.
TrayNumber
,
true
,
ReelType
.
OutStore
,
MoveInfo
.
MoveParam
.
WareCode
,
MoveInfo
.
MoveParam
.
PosId
,
MoveInfo
.
MoveParam
.
PlateH
,
bagWidth
);
TrayManager
.
Update
TrayInfo
(
MoveInfo
.
MoveParam
.
TrayNumber
,
true
,
ReelType
.
OutStore
,
MoveInfo
.
MoveParam
.
WareCode
,
MoveInfo
.
MoveParam
.
PosId
,
MoveInfo
.
MoveParam
.
PlateH
,
bagWidth
);
//出库全部完成
//出库全部完成
lineStatus
=
LineStatus
.
StoreOnline
;
lineStatus
=
LineStatus
.
StoreOnline
;
...
@@ -162,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -162,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager
.
DelNeedEmptyTrayNum
();
TrayManager
.
DelNeedEmptyTrayNum
();
OutStoreLog
(
"出库 SecondMove:移栽完成,放行托盘"
);
OutStoreLog
(
"出库 SecondMove:移栽完成,放行托盘"
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
3
_TopCylinder_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
LogInfo
(
"【"
+
posId
+
"】出库处理结束,!"
);
LogInfo
(
"【"
+
posId
+
"】出库处理结束,!"
);
...
@@ -249,12 +249,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -249,12 +249,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_10_WaitBox
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MI_10_WaitBox
);
LogInfo
(
"入库【"
+
posId
+
"】处理(等待移栽):(判断box门口没有盘, 且可以入库),更新盘号【"
+
num
+
"】为空盘"
);
LogInfo
(
"入库【"
+
posId
+
"】处理(等待移栽):(判断box门口没有盘, 且可以入库),更新盘号【"
+
num
+
"】为空盘"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBoxCanReviceTray
());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBoxCanReviceTray
());
TrayManager
.
Update
FixtureValue
(
num
);
TrayManager
.
Update
TrayInfo
(
num
);
//阻挡气缸移动
//阻挡气缸移动
InStoreLog
(
"放托盘(放开阻挡):SecondMove=MO_13_TopCylinder_Down 物品已移走,顶升气缸1下降)"
);
InStoreLog
(
"放托盘(放开阻挡):SecondMove=MO_13_TopCylinder_Down 物品已移走,顶升气缸1下降)"
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
3
_TopCylinder_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_WaitBox
))
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MI_10_WaitBox
))
...
@@ -530,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -530,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager
.
UpdateTrayNumError
(-
1
,
""
);
TrayManager
.
UpdateTrayNumError
(-
1
,
""
);
}
}
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
5
_WaitCanGo
);
if
(
DeviceID
.
Equals
(
2
))
if
(
DeviceID
.
Equals
(
2
))
{
{
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
...
@@ -587,7 +587,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -587,7 +587,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager
.
UpdateTrayNumError
(-
1
,
""
);
TrayManager
.
UpdateTrayNumError
(-
1
,
""
);
}
}
CheckLog
(
"托盘检测 SecondMove:(MO_13_TopCylinder_Down ,托盘号【"
+
currMoveTrayNum
+
"】,直接放盘通过,顶升气缸下降)"
);
CheckLog
(
"托盘检测 SecondMove:(MO_13_TopCylinder_Down ,托盘号【"
+
currMoveTrayNum
+
"】,直接放盘通过,顶升气缸下降)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
3
_TopCylinder_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
}
}
...
@@ -601,10 +601,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -601,10 +601,10 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
#
region
不需要出入库,直接放行
#
region
不需要出入库,直接放行
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
3
_TopCylinder_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
4
_TopCylinder_Down
))
{
{
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
5
_WaitCanGo
);
if
(
DeviceID
.
Equals
(
2
))
if
(
DeviceID
.
Equals
(
2
))
{
{
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
...
@@ -613,29 +613,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -613,29 +613,29 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
4
_WaitCanGo
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
5
_WaitCanGo
))
{
{
CheckLog
(
"托盘放行 SecondMove:(MO_15_StopCylinder2_Down ,阻挡气缸1-2下降)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_15_StopCylinder2_Down ,阻挡气缸1-2下降)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
5
_StopCylinder2_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
6
_StopCylinder2_Down
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
// SecondMoveInfo.EndStepWait();
// SecondMoveInfo.EndStepWait();
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
5
_StopCylinder2_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
6
_StopCylinder2_Down
))
{
{
CheckLog
(
"托盘放行 SecondMove:(MO_16_Tray_Check , 阻挡2托盘检测=0), 延时2秒)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_16_Tray_Check , 阻挡2托盘检测=0), 延时2秒)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
6
_Tray_Check
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
7
_Tray_Check
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
LOW
));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
6
_Tray_Check
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
7
_Tray_Check
))
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
7
_StopCylinder_Back
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
8
_StopCylinder_Back
);
CheckLog
(
"托盘放行 SecondMove:(MO_17_StopCylinder_Back , 阻挡气缸1-2上升 )"
);
CheckLog
(
"托盘放行 SecondMove:(MO_17_StopCylinder_Back , 阻挡气缸1-2上升 )"
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
7
_StopCylinder_Back
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
8
_StopCylinder_Back
))
{
{
preTrayNum
=
currMoveTrayNum
;
preTrayNum
=
currMoveTrayNum
;
CheckLog
(
"托盘放行 SecondMove:(托盘放行结束) "
);
CheckLog
(
"托盘放行 SecondMove:(托盘放行结束) "
);
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
c25d1b3
...
@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
SecondMoveInfo
.
MoveNum
+
"***************上个托盘号【"
+
preTrayNum
+
"】,当前"
+
(
isFull
?
"有料托盘"
:
"空托盘"
)
+
"【"
+
currMoveTrayNum
+
"】没有出入料任务,放盘通过~"
);
LogInfo
(
SecondMoveInfo
.
MoveNum
+
"***************上个托盘号【"
+
preTrayNum
+
"】,当前"
+
(
isFull
?
"有料托盘"
:
"空托盘"
)
+
"【"
+
currMoveTrayNum
+
"】没有出入料任务,放盘通过~"
);
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
5
_WaitCanGo
);
}
}
}
}
else
else
...
@@ -166,37 +166,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -166,37 +166,37 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
#
region
不需要出出料,直接放行
#
region
不需要出出料,直接放行
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
3
_TopCylinder_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
4
_TopCylinder_Down
))
{
{
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
5
_WaitCanGo
);
//更新横移托盘已处理完成
//更新横移托盘已处理完成
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
4
_WaitCanGo
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
5
_WaitCanGo
))
{
{
CheckLog
(
"托盘放行 SecondMove:(MO_15_StopCylinder2_Down ,阻挡气缸1-2下降)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_15_StopCylinder2_Down ,阻挡气缸1-2下降)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
5
_StopCylinder2_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
6
_StopCylinder2_Down
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
// SecondMoveInfo.EndStepWait();
// SecondMoveInfo.EndStepWait();
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
5
_StopCylinder2_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
6
_StopCylinder2_Down
))
{
{
CheckLog
(
"托盘放行 SecondMove:(MO_16_Tray_Check , 阻挡2托盘检测=0), 延时2秒)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_16_Tray_Check , 阻挡2托盘检测=0), 延时2秒)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
6
_Tray_Check
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
7
_Tray_Check
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
LOW
));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
6
_Tray_Check
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
7
_Tray_Check
))
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
7
_StopCylinder_Back
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
8
_StopCylinder_Back
);
CheckLog
(
"托盘放行 SecondMove:(MO_17_StopCylinder_Back , 阻挡气缸1-2上升 )"
);
CheckLog
(
"托盘放行 SecondMove:(MO_17_StopCylinder_Back , 阻挡气缸1-2上升 )"
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
7
_StopCylinder_Back
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_1
8
_StopCylinder_Back
))
{
{
preTrayNum
=
currMoveTrayNum
;
preTrayNum
=
currMoveTrayNum
;
CheckLog
(
"托盘放行 SecondMove:(托盘放行结束) "
);
CheckLog
(
"托盘放行 SecondMove:(托盘放行结束) "
);
...
@@ -277,12 +277,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -277,12 +277,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_05_WaitBox
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
PO_05_WaitBox
);
LogInfo
(
"出料PO_05_WaitBox【"
+
posId
+
"】处理(等待可以移栽) 更新盘号【"
+
num
+
"】为空盘"
);
LogInfo
(
"出料PO_05_WaitBox【"
+
posId
+
"】处理(等待可以移栽) 更新盘号【"
+
num
+
"】为空盘"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBoxCanReviceTray
());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBoxCanReviceTray
());
TrayManager
.
Update
FixtureValue
(
num
);
TrayManager
.
Update
TrayInfo
(
num
);
//阻挡气缸移动
//阻挡气缸移动
InStoreLog
(
"放托盘(放开阻挡):SecondMoveInfo=MO_13_TopCylinder_Down 物品已移走,顶升气缸1下降)"
);
InStoreLog
(
"放托盘(放开阻挡):SecondMoveInfo=MO_13_TopCylinder_Down 物品已移走,顶升气缸1下降)"
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
3
_TopCylinder_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_1
4
_TopCylinder_Down
);
if
(
Config
.
SidesWayNum
<=
0
)
if
(
Config
.
SidesWayNum
<=
0
)
{
{
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
...
...
source/DeviceLibrary/assembly
Line
/ALineManager.cs
→
source/DeviceLibrary/assembly
manager
/ALineManager.cs
查看文件 @
c25d1b3
文件被删除
source/DeviceLibrary/assemblymanager/StoreServerManager.cs
0 → 100644
查看文件 @
c25d1b3
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
StoreServerManager
{
public
static
string
CodeReceived
(
string
deviceName
,
int
trayNum
,
string
codeStr
,
int
height
,
int
width
)
{
string
msg
=
""
;
try
{
if
(
String
.
IsNullOrEmpty
(
codeStr
))
{
return
msg
=
deviceName
+
"托盘【"
+
trayNum
+
"】 没有扫码到条码"
;
}
if
(
LineManager
.
Line
.
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
return
msg
=
deviceName
+
"托盘【"
+
trayNum
+
"】 收到条码<< "
+
codeStr
+
",暂未开启,不需要发送服务器"
;
}
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
string
server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
)
+
"?cids="
+
LineServer
.
GetAllCID
()
+
"&code=%3D"
+
codeStr
;
LogUtil
.
info
(
deviceName
+
"托盘【"
+
trayNum
+
"】 收到条码<< "
+
codeStr
+
",获取入库PosID:"
+
server
);
//发送扫码内容到服务器进行入库操作
// Operation operation =LineServer.GetInStoreOperation(codeStr);
// LineGetPosOp op = new LineGetPosOp(LineServer.GetAllCID(), codeStr);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LineOperation
serverResult
=
JsonHelper
.
DeserializeJsonToObject
<
LineOperation
>(
resultStr
);
if
(
serverResult
==
null
)
{
return
msg
=
deviceName
+
"托盘【"
+
trayNum
+
"】 条码【"
+
codeStr
+
"】没有收到服务器反馈"
;
}
else
if
((!
string
.
IsNullOrEmpty
(
serverResult
.
msg
))
||
serverResult
.
result
.
Equals
(
0
).
Equals
(
false
))
{
return
msg
=
deviceName
+
"托盘【"
+
trayNum
+
"】 条码【"
+
codeStr
+
"】 :"
+
serverResult
.
msg
;
}
if
(!
serverResult
.
pos
.
Equals
(
""
))
{
string
posId
=
serverResult
.
pos
;
int
plateW
=
width
;
int
plateH
=
height
;
string
[]
posArray
=
posId
.
Split
(
'#'
);
if
(!(
posArray
.
Length
==
2
))
{
return
msg
=
deviceName
+
"托盘【"
+
trayNum
+
"】 入库库位格式错误:条码【"
+
codeStr
+
"】库位【"
+
posId
+
"】"
;
}
//判断盘是否过高(7*8的盘需要判断,如果盘过高,不让盘通过,直接显示报警信息)
int
storeId
=
int
.
Parse
(
posArray
[
0
]);
//根据库位号查找移栽
MoveEquip
moveEquip
=
LineManager
.
Line
.
MoveEquipMap
[
storeId
];
//取盘号
string
wareNum
=
serverResult
.
barcode
;
int
trayCode
=
TrayManager
.
GetTrayNum
(
0
);
LogUtil
.
info
(
"更新盘空满信息,托盘号【"
+
trayCode
+
"】,是否有料盘【"
+
true
+
"】,出库入库【"
+
1
+
"】"
);
TrayManager
.
UpdateTrayInfo
(
trayCode
,
true
,
ReelType
.
InStore
,
wareNum
,
posId
,
plateH
,
plateW
);
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
LineServer
.
BoxCanInStore
(
moveEquip
.
DeviceID
))
{
InOutParam
param
=
new
InOutParam
(
trayCode
,
wareNum
,
posId
,
plateH
,
plateW
);
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
{
LineManager
.
Line
.
WarnMsg
=
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
;
moveEquip
.
WarnMsg
=
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
;
return
msg
=(
"收到服务器入库命令 "
+
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
);
}
LineServer
.
CheckInStorePos
(
storeId
,
param
);
//StartInStoreMove(param);
TrayManager
.
UpdateTrayInfo
(
trayCode
,
true
,
1
,
codeStr
,
posId
,
plateH
,
plateW
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
}
return
""
;
}
}
}
source/DeviceLibrary/assembly
Line
/TrayManager.cs
→
source/DeviceLibrary/assembly
manager
/TrayManager.cs
查看文件 @
c25d1b3
...
@@ -40,15 +40,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -40,15 +40,7 @@ namespace OnlineStore.DeviceLibrary
static
TrayManager
()
static
TrayManager
()
{
{
LineRunTest
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
LineRunTest
).
Equals
(
1
);
LineRunTest
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
LineRunTest
).
Equals
(
1
);
}
}
//public static bool isNeedEmptyTray()
//{
// if (LineRunTest)
// {
// return true;
// }
// return LineNeedEmptyTrayNum > 0;
//}
internal
static
void
AddNeedEmptyTrayNum
()
internal
static
void
AddNeedEmptyTrayNum
()
{
{
Interlocked
.
Increment
(
ref
LineNeedEmptyTrayNum
);
Interlocked
.
Increment
(
ref
LineNeedEmptyTrayNum
);
...
@@ -89,13 +81,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -89,13 +81,8 @@ namespace OnlineStore.DeviceLibrary
return
null
;
return
null
;
}
}
/// <summary>
/// 更新对应的盘号(1-6)是否有料盘
internal
static
void
UpdateTrayInfo
(
int
trayNum
,
bool
isFull
=
false
,
int
inOrOut
=
0
,
string
wareCode
=
""
,
string
posId
=
""
,
int
plateH
=
0
,
int
plateW
=
0
)
/// </summary>
/// <param name="trayNum"></param>
/// <param name="isFull"></param>
/// <param name="inOrOut">0=无操作,1=入库,2=出库</param>
internal
static
void
UpdateFixtureValue
(
int
trayNum
,
bool
isFull
=
false
,
int
inOrOut
=
0
,
string
wareCode
=
""
,
string
posId
=
""
,
int
plateH
=
0
,
int
plateW
=
0
)
{
{
lock
(
fixtureMapLock
)
lock
(
fixtureMapLock
)
{
{
...
@@ -117,6 +104,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -117,6 +104,28 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
internal
static
void
UpdateTrayCode
(
int
trayNum
,
string
wareCode
=
""
)
{
LogUtil
.
info
(
"更新托盘【"
+
trayNum
+
"】的条码为【"
+
wareCode
+
"】"
);
lock
(
fixtureMapLock
)
{
if
(
fixtureCodeFullMap
.
ContainsKey
(
trayNum
))
{
fixtureCodeFullMap
[
trayNum
].
WareCode
=
wareCode
;
}
}
}
internal
static
void
UpdateTrayPosId
(
int
trayNum
,
string
PosId
=
""
)
{
lock
(
fixtureMapLock
)
{
if
(
fixtureCodeFullMap
.
ContainsKey
(
trayNum
))
{
fixtureCodeFullMap
[
trayNum
].
PosId
=
PosId
;
}
}
}
/// <summary>
/// <summary>
/// 是否还有有料仓的盘
/// 是否还有有料仓的盘
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
c25d1b3
...
@@ -243,6 +243,44 @@ namespace OnlineStore.DeviceLibrary
...
@@ -243,6 +243,44 @@ namespace OnlineStore.DeviceLibrary
return
""
;
return
""
;
}
}
}
}
/// <summary>
/// 处理接收后的二维码
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
private
static
string
ReplaceCode
(
string
message
)
{
message
=
message
.
Trim
();
message
=
message
.
Replace
(
"\r"
,
""
);
message
=
message
.
Replace
(
"\n"
,
""
);
char
a
=
(
char
)
02
;
message
=
message
.
Replace
(
a
.
ToString
(),
""
);
message
=
message
.
Trim
();
System
.
Text
.
ASCIIEncoding
asciiEncoding
=
new
System
.
Text
.
ASCIIEncoding
();
byte
[]
bytes
=
asciiEncoding
.
GetBytes
(
message
);
List
<
byte
>
newBytes
=
new
List
<
byte
>();
foreach
(
byte
by
in
bytes
)
{
if
(!
by
.
Equals
(
24
))
{
newBytes
.
Add
(
by
);
}
}
message
=
asciiEncoding
.
GetString
(
newBytes
.
ToArray
());
return
message
;
}
public
static
string
ProcessCode
(
List
<
string
>
codeList
)
{
string
code
=
""
;
foreach
(
string
cc
in
codeList
)
{
if
(
string
.
IsNullOrEmpty
(
cc
))
{
continue
;
}
code
+=
cc
+
"##"
;
}
return
ReplaceCode
(
code
);
}
}
}
}
}
source/DeviceLibrary/model/LineMoveInfo.cs
查看文件 @
c25d1b3
...
@@ -309,6 +309,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -309,6 +309,12 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitFeedScanCode
()
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
WaitEnum
.
W102_FeedScanCode
;
return
wait
;
}
public
string
ToStr
()
public
string
ToStr
()
{
{
if
(
WaitType
.
Equals
(
WaitEnum
.
W001_AxisMove
))
if
(
WaitType
.
Equals
(
WaitEnum
.
W001_AxisMove
))
...
@@ -359,6 +365,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -359,6 +365,10 @@ namespace OnlineStore.DeviceLibrary
{
{
return
"上料轴缓慢上升"
;
return
"上料轴缓慢上升"
;
}
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W102_FeedScanCode
))
{
return
"入料模块扫码"
;
}
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W201_ProvidingCanOut
))
else
if
(
WaitType
.
Equals
(
WaitEnum
.
W201_ProvidingCanOut
))
{
{
return
"移栽模块可移栽出库"
;
return
"移栽模块可移栽出库"
;
...
@@ -470,6 +480,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -470,6 +480,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
internal
static
int
W101_BatchAxisMove
=
101
;
internal
static
int
W101_BatchAxisMove
=
101
;
/// <summary>
/// <summary>
/// 入料模块扫码
/// </summary>
internal
static
int
W102_FeedScanCode
=
102
;
/// <summary>
/// 移栽模块可移栽出库
/// 移栽模块可移栽出库
/// </summary>
/// </summary>
internal
static
int
W201_ProvidingCanOut
=
201
;
internal
static
int
W201_ProvidingCanOut
=
201
;
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
c25d1b3
...
@@ -307,29 +307,33 @@ namespace OnlineStore.DeviceLibrary
...
@@ -307,29 +307,33 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
MO_11_CodeRember
=
3101
,
MO_11_CodeRember
=
3101
,
/// <summary>
/// <summary>
/// 移栽处理已完成,开始扫码或继续托盘处理流程
/// </summary>
MO_12_MoveOk
=
3102
,
/// <summary>
/// 移载(流水线)定位气缸下降
/// 移载(流水线)定位气缸下降
/// </summary>
/// </summary>
MO_1
2_LoactionCylinder_Down
=
3102
,
MO_1
3_LoactionCylinder_Down
=
3103
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理 ,顶升气缸1下降
/// 移载(流水线)装置出库处理 ,顶升气缸1下降
/// </summary>
/// </summary>
MO_1
3_TopCylinder_Down
=
3103
,
MO_1
4_TopCylinder_Down
=
3104
,
/// <summary>
/// <summary>
/// 如果是移栽2需要等待托盘是否可以走
/// 如果是移栽2需要等待托盘是否可以走
/// </summary>
/// </summary>
MO_1
4_WaitCanGo
=
3104
,
MO_1
5_WaitCanGo
=
3105
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理, 阻挡气缸1-2下降
/// 移载(流水线)装置出库处理, 阻挡气缸1-2下降
/// </summary>
/// </summary>
MO_1
5_StopCylinder2_Down
=
3105
,
MO_1
6_StopCylinder2_Down
=
3106
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理, 阻挡2托盘检测=0,
/// 移载(流水线)装置出库处理, 阻挡2托盘检测=0,
/// </summary>
/// </summary>
MO_1
6_Tray_Check
=
3106
,
MO_1
7_Tray_Check
=
3107
,
/// <summary>
/// <summary>
/// 移载(流水线)装置出库处理, 阻挡气缸1-1下降 阻挡气缸1-2上升
/// 移载(流水线)装置出库处理, 阻挡气缸1-1下降 阻挡气缸1-2上升
/// </summary>
/// </summary>
MO_1
7_StopCylinder_Back
=
3107
,
MO_1
8_StopCylinder_Back
=
3108
,
/// <summary>
/// <summary>
/// 移栽装置出库处理,开始出库
/// 移栽装置出库处理,开始出库
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
c25d1b3
...
@@ -29,7 +29,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -29,7 +29,7 @@ namespace OnlineStore.DeviceLibrary
this
.
PlateW
=
plateW
;
this
.
PlateW
=
plateW
;
}
}
/// <summary>
/// <summary>
/// 夹具编码值(1-
6
)
/// 夹具编码值(1-
32?
)
/// </summary>
/// </summary>
public
int
TrayCode
{
get
;
set
;
}
public
int
TrayCode
{
get
;
set
;
}
/// <summary>
/// <summary>
...
@@ -46,7 +46,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -46,7 +46,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
string
WareCode
{
get
;
set
;
}
public
string
WareCode
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 位置
坐标
名(对应配置表的位置)
/// 位置名(对应配置表的位置)
/// </summary>
/// </summary>
public
string
PosId
{
get
;
set
;
}
public
string
PosId
{
get
;
set
;
}
/// <summary>
/// <summary>
...
@@ -57,6 +57,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -57,6 +57,8 @@ namespace OnlineStore.DeviceLibrary
/// 料盘宽度
/// 料盘宽度
/// </summary>
/// </summary>
public
int
PlateW
{
get
;
set
;
}
public
int
PlateW
{
get
;
set
;
}
}
}
/// <summary>
/// <summary>
/// 托盘上的物料的类型
/// 托盘上的物料的类型
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论