Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 119952f3
由
刘韬
编写于
2025-01-06 09:08:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
128626d0
隐藏空白字符变更
内嵌
并排
正在显示
52 个修改的文件
包含
3491 行增加
和
628 行删除
source/Common/Common.csproj
source/Common/PosIDManger.cs
source/Common/Setting_Init.cs
source/Common/packages.config
source/ConfigHelper/ConfigHelper/ConfigHelper.csproj
source/ConfigHelper/ConfigHelper/packages.config
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/app.config
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/baan/ClampJawBean.cs
source/DeviceLibrary/deviceLibrary/IPCameraHelper.cs
source/DeviceLibrary/manager/StoreManager.cs
source/DeviceLibrary/manager/model/DeviceBase.cs
source/DeviceLibrary/manager/model/DeviceStep.cs
source/DeviceLibrary/manager/model/InOutParam.cs
source/DeviceLibrary/packages.config
source/DeviceLibrary/storeBean/EquipBase.cs
source/DeviceLibrary/storeBean/XLRStoreBean.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute_Partial.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ServerPos.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ShelfPos.cs
source/DeviceLibrary/storeBean/boxBean/GetMovePFromServer.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
source/DeviceLibrary/storeBean/inputBean/InputEquip_ServerCommunication.cs
source/HuichuanLibrary/HuichuanLibrary.csproj
source/HuichuanLibrary/packages.config
source/LoadCVSLibrary/LoadCSVLibrary.csproj
source/LoadCVSLibrary/packages.config
source/XLRStoreClient/App.config
source/XLRStoreClient/FrmXLRStore.Designer.cs
source/XLRStoreClient/FrmXLRStore.cs
source/XLRStoreClient/Program.cs
source/XLRStoreClient/XLRStore.csproj
source/XLRStoreClient/boxForm/FrmAxisMove.Designer.cs
source/XLRStoreClient/boxForm/FrmAxisMove.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.Designer.cs
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
source/XLRStoreClient/inputForm/FrmInputEquip.Designer.cs
source/XLRStoreClient/inputForm/FrmInputEquip.cs
source/XLRStoreClient/useControl/AxisMoveControl.Designer.cs
source/XLRStoreClient/useControl/CT.Designer.cs
source/XLRStoreClient/useControl/CT.cs
source/XLRStoreClient/useControl/CT.resx
source/Common/Common.csproj
查看文件 @
119952f
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Obfuscar.2.2.40\build\obfuscar.props" Condition="Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...
...
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
...
...
@@ -52,6 +55,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="bean\Bean.cs" />
<Compile Include="PosIDManger.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setting_Init.cs" />
<Compile Include="util\AcSerialBean.cs" />
...
...
@@ -82,6 +86,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Obfuscar.2.2.40\build\obfuscar.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
...
...
source/Common/PosIDManger.cs
0 → 100644
查看文件 @
119952f
using
Newtonsoft.Json
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Security.Cryptography
;
namespace
OnlineStore.Common
{
public
static
class
PosIDManger
{
// Dictionary for storing POS information
public
static
DRAWERGroup
APosList
=
new
DRAWERGroup
();
public
static
DRAWERGroup
BPosList
=
new
DRAWERGroup
();
// File paths for the JSON data
private
static
readonly
string
APosFilePath
=
"E:\\data1List.json"
;
private
static
readonly
string
BPosFilePath
=
"E:\\data2List.json"
;
// Static constructor to initialize APosList and BPosList
static
PosIDManger
()
{
// Load the data from the JSON files if they exist, otherwise initialize from strings
APosList
=
LoadFromFile
<
DRAWERGroup
>(
APosFilePath
)
??
CreatePosListFromString
(
APosString
);
BPosList
=
LoadFromFile
<
DRAWERGroup
>(
BPosFilePath
)
??
CreatePosListFromString
(
BPosString
);
//if (BPosList == null)
//{
// BPosList = CreatePosListFromString(BPosString);
// foreach (var x in BPosList.DRAWER.Values)
// {
// x.Reverse();
// }
// LogUtil.error($"反转B面顺序");
// SaveToFile();
//}
// Merge with strings to ensure new POS are added
bool
updated
=
false
;
updated
|=
MergeWithPosString
(
APosList
,
APosString
);
updated
|=
MergeWithPosString
(
BPosList
,
BPosString
);
if
(
updated
)
{
LogUtil
.
info
(
$
"新 POS 信息已添加,保存数据"
);
SaveToFile
();
}
}
// Method to merge new POS from a string into an existing DRAWERGroup
private
static
bool
MergeWithPosString
(
DRAWERGroup
currentGroup
,
string
posString
)
{
var
newGroup
=
CreatePosListFromString
(
posString
);
bool
updated
=
false
;
foreach
(
var
kvp
in
newGroup
.
DRAWER
)
{
if
(!
currentGroup
.
DRAWER
.
ContainsKey
(
kvp
.
Key
))
{
currentGroup
.
DRAWER
[
kvp
.
Key
]
=
kvp
.
Value
;
updated
=
true
;
}
else
{
var
existingList
=
currentGroup
.
DRAWER
[
kvp
.
Key
];
foreach
(
var
pos
in
kvp
.
Value
)
{
if
(!
existingList
.
Any
(
p
=>
p
.
PosID
==
pos
.
PosID
))
{
existingList
.
Add
(
pos
);
updated
=
true
;
}
}
}
}
return
updated
;
}
// Method to load data from a file and deserialize it
private
static
T
LoadFromFile
<
T
>(
string
filePath
)
{
try
{
if
(
File
.
Exists
(
filePath
))
{
string
json
=
File
.
ReadAllText
(
filePath
);
return
JsonConvert
.
DeserializeObject
<
T
>(
json
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"Error loading from file {filePath}: {ex.Message}"
);
}
return
default
;
}
// Method to save data to a file (serialize to JSON)
public
static
void
SaveToFile
()
{
try
{
string
aPosJson
=
JsonConvert
.
SerializeObject
(
APosList
,
Formatting
.
Indented
);
string
bPosJson
=
JsonConvert
.
SerializeObject
(
BPosList
,
Formatting
.
Indented
);
File
.
WriteAllText
(
APosFilePath
,
aPosJson
);
File
.
WriteAllText
(
BPosFilePath
,
bPosJson
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"Error saving to files: {ex.Message}"
);
}
}
// Method to clear HasReel and Barcode for all entries and save
public
static
void
EmptyAllPos
()
{
try
{
// Iterate through APosList and BPosList to update the properties
UpdatePosList
(
APosList
);
UpdatePosList
(
BPosList
);
// Save the changes back to the files
SaveToFile
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"Error while emptying all POS: {ex.Message}"
);
}
}
// Helper method to update the PosInfo objects
private
static
void
UpdatePosList
(
DRAWERGroup
posList
)
{
if
(
posList
==
null
||
posList
.
DRAWER
==
null
)
return
;
foreach
(
var
drawer
in
posList
.
DRAWER
.
Values
)
{
if
(
drawer
==
null
)
continue
;
foreach
(
var
pos
in
drawer
)
{
if
(
pos
==
null
)
continue
;
pos
.
HasReel
=
false
;
pos
.
Barcode
=
string
.
Empty
;
}
}
}
// Method to create PosInfo list from a string
private
static
DRAWERGroup
CreatePosListFromString
(
string
posString
)
{
var
drawerGroup
=
new
DRAWERGroup
();
int
currentKey
=
0
;
var
lines
=
posString
.
Split
(
new
[]
{
'\n'
,
'\r'
},
StringSplitOptions
.
RemoveEmptyEntries
);
foreach
(
var
line
in
lines
)
{
if
(
int
.
TryParse
(
line
.
Trim
(),
out
int
key
))
{
// Update the current key
currentKey
=
key
;
if
(!
drawerGroup
.
DRAWER
.
ContainsKey
(
currentKey
))
{
drawerGroup
.
DRAWER
[
currentKey
]
=
new
List
<
PosInfo
>();
}
}
else
{
// Add PosInfo to the current key
drawerGroup
.
DRAWER
[
currentKey
].
Add
(
new
PosInfo
{
PosID
=
line
.
Trim
(),
HasReel
=
false
,
Barcode
=
string
.
Empty
});
}
}
return
drawerGroup
;
}
// New method to retrieve POS lists based on drawer index
public
static
void
GetDarwerPoslist
(
int
darwerindex
,
out
string
apos
,
out
string
bpos
,
out
string
aout
,
out
string
bout
)
{
apos
=
string
.
Empty
;
bpos
=
string
.
Empty
;
aout
=
string
.
Empty
;
bout
=
string
.
Empty
;
if
(
APosList
.
DRAWER
.
TryGetValue
(
darwerindex
,
out
var
aDrawer
))
{
var
pos
=
aDrawer
.
FirstOrDefault
(
p
=>
!
p
.
HasReel
);
var
outPos
=
aDrawer
.
FirstOrDefault
(
p
=>
p
.
HasReel
);
apos
=
pos
?.
PosID
??
string
.
Empty
;
aout
=
outPos
?.
PosID
??
string
.
Empty
;
}
if
(
BPosList
.
DRAWER
.
TryGetValue
(
darwerindex
,
out
var
bDrawer
))
{
var
pos
=
bDrawer
.
FirstOrDefault
(
p
=>
!
p
.
HasReel
);
var
outPos
=
bDrawer
.
FirstOrDefault
(
p
=>
p
.
HasReel
);
bpos
=
pos
?.
PosID
??
string
.
Empty
;
bout
=
outPos
?.
PosID
??
string
.
Empty
;
}
}
// Method to update PosInfo based on PosID and HasReel
public
static
void
UpdatePosinfo
(
string
posid
,
bool
hasreel
)
{
LogUtil
.
info
(
$
"UpdatePosinfo {posid}={hasreel}"
);
foreach
(
var
drawer
in
APosList
.
DRAWER
.
Values
.
Concat
(
BPosList
.
DRAWER
.
Values
))
{
var
pos
=
drawer
.
FirstOrDefault
(
p
=>
p
.
PosID
==
posid
);
if
(
pos
!=
null
)
{
pos
.
HasReel
=
hasreel
;
SaveToFile
();
// Save the updated data
return
;
}
}
}
public
static
bool
GetPosHasReel
(
string
posid
)
{
foreach
(
var
drawer
in
APosList
.
DRAWER
.
Values
.
Concat
(
BPosList
.
DRAWER
.
Values
))
{
var
pos
=
drawer
.
FirstOrDefault
(
p
=>
p
.
PosID
==
posid
);
if
(
pos
!=
null
)
{
return
pos
.
HasReel
;
}
}
return
true
;
}
// APos and BPos string values
static
string
APosString
=
@
"
1
01
AA15060101
01
AA15060103
01
AA15060105
2
01
BB01060220
01
BB01060218
01
BB01060216
3
01
AA15060420
01
AA15060418
01
AA15060416
4
01
BB01020220
01
BB01020218
01
BB01020216
5
01
AA15040101
01
AA15040103
01
AA15040105
6
01
BB15020220
01
BB15020218
01
BB15020216
7
01
AA15020101
01
AA15020103
01
AA15020105
8
01
BB14050401
01
BB14050403
01
BB14050405
9
01
AA01040101
01
AA01040103
01
AA01040105
10
01
BB01040220
01
BB01040218
01
BB01040216
11
01
AA05060101
01
AA05060103
01
AA05060105
12
01
BB15060220
01
BB15060218
01
BB15060216
13
01
AA01060101
01
AA01060103
01
AA01060105
";
static
string
BPosString
=
@
"
1
01
BB05040220
01
BB05040218
01
BB05040216
2
01
AA01020101
01
AA01020103
01
AA01020105
3
01
BB05020220
01
BB05020218
01
BB05020216
4
01
AA04040101
01
AA04040103
01
AA04040105
5
01
BB05060220
01
BB05060218
01
BB05060216
6
01
AA05040101
01
AA05040103
01
AA05040105
7
01
BB04020220
01
BB04020218
01
BB04020216
8
01
AA05020101
01
AA05020103
01
AA05020105
9
01
BB04060220
01
BB04060218
01
BB04060216
10
01
AA04060101
01
AA04060103
01
AA04060105
11
01
BB15040220
01
BB15040218
01
BB15040216
12
01
AA04020101
01
AA04020103
01
AA04020105
13
01
BB04040220
01
BB04040218
01
BB04040216
";
}
[
Serializable
]
public
class
PosInfo
{
public
string
PosID
{
get
;
set
;
}
public
bool
HasReel
{
get
;
set
;
}
public
string
Barcode
{
get
;
set
;
}
}
[
Serializable
]
public
class
DRAWERGroup
{
public
Dictionary
<
int
,
List
<
PosInfo
>>
DRAWER
=
new
Dictionary
<
int
,
List
<
PosInfo
>>();
}
}
source/Common/Setting_Init.cs
查看文件 @
119952f
...
...
@@ -119,5 +119,7 @@ namespace OnlineStore.Common
/// </summary>
public
static
string
DisSecurityAccess
=
"DisSecurityAccess"
;
public
static
string
HeightLimit
=
"HeightLimit"
;
public
static
bool
CycleMode
=
true
;
}
}
source/Common/packages.config
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"log4net"
version
=
"2.0.12"
targetFramework
=
"net40"
requireReinstallation
=
"true"
/>
<
package
id
=
"Obfuscar"
version
=
"2.2.40"
targetFramework
=
"net48"
developmentDependency
=
"true"
/>
</
packages
>
\ No newline at end of file
source/ConfigHelper/ConfigHelper/ConfigHelper.csproj
查看文件 @
119952f
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\Obfuscar.2.2.40\build\obfuscar.props" Condition="Exists('..\..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...
...
@@ -13,6 +14,8 @@
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
...
...
@@ -78,5 +81,14 @@
<DependentUpon>AdvanceConfigForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Obfuscar.2.2.40\build\obfuscar.props'))" />
</Target>
</Project>
\ No newline at end of file
source/ConfigHelper/ConfigHelper/packages.config
0 → 100644
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Obfuscar"
version
=
"2.2.40"
targetFramework
=
"net48"
developmentDependency
=
"true"
/>
</
packages
>
\ No newline at end of file
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
119952f
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Obfuscar.2.2.40\build\obfuscar.props" Condition="Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...
...
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
...
...
@@ -90,10 +93,14 @@
<Compile Include="storeBean\boxBean\BoxEquip_ConnectServerTimer.cs" />
<Compile Include="storeBean\boxBean\AutoInoutInfo.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute_Partial.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_OutExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_AutoFindPos.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_PosDebug.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_ServerPos.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_ShelfPos.cs" />
<Compile Include="storeBean\boxBean\EyemLibDemo.cs" />
<Compile Include="storeBean\boxBean\GetMovePFromServer.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" />
<Compile Include="storeBean\boxBean\MoveAxisDebug\BoxEquip_MoveAxisDebug.cs" />
...
...
@@ -107,6 +114,7 @@
<Compile Include="storeBean\inputBean\InputEquip_InStore.cs" />
<Compile Include="storeBean\boxBean\BoxEquip.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_Partial.cs" />
<Compile Include="storeBean\inputBean\InputEquip_ServerCommunication.cs" />
<Compile Include="storeBean\XLRStoreBean.cs" />
<Compile Include="baan\AxisBean.cs" />
<Compile Include="baan\ClampJawBean.cs" />
...
...
@@ -239,6 +247,12 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Obfuscar.2.2.40\build\obfuscar.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
...
...
source/DeviceLibrary/app.config
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/></
startup
></
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/></
startup
></
configuration
>
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
119952f
...
...
@@ -121,6 +121,12 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
void
AbsMove
(
DeviceMoveInfo
MoveInfo
,
int
targetPosition
,
int
targetSpeed
)
{
if
(
IsInPosition
(
targetPosition
))
{
LogUtil
.
info
(
AxisName
+
$
" 已在目标点:{targetPosition}"
);
return
;
}
targetSpeed
=
(
int
)(
targetSpeed
*
ConfigHelper
.
Config
.
Get
<
double
>(
"SpeedRatio"
,
0.2
));
bool
rtn
;
if
(
MoveInfo
==
null
)
{
...
...
@@ -154,6 +160,7 @@ namespace OnlineStore.DeviceLibrary
string
state
=
AxisManager
.
instance
.
GetStatus
(
deviceName
,
axisNo
);
//打印轴状态
LogUtil
.
info
(
$
" {MoveInfo.SLog}{MoveInfo.Name}{axis.DisplayStr},目标位置[{targetPosition}]当前位置[{outCount}]规划位置[{targetCount}]轴状态[{state}]"
);
axis
.
CanErrorCountMax
=
1000
;
//**
if
(
errorCount
<=
axis
.
CanErrorCountMax
)
{
return
true
;
...
...
@@ -265,6 +272,7 @@ namespace OnlineStore.DeviceLibrary
}
public
bool
IsInPosition
(
int
targetP
,
int
canErrorMax
=
0
)
{
canErrorMax
=
1000
;
if
(
canErrorMax
<=
0
)
{
canErrorMax
=
Config
.
CanErrorCountMax
;
...
...
source/DeviceLibrary/baan/ClampJawBean.cs
查看文件 @
119952f
...
...
@@ -38,6 +38,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
" OpenPort 失败"
);
}
}
LogUtil
.
info
(
Name
+
" OpenPort 成功"
);
return
rmaxis
.
IsPortOpen
;
}
...
...
source/DeviceLibrary/deviceLibrary/IPCameraHelper.cs
查看文件 @
119952f
...
...
@@ -20,6 +20,7 @@ namespace OnlineStore.DeviceLibrary
}
public
static
void
StartRecord
(
string
camName
,
string
fileName
=
""
)
{
return
;
//**
Task
.
Factory
.
StartNew
(
delegate
{
//string url = $"{baseDir}/cam/startRecord?camName={camName}&filename={fileName}";
...
...
source/DeviceLibrary/manager/StoreManager.cs
查看文件 @
119952f
...
...
@@ -20,7 +20,7 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
UseBuzzer
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseBuzzer
).
Equals
(
1
);
private
static
bool
isInit
=
false
;
public
static
bool
IsConnectServer
=
!
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
).
Equals
(
""
);
public
static
event
EventHandler
<
bool
>
Loadfinishevent
;
public
static
XLRStoreBean
XLRStore
=
null
;
public
static
XLRStore_Config
Config
=
null
;
public
static
Dictionary
<
int
,
DeviceConfig
>
allConfigMap
=
null
;
...
...
@@ -86,6 +86,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
" 开始加载配置"
);
string
appPath
=
Application
.
StartupPath
;
//string appPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string
CID
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Line_CID
);
string
storeConfigPath
=
appPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
ConfigPath_XLRStore
);
...
...
@@ -111,6 +112,7 @@ namespace OnlineStore.DeviceLibrary
//CSVPositionReader<DrawerPosition>.AddCSVFile(drawConfigFile);
XLRStore
=
new
XLRStoreBean
(
Config
,
inputConfig
,
boxConfig
);
Loadfinishevent
?.
Invoke
(
null
,
true
);
LogUtil
.
info
(
"加载 完成!"
);
return
true
;
}
...
...
@@ -129,6 +131,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
public
static
bool
checkWatch
(
Stopwatch
watch
,
int
targetMs
,
bool
isStop
=
true
)
{
if
(!
watch
.
IsRunning
)
...
...
source/DeviceLibrary/manager/model/DeviceBase.cs
查看文件 @
119952f
...
...
@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
{
mainTimer
=
new
System
.
Timers
.
Timer
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Interval
=
300
;
mainTimer
.
Interval
=
50
;
//**
mainTimer
.
Elapsed
+=
mainTimer_Elapsed
;
mainTimer
.
AutoReset
=
true
;
...
...
source/DeviceLibrary/manager/model/DeviceStep.cs
查看文件 @
119952f
...
...
@@ -459,7 +459,54 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SI_20_ToStandby
,
#
endregion
#
region
两侧同时进行取料
SIB_00_StartInstore
,
/// <summary>
///料仓入库:料斗拉取进出轴先运动到P1
/// </summary>
SIB_01_PullAxis_Ready
,
/// <summary>
///料仓入库:未在安全位置,行走机构先运动到P1
/// </summary>
SIB_01_MoveAxis_Ready
,
/// <summary>
///料仓入库:移栽升降轴到上暂存区取料低点P3/P9
/// </summary>
SIB_01_Pull_Updown_ToPosition
,
/// <summary>
/// 料仓入库:到料盘暂存区
/// 1. 行走机构到P2(进出料机构取放点)
/// 2. 移栽升降轴到P3(A上暂存区取料低点)
/// 3. A/B面移栽压紧轴到P2(压紧前点)
/// 4. A面移栽旋转轴到P2(进出料暂存区取放料水平点),同时检测X02=1
/// 或者 B面移栽旋转轴到P2(进出料暂存区取放料水平点),同时检测X03=1
/// </summary>
SIB_02_ToBufferArea
,
/// <summary>
/// 料仓入库:确保暂存区有料盘
/// 如果无料盘则报警
/// </summary>
SIB_03_VerifyBufferState
,
/// <summary>
/// 料仓入库:A/B面移栽X轴到P2(A/B进出料暂存区取放点)
/// </summary>
SIB_04_InOutToBuff
,
/// <summary>
/// 料仓入库:取料盘
/// 1. 移栽升降轴到P2(A上暂存区取料高点)
/// 2. A/B面移栽压紧轴到P3压紧点
/// </summary>
SIB_05_GetReel
,
/// <summary>
/// 料仓入库:A/B面移栽X轴到P1
/// </summary>
SIB_06_InOutBackToP1FromBuff
,
/// <summary>
/// 料仓入库:清除缓存
/// </summary>
SIB_06_ClearBuffInfo
,
#
endregion
#
region
存储机构自动对位功能
400
开始
/// <summary>
/// 存储机构自动对位:开始对位
...
...
source/DeviceLibrary/manager/model/InOutParam.cs
查看文件 @
119952f
...
...
@@ -58,6 +58,8 @@ namespace OnlineStore.DeviceLibrary
/// 0=未知,1=A侧料串,2=B侧料串
/// </summary>
public
int
ShelfType
{
get
;
set
;
}
=
0
;
public
InOutPosInfo
AOutPosInfo
{
get
;
set
;
}
=
null
;
public
InOutPosInfo
BOutPosInfo
{
get
;
set
;
}
=
null
;
}
/// <summary>
/// 出入库料盘信息
...
...
@@ -264,17 +266,17 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"GetPositon["
+
posId
+
"] =null,没有库位不能执行出入库"
);
}
PullAxis_Inout_P2_P4
=
position
.
PullAxis_Inout_P2_P4
;
PullAxis_Inout_P3_P5
=
position
.
PullAxis_Inout_P3_P5
;
PullAxis_Updown_P2
=
position
.
PullAxis_Updown_P2
;
PullAxis_Updown_P3
=
position
.
PullAxis_Updown_P3
;
PullAxis_Updown_P4
=
position
.
PullAxis_Updown_P4
;
Updown_P6_P12
=
position
.
Updown_P6_P12
;
Updown_P7_P13
=
position
.
Updown_P7_P13
;
XAxis_AB_P3
=
position
.
XAxis_AB_P3
;
ComAxis_AB_P2
=
position
.
ComAxis_AB_P2
;
ComAxis_AB_P3
=
position
.
ComAxis_AB_P3
;
MoveAxis_P3
=
position
.
MoveAxis_P3
;
PullAxis_Inout_P2_P4
=
position
.
PullAxis_Inout_P2_P4
;
PullAxis_Inout_P3_P5
=
position
.
PullAxis_Inout_P3_P5
;
PullAxis_Updown_P2
=
position
.
PullAxis_Updown_P2
;
PullAxis_Updown_P3
=
position
.
PullAxis_Updown_P3
;
PullAxis_Updown_P4
=
position
.
PullAxis_Updown_P4
;
Updown_P6_P12
=
position
.
Updown_P6_P12
;
Updown_P7_P13
=
position
.
Updown_P7_P13
;
XAxis_AB_P3
=
position
.
XAxis_AB_P3
;
ComAxis_AB_P2
=
position
.
ComAxis_AB_P2
;
ComAxis_AB_P3
=
position
.
ComAxis_AB_P3
;
MoveAxis_P3
=
position
.
MoveAxis_P3
;
}
/// <summary>
...
...
@@ -282,31 +284,31 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
void
LoadStaticPos
(
BoxEquip_Config
equip_Config
)
{
MoveAxis_P1
=
equip_Config
.
MoveAxis_P1
;
MoveAxis_P2
=
equip_Config
.
MoveAxis_P2
;
PullAxis_Inout_P1
=
equip_Config
.
PullAxis_Inout_P1
;
Updown_P1
=
equip_Config
.
Updown_P1
;
Updown_P2
=
equip_Config
.
Updown_P2
;
Updown_P3
=
equip_Config
.
Updown_P3
;
Updown_P4
=
equip_Config
.
Updown_P4
;
Updown_P5
=
equip_Config
.
Updown_P5
;
Updown_P8
=
equip_Config
.
Updown_P8
;
Updown_P9
=
equip_Config
.
Updown_P9
;
Updown_P10
=
equip_Config
.
Updown_P10
;
Updown_P11
=
equip_Config
.
Updown_P11
;
PullAxis_Updown_P1
=
equip_Config
.
PullAxis_Updown_P1
;
XAxis_A_P1
=
equip_Config
.
XAxis_A_P1
;
XAxis_A_P2
=
equip_Config
.
XAxis_A_P2
;
MiddleAxis_A_P1
=
equip_Config
.
MiddleAxis_A_P1
;
MiddleAxis_A_P2
=
equip_Config
.
MiddleAxis_A_P2
;
MiddleAxis_A_P3
=
equip_Config
.
MiddleAxis_A_P3
;
ComAxis_A_P1
=
equip_Config
.
ComAxis_A_P1
;
XAxis_B_P1
=
equip_Config
.
XAxis_B_P1
;
XAxis_B_P2
=
equip_Config
.
XAxis_B_P2
;
MiddleAxis_B_P1
=
equip_Config
.
MiddleAxis_B_P1
;
MiddleAxis_B_P2
=
equip_Config
.
MiddleAxis_B_P2
;
MiddleAxis_B_P3
=
equip_Config
.
MiddleAxis_B_P3
;
ComAxis_B_P1
=
equip_Config
.
ComAxis_B_P1
;
MoveAxis_P1
=
equip_Config
.
MoveAxis_P1
;
MoveAxis_P2
=
equip_Config
.
MoveAxis_P2
;
PullAxis_Inout_P1
=
equip_Config
.
PullAxis_Inout_P1
;
Updown_P1
=
equip_Config
.
Updown_P1
;
Updown_P2
=
equip_Config
.
Updown_P2
;
Updown_P3
=
equip_Config
.
Updown_P3
;
Updown_P4
=
equip_Config
.
Updown_P4
;
Updown_P5
=
equip_Config
.
Updown_P5
;
Updown_P8
=
equip_Config
.
Updown_P8
;
Updown_P9
=
equip_Config
.
Updown_P9
;
Updown_P10
=
equip_Config
.
Updown_P10
;
Updown_P11
=
equip_Config
.
Updown_P11
;
PullAxis_Updown_P1
=
equip_Config
.
PullAxis_Updown_P1
;
XAxis_A_P1
=
equip_Config
.
XAxis_A_P1
;
XAxis_A_P2
=
equip_Config
.
XAxis_A_P2
;
MiddleAxis_A_P1
=
equip_Config
.
MiddleAxis_A_P1
;
MiddleAxis_A_P2
=
equip_Config
.
MiddleAxis_A_P2
;
MiddleAxis_A_P3
=
equip_Config
.
MiddleAxis_A_P3
;
ComAxis_A_P1
=
equip_Config
.
ComAxis_A_P1
;
XAxis_B_P1
=
equip_Config
.
XAxis_B_P1
;
XAxis_B_P2
=
equip_Config
.
XAxis_B_P2
;
MiddleAxis_B_P1
=
equip_Config
.
MiddleAxis_B_P1
;
MiddleAxis_B_P2
=
equip_Config
.
MiddleAxis_B_P2
;
MiddleAxis_B_P3
=
equip_Config
.
MiddleAxis_B_P3
;
ComAxis_B_P1
=
equip_Config
.
ComAxis_B_P1
;
}
#
region
固定轴移动点位信息
/// <summary>
...
...
source/DeviceLibrary/packages.config
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"log4net"
version
=
"2.0.12"
targetFramework
=
"net461"
/>
<
package
id
=
"Obfuscar"
version
=
"2.2.40"
targetFramework
=
"net48"
developmentDependency
=
"true"
/>
</
packages
>
\ No newline at end of file
source/DeviceLibrary/storeBean/EquipBase.cs
查看文件 @
119952f
...
...
@@ -493,7 +493,7 @@ namespace OnlineStore.DeviceLibrary
string
msg
=
""
;
int
tLength
=
15
;
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
" "
+
LastAlarmTime
.
ToLongTimeString
()
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
;
//**
+ " " + LastAlarmTime.ToLongTimeString() + "\n";
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS :"
+
MoveInfo
.
MoveStep
+
"\n"
;
return
msg
;
...
...
@@ -525,6 +525,7 @@ namespace OnlineStore.DeviceLibrary
CloseLed
();
return
;
}
return
;
//**
bool
isNeedAlarmLed
=
false
;
bool
isInOut
=
false
;
bool
yellowMove
=
false
;
...
...
source/DeviceLibrary/storeBean/XLRStoreBean.cs
查看文件 @
119952f
...
...
@@ -26,7 +26,6 @@ namespace OnlineStore.DeviceLibrary
public
InputEquip
inputEquip
;
public
BoxEquip
boxEquip
;
public
Dictionary
<
int
,
EquipBase
>
equipsMap
=
new
Dictionary
<
int
,
EquipBase
>();
public
XLRStore_Config
Config
=
null
;
private
bool
canStart
=
false
;
//public SQLite sQLite = null;
...
...
@@ -247,7 +246,7 @@ namespace OnlineStore.DeviceLibrary
{
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
mainTimer
.
Interval
=
300
;
mainTimer
.
Interval
=
100
;
//**
maxSeconds
=
3
;
AgvClient
.
SetCancelState
(
AgvClient
.
CurrCancelState
);
LogUtil
.
info
(
Name
+
"复位完成 ["
+
FormUtil
.
GetSpanStr
(
span
)
+
"]"
);
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip.cs
查看文件 @
119952f
...
...
@@ -202,6 +202,7 @@ namespace OnlineStore.DeviceLibrary
object
locObj
=
new
object
();
void
logColumnSig
()
{
return
;
//**
if
(
Monitor
.
TryEnter
(
locObj
))
{
try
...
...
@@ -389,6 +390,9 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfo
.
EndMove
();
return
;
switch
(
MoveInfo
.
MoveStep
)
{
//回零
...
...
@@ -743,7 +747,7 @@ namespace OnlineStore.DeviceLibrary
private
DateTime
errUpperB
=
DateTime
.
Now
;
private
DateTime
errUnderA
=
DateTime
.
Now
;
private
DateTime
errUnderB
=
DateTime
.
Now
;
int
SigLastTime
=
2
;
//5秒
int
SigLastTime
=
10
;
//5秒
protected
override
void
OnTimerProcess
()
{
if
(!
runStatus
.
Equals
(
RunStatus
.
Runing
))
...
...
@@ -794,11 +798,22 @@ namespace OnlineStore.DeviceLibrary
ClearSpecifiedAlarm
(
"B出料下暂存区有料盘,但信号未亮"
);
errUnderB
=
DateTime
.
Now
;
}
if
(
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
)
&&
BufferDataManager
.
AInStoreInfo
!=
null
&&
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
)
&&
BufferDataManager
.
BInStoreInfo
!=
null
&&
(
BufferDataManager
.
AInStoreInfo
.
PlateW
==
BufferDataManager
.
BInStoreInfo
.
PlateW
&&
BufferDataManager
.
AInStoreInfo
.
PlateH
==
BufferDataManager
.
BInStoreInfo
.
PlateH
))
{
//**StartInstore(new InOutParam() { PosInfo = BufferDataManager.AInStoreInfo, PosInfoBack = BufferDataManager.BInStoreInfo });
return
;
}
//检测A上暂存区是否有料盘
if
(
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
timeSpanA
.
TotalSeconds
>=
SigLastTime
)
StartInstore
(
new
InOutParam
(
BufferDataManager
.
AInStoreInfo
));
//**
if (timeSpanA.TotalSeconds >= SigLastTime)
//**
StartInstore(new InOutParam(BufferDataManager.AInStoreInfo));
}
else
{
...
...
@@ -808,8 +823,8 @@ namespace OnlineStore.DeviceLibrary
//检测B上暂存区是否有料盘
if
(
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
timeSpanB
.
TotalSeconds
>=
SigLastTime
)
StartInstore
(
new
InOutParam
(
BufferDataManager
.
BInStoreInfo
));
//**
if (timeSpanB.TotalSeconds >= SigLastTime)
//**
StartInstore(new InOutParam(BufferDataManager.BInStoreInfo));
}
else
{
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
查看文件 @
119952f
...
...
@@ -66,6 +66,7 @@ namespace OnlineStore.DeviceLibrary
public
const
string
boxBCamName
=
"box_B"
;
public
void
StartRecord
(
string
fileName
)
{
return
;
//**
StartBoxARecord
(
fileName
);
StartBoxBRecord
(
fileName
);
}
...
...
@@ -87,6 +88,7 @@ namespace OnlineStore.DeviceLibrary
}
public
void
StopRecord
()
{
return
;
//**
StopBoxARecord
();
StopBoxBRecord
();
}
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ConnectServerTimer.cs
查看文件 @
119952f
...
...
@@ -16,6 +16,7 @@ namespace OnlineStore.DeviceLibrary
public
partial
class
BoxEquip
{
private
System
.
Timers
.
Timer
serverConnectTimer
;
public
bool
IsServerConnected
=
false
;
public
void
InitConnectServerTimer
()
{
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
...
...
@@ -24,19 +25,24 @@ namespace OnlineStore.DeviceLibrary
serverConnectTimer
.
Enabled
=
false
;
serverConnectTimer
.
Elapsed
+=
server_connect_timer_Tick
;
}
/// <summary>
/// 反馈状态
/// </summary>
/// <param name="posid"></param>
/// <param name="storeStatus"></param>
public
void
SendStoreState
(
string
posid
,
DeviceStatus
storeStatus
)
{
Operation
operation
=
getLineBoxStatus
();
if
(!
string
.
IsNullOrEmpty
(
posid
))
{
operation
.
boxStatus
[
1
].
data
[
ParamDefine
.
posId
]
=
posid
;
}
LogUtil
.
info
(
$
"SendStoreState,posid:{posid}, storeStatus:{storeStatus}"
);
operation
.
boxStatus
[
1
].
status
=
(
int
)
storeStatus
;
//
Operation operation = getLineBoxStatus();
//
if (!string.IsNullOrEmpty(posid))
//
{
//
operation.boxStatus[1].data[ParamDefine.posId] = posid;
//
}
//
LogUtil.info($"SendStoreState,posid:{posid}, storeStatus:{storeStatus}");
//
operation.boxStatus[1].status = (int)storeStatus;
LogUtil
.
info
(
JsonHelper
.
SerializeObject
(
operation
));
//
LogUtil.info(JsonHelper.SerializeObject(operation));
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
operation
);
//
Operation resultOperation = HttpHelper.PostOperation(SServerManager.GetPostApi(server), operation);
}
internal
void
SetConnectServerTimer
(
bool
open
)
...
...
@@ -62,18 +68,12 @@ namespace OnlineStore.DeviceLibrary
lastConTime
=
DateTime
.
Now
;
try
{
// humBean.HumidityProcess(this);
//if (IsDebug)
//{
// if (StoreManager.IsConnectServer && (runStatus.Equals(RunStatus.Runing)|| runStatus.Equals(RunStatus.Busy)))
// {
// //SendLineStatus();
// }
//}
//else
{
if
(
StoreManager
.
IsConnectServer
&&
(
runStatus
.
Equals
(
RunStatus
.
Runing
)||
runStatus
.
Equals
(
RunStatus
.
Busy
)))
{
SendLineStatus
();
}
}
}
catch
(
Exception
ex
)
{
...
...
@@ -185,32 +185,32 @@ namespace OnlineStore.DeviceLibrary
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
lineOperation
);
//LogUtil.info("resultOperation="+ JsonHelper.SerializeObject(resultOperation));
//发送状态信息到服务器
if
(
resultOperation
==
null
||
(
resultOperation
.
op
<=
0
))
{
//判断服务端是否返回出库操作
return
;
}
if
(
resultOperation
.
op
.
Equals
(
1
))
{
//ReviceInStoreProcess("", resultOperation);
}
else
if
(
resultOperation
.
op
.
Equals
(
2
))
{
ReviceOutStoreProcess
(
resultOperation
);
}
else
if
(
resultOperation
.
op
.
Equals
(
5
))
{
humBean
.
ProcessHumidityCMD
(
resultOperation
);
}
else
{
LogUtil
.
error
(
"收到服务器命令:op="
+
resultOperation
.
op
+
",未找到对应处理"
);
}
TimeSpan
span
=
DateTime
.
Now
-
time
;
if
(
span
.
TotalMilliseconds
>
10
)
{
LogUtil
.
info
(
Name
+
"执行TimerProcess 共处理了【"
+
span
.
TotalMilliseconds
+
"】毫秒"
);
}
//
if (resultOperation == null || (resultOperation.op <= 0))
//
{
//
//判断服务端是否返回出库操作
//
return;
//
}
//
if (resultOperation.op.Equals(1))
//
{
//
//ReviceInStoreProcess("", resultOperation);
//
}
//
else if (resultOperation.op.Equals(2))
//
{
//
ReviceOutStoreProcess(resultOperation);
//
}
//
else if (resultOperation.op.Equals(5))
//
{
//
humBean.ProcessHumidityCMD(resultOperation);
//
}
//
else
//
{
//
LogUtil.error("收到服务器命令:op=" + resultOperation.op + ",未找到对应处理");
//
}
//
TimeSpan span = DateTime.Now - time;
//
if (span.TotalMilliseconds > 10)
//
{
//
LogUtil.info(Name + "执行TimerProcess 共处理了【" + span.TotalMilliseconds + "】毫秒");
//
}
}
public
bool
ReviceInStoreCMD
(
string
posId
,
int
plateH
,
int
plateW
,
string
message
)
{
...
...
@@ -228,39 +228,39 @@ namespace OnlineStore.DeviceLibrary
operation
.
op
=
1
;
operation
.
data
=
new
Dictionary
<
string
,
string
>()
{
{
"code"
,
message
},
{
"boxId"
,
this
.
DeviceID
.
ToString
()
}
};
operation
.
data
.
Add
(
"inPos"
,
posId
);
for
(
int
i
=
1
;
i
<=
5
;
i
++)
{
bool
timeOut
=
false
;
Operation
resultOperation
=
HttpHelper
.
PostOperation
(
SServerManager
.
GetPostApi
(
server
),
operation
);
LogUtil
.
info
(
$
"入库验证请求信息:【{JsonHelper.SerializeObject(operation)}】【{JsonHelper.SerializeObject(resultOperation)}】"
);
if
(
timeOut
)
{
LogUtil
.
error
(
logName
+
" 第"
+
i
+
"次发送超时 "
);
continue
;
}
if
(
resultOperation
==
null
)
{
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
LogUtil
.
error
(
logName
+
" 没有收到服务器反馈 "
);
}
else
if
(!
string
.
IsNullOrEmpty
(
resultOperation
.
msg
))
{
//如果有提示消息,直接显示提示
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
resultOperation
.
msg
);
continue
;
}
else
if
(
resultOperation
.
op
.
Equals
(
1
)
&&
operation
.
seq
.
Equals
(
resultOperation
.
seq
))
{
LogUtil
.
info
(
logName
+
" 成功"
+
$
"【{JsonHelper.SerializeObject(resultOperation)}】"
);
return
true
;
}
else
{
LogUtil
.
info
(
logName
+
"服务器反馈 :"
+
JsonHelper
.
SerializeObject
(
resultOperation
));
continue
;
}
break
;
}
//
for (int i = 1; i <= 5; i++)
//
{
//
bool timeOut = false;
//
Operation resultOperation = HttpHelper.PostOperation(SServerManager.GetPostApi(server), operation);
//
LogUtil.info($"入库验证请求信息:【{JsonHelper.SerializeObject(operation)}】【{JsonHelper.SerializeObject(resultOperation)}】");
//
if (timeOut)
//
{
//
LogUtil.error(logName + " 第" + i + "次发送超时 ");
//
continue;
//
}
//
if (resultOperation == null)
//
{
//
// CodeMsg = "二维码【" + message + "】没有收到服务器反馈";
//
LogUtil.error(logName + " 没有收到服务器反馈 ");
//
}
//
else if (!string.IsNullOrEmpty(resultOperation.msg))
//
{
//
//如果有提示消息,直接显示提示
//
LogUtil.info(logName + "服务器反馈 :" + resultOperation.msg);
//
continue;
//
}
//
else if (resultOperation.op.Equals(1) && operation.seq.Equals(resultOperation.seq))
//
{
//
LogUtil.info(logName + " 成功" + $"【{JsonHelper.SerializeObject(resultOperation)}】");
//
return true;
//
}
//
else
//
{
//
LogUtil.info(logName + "服务器反馈 :" + JsonHelper.SerializeObject(resultOperation));
//
continue;
//
}
//
break;
//
}
}
catch
(
Exception
ex
)
{
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute.cs
查看文件 @
119952f
using
Cod
eLibrary
;
using
Devic
eLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms.VisualStyles
;
namespace
OnlineStore.DeviceLibrary
{
partial
class
BoxEquip
{
public
event
EventHandler
<
double
>
cttime
;
#
region
入库
/// <summary>
/// 检查另一个料叉上是否有料,有料则开始入库
...
...
@@ -165,45 +158,45 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
private
DateTime
startTime
;
bool
both
=
false
;
private
void
InstoreExecute
()
{
switch
(
MoveInfo
.
MoveStep
)
{
case
StepEnum
.
SI_00_StartInstore
:
PullAxisToP1
(
"入库"
);
break
;
case
StepEnum
.
SI_01_PullAxis_Ready
:
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_01_Pull_Updown_ToPosition
);
if
(!
IsMoveAxisInSafePos
())
startTime
=
DateTime
.
Now
;
if
(
PullAxis_Inout
.
GetAclPosition
()
<
197633
+
1200
&&
PullAxis_Inout
.
GetAclPosition
()
>
-
220714
-
1200
)
{
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取轴不干涉"
);
}
else
{
MoveAxisToP1
();
LogInfo
(
$
"入库
行走机构不在安全位置,先到安全位置={Config.MoveAxis_SafePos}。当前位置{MoveAxis.GetAclPosition()}
"
);
PullAxis_Inout_To_Cam
();
LogInfo
(
$
"入库
{MoveInfo.SLog}:抽屉拉取轴干涉
"
);
}
break
;
case
StepEnum
.
SI_01_Pull_Updown_ToPosition
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_0
1_MoveAxis_Ready
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_0
3_VerifyBufferState
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:到暂存区入料口,"
+
$
"行走机构到待机点P1,料屉升降轴到P1点,移栽升降轴到上暂存区取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1,料屉升降轴到P1点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxisTo
P1
();
MoveAxisTo
SafePos
();
PullAxis_UpdownToP1
();
UpdownAxisTo_P3_P9
();
ComAxis_To_P2
();
MiddleAxis_To_P2
();
XAxis_To_P1
();
break
;
case
StepEnum
.
SI_01_MoveAxis_Ready
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_02_ToBufferArea
);
startTime
=
DateTime
.
Now
;
break
;
case
StepEnum
.
SI_02_ToBufferArea
:
if
(!
InDoorCheck
(
MoveInfo
.
MoveParam
))
if
(
true
||
!
InDoorCheck
(
MoveInfo
.
MoveParam
))
{
SetWarnMsg
(
$
"入库 {MoveInfo.SLog}:入口料盘无入库信息[barcode={MoveInfo.MoveParam.PosInfo.barcode},PosSide={MoveInfo.MoveParam.PosInfo.GetPosSide()}], 任务取消"
);
if
(
MoveInfo
.
MoveParam
.
PosInfoBack
==
null
)
{
LogInfo
(
$
"入库 {MoveInfo.SLog}:入口料盘因无入库信息且AB面料叉无料,结束入库"
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
//SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
}
else
if
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
)
//料叉有料,忽略当前入料口,直接入库
...
...
@@ -224,7 +217,7 @@ namespace OnlineStore.DeviceLibrary
}
break
;
case
StepEnum
.
SI_03_VerifyBufferState
:
if
(!
CheckInputMiddleAxisInBuff
())
if
(
true
||
!
CheckInputMiddleAxisInBuff
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_04_InOutToBuff
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:移栽X轴到暂存区取放点P2,行走机构到取放点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
...
@@ -245,7 +238,8 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SI_05_GetReel
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_06_InOutBackToP1FromBuff
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:移栽X轴到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
XAxis_To_P1
();
XAxis_To_P3
();
MoveAxisToSafePos
();
break
;
case
StepEnum
.
SI_06_InOutBackToP1FromBuff
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_06_ClearBuffInfo
);
...
...
@@ -256,33 +250,8 @@ namespace OnlineStore.DeviceLibrary
case
StepEnum
.
SI_06_ClearBuffInfo
:
//存储当前料叉信息
if
(
MoveInfo
.
MoveParam
.
PosInfoBack
==
null
)
{
if
(
CheckOtherSideIsThereReel
(
out
InOutPosInfo
inOutPosInfo
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_01_MoveAxis_Ready
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:取另一面暂存区的料,移栽升降轴到上暂存区取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1,料屉升降轴到P1点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveInfo
.
MoveParam
.
PosInfoBack
=
MoveInfo
.
MoveParam
.
PosInfo
.
ToCopy
();
MoveInfo
.
MoveParam
.
PosInfo
=
inOutPosInfo
;
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
inOutPosInfo
.
PosId
);
UpdownAxisTo_P3_P9
();
ComAxis_To_P2
();
MiddleAxis_To_P2
();
XAxis_To_P1
();
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
//MiddleAxis_To_P3();
LogInfo
(
$
"入库 {MoveInfo.SLog}:另一面无料,直接入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//移栽旋转轴到料屉库位垂直取放料点P3
}
}
else
//另一个料叉已有料,进行入库
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
//MiddleAxis_To_P3();
LogInfo
(
$
"入库 {MoveInfo.SLog}:另一个料叉已有料,进行入库[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//移栽旋转轴到料屉库位垂直取放料点P3
}
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:对盘进行入库"
);
//移栽旋转轴到料屉库位垂直取放料点P3
break
;
//去库位点
...
...
@@ -299,7 +268,7 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
break
;
case
StepEnum
.
SI_08_ToPosition
:
if
(
CamCheckReelPosition
())
//
if (CamCheckReelPosition())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_09_ToTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:到抽屉提取点,料斗拉取进出轴到料屉提取点P2/P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
...
@@ -315,27 +284,37 @@ namespace OnlineStore.DeviceLibrary
PullAxis_UpdownToHighP3
();
break
;
case
StepEnum
.
SI_10_LiftTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_11_PullTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:拉抽屉到库位点,料斗拉取进出轴到料屉库位点P3/P5,同时检测{trayAColumns[GetPosColumn()]}=0[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P3_P5
();
if
(
CheckASide
())
{
if
(!
GetShieldState
(
sheidAColmns
[
GetPosColumn
()]))
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayAColumns
[
GetPosColumn
()],
IO_VALUE
.
LOW
));
}
else
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
==
"OUTSTEST"
)
{
if
(!
GetShieldState
(
sheidBColmns
[
GetPosColumn
()]))
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayBColumns
[
GetPosColumn
()],
IO_VALUE
.
LOW
));
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_14_ReleaseCompress
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:无入库物料"
);
//MoveInfo.MoveParam.PosInfo.PosId = "XX";
return
;
}
SaveSpecifiedImage
();
break
;
case
StepEnum
.
SI_11_PullTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_12_DropTrayToPos
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToMiddleP2
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayRows
[
GetPosRow
()],
IO_VALUE
.
HIGH
));
LogInfo
(
$
"入库 {MoveInfo.SLog}:拉抽屉到库位点,料斗拉取进出轴到料屉库位点P3/P5,同时检测{trayAColumns[GetPosColumn()]}=0[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P3_P5
();
//if (CheckASide())
//{
// if (!GetShieldState(sheidAColmns[GetPosColumn()]))
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayAColumns[GetPosColumn()], IO_VALUE.LOW));
//}
//else
//{
// if (!GetShieldState(sheidBColmns[GetPosColumn()]))
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.LOW));
//}
SaveSpecifiedImage
();
break
;
//case StepEnum.SI_11_PullTray:
// MoveInfo.NextMoveStep(StepEnum.SI_12_DropTrayToPos);
// LogInfo($"入库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// //PullAxis_UpdownToMiddleP2();
// //MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayRows[GetPosRow()], IO_VALUE.HIGH));
// break;
case
StepEnum
.
SI_12_DropTrayToPos
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_13_GetReel
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
...
@@ -350,75 +329,146 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_15_UpDownBack
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:叉子从库位返回,[{MoveInfo.MoveParam.PosInfo.ToStr()}]入库完成,移栽升降轴到料屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//入库完成
SetBoxStatus
(
DeviceStatus
.
InStoreEnd
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:数据记录:{MoveInfo.MoveParam.PosInfo.ToStr()}"
);
PosIDManger
.
UpdatePosinfo
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
true
);
//SetBoxStatus(DeviceStatus.InStoreEnd, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
executeTime
=
(
DateTime
.
Now
-
startTime
).
TotalSeconds
.
ToString
(
"f2"
);
if
(
CheckASide
())
{
if
(
MoveInfo
.
MoveParam
.
AOutPosInfo
!=
null
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_05_PullTray
);
MoveInfo
.
MoveParam
.
PosInfo
=
MoveInfo
.
MoveParam
.
AOutPosInfo
.
ToCopy
();
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:A面有出库物料信息:{MoveInfo.MoveParam.PosInfo.ToStr()}"
);
//MoveInfo.MoveParam.AOutPosInfo = null;
}
}
else
{
if
(
MoveInfo
.
MoveParam
.
BOutPosInfo
!=
null
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_05_PullTray
);
MoveInfo
.
MoveParam
.
PosInfo
=
MoveInfo
.
MoveParam
.
BOutPosInfo
.
ToCopy
();
//
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:B面有出库物料信息:{MoveInfo.MoveParam.PosInfo.ToStr()}"
);
//MoveInfo.MoveParam.BOutPosInfo = null;
}
}
UpdownAxisTo_P6_P12
();
break
;
#
region
同步出库流程
,
取料
case
StepEnum
.
SO_05_PullTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_06_DropTrayToPos
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:将抽屉降到库位提取点,料斗拉取升降轴到P2料屉提取水平点P2,到位后检测{trayRows[GetPosRow()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
//PullAxis_UpdownToMiddleP2();
PullAxis_Inout_To_P3_P5
();
ComAxis_To_P2
();
XAxis_To_P3
();
MiddleAxis_To_P3
();
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayRows[GetPosRow()], IO_VALUE.HIGH));
//SetBoxStatus(DeviceStatus.OutStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
break
;
case
StepEnum
.
SO_06_DropTrayToPos
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_07_GetReel
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:进入库位中,移栽升降轴到料屉取放点P7/P13[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
UpdownAxisToP7_P13
();
break
;
case
StepEnum
.
SO_07_GetReel
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_08_StartCompress
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:压紧轴开始缓慢夹取,移栽压紧轴到压紧点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
ComAxis_To_P3
();
break
;
case
StepEnum
.
SO_08_StartCompress
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_15_UpDownBack
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:叉子从库位返回,移栽升降轴到料屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
UpdownAxisTo_P6_P12
();
LogInfo
(
$
"出库 {MoveInfo.SLog}:数据记录:{MoveInfo.MoveParam.PosInfo.ToStr()}"
);
PosIDManger
.
UpdatePosinfo
(
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
false
);
break
;
//case StepEnum.SO_09_UpDownBack:
// MoveInfo.NextMoveStep(StepEnum.SI_15_UpDownBack);
// //SetBoxStatus(DeviceStatus.OutStoreBoxEnd, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
// break;
#
endregion
case
StepEnum
.
SI_15_UpDownBack
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_16_LiftTray
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:提升抽屉,料斗拉取升降轴到料屉提取高点P3[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToHighP3
();
PullAxis_UpdownToHighP3
(
needwait
:
true
);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime)
break
;
case
StepEnum
.
SI_16_LiftTray
:
//MoveInfo.NextMoveStep(StepEnum.SI_17_PushTray);
// LogInfo($"入库 {MoveInfo.SLog}:推到抽屉待机点采集图片,料斗拉取进出轴到P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
//PullAxis_Inout_To_P1();
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_18_PutTrayMiddle
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:推到抽屉提取点,料斗拉取进出轴到料屉提取点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P2_P4
();
MiddleAxis_To_P2
();
break
;
case
StepEnum
.
SI_17_PushTray
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_18_PutTrayMiddle
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:推到抽屉提取点,料斗拉取进出轴到料屉提取点P2/P4,移栽旋转轴到水平点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_Inout_To_P2_P4
();
MiddleAxis_To_P2
();
//Bitmap bitmap = AcqImage(CamPosSide(MoveInfo.MoveParam.PosInfo.PosId));
//bool rtn = MatchAndSaveImg(bitmap, $"{DateTime.Now.ToString("HHmmss")}");
//string res = rtn ? "OK" : "NG";
//LogInfo($"入库 {MoveInfo.SLog}:抓手检测结果:{res}");
//PullAxis_UpdownToMiddleP2();
//if (CheckASide())
//{
// LogInfo($"入库 {MoveInfo.SLog}:料斗拉取升降轴到料屉水平点P2,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// if (!GetShieldState(sheidAColmns[GetPosColumn()]))
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayAColumns[GetPosColumn()], IO_VALUE.HIGH));
//}
//else
//{
// LogInfo($"入库 {MoveInfo.SLog}:料斗拉取升降轴到料屉水平点P2,同时检测{trayBColumns[GetPosColumn()]} = 1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// if (!GetShieldState(sheidBColmns[GetPosColumn()]))
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH));
//}
//MiddleAxis_To_P2();
break
;
case
StepEnum
.
SI_18_PutTrayMiddle
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_1
8_PutTrayDown
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_1
9_InoutBack
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:放下料屉,料斗拉取升降轴到料屉提取低点P4[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
PullAxis_UpdownToLowP4
();
MiddleAxis_To_P2
(
needwait
:
false
);
break
;
case
StepEnum
.
SI_18_PutTrayDown
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_19_InoutBack
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:料斗拉取进出轴到拍照点,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
if
(
CheckASide
())
//case StepEnum.SI_18_PutTrayDown:
// MoveInfo.NextMoveStep(StepEnum.SI_19_InoutBack);
// LogInfo($"入库 {MoveInfo.SLog}:料斗拉取进出轴到拍照点,同时检测{trayAColumns[GetPosColumn()]}=1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
// //if (CheckASide())
// //{
// // if (!GetShieldState(sheidAColmns[GetPosColumn()]))
// // MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayAColumns[GetPosColumn()], IO_VALUE.HIGH));
// //}
// //else
// //{
// // if (!GetShieldState(sheidBColmns[GetPosColumn()]))
// // MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(trayBColumns[GetPosColumn()], IO_VALUE.HIGH));
// //}
// //
// //MoveInfo.WaitList.Clear();
// //SaveSpecifiedImage();
// break;
case
StepEnum
.
SI_19_InoutBack
:
if
(
MoveInfo
.
MoveParam
.
PosInfoBack
!=
null
)
{
if
(!
GetShieldState
(
sheidAColmns
[
GetPosColumn
()]))
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayAColumns
[
GetPosColumn
()],
IO_VALUE
.
HIGH
));
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
MoveInfo
.
MoveParam
.
PosInfo
=
MoveInfo
.
MoveParam
.
PosInfoBack
.
ToCopy
();
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
MoveInfo
.
MoveParam
.
PosInfoBack
=
null
;
LogInfo
(
$
"入库 {MoveInfo.SLog}:开始B面入库测试"
);
PullAxis_Inout_To_Cam
(
needswitch
:
true
);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
return
;
}
else
else
if
(
MoveInfo
.
MoveParam
.
AOutPosInfo
!=
null
||
MoveInfo
.
MoveParam
.
BOutPosInfo
!=
null
)
{
if
(!
GetShieldState
(
sheidBColmns
[
GetPosColumn
()]))
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
trayBColumns
[
GetPosColumn
()],
IO_VALUE
.
HIGH
));
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_15_ToBufferArea
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:开始同步出库测试"
);
PullAxis_Inout_To_Cam
();
return
;
}
PullAxis_Inout_To_Cam
();
SaveSpecifiedImage
();
break
;
case
StepEnum
.
SI_19_InoutBack
:
else
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
==
"STEST"
)
{
cttime
?.
BeginInvoke
(
null
,
(
DateTime
.
Now
-
startTime
).
TotalSeconds
,
null
,
null
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:没有可出库物料结束,时间:{(DateTime.Now - startTime).TotalSeconds}"
);
PullAxis_Inout_To_Cam
();
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
return
;
}
if
(!
CheckInStoreOtherSideInfo
())
{
if
(
InDoorSigCheck
())
if
(
MoveInfo
.
MoveParam
.
AOutPosInfo
!=
null
||
MoveInfo
.
MoveParam
.
BOutPosInfo
!=
null
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_15_ToBufferArea
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:开始同步出库测试"
);
}
else
if
(
InDoorSigCheck
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_20_ToStandby
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入料口有料,行走机构去待机点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
...
...
@@ -426,9 +476,10 @@ namespace OnlineStore.DeviceLibrary
}
else
{
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
//
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
StopRecord
();
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
}
...
...
@@ -438,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:从{MoveInfo.MoveParam.PosInfo.GetPosSide()}面切换到另一面入库[{MoveInfo.MoveParam.PosInfoBack.barcode}]"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo
.
MoveParam
.
PosInfo
=
MoveInfo
.
MoveParam
.
PosInfoBack
.
ToCopy
();
MoveInfo
.
MoveParam
.
MoveP
=
new
LineMoveP
(
Config
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
);
MoveInfo
.
MoveParam
.
PosInfoBack
=
null
;
...
...
@@ -447,12 +498,115 @@ namespace OnlineStore.DeviceLibrary
break
;
case
StepEnum
.
SI_20_ToStandby
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
var
posid
=
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
;
LogInfo
(
$
"入库 {MoveInfo.SLog}:入库结束[{MoveInfo.MoveParam.PosInfo.PosId}][耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
//停止记录
StopRecord
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
InStore
);
//var outp = new InOutParam();
////posid;
//StartOutstore(outp);
break
;
#
region
同步出库到缓存位
,
放到出库缓存位
case
StepEnum
.
SO_15_ToBufferArea
:
both
=
MoveInfo
.
MoveParam
.
AOutPosInfo
!=
null
&&
MoveInfo
.
MoveParam
.
BOutPosInfo
!=
null
;
if
(
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
))
{
SetWarnMsg
(
$
"出库 {MoveInfo.SLog}:出料口有其他料盘,无法放置料盘"
);
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_17_InOutToBuff
);
MoveAxisToSafePos
();
XAxis_To_P1
(
bothmove
:
both
);
PullAxis_UpdownToP1
();
UpdownAxisTo_P4_P10
();
MiddleAxis_To_P2
(
bothmove
:
both
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:出料口无料盘确认,开始放料[barcode={MoveInfo.MoveParam.PosInfo.barcode}][{MoveInfo.MoveParam.PosInfo.GetPosSide()}面] both:{both}"
);
}
break
;
case
StepEnum
.
SO_16_VerifyBufferState
:
if
(
UpdownAxis
.
IsInPosition
(
Config
.
Updown_P4
)
||
UpdownAxis
.
IsInPosition
(
Config
.
Updown_P10
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_17_InOutToBuff
);
XAxis_To_P2
(
bothmove
:
both
);
MoveAxisToP2
();
MoveAxisToSafePos
();
XAxis_To_P1
();
PullAxis_UpdownToP1
();
UpdownAxisTo_P4_P10
();
MiddleAxis_To_P2
(
bothmove
:
both
);
}
break
;
case
StepEnum
.
SO_17_InOutToBuff
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_18_ReleaseReel
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:移栽X轴到进出料暂存区取放点P2,行走机构到进出料机构取放点P2[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
XAxis_To_P2
(
bothmove
:
both
);
MoveAxisToP2
();
break
;
case
StepEnum
.
SO_18_ReleaseReel
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_18_PutReel
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:松开料盘,移栽压紧轴到压紧前点P2"
);
ComAxis_To_P2
(
bothmove
:
both
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:放料盘,移栽升降轴到下暂存区放料低点P5/P11"
);
UpdownAxisTo_P5_P11
();
break
;
case
StepEnum
.
SO_18_PutReel
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_19_InOutBackFromBuff
);
XAxis_To_P1
(
bothmove
:
both
);
MoveAxisToSafePos
();
LogInfo
(
$
"出库 {MoveInfo.SLog}:到待机电"
);
break
;
case
StepEnum
.
SO_19_InOutBackFromBuff
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_20_Finish
);
PullAxis_UpdownToP1
();
UpdownAxisTo_P3_P9
();
BothComAxis_To_P2
();
//停止记录
executeTime
=
(
DateTime
.
Now
-
startTime
).
TotalSeconds
.
ToString
(
"f2"
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}]出库完成[耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("
f2
")}秒],移栽X轴到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
cttime
?.
BeginInvoke
(
null
,
(
DateTime
.
Now
-
startTime
).
TotalSeconds
,
null
,
null
);
break
;
case
StepEnum
.
SO_20_Finish
:
//SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
StopRecord
();
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
AutoInout
.
InOutEndProcess
(
this
,
MoveType
.
OutStore
);
break
;
case
StepEnum
.
BOX_H001_Wait
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H002_PullAxis_UpdownToP3
);
if
(
PullAxis_Inout
.
GetAclPosition
()
<
197633
+
1200
&&
PullAxis_Inout
.
GetAclPosition
()
>
-
220714
-
1200
)
{
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取轴不干涉"
);
}
else
{
PullAxis_Inout_To_Cam
();
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取轴干涉"
);
}
break
;
case
StepEnum
.
BOX_H002_PullAxis_UpdownToP3
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
BOX_H003_1_InoutToP1
);
MoveAxisToSafePos
();
PullAxis_UpdownToP1
();
UpdownAxisTo_P3_P9
();
ComAxis_To_P2
();
MiddleAxis_To_P2
();
XAxis_To_P1
();
break
;
case
StepEnum
.
BOX_H003_1_InoutToP1
:
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
break
;
case
StepEnum
.
BOX_H004_PullAxis_UpdownToMiddle
:
break
;
case
StepEnum
.
BOX_H005_PullAxis_UpdownToLow
:
break
;
#
endregion
}
}
#
endregion
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_InExecute_Partial.cs
查看文件 @
119952f
using
CodeLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms.VisualStyles
;
namespace
OnlineStore.DeviceLibrary
{
...
...
@@ -23,7 +14,6 @@ namespace OnlineStore.DeviceLibrary
ComAxis_A
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P2
,
Config
.
ComAxis_FindPosSpeed
);
ComAxis_B
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P2
,
Config
.
ComAxis_FindPosSpeed
);
}
else
{
ComAxis_A
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P2
,
Config
.
ComAxis_A_P2_Speed
);
...
...
@@ -148,49 +138,37 @@ namespace OnlineStore.DeviceLibrary
switch
(
MoveInfo
.
MoveStep
)
{
case
StepEnum
.
SIB_00_StartInstore
:
PullAxisToP1
(
"入库"
);
break
;
case
StepEnum
.
SIB_01_PullAxis_Ready
:
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_01_Pull_Updown_ToPosition
);
if
(!
IsMoveAxisInSafePos
())
startTime
=
DateTime
.
Now
;
//PullAxisToP1("入库");
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_01_PullAxis_Ready
);
if
(
PullAxis_Inout
.
GetAclPosition
()
<
197633
+
1200
&&
PullAxis_Inout
.
GetAclPosition
()
>
-
220714
-
1200
)
{
MoveAxisToSafePos
();
LogInfo
(
$
"入库 {MoveInfo.SLog}:行走机构不在安全位置,先到安全位置={Config.MoveAxis_SafePos}。当前位置{MoveAxis.GetAclPosition()}"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取轴不干涉"
);
}
else
{
PullAxis_Inout_To_Cam
();
LogInfo
(
$
"入库 {MoveInfo.SLog}:抽屉拉取轴干涉"
);
}
break
;
case
StepEnum
.
SIB_01_Pull
_Updown_ToPosition
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_01_MoveAxis_Ready
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:到暂存区入料口,"
+
$
"行走机构到待机点P1,料斗升降轴到P1点,移栽升降轴到上暂存区入库取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1,料斗升降轴到P1点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxisTo
P1
();
case
StepEnum
.
SIB_01_Pull
Axis_Ready
:
//SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_03_VerifyBufferState
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:到暂存区入料口,"
+
$
"行走机构到待机点P1,料斗升降轴到P1点,移栽升降轴到上暂存区入库取料低点P3/P9,移栽压紧轴到压紧前点P2,移栽旋转轴到取放料水平点P2,移栽X轴到P1,料斗升降轴到P1点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"
);
MoveAxisTo
SafePos
();
PullAxis_UpdownToP1
();
UpdownAxisTo_P3_P9
();
BothComAxis_To_P2
();
BothMiddleAxis_To_P2
();
BothXAxis_To_P1
();
//BuffAreaInstoreDoor(true);
break
;
case
StepEnum
.
SIB_01_MoveAxis_Ready
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_02_ToBufferArea
);
startTime
=
DateTime
.
Now
;
break
;
case
StepEnum
.
SIB_02_ToBufferArea
:
if
(!
InDoorBothCheck
(
MoveInfo
.
MoveParam
))
{
SetWarnMsg
(
$
"入库 {MoveInfo.SLog}:AB入口料盘无入库信息, 任务取消"
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:AB入口料盘因无入库信息,结束入库"
);
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
MoveInfo
.
EndMove
();
}
else
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_03_VerifyBufferState
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:AB入料口入库信息确认,[barcode={MoveInfo.MoveParam.PosInfo.barcode},posId={MoveInfo.MoveParam.PosInfo.PosId}][barcode={MoveInfo.MoveParam.PosInfoBack.barcode},posId={MoveInfo.MoveParam.PosInfoBack.PosId}],开始取料"
);
}
PullAxis_Inout_To_Cam
(
needwait
:
false
);
//if (!IsMoveAxisInSafePos())
//{
// LogInfo($"入库 {MoveInfo.SLog}:行走机构不在安全位置,先到安全位置={Config.MoveAxis_SafePos}。当前位置{MoveAxis.GetAclPosition()}");
//}
break
;
case
StepEnum
.
SIB_03_VerifyBufferState
:
if
(!
CheckInputMiddleAxisInBuff
())
if
(
true
||
!
CheckInputMiddleAxisInBuff
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_04_InOutToBuff
);
LogInfo
(
$
"入库 {MoveInfo.SLog}:移栽X轴到暂存区取放点P2,行走机构到取放点P2"
);
...
...
@@ -214,7 +192,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
$
"入库 {MoveInfo.SLog}:移栽X轴到库位取放点P3,行走机构到待机点P1"
);
// XAxis_To_P1();
BothXAxis_To_P3
();
MoveAxisTo
P1
();
MoveAxisTo
SafePos
();
break
;
case
StepEnum
.
SIB_06_InOutBackToP1FromBuff
:
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_06_ClearBuffInfo
);
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_OutExecute.cs
查看文件 @
119952f
...
...
@@ -44,7 +44,7 @@ namespace OnlineStore.DeviceLibrary
break
;
case
StepEnum
.
SO_01_PullAxis_Ready
:
SetBoxStatus
(
DeviceStatus
.
OutStoreExecute
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
//
SetBoxStatus(DeviceStatus.OutStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_01_MoveAxis_Ready
);
if
(!
IsMoveAxisInSafePos
())
{
...
...
@@ -269,7 +269,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_18_PutReel
);
LogInfo
(
$
"出库 {MoveInfo.SLog}:放料盘,移栽升降轴到下暂存区放料低点P5/P11"
);
executeTime
=
(
DateTime
.
Now
-
startTime
).
TotalSeconds
.
ToString
(
"f2"
);
SetBoxStatus
(
DeviceStatus
.
OutStoreBoxEnd
,
RunStatus
.
Busy
,
MoveInfo
.
MoveParam
.
PosInfo
.
PosId
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
//
SetBoxStatus(DeviceStatus.OutStoreBoxEnd, RunStatus.Busy, MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode);
UpdownAxisTo_P5_P11
();
break
;
case
StepEnum
.
SO_18_PutReel
:
...
...
@@ -299,7 +299,7 @@ namespace OnlineStore.DeviceLibrary
}
break
;
case
StepEnum
.
SO_20_Finish
:
SetBoxStatus
(
DeviceStatus
.
StoreOnline
,
RunStatus
.
Runing
);
//
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
//停止记录
StopRecord
();
MoveInfo
.
EndMove
();
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Partial.cs
查看文件 @
119952f
...
...
@@ -246,21 +246,27 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料斗拉取进出轴到取像点
/// </summary>
private
void
PullAxis_Inout_To_Cam
(
bool
isdebugSpeed
=
false
)
private
void
PullAxis_Inout_To_Cam
(
bool
isdebugSpeed
=
false
,
bool
needswitch
=
false
,
bool
needwait
=
true
)
{
if
(
CheckASide
())
var
isa
=
CheckASide
();
if
(
needswitch
)
isa
=
!
isa
;
if
(
isa
)
{
Config
.
PullAxis_Inout_CamA
=
197633
;
if
(
isdebugSpeed
)
PullAxis_Inout
.
AbsMove
(
MoveInfo
,
Config
.
PullAxis_Inout_CamA
,
Config
.
PullAxis_InOut_FindPosSpeed
);
PullAxis_Inout
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
PullAxis_Inout_CamA
,
Config
.
PullAxis_InOut_FindPosSpeed
);
else
PullAxis_Inout
.
AbsMove
(
MoveInfo
,
Config
.
PullAxis_Inout_CamA
,
Config
.
PullAxis_Inout_P1_Speed
);
PullAxis_Inout
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
PullAxis_Inout_CamA
,
Config
.
PullAxis_Inout_P1_Speed
);
}
else
{
Config
.
PullAxis_Inout_CamB
=
-
220714
;
if
(
isdebugSpeed
)
PullAxis_Inout
.
AbsMove
(
MoveInfo
,
Config
.
PullAxis_Inout_CamB
,
Config
.
PullAxis_InOut_FindPosSpeed
);
PullAxis_Inout
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
PullAxis_Inout_CamB
,
Config
.
PullAxis_InOut_FindPosSpeed
);
else
PullAxis_Inout
.
AbsMove
(
MoveInfo
,
Config
.
PullAxis_Inout_CamB
,
Config
.
PullAxis_Inout_P1_Speed
);
PullAxis_Inout
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
PullAxis_Inout_CamB
,
Config
.
PullAxis_Inout_P1_Speed
);
}
}
#
region
移栽升降轴
...
...
@@ -391,16 +397,16 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// AB面移栽X轴到进出料暂存区取放点P2
/// </summary>
private
void
XAxis_To_P2
(
bool
isdebugSpeed
=
false
)
private
void
XAxis_To_P2
(
bool
isdebugSpeed
=
false
,
bool
bothmove
=
false
)
{
if
(
CheckASide
())
if
(
bothmove
||
CheckASide
())
{
if
(
isdebugSpeed
)
XAxis_A
.
AbsMove
(
MoveInfo
,
Config
.
XAxis_A_P2
,
Config
.
XAxis_FindPosSpeed
);
else
XAxis_A
.
AbsMove
(
MoveInfo
,
Config
.
XAxis_A_P2
,
Config
.
XAxis_A_P2_Speed
);
}
else
if
(
bothmove
||
!
CheckASide
())
{
if
(
isdebugSpeed
)
XAxis_B
.
AbsMove
(
MoveInfo
,
Config
.
XAxis_B_P2
,
Config
.
XAxis_FindPosSpeed
);
...
...
@@ -431,9 +437,9 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// AB面移栽X轴到待机点
/// </summary>
private
void
XAxis_To_P1
(
bool
isdebugSpeed
=
false
)
private
void
XAxis_To_P1
(
bool
isdebugSpeed
=
false
,
bool
bothmove
=
false
)
{
if
(
CheckASide
())
if
(
bothmove
||
CheckASide
())
{
if
(!
XAxis_A
.
IsInPosition
(
Config
.
XAxis_A_P1
))
{
...
...
@@ -444,7 +450,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
bothmove
||
!
CheckASide
())
{
if
(!
XAxis_B
.
IsInPosition
(
Config
.
XAxis_B_P1
))
{
...
...
@@ -462,16 +468,17 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// AB移栽压紧轴到压紧前点P2
/// </summary>
private
void
ComAxis_To_P2
(
bool
isdebugSpeed
=
false
)
private
void
ComAxis_To_P2
(
bool
isdebugSpeed
=
false
,
bool
bothmove
=
false
)
{
if
(
CheckASide
())
if
(
bothmove
||
CheckASide
())
{
if
(
isdebugSpeed
)
ComAxis_A
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P2
,
Config
.
ComAxis_FindPosSpeed
);
else
ComAxis_A
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P2
,
Config
.
ComAxis_A_P2_Speed
);
}
else
if
(
bothmove
||
!
CheckASide
())
{
if
(
isdebugSpeed
)
ComAxis_B
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P2
,
Config
.
ComAxis_FindPosSpeed
);
...
...
@@ -482,16 +489,16 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// AB移栽压紧轴到压紧点P3
/// </summary>
private
void
ComAxis_To_P3
(
bool
isdebugSpeed
=
false
)
private
void
ComAxis_To_P3
(
bool
isdebugSpeed
=
false
,
bool
bothmove
=
false
)
{
if
(
CheckASide
())
if
(
bothmove
||
CheckASide
())
{
if
(
isdebugSpeed
)
ComAxis_A
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P3
,
Config
.
ComAxis_FindPosSpeed
);
else
ComAxis_A
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P3
,
Config
.
ComAxis_A_P3_Speed
);
}
else
if
(
bothmove
||
!
CheckASide
())
{
if
(
isdebugSpeed
)
ComAxis_B
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
ComAxis_AB_P3
,
Config
.
ComAxis_FindPosSpeed
);
...
...
@@ -506,26 +513,30 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
private
void
PullAxis_UpdownToP1
(
bool
isdebugSpeed
=
false
)
{
//MoveInfo.MoveParam.MoveP.PullAxis_Updown_P1 = GetPullAxisUpdownToP1PosFromServer(MoveInfo.MoveParam);
if
(
isdebugSpeed
)
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P1
,
Config
.
PullAxis_Updown_FindPosSpeed
);
else
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P1
,
Config
.
PullAxis_Updown_P1_Speed
);
}
/// <summary>
/// 抽屉高点,料斗拉取升降轴到料屉提取高点P3
/// </summary>
private
void
PullAxis_UpdownToHighP3
(
bool
isdebugSpeed
=
false
)
private
void
PullAxis_UpdownToHighP3
(
bool
isdebugSpeed
=
false
,
bool
needwait
=
true
)
{
//MoveInfo.MoveParam.MoveP.PullAxis_Updown_P3 = GetPullAxisUpdownP3PosFromServer(MoveInfo.MoveParam);
if
(
isdebugSpeed
)
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P3
,
Config
.
PullAxis_Updown_FindPosSpeed
);
PullAxis_Updown
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P3
,
Config
.
PullAxis_Updown_FindPosSpeed
);
else
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P3
,
Config
.
PullAxis_Updown_P3_Speed
);
PullAxis_Updown
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P3
,
Config
.
PullAxis_Updown_P3_Speed
);
}
/// <summary>
/// 抽屉水平点,料斗拉取升降轴到料屉水平点P2
/// </summary>
private
void
PullAxis_UpdownToMiddleP2
(
bool
isdebugSpeed
=
false
)
{
//MoveInfo.MoveParam.MoveP.PullAxis_Updown_P2 = GetPullAxisUpdownP2PosFromServer(MoveInfo.MoveParam);
if
(
isdebugSpeed
)
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P2
,
Config
.
PullAxis_Updown_FindPosSpeed
);
else
...
...
@@ -536,6 +547,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
private
void
PullAxis_UpdownToLowP4
(
bool
isdebugSpeed
=
false
)
{
//MoveInfo.MoveParam.MoveP.PullAxis_Updown_P4 = GetPullAxisUpdownP4PosFromServer(MoveInfo.MoveParam);
if
(
isdebugSpeed
)
PullAxis_Updown
.
AbsMove
(
MoveInfo
,
MoveInfo
.
MoveParam
.
MoveP
.
PullAxis_Updown_P4
,
Config
.
PullAxis_Updown_FindPosSpeed
);
else
...
...
@@ -547,33 +559,33 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// AB面移栽旋转轴到料屉库位垂直取放料点P3
/// </summary>
private
void
MiddleAxis_To_P3
(
bool
isdebugSpeed
=
false
)
private
void
MiddleAxis_To_P3
(
bool
isdebugSpeed
=
false
,
bool
needwait
=
true
)
{
if
(
CheckASide
())
{
MiddleAxis_A
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_A_P3
,
Config
.
MiddleAxis_A_P3_Speed
);
MiddleAxis_A
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
MiddleAxis_A_P3
,
Config
.
MiddleAxis_A_P3_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxisOrg
(
MiddleAxis_A
.
Config
,
IO_VALUE
.
HIGH
));
}
else
{
MiddleAxis_B
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_B_P3
,
Config
.
MiddleAxis_B_P3_Speed
);
MiddleAxis_B
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
MiddleAxis_B_P3
,
Config
.
MiddleAxis_B_P3_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxisOrg
(
MiddleAxis_B
.
Config
,
IO_VALUE
.
HIGH
));
}
}
/// <summary>
/// AB面移栽旋转轴到水平点P2
/// </summary>
private
void
MiddleAxis_To_P2
(
bool
isdebugSpeed
=
false
)
private
void
MiddleAxis_To_P2
(
bool
isdebugSpeed
=
false
,
bool
bothmove
=
false
,
bool
needwait
=
true
)
{
if
(
CheckASide
())
if
(
CheckASide
()
||
bothmove
)
{
MiddleAxis_A
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_A_P2
,
Config
.
MiddleAxis_A_P2_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
AHorizontal_Check
,
IO_VALUE
.
HIGH
));
MiddleAxis_A
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
MiddleAxis_A_P2
,
Config
.
MiddleAxis_A_P2_Speed
);
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.AHorizontal_Check, IO_VALUE.HIGH));
}
else
if
(!
CheckASide
()
||
bothmove
)
{
MiddleAxis_B
.
AbsMove
(
MoveInfo
,
Config
.
MiddleAxis_B_P2
,
Config
.
MiddleAxis_B_P2_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BHorizontal_Check
,
IO_VALUE
.
HIGH
));
MiddleAxis_B
.
AbsMove
(
needwait
?
MoveInfo
:
null
,
Config
.
MiddleAxis_B_P2
,
Config
.
MiddleAxis_B_P2_Speed
);
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.BHorizontal_Check, IO_VALUE.HIGH));
}
}
/// <summary>
...
...
@@ -936,13 +948,15 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
" 启动入库出错,忙碌或报警中 ,storeStatus="
+
runStatus
+
",MoveType="
+
MoveInfo
.
MoveType
+
",isInSuddenDown="
+
isInSuddenDown
+
",isNoAirpressure_Check="
+
isNoAirpressure_Check
);
return
false
;
}
if
(
!
PreInStoreCheck
(
param
))
{
return
false
;
}
//if (param.PosInfo.barcode != "STEST" &&
!PreInStoreCheck(param))
//
{
//
return false;
//
}
startInStoreTime
=
DateTime
.
Now
;
LogInfo
(
" 启动入库【"
+
param
.
PosInfo
.
ToStr
()
+
"】 "
);
param
.
MoveP
=
new
LineMoveP
(
Config
,
param
.
PosInfo
.
PosId
);
//param.MoveP = GetMovePFromServer(Config, param.PosInfo);
param
.
MoveP
=
new
LineMoveP
(
Config
,
param
.
PosInfo
.
PosId
);
// LogInfo("LoadInoutParam:" + JsonHelper.SerializeObject(param.MoveP));
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
param
);
///开始记录
...
...
@@ -950,10 +964,22 @@ namespace OnlineStore.DeviceLibrary
IgnoreCamDect
=
false
;
SetBoxStatus
(
DeviceStatus
.
InStoreExecute
,
RunStatus
.
Busy
,
param
.
PosInfo
.
PosId
,
param
.
PosInfo
.
barcode
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_00_StartInstore
);
if
(
param
.
PosInfoBack
!=
null
)
MoveInfo
.
NextMoveStep
(
StepEnum
.
SIB_00_StartInstore
);
else
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_00_StartInstore
);
if
(
param
.
PosInfo
.
barcode
==
"OUTSTEST"
)
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
SI_07_MiddleToP3
);
PullAxis_Inout_To_Cam
();
}
AxisAlarmFlag
=
false
;
return
true
;
}
private
bool
InDoorCheck
(
InOutParam
param
)
{
if
(
param
.
PosInfo
==
null
)
...
...
@@ -1020,6 +1046,7 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
InstoreBothSideExecute
();
InstoreExecute
();
}
/// <summary>
...
...
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ServerPos.cs
查看文件 @
119952f
using
System
;
using
DeviceLibrary
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
...
...
@@ -8,5 +10,141 @@ namespace OnlineStore.DeviceLibrary
{
public
partial
class
BoxEquip
{
/// <summary>
/// 从服务器获取运动点位数据P1
/// </summary>
/// <param name="inOutParam"></param>
/// <returns></returns>
public
int
GetPullAxisUpdownToP1PosFromServer
(
InOutParam
inOutParam
)
{
//try
//{
//Dictionary<string, string> paramMap = new Dictionary<string, string>();
//paramMap.Add("PosInfo", JsonHelper.SerializeObject(inOutParam.PosInfo));
// string server = GetAddr("/service/store/GetPullAxisUpdownToP1PosFromServer", null);
// DateTime startTime = DateTime.Now;
// ResultData resultdata = HttpHelper.PostJson<Dictionary<string, string>, ResultData>(server, paramMap, 2000, true);
// LogUtil.info("GetPullAxisUpdownToP1PosFromServer " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】");
// if (resultdata == null)
// {
// LogUtil.info("GetPullAxisUpdownToP1PosFromServer【 " + movepos + "】 没有收到服务器反馈");
// return 0;
// }
// else if (resultdata.data != null)
// {
// var b = int.Parse(resultdata.data["pos"]);
// return int;
// }
// return 0;
//}
//catch (Exception ex)
//{
// LogUtil.error("GetPullAxisUpdownToP1PosFromServer: " + ex.ToString());
//}
//return string.Empty;
return
0
;
}
/// <summary>
/// 从服务器获取运动点位数据P3
/// </summary>
/// <param name="inOutParam"></param>
/// <returns></returns>
public
int
GetPullAxisUpdownP3PosFromServer
(
InOutParam
inOutParam
)
{
//try
//{
//Dictionary<string, string> paramMap = new Dictionary<string, string>();
//paramMap.Add("PosInfo", JsonHelper.SerializeObject(inOutParam.PosInfo));
// string server = GetAddr("/service/store/GetPullAxisUpdownP3PosFromServer", null);
// DateTime startTime = DateTime.Now;
// ResultData resultdata = HttpHelper.PostJson<Dictionary<string, string>, ResultData>(server, paramMap, 2000, true);
// LogUtil.info("GetPullAxisUpdownP3PosFromServer " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】");
// if (resultdata == null)
// {
// LogUtil.info("GetPullAxisUpdownP3PosFromServer【 " + movepos + "】 没有收到服务器反馈");
// return 0;
// }
// else if (resultdata.data != null)
// {
// var b = int.Parse(resultdata.data["pos"]);
// return int;
// }
// return 0;
//}
//catch (Exception ex)
//{
// LogUtil.error("GetPullAxisUpdownP3PosFromServer: " + ex.ToString());
//}
//return string.Empty;
return
0
;
}
/// <summary>
/// 从服务器获取运动点位数据P4
/// </summary>
/// <param name="inOutParam"></param>
/// <returns></returns>
public
int
GetPullAxisUpdownP4PosFromServer
(
InOutParam
inOutParam
)
{
//try
//{
//Dictionary<string, string> paramMap = new Dictionary<string, string>();
//paramMap.Add("PosInfo", JsonHelper.SerializeObject(inOutParam.PosInfo));
// string server = GetAddr("/service/store/GetPullAxisUpdownP4PosFromServer", null);
// DateTime startTime = DateTime.Now;
// ResultData resultdata = HttpHelper.PostJson<Dictionary<string, string>, ResultData>(server, paramMap, 2000, true);
// LogUtil.info("GetPullAxisUpdownP4PosFromServer " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】");
// if (resultdata == null)
// {
// LogUtil.info("GetPullAxisUpdownP4PosFromServer【 " + movepos + "】 没有收到服务器反馈");
// return 0;
// }
// else if (resultdata.data != null)
// {
// var b = int.Parse(resultdata.data["pos"]);
// return int;
// }
// return 0;
//}
//catch (Exception ex)
//{
// LogUtil.error("GetPullAxisUpdownP4PosFromServer: " + ex.ToString());
//}
//return string.Empty;
return
0
;
}
/// <summary>
/// 从服务器获取运动点位数据P2
/// </summary>
/// <param name="inOutParam"></param>
/// <returns></returns>
public
int
GetPullAxisUpdownP2PosFromServer
(
InOutParam
inOutParam
)
{
//try
//{
//Dictionary<string, string> paramMap = new Dictionary<string, string>();
//paramMap.Add("PosInfo", JsonHelper.SerializeObject(inOutParam.PosInfo));
// string server = GetAddr("/service/store/GetPullAxisUpdownP2PosFromServer", null);
// DateTime startTime = DateTime.Now;
// ResultData resultdata = HttpHelper.PostJson<Dictionary<string, string>, ResultData>(server, paramMap, 2000, true);
// LogUtil.info("GetPullAxisUpdownP2PosFromServer " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】");
// if (resultdata == null)
// {
// LogUtil.info("GetPullAxisUpdownP2PosFromServer【 " + movepos + "】 没有收到服务器反馈");
// return 0;
// }
// else if (resultdata.data != null)
// {
// var b = int.Parse(resultdata.data["pos"]);
// return int;
// }
// return 0;
//}
//catch (Exception ex)
//{
// LogUtil.error("GetPullAxisUpdownP2PosFromServer: " + ex.ToString());
//}
//return string.Empty;
return
0
;
}
}
}
source/DeviceLibrary/storeBean/boxBean/BoxEquip_ShelfPos.cs
0 → 100644
查看文件 @
119952f
using
DeviceLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
partial
class
BoxEquip
{
/// <summary>
/// 从服务器获取库位点位数据P1
/// </summary>
/// <param name="inOutParam"></param>
/// <returns></returns>
public
LineMoveP
GetMovePFromServer
(
BoxEquip_Config
config
,
InOutPosInfo
posInfo
)
{
//try
//{
//Dictionary<string, string> paramMap = new Dictionary<string, string>();
//paramMap.Add("PosInfo", JsonHelper.SerializeObject(inOutParam.PosInfo));
// string server = GetAddr("/service/store/GetMovePFromServer", null);
// DateTime startTime = DateTime.Now;
// LineMoveP resultdata = HttpHelper.PostJson<Dictionary<string, string>, LineMoveP>(server, paramMap, 2000, true);
// LogUtil.info("GetMovePFromServer " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】");
// if (resultdata == null)
// {
// LogUtil.info("GetMovePFromServer【 " + movepos + "】 没有收到服务器反馈");
// return 0;
// }
// else if (resultdata.data != null)
// {
// return resultdata;
// }
// return 0;
//}
//catch (Exception ex)
//{
// LogUtil.error("GetMovePFromServer: " + ex.ToString());
//}
//return string.Empty;
return
new
LineMoveP
();
}
}
}
source/DeviceLibrary/storeBean/boxBean/GetMovePFromServer.cs
0 → 100644
查看文件 @
119952f
using
OnlineStore.LoadCSVLibrary
;
namespace
OnlineStore.DeviceLibrary
{
internal
class
GetMovePFromServer
:
LineMoveP
{
}
}
\ No newline at end of file
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean.cs
查看文件 @
119952f
...
...
@@ -71,13 +71,16 @@ namespace OnlineStore.DeviceLibrary
if
(!
MoveStop
)
{
//LogUtil.info( Name+$" 启动料串1:{MoveInfo.MoveType},{Robot.MoveInfo.MoveType}");
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
))
{
if
(
Robot
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
)
||
Robot
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
RHome
))
{
LogUtil
.
info
(
"启动料串1"
);
}
else
{
LogUtil
.
info
(
"启动料串2"
);
if
(
Robot
.
AutoInput
&&
Robot
.
IOValue
(
Config
.
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
StartInstore
(
new
InOutParam
());
...
...
@@ -103,27 +106,27 @@ namespace OnlineStore.DeviceLibrary
}
//判断是否无料串
if
(
Robot
.
IOValue
(
Config
.
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
Robot
.
IOValue
(
Config
.
IO_LineEnd_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
Robot
.
CylinderIsOk
(
Config
.
IO_Shelf_StopUp
,
Config
.
IO_Shelf_StopDown
))
{
if
(
StoreManager
.
checkWatch
(
shelfWatch
,
10000
,
true
))
{
Asa
.
ClientAction
action
=
AgvClient
.
GetAction
(
Config
.
AgvName
);
var
agvcallresult
=
AgvClient
.
NeedEnter
(
Config
.
AgvName
,
""
,
Asa
.
ClientLevel
.
High
);
if
(!
action
.
Equals
(
Asa
.
ClientAction
.
NeedEnter
))
{
WorkLog
(
"无料串,:通知agv来送料串AgvName:"
+
Config
.
AgvName
+
",send NeedEnter=:"
+
agvcallresult
.
ToString
());
}
}
}
else
if
(
Robot
.
IOValue
(
Config
.
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
Robot
.
IOValue
(
Config
.
IO_LineEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
AgvClient
.
GetAction
(
Config
.
AgvName
)
!=
Asa
.
ClientAction
.
NeedLeave
&&
AgvClient
.
GetAction
(
Config
.
AgvName
)
!=
Asa
.
ClientAction
.
MayLeave
&&
AgvClient
.
GetAction
(
Config
.
AgvName
)
!=
Asa
.
ClientAction
.
FinishLeave
)
{
shelfWatch
.
Stop
();
AgvClient
.
SetToNone
(
Config
.
AgvName
);
}
//
//
判断是否无料串
//
if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.LOW)
//
&& Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.LOW)
//
&& Robot.CylinderIsOk(Config.IO_Shelf_StopUp, Config.IO_Shelf_StopDown))
//
{
//
if (StoreManager.checkWatch(shelfWatch, 10000, true))
//
{
//
Asa.ClientAction action = AgvClient.GetAction(Config.AgvName);
//
var agvcallresult = AgvClient.NeedEnter(Config.AgvName, "", Asa.ClientLevel.High);
//
if (!action.Equals(Asa.ClientAction.NeedEnter))
//
{
//
WorkLog("无料串,:通知agv来送料串AgvName:" + Config.AgvName + ",send NeedEnter=:" + agvcallresult.ToString());
//
}
//
}
//
}
//
else if (Robot.IOValue(Config.IO_LineIn_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(Config.IO_LineEnd_Check).Equals(IO_VALUE.HIGH)
//
&& AgvClient.GetAction(Config.AgvName) != Asa.ClientAction.NeedLeave && AgvClient.GetAction(Config.AgvName) != Asa.ClientAction.MayLeave && AgvClient.GetAction(Config.AgvName) != Asa.ClientAction.FinishLeave)
//
{
//
shelfWatch.Stop();
//
AgvClient.SetToNone(Config.AgvName);
//
}
}
private
Stopwatch
shelfWatch
=
new
Stopwatch
();
public
bool
Reset
(
bool
needStop
=
false
,
bool
resetShelf
=
false
)
...
...
@@ -159,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NewMove
(
MoveType
.
Reset
,
new
InOutParam
());
MoveInfo
.
NextMoveStep
(
StepEnum
.
IBR01_StopDown
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
WorkLog
(
"开始复位,定位气缸下降
"
);
WorkLog
(
$
"开始复位,定位气缸下降,runStatus:{Robot.runStatus},AutoInput:{Robot.AutoInput},MoveStop:{MoveStop},alarmType:{Robot.alarmType},Robot.MoveStop:{Robot.MoveStop}
"
);
StopDown
(
MoveInfo
);
return
true
;
}
...
...
@@ -186,9 +189,10 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
//return;//**
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IBR01_StopDown
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IBR02_LineRun
);
WorkLog
(
"复位:链条正转3秒"
);
LineRun
(
MoveInfo
);
...
...
source/DeviceLibrary/storeBean/inputBean/BatchMoveBean_Partial.cs
查看文件 @
119952f
...
...
@@ -29,27 +29,29 @@ namespace OnlineStore.DeviceLibrary
public
bool
StartInstore
(
InOutParam
param
)
{
if
(
ProcessShelfOut
||
ProcessShelfEnter
)
{
return
false
;
}
LogUtil
.
info
(
"启动料串4"
);
//if (ProcessShelfOut || ProcessShelfEnter)
//{
// return false;
//}
//if (!Robot.CanStartWork())
//{
// return false;
//}
if
(
AgvClient
.
GetAction
(
Config
.
AgvName
)
==
ClientAction
.
NeedLeave
||
AgvClient
.
GetAction
(
Config
.
AgvName
)
==
ClientAction
.
MayLeave
)
{
//WorkLog("料串入料 :等待AGV来取空料串1");
return
false
;
}
UpdateShelf
(
1
);
if
(
CurrShelf
.
ShelfState
.
Equals
(
3
))
{
bool
agvcallresult
=
AgvClient
.
NeedLeave
(
Config
.
AgvName
,
CurrShelf
.
ShelfRfid
,
ClientLevel
.
High
);
LogUtil
.
info
(
Name
+
"StartInstore 失败,料串"
+
CurrShelf
.
ToStr
()
+
"需要离开,NeedLeave:"
+
Config
.
AgvName
+
","
+
CurrShelf
.
ShelfRfid
+
",agvcallresult:"
+
agvcallresult
.
ToString
());
return
false
;
}
else
if
(
Robot
.
IOValue
(
Config
.
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
//if (AgvClient.GetAction(Config.AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(Config.AgvName) == ClientAction.MayLeave)
//{
// //WorkLog("料串入料 :等待AGV来取空料串1");
// return false;
//}
//UpdateShelf(1);
//if (CurrShelf.ShelfState.Equals(3))
//{
// bool agvcallresult = AgvClient.NeedLeave(Config.AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
// LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + Config.AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
// return false;
//}
//else
if
(
Robot
.
IOValue
(
Config
.
IO_LineIn_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
MoveInfo
.
NewMove
(
MoveType
.
InStore
,
new
InOutParam
());
IB03_LineStart
();
...
...
@@ -134,6 +136,7 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
//return;//**
#
region
入料:料串进入并开始检测托盘
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB01_Wait
))
{
...
...
@@ -178,6 +181,8 @@ namespace OnlineStore.DeviceLibrary
LineStop
();
if
(
Robot
.
IOValue
(
Config
.
IO_LineEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
CurrShelf
=
new
ShelfInfo
();
//**
CurrShelf
.
ShelfState
=
1
;
//**
if
(
CurrShelf
!=
null
&&
CurrShelf
.
ShelfState
.
Equals
(
2
))
{
SendInShelfLeave
(
" 料串【"
+
CurrShelf
.
ToStr
()
+
"】为出库中料串,不需要入库 "
);
...
...
@@ -298,6 +303,9 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IB17_WaitReelLeave
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
WorkLog
(
"未连接mes, 跳过扫码"
);
return
;
//**
CheckHasTray
();
}
...
...
@@ -347,6 +355,10 @@ namespace OnlineStore.DeviceLibrary
private
Task
<
List
<
string
>>
scanTask
=
null
;
private
void
IB11_ScanCode
()
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
WorkLog
(
"未连接mes, 跳过扫码"
);
return
;
//**
ClearWarnMsg
(
"等待旋转轴离开料串超时"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB11_ScanCode
);
LastCodeList
=
new
List
<
string
>();
...
...
@@ -424,6 +436,10 @@ namespace OnlineStore.DeviceLibrary
if
(
Robot
.
IOValue
(
Config
.
IO_ReelCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
MoveInfo
.
ShelfNoTray
.
Equals
(
false
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IB13_ScanOK
);
WorkLog
(
"未连接mes, 跳过扫码"
);
return
;
//**
toBatchP4
=
false
;
//判断扫码点是否可用,可用,运动到扫码点
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip.cs
查看文件 @
119952f
...
...
@@ -177,9 +177,16 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
//LogInfo("复位完成");//**
//runStatus = RunStatus.Runing;//**
//MoveInfo.EndMove();//**
//return;//**
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR01_Wait
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IR06_UpdownToP1
);
LogInfo
(
$
"复位 {MoveInfo.SLog}:XXXXX"
);
return
;
// 1,处于A,B,NG料口是,可以直接回取料升降轴。
// 2,处于A, B两个暂存区时,升降轴先运动到该暂存区的取放料高点,旋转轴再回原点或待机点。
//验证旋转轴位置 TODO
...
...
@@ -295,12 +302,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
IR07_ClampRelax
);
LogInfo
(
$
"复位{MoveInfo.SLog}:夹爪气缸放松"
);
ClampRelax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P1
,
Config
.
Updown_P1_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR07_ClampRelax
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IR08_WaitBatchMove
);
LogInfo
(
$
"复位{MoveInfo.SLog}:等待左右批量轴模块复位完成"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P2_ATake
,
Config
.
Middle_P2_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IR08_WaitBatchMove
))
...
...
@@ -308,6 +317,7 @@ namespace OnlineStore.DeviceLibrary
if
((
BatchMove_A
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
).
Equals
(
false
))
&&
(
BatchMove_B
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
Reset
).
Equals
(
false
)))
{
ClampRelax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
LogInfo
(
"复位完成"
);
runStatus
=
RunStatus
.
Runing
;
MoveInfo
.
EndMove
();
...
...
@@ -421,19 +431,20 @@ namespace OnlineStore.DeviceLibrary
}
if
(
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
None
)
&&
NoErrorAlarm
())
{
//若左侧或右侧在等待扫码结束的状态,需要开始去取料
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
{
if
(
moveBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
)
&&
moveBean
.
MoveInfo
.
IsStep
(
StepEnum
.
IB13_ScanOK
))
{
LogInfo
(
moveBean
.
Name
+
"开始取料:"
+
moveBean
.
GetInstoreParam
().
PosInfo
.
ToStr
());
StartInstore
(
moveBean
.
GetInstoreParam
());
break
;
}
}
}
//if (MoveInfo.MoveType.Equals(MoveType.None) && NoErrorAlarm())
//{
// return;//**
// //若左侧或右侧在等待扫码结束的状态,需要开始去取料
// foreach (BatchMoveBean moveBean in BatchMoveList)
// {
// if (moveBean.MoveInfo.MoveType.Equals(MoveType.InStore) && moveBean.MoveInfo.IsStep(StepEnum.IB13_ScanOK))
// {
// LogInfo(moveBean.Name + "开始取料:" + moveBean.GetInstoreParam().PosInfo.ToStr());
// StartInstore(moveBean.GetInstoreParam());
// break;
// }
// }
//}
}
foreach
(
BatchMoveBean
moveBean
in
BatchMoveList
)
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_InStore.cs
查看文件 @
119952f
...
...
@@ -56,7 +56,9 @@ namespace OnlineStore.DeviceLibrary
}
#
region
入库
public
event
EventHandler
<
double
>
cttime
;
private
DateTime
startInTime
=
DateTime
.
Now
;
private
DateTime
ctTime
=
DateTime
.
Now
;
public
override
bool
StartInstore
(
InOutParam
param
)
{
if
(!
NoAlarm
())
...
...
@@ -64,7 +66,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
"报警中,无法开始取料入库:"
+
param
.
PosInfo
.
ToStr
());
return
false
;
}
if
(
AxisInWorkingArea
(
new
int
[]
{
1
,
2
,
3
,
4
}))
if
(
!
param
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
)
&&
AxisInWorkingArea
(
new
int
[]
{
1
,
2
,
3
,
4
}))
{
LogInfo
(
"选择轴在暂存区,请先手动复位。 取料入库失败:"
+
param
.
PosInfo
.
ToStr
());
return
false
;
...
...
@@ -165,6 +167,14 @@ namespace OnlineStore.DeviceLibrary
MoveLog
(
$
"入库取料{shelf}{MoveInfo.SLog}: 条码 {MoveInfo.MoveParam.PosInfo.barcode}为测试料,直接去目标位置"
);
LastPosInfo
=
MoveInfo
.
MoveParam
.
PosInfo
;
StrartToTargetP
();
if
(
shelf
.
Equals
(
1
))
{
BatchMove_A
.
GetTrayOK
();
}
else
if
(
shelf
.
Equals
(
2
))
{
BatchMove_B
.
GetTrayOK
();
}
}
else
{
...
...
@@ -182,10 +192,15 @@ namespace OnlineStore.DeviceLibrary
{
moveBean
=
BatchMove_B
;
}
if
(
moveBean
.
LastHeight
>
0
)
moveBean
.
LastHeight
=
8
;
if
(
moveBean
.
LastHeight
>
0
||
Setting_Init
.
CycleMode
)
{
ClearTimeoutAlarm
(
"获取料盘高度完成超时"
);
int
Height
=
moveBean
.
LastHeight
;
if
(
Setting_Init
.
CycleMode
)
Height
=
8
;
int
width
=
7
;
if
(
IOValue
(
IO_Type
.
MAxis_ReelCheck_13
).
Equals
(
IO_VALUE
.
HIGH
))
{
...
...
@@ -234,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
{
//如果无料且暂存区为空,直接过去
bool
empty
=
(
BufferDataManager
.
AInStoreInfo
==
null
||
BufferDataManager
.
AInStoreInfo
.
PosId
.
Equals
(
""
));
if
(
IOValue
(
IO_Type
.
U
pperArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
)
&&
empty
)
if
(
IOValue
(
IO_Type
.
U
nderArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
)
&&
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
)
||
empty
)
)
{
II43_MiddleToP4
();
}
...
...
@@ -243,6 +258,7 @@ namespace OnlineStore.DeviceLibrary
int
targetV
=
Config
.
Middle_P4_AUpper
-
Config
.
MiddleOffsetValue
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
II41_MiddleTWaitP4
);
MoveLog
(
$
" 入料->A侧 {MoveInfo.SLog}: 暂存区有料, 旋转轴 到P4{Config.Middle_P4_AUpper}-{Config.MiddleOffsetValue}=目标{targetV}位置等待暂存区无料"
);
MoveLog
(
$
" 入料->A侧 {MoveInfo.SLog}:UnderArea_Check_A: {IOValue(IO_Type.UnderArea_Check_A)},{MoveInfo.MoveParam.PosInfo.ToStr()}"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
targetV
,
Config
.
Middle_P4_Speed
);
}
}
...
...
@@ -254,7 +270,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
II42_WaitNoReel
);
MoveInfo
.
TimeOutSeconds
=
60
;
MoveLog
(
$
"入库取料{shelf}{MoveInfo.SLog}: 等待A上暂存区无料"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
UpperArea_Check_A
,
IO_VALUE
.
LOW
));
//**MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_Check_A, IO_VALUE.LOW));
//**MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_Check_A, IO_VALUE.LOW));
}
else
{
...
...
@@ -264,13 +281,14 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II42_WaitNoReel
))
{
if
(
BufferDataManager
.
AInStoreInfo
==
null
||
BufferDataManager
.
AInStoreInfo
.
PosId
.
Equals
(
""
))
if
((
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
)
&&
IOValue
(
IO_Type
.
UnderArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
))
||
BufferDataManager
.
AInStoreInfo
==
null
||
BufferDataManager
.
AInStoreInfo
.
PosId
.
Equals
(
""
))
{
ClearTimeoutAlarm
(
"A上暂存区物料拿走"
);
MoveInfo
.
NextMoveStep
(
StepEnum
.
II43_MiddleToP4
);
MoveLog
(
$
" 入料->A侧 {MoveInfo.SLog}: 暂存区为空, 旋转轴 到P4(A上暂存区放料点){Config.Middle_P4_AUpper},等待{IO_Type.MAxis_Check_AreaA}信号亮"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P4_AUpper
,
Config
.
Middle_P4_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
MAxis_Check_AreaA
,
IO_VALUE
.
HIGH
));
//**
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_AreaA, IO_VALUE.HIGH));
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
...
...
@@ -305,6 +323,17 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II46_UpdownToP4
))
{
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
{
MoveInfo
.
EndMove
();
BoxPosition
posiiton
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
PosIDManger
.
BPosList
.
DRAWER
[
1
][
0
].
PosID
);
InOutParam
param
=
new
InOutParam
(
new
InOutPosInfo
(
"InstoreSTEST"
,
posiiton
.
PositionNum
,
posiiton
.
BagHigh
,
posiiton
.
BagWidth
));
param
.
ShelfType
=
2
;
LogUtil
.
info
(
"A料结束自动切换到B料串->"
+
param
.
PosInfo
.
ToStr
());
StartInstore
(
param
);
return
;
}
if
(!
BatchMove_A
.
IsInScanCode
())
{
int
targetV
=
Config
.
Middle_P4_AUpper
-
Config
.
MiddleOffsetValue
;
...
...
@@ -336,7 +365,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II60_UpdownToP10
))
{
bool
empty
=
BufferDataManager
.
BInStoreInfo
==
null
||
BufferDataManager
.
BInStoreInfo
.
PosId
.
Equals
(
""
);
if
(
IOValue
(
IO_Type
.
U
pperArea_Check_B
).
Equals
(
IO_VALUE
.
LOW
)
&&
empty
)
if
(
IOValue
(
IO_Type
.
U
nderArea_Check_B
).
Equals
(
IO_VALUE
.
LOW
)
&&
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
)
||
empty
)
)
{
II63_MiddleToP5
();
}
...
...
@@ -345,6 +374,7 @@ namespace OnlineStore.DeviceLibrary
int
targetValue
=
Config
.
Middle_P5_BUpper
+
Config
.
MiddleOffsetValue
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
II61_MiddleToWaitP5
);
MoveLog
(
$
" 入料->B侧 {MoveInfo.SLog}: 暂存区有料, 旋转轴 到P5{Config.Middle_P5_BUpper}-{Config.MiddleOffsetValue}=目标{targetValue}位置等待暂存区无料"
);
MoveLog
(
$
" 入料->B侧 {MoveInfo.SLog}: {MoveInfo.MoveParam.PosInfo.ToStr()}, UnderArea_Check_B {IOValue(IO_Type.UnderArea_Check_B)}"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
targetValue
,
Config
.
Middle_P5_Speed
);
}
}
...
...
@@ -355,7 +385,7 @@ namespace OnlineStore.DeviceLibrary
TrayHasLeave
();
MoveInfo
.
NextMoveStep
(
StepEnum
.
II62_WaitNoReel
);
MoveLog
(
$
"入库取料{shelf}{MoveInfo.SLog}: 等待B上暂存区无料"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
UpperArea_Check_B
,
IO_VALUE
.
LOW
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_Check_B, IO_VALUE.LOW));
}
else
{
...
...
@@ -392,9 +422,24 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
II66_UpdownToP10
);
MoveLog
(
$
" 入料->B侧 {MoveInfo.SLog}: 升降轴 到P10 (B上暂存区放料高点){Config.Updown_P10_BUpperH}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P10_BUpperH
,
Config
.
Updown_P10_Speed
);
int
targetValue
=
Config
.
Middle_P5_BUpper
+
Config
.
MiddleOffsetValue
;
//MoveInfo.NextMoveStep(StepEnum.II67_MiddleToP1);
MoveLog
(
$
" 入料->B侧 {MoveInfo.SLog}: 旋转轴 到P5(偏移点){targetValue}"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
targetValue
,
Config
.
Middle_P1_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II66_UpdownToP10
))
{
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
{
MoveInfo
.
EndMove
();
BoxPosition
posiiton
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
PosIDManger
.
BPosList
.
DRAWER
[
1
][
0
].
PosID
);
InOutParam
param
=
new
InOutParam
(
new
InOutPosInfo
(
"OutstoreSTEST"
,
posiiton
.
PositionNum
,
posiiton
.
BagHigh
,
posiiton
.
BagWidth
,
true
));
param
.
ShelfType
=
2
;
LogUtil
.
info
(
"B入结束切换到B出"
+
param
.
PosInfo
.
ToStr
());
StartOutstore
(
param
);
return
;
}
//需要等A侧料串不扫码时再过去
if
(!
BatchMove_B
.
IsInScanCode
())
{
...
...
@@ -490,7 +535,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
TimeOutSeconds
=
10
;
MoveLog
(
$
" 入料->A侧 {MoveInfo.SLog}: 暂存区为空, 旋转轴 到P4(A上暂存区放料点){Config.Middle_P4_AUpper},等待{IO_Type.MAxis_Check_AreaA}信号亮"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P4_AUpper
,
Config
.
Middle_P4_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
MAxis_Check_AreaA
,
IO_VALUE
.
HIGH
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_AreaA, IO_VALUE.HIGH));
}
private
void
ToShelfMove
()
{
...
...
@@ -504,7 +549,7 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P1
,
Config
.
Updown_P1_Speed
);
}
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P2_ATake
,
Config
.
Middle_P2_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
MAxis_Check_A
,
IO_VALUE
.
HIGH
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_A, IO_VALUE.HIGH));
}
else
if
(
shelf
.
Equals
(
2
))
{
...
...
@@ -515,7 +560,7 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P1
,
Config
.
Updown_P1_Speed
);
}
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P3_BTake
,
Config
.
Middle_P3_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
MAxis_Check_B
,
IO_VALUE
.
HIGH
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_B, IO_VALUE.HIGH));
}
else
{
...
...
@@ -549,7 +594,8 @@ namespace OnlineStore.DeviceLibrary
private
void
II61_MiddleToWaitP5
()
{
int
targetValue
=
Config
.
Middle_P5_BUpper
+
Config
.
MiddleOffsetValue
;
//** int targetValue = Config.Middle_P5_BUpper + Config.MiddleOffsetValue;
int
targetValue
=
Config
.
Middle_P5_BUpper
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
II61_MiddleToWaitP5
);
MoveLog
(
$
" 入料->B侧 {MoveInfo.SLog}: 暂存区有料,升降轴 到P10(B上暂存区放料高点){Config.Updown_P10_BUpperH}, 旋转轴 到P5{Config.Middle_P5_BUpper}-{Config.MiddleOffsetValue}=目标{targetValue}位置等待暂存区无料"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P10_BUpperH
,
Config
.
Updown_P10_Speed
);
...
...
@@ -558,7 +604,8 @@ namespace OnlineStore.DeviceLibrary
private
void
II41_MiddleTWaitP4
()
{
int
targetV
=
Config
.
Middle_P4_AUpper
-
Config
.
MiddleOffsetValue
;
//** int targetV = Config.Middle_P4_AUpper - Config.MiddleOffsetValue;
int
targetV
=
Config
.
Middle_P4_AUpper
;
MoveInfo
.
NextMoveStep
(
StepEnum
.
II41_MiddleTWaitP4
);
MoveLog
(
$
" 入料->A侧 {MoveInfo.SLog}: 暂存区有料,升降轴 到P4(A上暂存区放料高点){Config.Updown_P4_AUpperH}, 旋转轴 到P4{Config.Middle_P4_AUpper}-{Config.MiddleOffsetValue}=目标{targetV}位置等待暂存区无料"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P4_AUpperH
,
Config
.
Updown_P4_Speed
);
...
...
@@ -578,6 +625,12 @@ namespace OnlineStore.DeviceLibrary
List
<
string
>
codeList
=
Regex
.
Split
(
pos
.
barcode
,
"##"
,
RegexOptions
.
IgnoreCase
).
ToList
();
getPosTask
=
Task
.
Factory
.
StartNew
(
delegate
{
//if (Setting_Init.CycleMode)
//{
// LastPosInfo= new InOutPosInfo(pos.barcode, serverResult.posId, pos.PlateH, pos.PlateW, false, false, true, pos.rfid, 0);
// return;
//}
//更新托盘条码信息
try
{
...
...
@@ -714,15 +767,15 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO01_ReelCheck
);
if
(!
MiddleAxis
.
IsInPosition
(
Config
.
Middle_P1
))
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_Speed
);
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
//**
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_Speed);
MoveLog
(
$
"开始A下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1,旋转轴到P1{Config.Middle_P1}"
);
}
else
{
MoveLog
(
$
"开始A下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1"
);
}
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
Under
Area_Check_A
,
IO_VALUE
.
HIGH
));
//** MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.U
Area_Check_A, IO_VALUE.HIGH));
}
else
if
(
startp
.
Equals
(
2
))
{
...
...
@@ -732,15 +785,15 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO11_ReelCheck
);
if
(!
MiddleAxis
.
IsInPosition
(
Config
.
Middle_P1
))
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_Speed
);
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
//**
MiddleAxis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_Speed);
MoveLog
(
$
"开始B下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1,旋转轴到P1{Config.Middle_P1}"
);
}
else
{
MoveLog
(
$
"开始B下暂存区物料出库{MoveInfo.SLog}: 料串{param.ShelfType},等待料盘检测=1"
);
}
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
UnderArea_Check_B
,
IO_VALUE
.
HIGH
));
//**
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_Check_B, IO_VALUE.HIGH));
}
else
{
...
...
@@ -786,15 +839,15 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO02_UpdownToP6
);
MoveLog
(
$
"出库A->{shelf}料串 {MoveInfo.SLog}: 升降轴到P6(A下暂存区取料高点){Config.Updown_P6_AUnderH}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P6_AUnderH
,
Config
.
Updown_P6_Speed
);
ShelfBatchAxisDown
();
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
ShelfBatchAxisDown
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO02_UpdownToP6
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO03_MiddleToP7
);
MoveLog
(
$
"出库A->{shelf}料串 {MoveInfo.SLog}: 旋转轴到P7(A下暂存区取料点){Config.Middle_P7_AUnder},等待{IO_Type.MAxis_Check_AreaA}信号亮"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P7_AUnder
,
Config
.
Middle_P7_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
MAxis_Check_AreaA
,
IO_VALUE
.
HIGH
));
//**
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.MAxis_Check_AreaA, IO_VALUE.HIGH));
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO03_MiddleToP7
))
{
...
...
@@ -816,6 +869,12 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO06_UpdownToP6
))
{
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II81_UpdownToP8
);
MoveLog
(
$
" 直接出库"
);
return
;
}
//判断料盘信号是否消失
if
(
IOValue
(
IO_Type
.
UnderArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -848,15 +907,15 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO12_UpdownToP12
);
MoveLog
(
$
"出库B->{shelf}料串 {MoveInfo.SLog}: 升降轴到P12(B下暂存区取料高点){Config.Updown_P12_BUnderH}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P12_BUnderH
,
Config
.
Updown_P12_Speed
);
ShelfBatchAxisDown
();
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
ShelfBatchAxisDown
();
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO12_UpdownToP12
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO13_MiddleToP8
);
MoveLog
(
$
"出库B->{shelf}料串 {MoveInfo.SLog}: 旋转轴到P8(B下暂存区取料点){Config.Middle_P8_BUnder},等待{MiddleAxis.AxisName}原点信号亮"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P8_BUnder
,
Config
.
Middle_P8_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxisOrg
(
MiddleAxis
.
Config
,
IO_VALUE
.
HIGH
));
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxisOrg(MiddleAxis.Config, IO_VALUE.HIGH));
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO13_MiddleToP8
))
{
...
...
@@ -878,6 +937,13 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO16_UpdownToP6
))
{
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II81_UpdownToP8
);
MoveLog
(
$
" 直接出库"
);
return
;
}
//判断料盘信号是否消失
if
(
IOValue
(
IO_Type
.
UnderArea_Check_B
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -895,7 +961,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
IO17_WaitReelCheckLow
))
{
{
if
(!
MiddleToShelf
())
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
IO21_WaitShelfReady
);
...
...
@@ -982,6 +1048,68 @@ namespace OnlineStore.DeviceLibrary
}
#
endregion
#
region
出库放料到
NG
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II81_UpdownToP8
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II83_UpdownToP9
);
MoveLog
(
$
" 直接出库 {MoveInfo.SLog}: 旋转轴到P6(放料点){Config.Middle_P6_NG}"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P6_NG
,
Config
.
Middle_P6_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II82_MiddleToNg
))
{
TrayHasLeave
();
MoveInfo
.
NextMoveStep
(
StepEnum
.
II83_UpdownToP9
);
MoveLog
(
$
" 直接出库 {MoveInfo.SLog}: 升降轴到P9(放料低点){Config.Updown_P9_NGL}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P9_NGL
,
Config
.
Updown_P9_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II83_UpdownToP9
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II85_UpdownToP8
);
MoveLog
(
$
" 直接出库 {MoveInfo.SLog}: 夹爪放松"
);
ClampRelax
(
MoveInfo
,
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II84_ClampRelax
))
{
MoveInfo
.
NextMoveStep
(
StepEnum
.
II85_UpdownToP8
);
MoveLog
(
$
" 直接出库 {MoveInfo.SLog}: 升降轴到P8(放料高点){Config.Updown_P8_NGH}"
);
UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
Updown_P8_NGH
,
Config
.
Updown_P8_Speed
);
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II85_UpdownToP8
))
{
if
(
shelf
.
Equals
(
1
))
{
MoveLog
(
$
" 直接出库放料结束"
);
cttime
?.
Invoke
(
null
,
0
);
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
}
else
{
if
(
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
.
EndsWith
(
"STEST"
))
{
MoveInfo
.
EndMove
();
BoxPosition
posiiton
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
PosIDManger
.
APosList
.
DRAWER
[
1
][
0
].
PosID
);
InOutParam
param
=
new
InOutParam
(
new
InOutPosInfo
(
"OutstoreSTEST"
,
posiiton
.
PositionNum
,
posiiton
.
BagHigh
,
posiiton
.
BagWidth
,
true
));
param
.
ShelfType
=
1
;
LogUtil
.
info
(
"B出切换到A出"
+
param
.
PosInfo
.
ToStr
());
StartOutstore
(
param
);
return
;
}
//旋转轴暂不回待机点
MoveInfo
.
NextMoveStep
(
StepEnum
.
II86_MiddleToP1
);
MoveLog
(
$
" 直接出库 {MoveInfo.SLog}: 旋转轴 到P1(待机点){Config.Middle_P1}"
);
MiddleAxis
.
AbsMove
(
MoveInfo
,
Config
.
Middle_P1
,
Config
.
Middle_P1_Speed
);
}
}
else
if
(
MoveInfo
.
IsStep
(
StepEnum
.
II86_MiddleToP1
))
{
TimeSpan
span
=
DateTime
.
Now
-
startInTime
;
MoveLog
(
$
"直接出库放料结束,耗时【{FormUtil.GetSpanStr(span)}】"
);
MoveInfo
.
EndMove
();
runStatus
=
RunStatus
.
Runing
;
}
#
endregion
}
private
bool
MiddleToShelf
()
{
...
...
source/DeviceLibrary/storeBean/inputBean/InputEquip_ServerCommunication.cs
0 → 100644
查看文件 @
119952f
using
OnlineStore
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Concurrent
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Linq
;
namespace
DeviceLibrary
{
partial
class
InputEquip
{
volatile
StoreStatus
_storeStatus
=
StoreStatus
.
None
;
// public delegate bool InStoreInfoDelegate(JobInfo jobInfo, bool ng, string msg);
//public event InStoreInfoDelegate InStoreEvent;
//public delegate void OutStoreInfoDelegate(JobInfo jobInfo);
// public event OutStoreInfoDelegate OutStoreEvent;
public
StoreStatus
storeStatus
{
get
=>
_storeStatus
;
set
{
if
(
_storeStatus
!=
value
)
LogUtil
.
info
(
$
"set storeStatus to {value}"
);
_storeStatus
=
value
;
}
}
static
string
server
=
""
;
//Setting_Init.Device_Server_Address;
public
static
string
CID
=
""
;
//Setting_Init.Device_CID;
//int StoreID = 1;
//string StoreName="";
//List<MsgInfo> WarnMsgList = new List<MsgInfo>();
private
System
.
Timers
.
Timer
serverConnectTimer
=
new
System
.
Timers
.
Timer
();
object
serverclock
=
new
object
();
public
bool
selfAudit
=
false
;
public
bool
selfAuditException
=
false
;
public
void
ServerCommunication
()
{
//serverConnectTimer.Interval = 1000;
//serverConnectTimer.AutoReset = true;
//serverConnectTimer.Enabled = true;
//serverConnectTimer.Elapsed += ServerConnectTimer_Elapsed;
//GC.KeepAlive(serverConnectTimer);
//LogUtil.info($"server:{server},cid:{CID}");
}
private
void
ServerConnectTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
try
{
//if (!RobotManage.isRunning)
// ProcessMsg(Msg.msg);
//if (server.StartsWith("http"))
// SendLineStatus();
}
catch
(
Exception
ex
)
{
LogUtil
.
info
(
$
"ServerConnectTimer_Elapsed:{ex}"
);
}
finally
{
//Monitor.Exit(serverConnectTimer);
}
}
public
string
spiltStr
=
"##"
;
/// <summary>
/// 获取整个料仓的状态
/// </summary>
Operation
getLineBoxStatus
()
{
//构建发送给服务器的对象
Operation
lineOperation
=
new
Operation
();
lineOperation
.
msg
=
""
;
lineOperation
.
alarmList
=
new
List
<
AlarmInfo
>();
//lineOperation.cid = CID;
//lineOperation.seq = ConfigAppSettings.nextSeq();
//lineOperation.status = 1;
//lineOperation.language = crc.CurrLanguage;
//lineOperation.status = (int)storeStatus;
//string sendmsg = "";
//if (!RobotManage.isRunning){
// sendmsg = crc.GetString("Res0004","设备未启动");
//}
//lineOperation.msg = sendmsg;
//lineOperation.msg = lineOperation.msg.Trim().Trim(',');
//lineOperation.msgEn = lineOperation.msg;
//lineOperation.msgJp = lineOperation.msg;
//if (WarnMsgList.Count > 0)
//{
// lineOperation.msgList = JsonConvert.DeserializeObject<List<OnlineStore.Common.MsgInfo>>(JsonConvert.SerializeObject(WarnMsgList));
//}
return
lineOperation
;
}
private
static
string
api_communication
=
"service/equipment/communication"
;
//流水线状态通信接口
public
static
string
GetPostApi
()
{
var
host
=
server
;
if
(!
host
.
StartsWith
(
"http://"
))
{
host
=
"http://"
+
host
;
}
if
(!
host
.
EndsWith
(
"/"
))
{
host
=
host
+
"/"
;
}
return
host
+
api_communication
;
}
int
getthtime
=
0
;
int
laststatus
=
0
;
public
void
SendLineStatus
()
{
lock
(
serverclock
)
{
bool
printlog
=
false
;
DateTime
time
=
DateTime
.
Now
;
//构建发送给服务器的对象
Operation
lineOperation
=
getLineBoxStatus
();
if
(
lineOperation
.
status
!=
laststatus
)
{
laststatus
=
lineOperation
.
status
;
printlog
=
true
;
}
//Operation resultOperation = HttpHelper.Post<Operation, Operation>(GetPostApi(), lineOperation, out _, 700, printlog);
//if (resultOperation != null)
// getthtime = 0;
////LogUtil.info(JsonHelper.SerializeObject(resultOperation.data));
////ResultProcess(resultOperation);
//TimeSpan span = DateTime.Now - time;
//if (span.TotalMilliseconds > 700)
//{
// LogUtil.info(StoreName + "TimerProcess[" + span.TotalMilliseconds + "]");
//}
}
}
public
int
queueTaskCount
=-
1
;
void
ResultProcess
(
Operation
resultOperation
)
{
//发送状态信息到服务器
if
(
resultOperation
==
null
)
{
//判断服务端是否返回出库操作
return
;
}
if
(
resultOperation
.
op
.
Equals
(
1
))
{
var
barcode
=
""
;
if
(
resultOperation
.
data
.
ContainsKey
(
"code"
))
barcode
=
resultOperation
.
data
[
"code"
];
ReviceInStoreProcess
(
barcode
,
resultOperation
);
}
else
if
(
resultOperation
.
op
.
Equals
(
2
))
{
ReviceOutStoreProcess
(
resultOperation
);
}
else
if
(
resultOperation
.
op
.
Equals
(
5
))
{
//ProcessHumidityCMD(resultOperation);
}
ProcessHumidityCMD
(
resultOperation
);
if
(
resultOperation
.
data
!=
null
)
{
string
result
=
""
;
Dictionary
<
string
,
string
>
dataMap
=
resultOperation
.
data
;
//if (dataMap.ContainsKey(ParamDefine.queueTaskCount))
//{
// var s = dataMap[ParamDefine.queueTaskCount];
// if (int.TryParse(s, out int c))
// {
// queueTaskCount = c;
// }
// else
// {
// queueTaskCount = -1;
// }
//}
//if (dataMap.ContainsKey(ParamDefine.selfAudit))
//{
// if (!string.IsNullOrEmpty(dataMap[ParamDefine.selfAudit].ToString()))
// selfAudit = true;
//}
//else
// selfAudit = false;
//if (dataMap.ContainsKey(ParamDefine.selfAuditException))
//{
// if (dataMap[ParamDefine.selfAuditException].ToString() == "true")
// selfAuditException = true;
//}
//else
// selfAuditException = false;
//SendLineStatus(result);
}
}
/// <summary>
/// 处理服务器入库库位消息
/// </summary>
/// <param name="message"></param>
/// <param name="resultOperation"></param>
private
void
ReviceInStoreProcess
(
string
message
,
Operation
resultOperation
)
{
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
posId
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateH
)
&&
data
.
ContainsKey
(
ParamDefine
.
plateW
))
{
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置
string
posId
=
data
[
ParamDefine
.
posId
];
int
.
TryParse
(
data
[
ParamDefine
.
plateW
],
out
int
plateW
);
int
.
TryParse
(
data
[
ParamDefine
.
plateH
],
out
int
plateH
);
//string[] posArray = posId.Split('#');
//if (!(posArray.Length == 2))
//{
// WarnMsg = StoreName + "入库库位格式错误:二维码【" + message + "】库位【" + posId + "】";
// //SetWarnMsg(ResourceControl.InStoreError, message, posId);
// LogUtil.error("服务器反馈 入库库位格式错误:二维码【" + message + "】库位【" + posId + "】");
// return;
//}
//int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表
//ACStorePosition position = Machine.StorePosition[posId];
// //if (!RobotManage.allPositionMap.TryGetValue(posId, out ACStorePosition position))
// //{
// // //出入库没有找到服务器发送的库位,需要打印日志方便查询原因
// // //SetWarnMsg(ResourceControl.InStoreNoPosition, message, posId);
// // WarnMsg = crc.GetString("Res0122", "入库未找到库位:") + posId;//0505
// // LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
// // return;
// //}
// //TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
// if (plateH > 56)
// plateH = 56;
// else if (plateH == 0) {
// plateH = position.BagHigh;
// plateW = position.BagWidth;
// }
// int lastReelH = plateH;
// if (data.ContainsKey("lastReelH"))
// int.TryParse(data[ParamDefine.lastReelH], out lastReelH);
// if (lastReelH <= 0)
// lastReelH = plateH;
// Setting_Init.Device_InStoragePreCheck = data.ContainsKey("inputCheck") && data["inputCheck"].ToLower() == "true";
// JobInfo inStoreJob = new JobInfo(message, posId, plateW, plateH);
// inStoreJob.lastReelH = lastReelH;
// if (InStoreEvent.Invoke(inStoreJob, false, ""))
// {
// WarnMsg = "";
// //如果当前正在出入库中,需要记录下来,等待空闲时执行
// LogUtil.info(StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
// }
// else
// {
// SendStoreState("", StoreStatus.InStoreError);
// }
//}
//else
//{
// var ngmsg = resultOperation.msg;
// if (crc.CurrLanguage== "en-US")
// ngmsg = resultOperation.msgEn;
// if (InStoreEvent.Invoke(null, true, ngmsg))
// {
// }
// SendStoreState("", StoreStatus.InStoreError);
// LogUtil.info("服务器没有正确返回库位. msg=" + resultOperation.msg);
}
}
public
float
Max_Humidity
;
public
float
Max_Temperature
;
/// <summary>
/// 处理服务器温湿度消息
/// </summary>
/// <param name="resultOperation"></param>
private
void
ProcessHumidityCMD
(
Operation
resultOperation
)
{
if
(
resultOperation
.
data
==
null
)
return
;
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
//if (data.ContainsKey(ParamDefine.maxHumidity) && data.ContainsKey(ParamDefine.maxTemperature))
//{
// string maxHumidity = data[ParamDefine.maxHumidity];
// string maxTemp = data[ParamDefine.maxTemperature];
// LogUtil.info( "收到服务器温湿度预警值:maxHumidity=" + maxHumidity + ",maxTemperature=" + maxTemp);
// try
// {
// this.Max_Humidity = (float)Convert.ToDouble(maxHumidity);
// this.Max_Temperature = (float)Convert.ToDouble(maxTemp);
// LogUtil.info( "保存温湿度预警值:Max_Humidity=" + Max_Humidity + ",Max_Temperature=" + Max_Temperature);
// }
// catch (Exception ex)
// {
// LogUtil.error("转换温湿度失败:" + ex.ToString());
// }
//}
}
/// <summary>
/// 处理服务器出库任务消息
/// </summary>
/// <param name="resultOperation"></param>
private
void
ReviceOutStoreProcess
(
Operation
resultOperation
)
{
DateTime
time
=
DateTime
.
Now
;
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
//if (data != null && data.ContainsKey(ParamDefine.posId)
// && data.ContainsKey(ParamDefine.plateH) && data.ContainsKey(ParamDefine.plateW))
//{
// string posIdStr = data[ParamDefine.posId];
// string plateWStr = data[ParamDefine.plateW];
// string plateHStr = data[ParamDefine.plateH];
// string singleOut = data[ParamDefine.singleOut];
// string barcode = data[ParamDefine.barcode];
// LogUtil.info("收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr + ",singleOut=" + singleOut);
// char splitChar = '|';
// string[] posIdArray = posIdStr.Split(splitChar);
// string[] plateWArray = plateWStr.Split(splitChar);
// string[] plateHArray = plateHStr.Split(splitChar);
// string[] singleOutArray = singleOut.Split(splitChar);
// string[] barcodeArray = barcode.Split(splitChar);
// int index = -1;
// foreach (string posId in posIdArray)
// {
// index++;
// int.TryParse(plateWArray[index], out int plateW);
// int.TryParse(plateHArray[index], out int plateH);
// var code = barcodeArray[index];
// bool isSingleOut = singleOutArray[index].ToLower().Equals("true");
// //根据发送的posId获取位置列表
// //if (!RobotManage.allPositionMap.TryGetValue(posId, out ACStorePosition position))
// //{
// // //出入库没有找到服务器发送的库位,需要打印日志方便查询原因
// // WarnMsg = StoreName + "出库未找库位:【" + posId + "】";
// // LogUtil.error("收到服务器出库命令:未找到【" + posId + "】的库位信息");
// // continue;
// //}
// //else
// //{
// // var ngReel = false;
// // var ngMsg = "";
// // if (data.ContainsKey("ngReel") && data["ngReel"].ToLower() == "true")
// // {
// // ngReel = true;
// // data.TryGetValue("ngMsg", out ngMsg);
// // }
// // JobInfo outStoreJob = new JobInfo(code, posId, plateW, plateH);
// // outStoreJob.isNG = ngReel;
// // outStoreJob.NgMsg = ngMsg;
// // OutStoreEvent.Invoke(outStoreJob);
// //}
// }
// TimeSpan span = DateTime.Now - time;
// if (span.TotalMilliseconds > 100)
// {
// LogUtil.info(StoreName + "执行 ReviceOutStoreProcess 共处理了【" + span.TotalMilliseconds + "】毫秒");
// }
//}
}
private
static
string
GetAddr
(
string
addr
,
Dictionary
<
string
,
string
>
paramsMap
)
{
if
(
server
.
EndsWith
(
"/"
))
{
server
=
server
.
Substring
(
0
,
server
.
Length
-
1
);
}
string
path
=
server
+
addr
.
Trim
()
+
"?"
;
foreach
(
string
paramName
in
paramsMap
.
Keys
)
{
string
par
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
paramsMap
[
paramName
],
System
.
Text
.
Encoding
.
UTF8
);
path
+=
paramName
+
"="
+
par
+
"&"
;
}
path
=
path
.
Substring
(
0
,
path
.
Length
-
1
);
return
path
;
}
public
Dictionary
<
string
,
int
>
getBoxOutInfo
(
string
boxcode
)
{
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"boxStr"
,
boxcode
);
//string server = GetAddr(ServerInterface.getBoxOutInfo, paramMap);
//DateTime startTime = DateTime.Now;
//string resultStr = HttpHelper.Get(server);
//LogUtil.info("getBoxOutInfo [" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "] 【" + server + "】【" + resultStr + "】");
////{"code":0,"data":{"C0700050-05":1,"C0700050-04":1,"C0700050-01":3,"C0700050-03":1},"msg":"ok","msgKey":"smfcore.ok","okResult":true,"params":[]}
//if (string.IsNullOrEmpty(resultStr))
//{
// LogUtil.error("getBoxOutInfo【 " + boxcode + "】 没有收到服务器反馈");
//}
//else
//{
// var result = JsonHelper.DeserializeJsonToObject<ResultData2>(resultStr);
// if (result.code==0)
// return JsonHelper.DeserializeJsonToObject<Dictionary<string, int>>(result.data.ToString());
//}
return
null
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"getBoxOutInfo: "
+
ex
.
ToString
());
}
return
null
;
}
public
bool
?
starckerLeaveOutStation
(
string
stringCode
)
{
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"stacker"
,
stringCode
);
//string server = GetAddr(ServerInterface.starckerLeaveOutStation, paramMap);
//DateTime startTime = DateTime.Now;
//string resultStr = HttpHelper.Get(server);
//LogUtil.info("starckerLeaveOutStation [" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "] 【" + server + "】【" + resultStr + "】");
//if (string.IsNullOrEmpty(resultStr))
//{
// LogUtil.error("starckerLeaveOutStation【 " + stringCode + "】 没有收到服务器反馈");
//}
//else
//{
// var result = JsonHelper.DeserializeJsonToObject<ResultData2>(resultStr);
// return result?.code == 0;
//}
return
null
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"starckerLeaveOutStation: "
+
ex
.
ToString
());
}
return
null
;
}
public
bool
?
starckerLeaveOutStationisFull
(
string
stringCode
,
bool
isFull
)
{
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"stacker"
,
stringCode
);
paramMap
.
Add
(
"isFull"
,
isFull
.
ToString
());
//string server = GetAddr(ServerInterface.starckerLeaveOutStationisFull, paramMap);
//DateTime startTime = DateTime.Now;
//string resultStr = HttpHelper.Get(server);
//LogUtil.info("starckerLeaveOutStationisFull [" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "] 【" + server + "】【" + resultStr + "】");
//if (string.IsNullOrEmpty(resultStr))
//{
// LogUtil.error("starckerLeaveOutStationisFull【 " + stringCode + "】 没有收到服务器反馈");
//}
//else
//{
// var result = JsonHelper.DeserializeJsonToObject<ResultData2>(resultStr);
// return result?.code == 0;
//}
return
null
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"starckerLeaveOutStationisFull: "
+
ex
.
ToString
());
}
return
null
;
}
public
bool
?
boxIntoPos
(
string
boxcode
)
{
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"boxStr"
,
boxcode
);
//paramMap.Add("boxLoc", Setting_Init.);
//string server = GetAddr(ServerInterface.boxIntoPos, paramMap);
//DateTime startTime = DateTime.Now;
//string resultStr = HttpHelper.Get(server);
//LogUtil.info("boxIntoPos [" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "] 【" + server + "】【" + resultStr + "】");
//if (string.IsNullOrEmpty(resultStr))
//{
// LogUtil.error("boxIntoPos【 " + boxcode + "】 没有收到服务器反馈");
//}
//else
//{
// var result = JsonHelper.DeserializeJsonToObject<ResultData2>(resultStr);
// return result.code == 0;
//}
return
null
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"getBoxOutInfo: "
+
ex
.
ToString
());
}
return
null
;
}
public
bool
?
currentReelSize
(
string
grid_number
,
string
stringBarcode
,
out
string
barcode
,
out
int
platSize
,
out
int
height
)
{
barcode
=
""
;
platSize
=
0
;
height
=
0
;
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"boxStr"
,
grid_number
);
paramMap
.
Add
(
"isNormal"
,
"true"
);
paramMap
.
Add
(
"materialStr"
,
stringBarcode
);
paramMap
.
Add
(
"currentLoc"
,
CID
);
//string server = GetAddr(ServerInterface.currentReelSize, paramMap);
//DateTime startTime = DateTime.Now;
//string resultStr = HttpHelper.Get(server);
//LogUtil.info("currentReelSize [" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "] 【" + server + "】【" + resultStr + "】");
//if (string.IsNullOrEmpty(resultStr))
//{
// LogUtil.error("currentReelSize【 " + grid_number + "】 没有收到服务器反馈");
// return null;
//}
//else
//{
// var result = JsonHelper.DeserializeJsonToObject<ResultData2>(resultStr);
// if (result==null)
// return null;
// if (result.code == 0)
// {
// var data = JsonHelper.DeserializeJsonToObject<Dictionary<string, string>>(result.data.ToString());
// barcode = data["barcode"].ToString();
// int.TryParse(data["platSize"].ToString(), out platSize);
// int.TryParse(data["height"].ToString(), out height);
// return true;
// }
// if (result.code == int.MinValue)
// return null;
// else
// return false;
//}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"currentReelSize: "
+
ex
.
ToString
());
}
return
null
;
}
}
public
class
ResultData
{
//{"code":0,"msg":"ok","data":"7"}
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
Dictionary
<
string
,
string
>
data
{
get
;
set
;
}
}
public
class
ResultData2
{
//{"code":0,"msg":"ok","data":"7"}
public
int
code
{
get
;
set
;
}
=
int
.
MinValue
;
public
string
msg
{
get
;
set
;
}
public
object
data
{
get
;
set
;
}
}
/// <summary>
///1=设备联机(正常就绪)(入库后,BOX恢复原始状态)(出库后,移载装置恢复原始状态),
///2=急停,3=故障,4=警告,5=调试
/// 6=入库执行中,7=入仓完成,8=入仓失败
/// 9=出库执行,10=出仓完成,11=出库失败
/// </summary>
public
enum
StoreStatus
{
None
=
0
,
/// <summary>
/// 1=设备联机(正常就绪)(入库后,BOX恢复原始状态)(出库后,移载装置恢复原始状态),
/// </summary>
StoreOnline
=
1
,
/// <summary>
///2=急停中
/// </summary>
SuddenStop
=
2
,
/// <summary>
/// 3=故障中
/// </summary>
InTrouble
=
3
,
/// <summary>
/// 4=警告
/// </summary>
Warning
=
4
,
/// <summary>
/// 5=设备调试中
/// </summary>
Debugging
=
5
,
/// <summary>
/// 6=入库执行中
/// </summary>
InStoreExecute
=
6
,
/// <summary>
/// 7= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
/// </summary>
InStoreEnd
=
7
,
/// <summary>
/// 8=入库失败
/// </summary>
InStoreFaild
=
8
,
/// <summary>
/// 9=出库执行中",
/// </summary>
OutStoreExecute
=
9
,
/// <summary>
///10= 出仓位完成( 料盘已经放到Box门口)
/// </summary>
OutStoreBoxEnd
=
10
,
/// <summary>
///11=出库完成
/// </summary>
OutStoreEnd
=
11
,
/// <summary>
/// 12=移栽出库移栽过程中(移栽完成后变成OnLine)
/// </summary>
OutMoveExecute
=
12
,
/// <summary>
/// 重置中(原点返回和重置都发此状态)
/// </summary>
ResetMove
=
13
,
/// <summary>
/// 扫码入库失败
/// </summary>
InStoreError
=
14
,
}
}
\ No newline at end of file
source/HuichuanLibrary/HuichuanLibrary.csproj
查看文件 @
119952f
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Obfuscar.2.2.40\build\obfuscar.props" Condition="Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...
...
@@ -13,6 +14,8 @@
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
...
...
@@ -114,4 +117,10 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Obfuscar.2.2.40\build\obfuscar.props'))" />
</Target>
</Project>
\ No newline at end of file
source/HuichuanLibrary/packages.config
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"log4net"
version
=
"2.0.12"
targetFramework
=
"net461"
/>
<
package
id
=
"Obfuscar"
version
=
"2.2.40"
targetFramework
=
"net48"
developmentDependency
=
"true"
/>
</
packages
>
\ No newline at end of file
source/LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
119952f
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Obfuscar.2.2.40\build\obfuscar.props" Condition="Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...
...
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
...
...
@@ -75,6 +78,12 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Obfuscar.2.2.40\build\obfuscar.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Obfuscar.2.2.40\build\obfuscar.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
...
...
source/LoadCVSLibrary/packages.config
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"log4net"
version
=
"2.0.12"
targetFramework
=
"net40"
requireReinstallation
=
"true"
/>
<
package
id
=
"Obfuscar"
version
=
"2.2.40"
targetFramework
=
"net48"
developmentDependency
=
"true"
/>
</
packages
>
\ No newline at end of file
source/XLRStoreClient/App.config
查看文件 @
119952f
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configSections
>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
<
section
name
=
"log4net"
type
=
"log4net.Config.Log4NetConfigurationSectionHandler,log4net"
/>
</
configSections
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/XLR-SO908.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/XLR-SO908.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"TheRFID"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/rfid/TheRFID-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/rfid/TheRFID-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"Rmaxis"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/rmaix/Rmaxis-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
file
value
=
"logs/rmaix/Rmaxis-line.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
logger
>
<
logger
name
=
"TheRFID"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"TheRFID"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"TheRFID"
/>
</
logger
>
<
logger
name
=
"Rmaxis"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"Rmaxis"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"Rmaxis"
/>
</
logger
>
<!--<
root
>
<
level
value
=
"Info"
/>
...
...
@@ -52,13 +52,13 @@
</
root
>-->
</
log4net
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
</
startup
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
<
assemblyIdentity
name
=
"log4net"
publicKeyToken
=
"669e0ddf0bb1aa2a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-2.0.12.0"
newVersion
=
"2.0.12.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
...
...
source/XLRStoreClient/FrmXLRStore.Designer.cs
查看文件 @
119952f
...
...
@@ -31,6 +31,8 @@
this
.
components
=
new
System
.
ComponentModel
.
Container
();
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmXLRStore
));
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage4
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
ct1
=
new
OnlineStore
.
XLRStore
.
useControl
.
CT
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
logBox
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
tabPage2
=
new
System
.
Windows
.
Forms
.
TabPage
();
...
...
@@ -89,6 +91,7 @@
this
.
禁用安全光栅
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
启用门禁
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage4
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage2
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
...
...
@@ -103,6 +106,7 @@
this
.
tabControl1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage4
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage1
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage2
);
this
.
tabControl1
.
Controls
.
Add
(
this
.
tabPage3
);
...
...
@@ -111,17 +115,38 @@
this
.
tabControl1
.
Multiline
=
true
;
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
996
,
638
);
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
996
,
780
);
this
.
tabControl1
.
TabIndex
=
0
;
this
.
tabControl1
.
DrawItem
+=
new
System
.
Windows
.
Forms
.
DrawItemEventHandler
(
this
.
tabControl1_DrawItem
);
this
.
tabControl1
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
tabControl1_SelectedIndexChanged
);
//
// tabPage4
//
this
.
tabPage4
.
Controls
.
Add
(
this
.
ct1
);
this
.
tabPage4
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage4
.
Name
=
"tabPage4"
;
this
.
tabPage4
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage4
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
747
);
this
.
tabPage4
.
TabIndex
=
3
;
this
.
tabPage4
.
Text
=
"CT测试"
;
this
.
tabPage4
.
UseVisualStyleBackColor
=
true
;
//
// ct1
//
this
.
ct1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ct1
.
Enabled
=
false
;
this
.
ct1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
ct1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
ct1
.
Name
=
"ct1"
;
this
.
ct1
.
Size
=
new
System
.
Drawing
.
Size
(
982
,
741
);
this
.
ct1
.
TabIndex
=
0
;
//
// tabPage1
//
this
.
tabPage1
.
Controls
.
Add
(
this
.
logBox
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
32
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
602
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
67
);
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
Text
=
" 运行日志 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -134,7 +159,7 @@
this
.
logBox
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
logBox
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
3
);
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
977
,
591
);
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
181
,
56
);
this
.
logBox
.
TabIndex
=
106
;
this
.
logBox
.
Text
=
""
;
this
.
logBox
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
logBox_VisibleChanged
);
...
...
@@ -142,9 +167,9 @@
// tabPage2
//
this
.
tabPage2
.
Controls
.
Add
(
this
.
panel1
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
32
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
64
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
747
);
this
.
tabPage2
.
TabIndex
=
1
;
this
.
tabPage2
.
Text
=
" 设备状态 "
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -155,7 +180,7 @@
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
64
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
747
);
this
.
panel1
.
TabIndex
=
1
;
//
// tableLayoutPanel1
...
...
@@ -180,7 +205,7 @@
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
14.28571F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
19.04762F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
19.04762F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
64
);
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
988
,
747
);
this
.
tableLayoutPanel1
.
TabIndex
=
0
;
//
// InputControl
...
...
@@ -191,11 +216,11 @@
this
.
tableLayoutPanel1
.
SetColumnSpan
(
this
.
InputControl
,
2
);
this
.
InputControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
InputControl
.
EquipText
=
"上料机构"
;
this
.
InputControl
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
4
3
);
this
.
InputControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
InputControl
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
4
64
);
this
.
InputControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
InputControl
.
MoveInfo
=
"暂无出入库"
;
this
.
InputControl
.
Name
=
"InputControl"
;
this
.
InputControl
.
Size
=
new
System
.
Drawing
.
Size
(
184
,
4
);
this
.
InputControl
.
Size
=
new
System
.
Drawing
.
Size
(
980
,
13
4
);
this
.
InputControl
.
TabIndex
=
5
;
this
.
InputControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
@@ -205,11 +230,11 @@
this
.
ReelControlA1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlA1
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlA1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlA1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
);
this
.
ReelControlA1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
ReelControlA1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
25
2
);
this
.
ReelControlA1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
ReelControlA1
.
Name
=
"ReelControlA1"
;
this
.
ReelControlA1
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlA1
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
1
);
this
.
ReelControlA1
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
98
);
this
.
ReelControlA1
.
TabIndex
=
0
;
//
// ReelControlA2
...
...
@@ -218,11 +243,11 @@
this
.
ReelControlA2
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlA2
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlA2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlA2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
3
4
);
this
.
ReelControlA2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
ReelControlA2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
3
58
);
this
.
ReelControlA2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
ReelControlA2
.
Name
=
"ReelControlA2"
;
this
.
ReelControlA2
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlA2
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
1
);
this
.
ReelControlA2
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
98
);
this
.
ReelControlA2
.
TabIndex
=
1
;
//
// ReelControlB1
...
...
@@ -231,11 +256,11 @@
this
.
ReelControlB1
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlB1
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlB1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlB1
.
Location
=
new
System
.
Drawing
.
Point
(
100
,
25
);
this
.
ReelControlB1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
ReelControlB1
.
Location
=
new
System
.
Drawing
.
Point
(
498
,
252
);
this
.
ReelControlB1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
ReelControlB1
.
Name
=
"ReelControlB1"
;
this
.
ReelControlB1
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlB1
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
1
);
this
.
ReelControlB1
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
98
);
this
.
ReelControlB1
.
TabIndex
=
2
;
//
// ReelControlB2
...
...
@@ -244,11 +269,11 @@
this
.
ReelControlB2
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
ReelControlB2
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ReelControlB2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ReelControlB2
.
Location
=
new
System
.
Drawing
.
Point
(
100
,
34
);
this
.
ReelControlB2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
ReelControlB2
.
Location
=
new
System
.
Drawing
.
Point
(
498
,
358
);
this
.
ReelControlB2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
ReelControlB2
.
Name
=
"ReelControlB2"
;
this
.
ReelControlB2
.
ReelText
=
"暂存区物料"
;
this
.
ReelControlB2
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
1
);
this
.
ReelControlB2
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
98
);
this
.
ReelControlB2
.
TabIndex
=
3
;
//
// BoxControl
...
...
@@ -260,10 +285,10 @@
this
.
BoxControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
BoxControl
.
EquipText
=
"存储机构"
;
this
.
BoxControl
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
4
);
this
.
BoxControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
BoxControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
BoxControl
.
MoveInfo
=
"暂无出入库"
;
this
.
BoxControl
.
Name
=
"BoxControl"
;
this
.
BoxControl
.
Size
=
new
System
.
Drawing
.
Size
(
184
,
13
);
this
.
BoxControl
.
Size
=
new
System
.
Drawing
.
Size
(
980
,
240
);
this
.
BoxControl
.
TabIndex
=
4
;
this
.
BoxControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
@@ -274,11 +299,11 @@
this
.
ShelfAControl
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ShelfAControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ShelfAControl
.
EquipText
=
"A料口"
;
this
.
ShelfAControl
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
55
);
this
.
ShelfAControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
ShelfAControl
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
606
);
this
.
ShelfAControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
ShelfAControl
.
MoveInfo
=
"暂无出入库"
;
this
.
ShelfAControl
.
Name
=
"ShelfAControl"
;
this
.
ShelfAControl
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
5
);
this
.
ShelfAControl
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
137
);
this
.
ShelfAControl
.
TabIndex
=
6
;
this
.
ShelfAControl
.
WorkStatus
=
"暂未启动"
;
//
...
...
@@ -289,20 +314,20 @@
this
.
ShelfBControl
.
ColorStatus
=
System
.
Drawing
.
Color
.
White
;
this
.
ShelfBControl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ShelfBControl
.
EquipText
=
"B料口"
;
this
.
ShelfBControl
.
Location
=
new
System
.
Drawing
.
Point
(
100
,
55
);
this
.
ShelfBControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
ShelfBControl
.
Location
=
new
System
.
Drawing
.
Point
(
498
,
606
);
this
.
ShelfBControl
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
ShelfBControl
.
MoveInfo
=
"暂无出入库"
;
this
.
ShelfBControl
.
Name
=
"ShelfBControl"
;
this
.
ShelfBControl
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
5
);
this
.
ShelfBControl
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
137
);
this
.
ShelfBControl
.
TabIndex
=
7
;
this
.
ShelfBControl
.
WorkStatus
=
"暂未启动"
;
//
// tabPage3
//
this
.
tabPage3
.
Controls
.
Add
(
this
.
panelVideo
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
60
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
54
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
36
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
42
);
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
Text
=
"监控"
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -312,7 +337,7 @@
this
.
panelVideo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panelVideo
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panelVideo
.
Name
=
"panelVideo"
;
this
.
panelVideo
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
36
);
this
.
panelVideo
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
42
);
this
.
panelVideo
.
TabIndex
=
0
;
//
// lblStatus
...
...
@@ -322,7 +347,7 @@
this
.
lblStatus
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblStatus
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
46
);
this
.
lblStatus
.
Name
=
"lblStatus"
;
this
.
lblStatus
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
24
);
this
.
lblStatus
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
20
);
this
.
lblStatus
.
TabIndex
=
92
;
this
.
lblStatus
.
Text
=
"等待启动"
;
//
...
...
@@ -356,24 +381,24 @@
this
.
toolStripSeparator8
,
this
.
toolStripMenuItem1
});
this
.
contextMenuStrip1
.
Name
=
"contextMenuStrip1"
;
this
.
contextMenuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
1
25
,
74
);
this
.
contextMenuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
1
13
,
62
);
//
// 显示ToolStripMenuItem
//
this
.
显示
ToolStripMenuItem
.
Name
=
"显示ToolStripMenuItem"
;
this
.
显示
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
24
,
32
);
this
.
显示
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
12
,
26
);
this
.
显示
ToolStripMenuItem
.
Text
=
"显示"
;
this
.
显示
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
显示
ToolStripMenuItem_Click
);
//
// toolStripSeparator8
//
this
.
toolStripSeparator8
.
Name
=
"toolStripSeparator8"
;
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
1
21
,
6
);
this
.
toolStripSeparator8
.
Size
=
new
System
.
Drawing
.
Size
(
1
09
,
6
);
//
// toolStripMenuItem1
//
this
.
toolStripMenuItem1
.
Name
=
"toolStripMenuItem1"
;
this
.
toolStripMenuItem1
.
Size
=
new
System
.
Drawing
.
Size
(
1
24
,
32
);
this
.
toolStripMenuItem1
.
Size
=
new
System
.
Drawing
.
Size
(
1
12
,
26
);
this
.
toolStripMenuItem1
.
Text
=
"退出"
;
this
.
toolStripMenuItem1
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem1_Click
);
//
...
...
@@ -395,60 +420,60 @@
this
.
toolStripSeparator2
,
this
.
退出
ToolStripMenuItem
});
this
.
操作
ToolStripMenuItem
.
Name
=
"操作ToolStripMenuItem"
;
this
.
操作
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
118
,
31
);
this
.
操作
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
96
,
25
);
this
.
操作
ToolStripMenuItem
.
Text
=
" 设备操作 "
;
//
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
// 启动AToolStripMenuItem
//
this
.
启动
AToolStripMenuItem
.
Name
=
"启动AToolStripMenuItem"
;
this
.
启动
AToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
32
);
this
.
启动
AToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
启动
AToolStripMenuItem
.
Text
=
"启动 "
;
this
.
启动
AToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启动所有料仓
AToolStripMenuItem_Click
);
//
// toolStripSeparator4
//
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
// 复位RToolStripMenuItem
//
this
.
复位
RToolStripMenuItem
.
Name
=
"复位RToolStripMenuItem"
;
this
.
复位
RToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
32
);
this
.
复位
RToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
复位
RToolStripMenuItem
.
Text
=
"复位"
;
this
.
复位
RToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复位
RToolStripMenuItem_Click
);
//
// toolStripSeparator3
//
this
.
toolStripSeparator3
.
Name
=
"toolStripSeparator3"
;
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
// 停止TToolStripMenuItem
//
this
.
停止
TToolStripMenuItem
.
Name
=
"停止TToolStripMenuItem"
;
this
.
停止
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
32
);
this
.
停止
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
停止
TToolStripMenuItem
.
Text
=
"停止"
;
this
.
停止
TToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
停止所有料仓
TToolStripMenuItem_Click
);
//
// toolStripSeparator5
//
this
.
toolStripSeparator5
.
Name
=
"toolStripSeparator5"
;
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
//
// toolStripSeparator2
//
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
this
.
toolStripSeparator2
.
Visible
=
false
;
//
// 退出ToolStripMenuItem
//
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
32
);
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
退出
ToolStripMenuItem
.
Text
=
"退出"
;
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click_1
);
//
...
...
@@ -463,49 +488,49 @@
this
.
toolStripMenuItem3
,
this
.
查看监控
ToolStripMenuItem
});
this
.
设置
TToolStripMenuItem
.
Name
=
"设置TToolStripMenuItem"
;
this
.
设置
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
31
);
this
.
设置
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
25
);
this
.
设置
TToolStripMenuItem
.
Text
=
"设备调试 "
;
//
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
6
);
this
.
toolStripSeparator6
.
Visible
=
false
;
//
// 二维码学习ToolStripMenuItem
//
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
32
);
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码学习"
;
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
//
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
6
);
//
// 托盘初始化ToolStripMenuItem
//
this
.
托盘初始化
ToolStripMenuItem
.
Name
=
"托盘初始化ToolStripMenuItem"
;
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
32
);
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
托盘初始化
ToolStripMenuItem
.
Text
=
"托盘编码"
;
//
// toolStripSeparator16
//
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
6
);
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
6
);
//
// toolStripMenuItem3
//
this
.
toolStripMenuItem3
.
Name
=
"toolStripMenuItem3"
;
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
32
);
this
.
toolStripMenuItem3
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
toolStripMenuItem3
.
Text
=
"脆盘料号配置"
;
this
.
toolStripMenuItem3
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem3_Click
);
//
// 查看监控ToolStripMenuItem
//
this
.
查看监控
ToolStripMenuItem
.
Name
=
"查看监控ToolStripMenuItem"
;
this
.
查看监控
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
32
);
this
.
查看监控
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
26
);
this
.
查看监控
ToolStripMenuItem
.
Text
=
"查看监控"
;
this
.
查看监控
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
查看监控
ToolStripMenuItem_Click
);
//
...
...
@@ -518,37 +543,37 @@
this
.
toolStripSeparator11
,
this
.
版本号
ToolStripMenuItem
});
this
.
帮助
ToolStripMenuItem
.
Name
=
"帮助ToolStripMenuItem"
;
this
.
帮助
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
31
);
this
.
帮助
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
69
,
25
);
this
.
帮助
ToolStripMenuItem
.
Text
=
" 系统 "
;
//
// 清空日志ToolStripMenuItem
//
this
.
清空日志
ToolStripMenuItem
.
Name
=
"清空日志ToolStripMenuItem"
;
this
.
清空日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
78
,
32
);
this
.
清空日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
清空日志
ToolStripMenuItem
.
Text
=
"清空日志"
;
this
.
清空日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清空日志
ToolStripMenuItem_Click
);
//
// toolStripSeparator10
//
this
.
toolStripSeparator10
.
Name
=
"toolStripSeparator10"
;
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
6
);
this
.
toolStripSeparator10
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
// 复制日志ToolStripMenuItem
//
this
.
复制日志
ToolStripMenuItem
.
Name
=
"复制日志ToolStripMenuItem"
;
this
.
复制日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
78
,
32
);
this
.
复制日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
复制日志
ToolStripMenuItem
.
Text
=
"复制日志"
;
this
.
复制日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复制日志
ToolStripMenuItem_Click
);
//
// toolStripSeparator11
//
this
.
toolStripSeparator11
.
Name
=
"toolStripSeparator11"
;
this
.
toolStripSeparator11
.
Size
=
new
System
.
Drawing
.
Size
(
1
75
,
6
);
this
.
toolStripSeparator11
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
// 版本号ToolStripMenuItem
//
this
.
版本号
ToolStripMenuItem
.
Name
=
"版本号ToolStripMenuItem"
;
this
.
版本号
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
78
,
32
);
this
.
版本号
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
版本号
ToolStripMenuItem
.
Text
=
"关于软件"
;
this
.
版本号
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
版本号
ToolStripMenuItem_Click
);
//
...
...
@@ -564,7 +589,7 @@
this
.
帮助
ToolStripMenuItem
});
this
.
menuStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
menuStrip1
.
Name
=
"menuStrip1"
;
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
1004
,
35
);
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
1004
,
29
);
this
.
menuStrip1
.
TabIndex
=
4
;
this
.
menuStrip1
.
Text
=
"menuStrip1"
;
//
...
...
@@ -580,37 +605,37 @@
this
.
禁用安全光栅
ToolStripMenuItem
,
this
.
启用门禁
ToolStripMenuItem
});
this
.
运行参数
ToolStripMenuItem
.
Name
=
"运行参数ToolStripMenuItem"
;
this
.
运行参数
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
106
,
31
);
this
.
运行参数
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
this
.
运行参数
ToolStripMenuItem
.
Text
=
"运行参数"
;
//
// 开机自动启动ToolStripMenuItem
//
this
.
开机自动启动
ToolStripMenuItem
.
Name
=
"开机自动启动ToolStripMenuItem"
;
this
.
开机自动启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
54
,
32
);
this
.
开机自动启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
06
,
26
);
this
.
开机自动启动
ToolStripMenuItem
.
Text
=
"开机自动启动"
;
this
.
开机自动启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开机自动启动
ToolStripMenuItem_Click
);
//
// toolStripSeparator15
//
this
.
toolStripSeparator15
.
Name
=
"toolStripSeparator15"
;
this
.
toolStripSeparator15
.
Size
=
new
System
.
Drawing
.
Size
(
2
51
,
6
);
this
.
toolStripSeparator15
.
Size
=
new
System
.
Drawing
.
Size
(
2
03
,
6
);
//
// 启用蜂鸣器ToolStripMenuItem
//
this
.
启用蜂鸣器
ToolStripMenuItem
.
Name
=
"启用蜂鸣器ToolStripMenuItem"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
54
,
32
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
06
,
26
);
this
.
启用蜂鸣器
ToolStripMenuItem
.
Text
=
"启用蜂鸣器"
;
this
.
启用蜂鸣器
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用蜂鸣器
ToolStripMenuItem_Click
);
//
// toolStripSeparator25
//
this
.
toolStripSeparator25
.
Name
=
"toolStripSeparator25"
;
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
2
51
,
6
);
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
2
03
,
6
);
//
// aGVCancelStateToolStripMenuItem
//
this
.
aGVCancelStateToolStripMenuItem
.
Name
=
"aGVCancelStateToolStripMenuItem"
;
this
.
aGVCancelStateToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
54
,
32
);
this
.
aGVCancelStateToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
06
,
26
);
this
.
aGVCancelStateToolStripMenuItem
.
Text
=
"AGV cancelState"
;
this
.
aGVCancelStateToolStripMenuItem
.
Visible
=
false
;
this
.
aGVCancelStateToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
aGVCancelStateToolStripMenuItem_Click
);
...
...
@@ -618,20 +643,20 @@
// toolStripSeparator17
//
this
.
toolStripSeparator17
.
Name
=
"toolStripSeparator17"
;
this
.
toolStripSeparator17
.
Size
=
new
System
.
Drawing
.
Size
(
2
51
,
6
);
this
.
toolStripSeparator17
.
Size
=
new
System
.
Drawing
.
Size
(
2
03
,
6
);
this
.
toolStripSeparator17
.
Visible
=
false
;
//
// 禁用安全光栅ToolStripMenuItem
//
this
.
禁用安全光栅
ToolStripMenuItem
.
Name
=
"禁用安全光栅ToolStripMenuItem"
;
this
.
禁用安全光栅
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
54
,
32
);
this
.
禁用安全光栅
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
06
,
26
);
this
.
禁用安全光栅
ToolStripMenuItem
.
Text
=
"启用安全光栅"
;
this
.
禁用安全光栅
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用安全光栅
ToolStripMenuItem_Click
);
//
// 启用门禁ToolStripMenuItem
//
this
.
启用门禁
ToolStripMenuItem
.
Name
=
"启用门禁ToolStripMenuItem"
;
this
.
启用门禁
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
54
,
32
);
this
.
启用门禁
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
2
06
,
26
);
this
.
启用门禁
ToolStripMenuItem
.
Text
=
"启用门禁"
;
this
.
启用门禁
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启用门禁
ToolStripMenuItem_Click
);
//
...
...
@@ -639,7 +664,7 @@
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1004
,
721
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1004
,
863
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
this
.
Controls
.
Add
(
this
.
lblStatus
);
this
.
Controls
.
Add
(
this
.
lblWarnMsg
);
...
...
@@ -656,6 +681,7 @@
this
.
FormClosed
+=
new
System
.
Windows
.
Forms
.
FormClosedEventHandler
(
this
.
FrmLineStore_FormClosed
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmMain_Load
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage4
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
tabPage2
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
...
...
@@ -729,6 +755,8 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
查看监控
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage3
;
private
System
.
Windows
.
Forms
.
Panel
panelVideo
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage4
;
private
useControl
.
CT
ct1
;
}
}
source/XLRStoreClient/FrmXLRStore.cs
查看文件 @
119952f
...
...
@@ -80,8 +80,8 @@ namespace OnlineStore.XLRStore
{
formLineStatus
(
false
);
string
title
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
this
.
Text
=
title
;
this
.
notifyIcon1
.
Text
=
title
;
this
.
Text
=
title
+
" - 设备维护版"
;
this
.
notifyIcon1
.
Text
=
title
+
" - 设备维护版"
;
int
autoValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
StoreBean
=
StoreManager
.
XLRStore
;
if
(
StoreBean
==
null
)
...
...
source/XLRStoreClient/Program.cs
查看文件 @
119952f
...
...
@@ -54,6 +54,15 @@ namespace OnlineStore.XLRStore
[
STAThread
]
static
void
Main
(
string
[]
Args
)
{
// 创建一个新的事件源
if
(!
EventLog
.
SourceExists
(
"XLRStore"
))
{
// 如果不存在,则创建一个新的事件源
EventLog
.
CreateEventSource
(
"XLRStore"
,
"Application"
);
}
// 使用类型名来限定静态方法WriteEntry
EventLog
.
WriteEntry
(
"XLRStore"
,
"启动"
,
EventLogEntryType
.
Information
);
//string code = " (X: 380,Y: 148) L00000000000WG9D19055;E20191230 0180;B7H.10618.5B1008082019123004000;R0080820191230E9600";
//string r = CodeManager.ReplaceCode(code);
...
...
@@ -65,7 +74,7 @@ namespace OnlineStore.XLRStore
Process
currentproc
=
Process
.
GetCurrentProcess
();
Process
[]
processcollection
=
Process
.
GetProcessesByName
(
currentproc
.
ProcessName
.
Replace
(
".vshost"
,
string
.
Empty
));
// 该程序已经运行,
//PosIDManger.SaveToFile();
bool
isShow
=
false
;
if
(
processcollection
.
Length
>=
1
)
{
...
...
@@ -100,6 +109,7 @@ namespace OnlineStore.XLRStore
{
System
.
Net
.
ServicePointManager
.
DefaultConnectionLimit
=
512
;
XmlConfigurator
.
Configure
();
LogUtil
.
info
(
"程序启动"
);
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
ManagerUtil
.
Init
();
...
...
source/XLRStoreClient/XLRStore.csproj
查看文件 @
119952f
...
...
@@ -214,6 +214,12 @@
<Compile Include="useControl\ClampJawControl.Designer.cs">
<DependentUpon>ClampJawControl.cs</DependentUpon>
</Compile>
<Compile Include="useControl\CT.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\CT.Designer.cs">
<DependentUpon>CT.cs</DependentUpon>
</Compile>
<Compile Include="useControl\ReelDataControl.cs">
<SubType>UserControl</SubType>
</Compile>
...
...
@@ -295,6 +301,9 @@
<EmbeddedResource Include="useControl\ClampJawControl.resx">
<DependentUpon>ClampJawControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\CT.resx">
<DependentUpon>CT.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\ReelDataControl.resx">
<DependentUpon>ReelDataControl.cs</DependentUpon>
</EmbeddedResource>
...
...
@@ -402,8 +411,10 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>"$(Obfuscar)" obfuscar.xml</PostBuildEvent>
<PropertyGroup>
<PostBuildEvent>"$(Obfuscar)" obfuscar.xml
rem copy /y $(TargetDir)Obfuscator_Output\$(TargetFileName) $(TargetDir)$(TargetFileName)
rem copy /y $(TargetDir)Obfuscator_Output\DeviceLibrary.dll $(TargetDir)DeviceLibrary.dll</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
...
...
source/XLRStoreClient/boxForm/FrmAxisMove.Designer.cs
查看文件 @
119952f
...
...
@@ -191,6 +191,7 @@
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnToPosPage
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox18
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btn_outin
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOutstoreTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInstoreTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -571,7 +572,7 @@
this
.
tabPage5
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage5
.
Name
=
"tabPage5"
;
this
.
tabPage5
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage5
.
Size
=
new
System
.
Drawing
.
Size
(
1637
,
35
0
);
this
.
tabPage5
.
Size
=
new
System
.
Drawing
.
Size
(
1637
,
35
2
);
this
.
tabPage5
.
TabIndex
=
1
;
this
.
tabPage5
.
Text
=
"A面移栽"
;
this
.
tabPage5
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1292,7 +1293,7 @@
this
.
tabPage3
.
Controls
.
Add
(
this
.
tableLayoutPanel3
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
990
,
2
70
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
990
,
2
69
);
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
Text
=
"抽屉信号"
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1311,7 +1312,7 @@
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
990
,
2
70
);
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
990
,
2
69
);
this
.
tableLayoutPanel3
.
TabIndex
=
7
;
//
// groupBox22
...
...
@@ -1332,9 +1333,9 @@
this
.
groupBox22
.
Controls
.
Add
(
this
.
Row_Check_7
);
this
.
groupBox22
.
Controls
.
Add
(
this
.
Row_Check_8
);
this
.
groupBox22
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox22
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
18
3
);
this
.
groupBox22
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
18
1
);
this
.
groupBox22
.
Name
=
"groupBox22"
;
this
.
groupBox22
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
8
4
);
this
.
groupBox22
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
8
5
);
this
.
groupBox22
.
TabIndex
=
2
;
this
.
groupBox22
.
TabStop
=
false
;
this
.
groupBox22
.
Text
=
"层信号"
;
...
...
@@ -1484,9 +1485,9 @@
this
.
groupBox21
.
Controls
.
Add
(
this
.
Column_Check_B1
);
this
.
groupBox21
.
Controls
.
Add
(
this
.
BHorizontal_Check
);
this
.
groupBox21
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox21
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
9
3
);
this
.
groupBox21
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
9
2
);
this
.
groupBox21
.
Name
=
"groupBox21"
;
this
.
groupBox21
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
8
4
);
this
.
groupBox21
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
8
3
);
this
.
groupBox21
.
TabIndex
=
1
;
this
.
groupBox21
.
TabStop
=
false
;
this
.
groupBox21
.
Text
=
"B面信号"
;
...
...
@@ -1566,7 +1567,7 @@
this
.
groupBox20
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox20
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
groupBox20
.
Name
=
"groupBox20"
;
this
.
groupBox20
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
8
4
);
this
.
groupBox20
.
Size
=
new
System
.
Drawing
.
Size
(
984
,
8
3
);
this
.
groupBox20
.
TabIndex
=
0
;
this
.
groupBox20
.
TabStop
=
false
;
this
.
groupBox20
.
Text
=
"A面信号"
;
...
...
@@ -1639,7 +1640,7 @@
this
.
tabPage7
.
Controls
.
Add
(
this
.
groupBox25
);
this
.
tabPage7
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
tabPage7
.
Name
=
"tabPage7"
;
this
.
tabPage7
.
Size
=
new
System
.
Drawing
.
Size
(
990
,
2
70
);
this
.
tabPage7
.
Size
=
new
System
.
Drawing
.
Size
(
990
,
2
69
);
this
.
tabPage7
.
TabIndex
=
3
;
this
.
tabPage7
.
Text
=
"参数配置"
;
this
.
tabPage7
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1861,6 +1862,7 @@
//
// groupBox18
//
this
.
groupBox18
.
Controls
.
Add
(
this
.
btn_outin
);
this
.
groupBox18
.
Controls
.
Add
(
this
.
btnOutstoreTest
);
this
.
groupBox18
.
Controls
.
Add
(
this
.
btnInstoreTest
);
this
.
groupBox18
.
Controls
.
Add
(
this
.
label2
);
...
...
@@ -1874,6 +1876,17 @@
this
.
groupBox18
.
TabStop
=
false
;
this
.
groupBox18
.
Text
=
"库位信息操作"
;
//
// btn_outin
//
this
.
btn_outin
.
Location
=
new
System
.
Drawing
.
Point
(
238
,
20
);
this
.
btn_outin
.
Name
=
"btn_outin"
;
this
.
btn_outin
.
Size
=
new
System
.
Drawing
.
Size
(
136
,
32
);
this
.
btn_outin
.
TabIndex
=
15
;
this
.
btn_outin
.
Text
=
"出入"
;
this
.
btn_outin
.
UseVisualStyleBackColor
=
true
;
this
.
btn_outin
.
Visible
=
false
;
this
.
btn_outin
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_outin_Click
);
//
// btnOutstoreTest
//
this
.
btnOutstoreTest
.
Location
=
new
System
.
Drawing
.
Point
(
238
,
68
);
...
...
@@ -2173,5 +2186,6 @@
private
System
.
Windows
.
Forms
.
GroupBox
groupBox27
;
private
System
.
Windows
.
Forms
.
TextBox
txtPullAxis_Inout_CamB
;
private
System
.
Windows
.
Forms
.
Button
btnInOutAxis_B_Cam
;
private
System
.
Windows
.
Forms
.
Button
btn_outin
;
}
}
\ No newline at end of file
source/XLRStoreClient/boxForm/FrmAxisMove.cs
查看文件 @
119952f
...
...
@@ -11,6 +11,7 @@ using System.Threading.Tasks;
using
System.Windows.Forms
;
using
OnlineStore.LoadCSVLibrary
;
using
System.IO
;
using
CodeLibrary
;
namespace
OnlineStore.XLRStore
{
...
...
@@ -28,6 +29,10 @@ namespace OnlineStore.XLRStore
private
void
FrmAxisMove_Load
(
object
sender
,
EventArgs
e
)
{
boxEquip
=
StoreManager
.
XLRStore
.
boxEquip
;
//for (int i = 1; i <= 12; i++)
//{
// combBoxPosIds.Items.Add(i);
//}
combBoxPosIds
.
Items
.
AddRange
(
boxEquip
.
PositionNumList
.
ToArray
());
combBoxPosIds
.
SelectedIndexChanged
+=
CombBoxPosIds_SelectedIndexChanged
;
InitShieldColData
();
...
...
@@ -719,9 +724,37 @@ namespace OnlineStore.XLRStore
/// <param name="e"></param>
private
void
btnInstoreTest_Click
(
object
sender
,
EventArgs
e
)
{
InOutParam
inoutParam
=
new
InOutParam
(
new
InOutPosInfo
(
"TestIn"
,
posId
));
boxEquip
.
StartInstore
(
inoutParam
);
//InOutParam inoutParam = new InOutParam(new InOutPosInfo("TestIn", posId));
//boxEquip.StartInstore(inoutParam);
//int drawerindex = int.Parse(cb_poslist.SelectedItem.ToString());
//PosIDManger.GetDarwerPoslist(drawerindex, out string apos, out string bpos, out string aout, out string bout);
LogUtil
.
info
(
"手动入库测试..."
);
string
apos
=
PosIDManger
.
APosList
.
DRAWER
[
12
][
0
].
PosID
;
string
aout
=
PosIDManger
.
APosList
.
DRAWER
[
12
][
1
].
PosID
;
string
bpos
=
PosIDManger
.
BPosList
.
DRAWER
[
12
][
0
].
PosID
;
string
bout
=
PosIDManger
.
BPosList
.
DRAWER
[
12
][
1
].
PosID
;
LogUtil
.
info
(
$
"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}"
);
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
var
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
AInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
BInStoreInfo
};
if
(!
string
.
IsNullOrEmpty
(
aout
))
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
if
(!
string
.
IsNullOrEmpty
(
bout
))
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
StartInstore
(
inp
))
{
MessageBox
.
Show
(
"启动失败"
);
return
;
}
}
/// <summary>
/// 出库测试
...
...
@@ -730,6 +763,8 @@ namespace OnlineStore.XLRStore
/// <param name="e"></param>
private
void
btnOutstoreTest_Click
(
object
sender
,
EventArgs
e
)
{
StoreManager
.
XLRStore
.
StopRun
();
return
;
InOutParam
inoutParam
=
new
InOutParam
(
new
InOutPosInfo
(
"TestOut"
,
posId
));
boxEquip
.
StartExecuctOut
(
inoutParam
);
LogUtil
.
info
(
"手动出库测试[posId]..."
);
...
...
@@ -907,5 +942,37 @@ namespace OnlineStore.XLRStore
{
AxisABSMove
(
boxEquip
.
PullAxis_Inout
,
txtPullAxis_Inout_CamB
,
boxEquip
.
Config
.
PullAxis_Inout_P1_Speed
);
}
private
void
btn_outin_Click
(
object
sender
,
EventArgs
e
)
{
var
selindex
=
2
;
LogUtil
.
info
(
"手动入库测试..."
);
string
apos
=
PosIDManger
.
APosList
.
DRAWER
[
selindex
][
0
].
PosID
;
string
aout
=
PosIDManger
.
APosList
.
DRAWER
[
selindex
][
1
].
PosID
;
string
bpos
=
PosIDManger
.
BPosList
.
DRAWER
[
selindex
][
0
].
PosID
;
string
bout
=
PosIDManger
.
BPosList
.
DRAWER
[
selindex
][
1
].
PosID
;
LogUtil
.
info
(
$
"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}"
);
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
var
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
AInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
BInStoreInfo
};
if
(!
string
.
IsNullOrEmpty
(
aout
))
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
if
(!
string
.
IsNullOrEmpty
(
bout
))
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
StartInstore
(
inp
))
{
MessageBox
.
Show
(
"启动失败"
);
return
;
}
else
{
StoreManager
.
XLRStore
.
boxEquip
.
MoveInfo
.
NextMoveStep
(
StepEnum
.
SO_15_ToBufferArea
);
LogUtil
.
info
(
$
"直接前往缓存放料"
);
}
}
}
}
source/XLRStoreClient/boxForm/FrmBoxEquip.Designer.cs
查看文件 @
119952f
...
...
@@ -34,12 +34,19 @@
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
groupDO
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btn_in
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_out
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_auto
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cb_poslist
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage3
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel3
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
lblInoutInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblMoveInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblInstoreList
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -53,17 +60,17 @@
this
.
lblStoreStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnStart
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tableLayoutPanel3
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupDO
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage3
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
groupBox6
.
SuspendLayout
();
this
.
tableLayoutPanel3
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
panBase
.
SuspendLayout
();
this
.
tableLayoutPanel3
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// timer1
...
...
@@ -110,7 +117,7 @@
this
.
txtDOIndex
.
Location
=
new
System
.
Drawing
.
Point
(
493
,
25
);
this
.
txtDOIndex
.
MaxLength
=
10
;
this
.
txtDOIndex
.
Name
=
"txtDOIndex"
;
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
2
7
);
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
2
3
);
this
.
txtDOIndex
.
TabIndex
=
276
;
this
.
txtDOIndex
.
Text
=
"0"
;
this
.
txtDOIndex
.
Visible
=
false
;
...
...
@@ -122,7 +129,7 @@
this
.
txtDoName
.
Location
=
new
System
.
Drawing
.
Point
(
467
,
25
);
this
.
txtDoName
.
MaxLength
=
10
;
this
.
txtDoName
.
Name
=
"txtDoName"
;
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
27
,
2
7
);
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
27
,
2
3
);
this
.
txtDoName
.
TabIndex
=
275
;
this
.
txtDoName
.
Text
=
"0"
;
this
.
txtDoName
.
Visible
=
false
;
...
...
@@ -134,7 +141,7 @@
this
.
lblAddr
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblAddr
.
Location
=
new
System
.
Drawing
.
Point
(
286
,
28
);
this
.
lblAddr
.
Name
=
"lblAddr"
;
this
.
lblAddr
.
Size
=
new
System
.
Drawing
.
Size
(
43
,
20
);
this
.
lblAddr
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
17
);
this
.
lblAddr
.
TabIndex
=
274
;
this
.
lblAddr
.
Text
=
"设备:"
;
this
.
lblAddr
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -171,7 +178,7 @@
this
.
txtWriteTime
.
Location
=
new
System
.
Drawing
.
Point
(
84
,
69
);
this
.
txtWriteTime
.
MaxLength
=
10
;
this
.
txtWriteTime
.
Name
=
"txtWriteTime"
;
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
58
,
2
7
);
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
58
,
2
3
);
this
.
txtWriteTime
.
TabIndex
=
271
;
this
.
txtWriteTime
.
Text
=
"0"
;
//
...
...
@@ -182,7 +189,7 @@
this
.
label5
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
18
,
72
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
20
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
17
);
this
.
label5
.
TabIndex
=
270
;
this
.
label5
.
Text
=
"定时(ms):"
;
this
.
label5
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -193,7 +200,7 @@
this
.
txtSlaveId
.
Location
=
new
System
.
Drawing
.
Point
(
544
,
29
);
this
.
txtSlaveId
.
MaxLength
=
10
;
this
.
txtSlaveId
.
Name
=
"txtSlaveId"
;
this
.
txtSlaveId
.
Size
=
new
System
.
Drawing
.
Size
(
12
,
2
7
);
this
.
txtSlaveId
.
Size
=
new
System
.
Drawing
.
Size
(
12
,
2
3
);
this
.
txtSlaveId
.
TabIndex
=
255
;
this
.
txtSlaveId
.
Text
=
"0"
;
this
.
txtSlaveId
.
Visible
=
false
;
...
...
@@ -274,6 +281,8 @@
//
this
.
groupDO
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupDO
.
Controls
.
Add
(
this
.
btn_in
);
this
.
groupDO
.
Controls
.
Add
(
this
.
btn_out
);
this
.
groupDO
.
Controls
.
Add
(
this
.
button2
);
this
.
groupDO
.
Controls
.
Add
(
this
.
button1
);
this
.
groupDO
.
Location
=
new
System
.
Drawing
.
Point
(
414
,
128
);
...
...
@@ -283,6 +292,28 @@
this
.
groupDO
.
TabStop
=
false
;
this
.
groupDO
.
Text
=
"IO操作测试"
;
//
// btn_in
//
this
.
btn_in
.
Location
=
new
System
.
Drawing
.
Point
(
67
,
270
);
this
.
btn_in
.
Name
=
"btn_in"
;
this
.
btn_in
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
34
);
this
.
btn_in
.
TabIndex
=
3
;
this
.
btn_in
.
Text
=
"存入料盘"
;
this
.
btn_in
.
UseVisualStyleBackColor
=
true
;
this
.
btn_in
.
Visible
=
false
;
this
.
btn_in
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_in_Click
);
//
// btn_out
//
this
.
btn_out
.
Location
=
new
System
.
Drawing
.
Point
(
161
,
270
);
this
.
btn_out
.
Name
=
"btn_out"
;
this
.
btn_out
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
34
);
this
.
btn_out
.
TabIndex
=
3
;
this
.
btn_out
.
Text
=
"取出料盘"
;
this
.
btn_out
.
UseVisualStyleBackColor
=
true
;
this
.
btn_out
.
Visible
=
false
;
this
.
btn_out
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_out_Click
);
//
// button2
//
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
209
,
60
);
...
...
@@ -303,15 +334,34 @@
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// btn_auto
//
this
.
btn_auto
.
Location
=
new
System
.
Drawing
.
Point
(
225
,
24
);
this
.
btn_auto
.
Name
=
"btn_auto"
;
this
.
btn_auto
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
34
);
this
.
btn_auto
.
TabIndex
=
3
;
this
.
btn_auto
.
Text
=
"CT"
;
this
.
btn_auto
.
UseVisualStyleBackColor
=
true
;
this
.
btn_auto
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_auto_Click
);
//
// cb_poslist
//
this
.
cb_poslist
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_poslist
.
FormattingEnabled
=
true
;
this
.
cb_poslist
.
Location
=
new
System
.
Drawing
.
Point
(
98
,
30
);
this
.
cb_poslist
.
Name
=
"cb_poslist"
;
this
.
cb_poslist
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
25
);
this
.
cb_poslist
.
TabIndex
=
2
;
//
// lblThisSta
//
this
.
lblThisSta
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
28
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
32
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
973
,
16
4
);
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
973
,
16
7
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
@@ -331,14 +381,35 @@
//
// tabPage3
//
this
.
tabPage3
.
Controls
.
Add
(
this
.
panel1
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
9
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
6
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
985
,
5
18
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
985
,
5
21
);
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
Text
=
" 设备状态 "
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
//
// panel1
//
this
.
panel1
.
Controls
.
Add
(
this
.
label1
);
this
.
panel1
.
Controls
.
Add
(
this
.
btn_auto
);
this
.
panel1
.
Controls
.
Add
(
this
.
cb_poslist
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
607
,
24
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
356
,
109
);
this
.
panel1
.
TabIndex
=
261
;
this
.
panel1
.
Visible
=
false
;
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
45
,
33
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
17
);
this
.
label1
.
TabIndex
=
4
;
this
.
label1
.
Text
=
"库位号:"
;
//
// groupBox6
//
this
.
groupBox6
.
Controls
.
Add
(
this
.
tableLayoutPanel3
);
...
...
@@ -346,18 +417,35 @@
this
.
groupBox6
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
985
,
5
18
);
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
985
,
5
21
);
this
.
groupBox6
.
TabIndex
=
278
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"当前状态"
;
//
// tableLayoutPanel3
//
this
.
tableLayoutPanel3
.
ColumnCount
=
1
;
this
.
tableLayoutPanel3
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel3
.
Controls
.
Add
(
this
.
lblInoutInfo
,
0
,
0
);
this
.
tableLayoutPanel3
.
Controls
.
Add
(
this
.
lblMoveInfo
,
0
,
1
);
this
.
tableLayoutPanel3
.
Controls
.
Add
(
this
.
lblThisSta
,
0
,
2
);
this
.
tableLayoutPanel3
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel3
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
19
);
this
.
tableLayoutPanel3
.
Name
=
"tableLayoutPanel3"
;
this
.
tableLayoutPanel3
.
RowCount
=
3
;
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
979
,
499
);
this
.
tableLayoutPanel3
.
TabIndex
=
282
;
//
// lblInoutInfo
//
this
.
lblInoutInfo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblInoutInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblInoutInfo
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
0
);
this
.
lblInoutInfo
.
Name
=
"lblInoutInfo"
;
this
.
lblInoutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
973
,
16
4
);
this
.
lblInoutInfo
.
Size
=
new
System
.
Drawing
.
Size
(
973
,
16
6
);
this
.
lblInoutInfo
.
TabIndex
=
281
;
this
.
lblInoutInfo
.
Text
=
"当前出入库:"
;
//
...
...
@@ -366,9 +454,9 @@
this
.
lblMoveInfo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
lblMoveInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblMoveInfo
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
16
4
);
this
.
lblMoveInfo
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
16
6
);
this
.
lblMoveInfo
.
Name
=
"lblMoveInfo"
;
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
973
,
16
4
);
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
973
,
16
6
);
this
.
lblMoveInfo
.
TabIndex
=
280
;
this
.
lblMoveInfo
.
Text
=
"运动信息:"
;
//
...
...
@@ -390,10 +478,10 @@
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupDO
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
9
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
6
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
985
,
5
18
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
985
,
5
21
);
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
Text
=
" IO列表 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -448,10 +536,11 @@
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
597
,
14
);
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
28
);
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
TabIndex
=
262
;
this
.
chbMoveStop
.
Text
=
"暂停运动"
;
this
.
chbMoveStop
.
UseVisualStyleBackColor
=
true
;
this
.
chbMoveStop
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged_1
);
this
.
chbMoveStop
.
Click
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged
);
//
// lblName
...
...
@@ -472,7 +561,7 @@
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
496
,
14
);
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
28
);
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbDebug
.
TabIndex
=
247
;
this
.
chbDebug
.
Text
=
"调试状态"
;
this
.
chbDebug
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -486,7 +575,7 @@
this
.
lblStoreStatus
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblStoreStatus
.
Location
=
new
System
.
Drawing
.
Point
(
701
,
15
);
this
.
lblStoreStatus
.
Name
=
"lblStoreStatus"
;
this
.
lblStoreStatus
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
24
);
this
.
lblStoreStatus
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
20
);
this
.
lblStoreStatus
.
TabIndex
=
245
;
this
.
lblStoreStatus
.
Text
=
"等待启动"
;
this
.
lblStoreStatus
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -517,26 +606,9 @@
this
.
btnStop
.
UseVisualStyleBackColor
=
false
;
this
.
btnStop
.
Click
+=
new
System
.
EventHandler
(
this
.
btnStop_Click
);
//
// tableLayoutPanel3
//
this
.
tableLayoutPanel3
.
ColumnCount
=
1
;
this
.
tableLayoutPanel3
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel3
.
Controls
.
Add
(
this
.
lblInoutInfo
,
0
,
0
);
this
.
tableLayoutPanel3
.
Controls
.
Add
(
this
.
lblMoveInfo
,
0
,
1
);
this
.
tableLayoutPanel3
.
Controls
.
Add
(
this
.
lblThisSta
,
0
,
2
);
this
.
tableLayoutPanel3
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel3
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
23
);
this
.
tableLayoutPanel3
.
Name
=
"tableLayoutPanel3"
;
this
.
tableLayoutPanel3
.
RowCount
=
3
;
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
33.33333F
));
this
.
tableLayoutPanel3
.
Size
=
new
System
.
Drawing
.
Size
(
979
,
492
);
this
.
tableLayoutPanel3
.
TabIndex
=
282
;
//
// FrmBoxEquip
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
9F
,
20
F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17
F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1004
,
611
);
this
.
Controls
.
Add
(
this
.
panBase
);
...
...
@@ -556,11 +628,13 @@
this
.
groupDO
.
ResumeLayout
(
false
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
tabPage3
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
panel1
.
PerformLayout
();
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
tableLayoutPanel3
.
ResumeLayout
(
false
);
this
.
tabPage1
.
ResumeLayout
(
false
);
this
.
panBase
.
ResumeLayout
(
false
);
this
.
panBase
.
PerformLayout
();
this
.
tableLayoutPanel3
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
...
...
@@ -604,6 +678,12 @@
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel3
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_poslist
;
private
System
.
Windows
.
Forms
.
Button
btn_auto
;
private
System
.
Windows
.
Forms
.
Button
btn_in
;
private
System
.
Windows
.
Forms
.
Button
btn_out
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
}
}
source/XLRStoreClient/boxForm/FrmBoxEquip.cs
查看文件 @
119952f
...
...
@@ -16,6 +16,7 @@ using System.Reflection;
using
UserFromControl
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.Common
;
using
System.Security.Cryptography
;
namespace
OnlineStore.XLRStore
...
...
@@ -50,6 +51,14 @@ namespace OnlineStore.XLRStore
boxBean
.
camera_event
+=
BoxBean_camera_event
;
btnDebugAxis
.
Enabled
=
!
boxBean
.
IsDebug
;
IsLoad
=
true
;
cb_poslist
.
Items
.
Clear
();
for
(
int
i
=
1
;
i
<=
13
;
i
++)
{
cb_poslist
.
Items
.
Add
(
i
);
}
//cb_poslist.Items.Add(20);
cb_poslist
.
SelectedIndex
=
0
;
}
/// <summary>
/// 监控相机采集图像事件
...
...
@@ -580,6 +589,126 @@ namespace OnlineStore.XLRStore
{
boxBean
.
StopRecord
();
}
private
void
btn_auto_Click
(
object
sender
,
EventArgs
e
)
{
if
(
StoreManager
.
XLRStore
.
runStatus
!=
RunStatus
.
Runing
)
{
MessageBox
.
Show
(
"请先启动设备, 并等待回原完成"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
)
&&
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
))
{
MessageBox
.
Show
(
"请在缓存位上放上料盘"
);
return
;
}
int
drawerindex
=
int
.
Parse
(
cb_poslist
.
SelectedItem
.
ToString
());
string
apos
=
""
,
bpos
=
""
,
aout
=
""
,
bout
=
""
;
//if (drawerindex == 20)
//{
// apos = "01AA15060420";
// bpos = "01BB14050401";
//}
//else
PosIDManger
.
GetDarwerPoslist
(
drawerindex
,
out
apos
,
out
bpos
,
out
aout
,
out
bout
);
if
(
string
.
IsNullOrEmpty
(
apos
))
{
MessageBox
.
Show
(
$
"位置{drawerindex} A侧没有可用库位"
);
return
;
}
if
(
string
.
IsNullOrEmpty
(
bpos
))
{
MessageBox
.
Show
(
$
"位置{drawerindex} B侧没有可用库位"
);
return
;
}
if
(
PosIDManger
.
GetPosHasReel
(
apos
))
{
MessageBox
.
Show
(
$
"库位{apos} 已有物料,不能入库"
);
return
;
}
if
(
PosIDManger
.
GetPosHasReel
(
bpos
))
{
MessageBox
.
Show
(
$
"库位{bpos} 已有物料,不能入库"
);
return
;
}
LogUtil
.
info
(
$
"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}"
);
InOutParam
inp
;
if
(
apos
.
IndexOf
(
"AA"
)
>
0
)
{
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
AInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
BInStoreInfo
};
if
(!
string
.
IsNullOrEmpty
(
aout
))
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
if
(!
string
.
IsNullOrEmpty
(
bout
))
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
}
else
{
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
BInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
AInStoreInfo
};
if
(!
string
.
IsNullOrEmpty
(
bout
))
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
if
(!
string
.
IsNullOrEmpty
(
aout
))
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
}
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
StartInstore
(
inp
))
{
MessageBox
.
Show
(
"启动失败"
);
return
;
}
//LogUtil.info("手动入库测试...");
//string apos = PosIDManger.APosList.DRAWER[selindex][0].PosID;
//string aout = PosIDManger.APosList.DRAWER[selindex][1].PosID;
//string bpos = PosIDManger.BPosList.DRAWER[selindex][0].PosID;
//string bout = PosIDManger.BPosList.DRAWER[selindex][1].PosID;
//LogUtil.info($"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}");
//BufferDataManager.AInStoreInfo = new InOutPosInfo("STEST", apos, 7, 8);
//BufferDataManager.BInStoreInfo = new InOutPosInfo("STEST", bpos, 7, 8);
//var inp = new InOutParam() { PosInfo = BufferDataManager.AInStoreInfo, PosInfoBack = BufferDataManager.BInStoreInfo };
//if (!string.IsNullOrEmpty(aout))
// inp.AOutPosInfo = new InOutPosInfo("STEST", aout, 7, 8);
//if (!string.IsNullOrEmpty(bout))
// inp.BOutPosInfo = new InOutPosInfo("STEST", bout, 7, 8);
//if (!StoreManager.XLRStore.boxEquip.StartInstore(inp))
//{
// MessageBox.Show("启动失败");
// return;
//}
//else
//{
// StoreManager.XLRStore.boxEquip.MoveInfo.NextMoveStep(StepEnum.SO_15_ToBufferArea);
// LogUtil.info($"直接前往缓存放料");
//}
}
private
void
btn_in_Click
(
object
sender
,
EventArgs
e
)
{
}
private
void
btn_out_Click
(
object
sender
,
EventArgs
e
)
{
}
private
void
chbMoveStop_CheckedChanged_1
(
object
sender
,
EventArgs
e
)
{
}
}
}
...
...
source/XLRStoreClient/inputForm/FrmInputEquip.Designer.cs
查看文件 @
119952f
...
...
@@ -22,6 +22,7 @@ namespace OnlineStore.XLRStore
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
btnScan
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabPage2
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
btnPointEditEnable
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox11
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
mideleAxisP3
=
new
OnlineStore
.
XLRStore
.
useControl
.
AxisPointControl
();
...
...
@@ -111,7 +112,6 @@ namespace OnlineStore.XLRStore
this
.
lblMoveInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
btnPointEditEnable
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabPage2
.
SuspendLayout
();
this
.
groupBox11
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
...
...
@@ -162,14 +162,27 @@ namespace OnlineStore.XLRStore
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox5
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
axisMoveControl1
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
9
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
6
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
986
,
5
58
);
this
.
tabPage2
.
Size
=
new
System
.
Drawing
.
Size
(
986
,
5
61
);
this
.
tabPage2
.
TabIndex
=
1
;
this
.
tabPage2
.
Text
=
" 伺服信息 "
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
//
// btnPointEditEnable
//
this
.
btnPointEditEnable
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnPointEditEnable
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnPointEditEnable
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.8F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnPointEditEnable
.
Location
=
new
System
.
Drawing
.
Point
(
625
,
262
);
this
.
btnPointEditEnable
.
Name
=
"btnPointEditEnable"
;
this
.
btnPointEditEnable
.
Size
=
new
System
.
Drawing
.
Size
(
163
,
40
);
this
.
btnPointEditEnable
.
TabIndex
=
230
;
this
.
btnPointEditEnable
.
Text
=
"启用点位编辑"
;
this
.
btnPointEditEnable
.
UseVisualStyleBackColor
=
false
;
this
.
btnPointEditEnable
.
Click
+=
new
System
.
EventHandler
(
this
.
btnPointEditEnable_Click
);
//
// groupBox11
//
this
.
groupBox11
.
Controls
.
Add
(
this
.
panel1
);
...
...
@@ -187,9 +200,9 @@ namespace OnlineStore.XLRStore
this
.
panel1
.
Controls
.
Add
(
this
.
updownAxisP2
);
this
.
panel1
.
Controls
.
Add
(
this
.
updownAxisP3
);
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
23
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
19
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
233
,
1
87
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
233
,
1
91
);
this
.
panel1
.
TabIndex
=
220
;
this
.
panel1
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
panel1_Paint
);
//
...
...
@@ -543,10 +556,10 @@ namespace OnlineStore.XLRStore
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
tabPage1
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
9
);
this
.
tabPage1
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
6
);
this
.
tabPage1
.
Name
=
"tabPage1"
;
this
.
tabPage1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
986
,
5
58
);
this
.
tabPage1
.
Size
=
new
System
.
Drawing
.
Size
(
986
,
5
61
);
this
.
tabPage1
.
TabIndex
=
0
;
this
.
tabPage1
.
Text
=
" IO列表 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -803,7 +816,7 @@ namespace OnlineStore.XLRStore
this
.
txtDOIndex
.
Location
=
new
System
.
Drawing
.
Point
(
386
,
47
);
this
.
txtDOIndex
.
MaxLength
=
10
;
this
.
txtDOIndex
.
Name
=
"txtDOIndex"
;
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
2
7
);
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
2
3
);
this
.
txtDOIndex
.
TabIndex
=
260
;
this
.
txtDOIndex
.
Text
=
"0"
;
this
.
txtDOIndex
.
Visible
=
false
;
...
...
@@ -815,7 +828,7 @@ namespace OnlineStore.XLRStore
this
.
txtDoName
.
Location
=
new
System
.
Drawing
.
Point
(
386
,
64
);
this
.
txtDoName
.
MaxLength
=
10
;
this
.
txtDoName
.
Name
=
"txtDoName"
;
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
2
7
);
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
2
3
);
this
.
txtDoName
.
TabIndex
=
259
;
this
.
txtDoName
.
Text
=
"0"
;
this
.
txtDoName
.
Visible
=
false
;
...
...
@@ -827,7 +840,7 @@ namespace OnlineStore.XLRStore
this
.
lblAddr
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblAddr
.
Location
=
new
System
.
Drawing
.
Point
(
364
,
27
);
this
.
lblAddr
.
Name
=
"lblAddr"
;
this
.
lblAddr
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
20
);
this
.
lblAddr
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
17
);
this
.
lblAddr
.
TabIndex
=
258
;
this
.
lblAddr
.
Text
=
"设备IP:"
;
this
.
lblAddr
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -851,7 +864,7 @@ namespace OnlineStore.XLRStore
this
.
txtSlaveId
.
Location
=
new
System
.
Drawing
.
Point
(
427
,
24
);
this
.
txtSlaveId
.
MaxLength
=
10
;
this
.
txtSlaveId
.
Name
=
"txtSlaveId"
;
this
.
txtSlaveId
.
Size
=
new
System
.
Drawing
.
Size
(
12
,
2
7
);
this
.
txtSlaveId
.
Size
=
new
System
.
Drawing
.
Size
(
12
,
2
3
);
this
.
txtSlaveId
.
TabIndex
=
255
;
this
.
txtSlaveId
.
Text
=
"0"
;
this
.
txtSlaveId
.
Visible
=
false
;
...
...
@@ -891,7 +904,7 @@ namespace OnlineStore.XLRStore
this
.
txtWriteTime
.
Location
=
new
System
.
Drawing
.
Point
(
82
,
61
);
this
.
txtWriteTime
.
MaxLength
=
10
;
this
.
txtWriteTime
.
Name
=
"txtWriteTime"
;
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
2
7
);
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
2
3
);
this
.
txtWriteTime
.
TabIndex
=
238
;
this
.
txtWriteTime
.
Text
=
"0"
;
//
...
...
@@ -902,7 +915,7 @@ namespace OnlineStore.XLRStore
this
.
label5
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
64
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
20
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
17
);
this
.
label5
.
TabIndex
=
237
;
this
.
label5
.
Text
=
"定时(ms):"
;
this
.
label5
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -967,9 +980,9 @@ namespace OnlineStore.XLRStore
//
this
.
tabPage3
.
Controls
.
Add
(
this
.
panBase
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
9
);
this
.
tabPage3
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
2
6
);
this
.
tabPage3
.
Name
=
"tabPage3"
;
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
986
,
5
58
);
this
.
tabPage3
.
Size
=
new
System
.
Drawing
.
Size
(
986
,
5
61
);
this
.
tabPage3
.
TabIndex
=
2
;
this
.
tabPage3
.
Text
=
"状态信息"
;
this
.
tabPage3
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1010,7 +1023,7 @@ namespace OnlineStore.XLRStore
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
454
,
11
);
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
28
);
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
TabIndex
=
262
;
this
.
chbMoveStop
.
Text
=
"暂停运动"
;
this
.
chbMoveStop
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1034,7 +1047,7 @@ namespace OnlineStore.XLRStore
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
365
,
11
);
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
28
);
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbDebug
.
TabIndex
=
247
;
this
.
chbDebug
.
Text
=
"调试状态"
;
this
.
chbDebug
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1049,7 +1062,7 @@ namespace OnlineStore.XLRStore
this
.
lblStoreStatus
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblStoreStatus
.
Location
=
new
System
.
Drawing
.
Point
(
543
,
13
);
this
.
lblStoreStatus
.
Name
=
"lblStoreStatus"
;
this
.
lblStoreStatus
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
24
);
this
.
lblStoreStatus
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
20
);
this
.
lblStoreStatus
.
TabIndex
=
245
;
this
.
lblStoreStatus
.
Text
=
"等待启动"
;
this
.
lblStoreStatus
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -1103,7 +1116,7 @@ namespace OnlineStore.XLRStore
this
.
checkBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
checkBox1
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
328
);
this
.
checkBox1
.
Name
=
"checkBox1"
;
this
.
checkBox1
.
Size
=
new
System
.
Drawing
.
Size
(
1
94
,
28
);
this
.
checkBox1
.
Size
=
new
System
.
Drawing
.
Size
(
1
54
,
24
);
this
.
checkBox1
.
TabIndex
=
291
;
this
.
checkBox1
.
Text
=
"检测到料串自动入库"
;
this
.
checkBox1
.
UseVisualStyleBackColor
=
true
;
...
...
@@ -1135,7 +1148,7 @@ namespace OnlineStore.XLRStore
this
.
cmbOutstorePos
.
FormattingEnabled
=
true
;
this
.
cmbOutstorePos
.
Location
=
new
System
.
Drawing
.
Point
(
104
,
70
);
this
.
cmbOutstorePos
.
Name
=
"cmbOutstorePos"
;
this
.
cmbOutstorePos
.
Size
=
new
System
.
Drawing
.
Size
(
142
,
31
);
this
.
cmbOutstorePos
.
Size
=
new
System
.
Drawing
.
Size
(
142
,
28
);
this
.
cmbOutstorePos
.
TabIndex
=
290
;
//
// cmbInstorePos
...
...
@@ -1145,7 +1158,7 @@ namespace OnlineStore.XLRStore
this
.
cmbInstorePos
.
FormattingEnabled
=
true
;
this
.
cmbInstorePos
.
Location
=
new
System
.
Drawing
.
Point
(
266
,
28
);
this
.
cmbInstorePos
.
Name
=
"cmbInstorePos"
;
this
.
cmbInstorePos
.
Size
=
new
System
.
Drawing
.
Size
(
142
,
31
);
this
.
cmbInstorePos
.
Size
=
new
System
.
Drawing
.
Size
(
142
,
28
);
this
.
cmbInstorePos
.
TabIndex
=
289
;
//
// btnOutStoreTest
...
...
@@ -1171,7 +1184,7 @@ namespace OnlineStore.XLRStore
"B下暂存区"
});
this
.
cmbOutStartP
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
70
);
this
.
cmbOutStartP
.
Name
=
"cmbOutStartP"
;
this
.
cmbOutStartP
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
31
);
this
.
cmbOutStartP
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
28
);
this
.
cmbOutStartP
.
TabIndex
=
287
;
this
.
cmbOutStartP
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cmbOutShelf_SelectedIndexChanged
);
//
...
...
@@ -1181,7 +1194,7 @@ namespace OnlineStore.XLRStore
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
251
,
74
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
3
9
,
24
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
3
1
,
20
);
this
.
label2
.
TabIndex
=
286
;
this
.
label2
.
Text
=
"-->"
;
//
...
...
@@ -1195,7 +1208,7 @@ namespace OnlineStore.XLRStore
"B料口"
});
this
.
cmbOutShelf
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
70
);
this
.
cmbOutShelf
.
Name
=
"cmbOutShelf"
;
this
.
cmbOutShelf
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
31
);
this
.
cmbOutShelf
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
28
);
this
.
cmbOutShelf
.
TabIndex
=
285
;
//
// BtnInStoreTest
...
...
@@ -1221,7 +1234,7 @@ namespace OnlineStore.XLRStore
"B上暂存区"
});
this
.
cmbInstoreTargetP
.
Location
=
new
System
.
Drawing
.
Point
(
171
,
28
);
this
.
cmbInstoreTargetP
.
Name
=
"cmbInstoreTargetP"
;
this
.
cmbInstoreTargetP
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
31
);
this
.
cmbInstoreTargetP
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
28
);
this
.
cmbInstoreTargetP
.
TabIndex
=
2
;
this
.
cmbInstoreTargetP
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cmbInstoreTargetP_SelectedIndexChanged
);
//
...
...
@@ -1231,7 +1244,7 @@ namespace OnlineStore.XLRStore
this
.
label1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
135
,
32
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
3
9
,
24
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
3
1
,
20
);
this
.
label1
.
TabIndex
=
1
;
this
.
label1
.
Text
=
"-->"
;
//
...
...
@@ -1245,7 +1258,7 @@ namespace OnlineStore.XLRStore
"B料口"
});
this
.
cmbInstoreShelf
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
28
);
this
.
cmbInstoreShelf
.
Name
=
"cmbInstoreShelf"
;
this
.
cmbInstoreShelf
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
31
);
this
.
cmbInstoreShelf
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
28
);
this
.
cmbInstoreShelf
.
TabIndex
=
0
;
//
// lblwidth
...
...
@@ -1267,7 +1280,7 @@ namespace OnlineStore.XLRStore
this
.
lblMoveInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblMoveInfo
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
109
);
this
.
lblMoveInfo
.
Name
=
"lblMoveInfo"
;
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
20
);
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
17
);
this
.
lblMoveInfo
.
TabIndex
=
278
;
this
.
lblMoveInfo
.
Text
=
"运动信息:"
;
//
...
...
@@ -1300,22 +1313,9 @@ namespace OnlineStore.XLRStore
this
.
tabControl1
.
TabIndex
=
257
;
this
.
tabControl1
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
tabControl1_SelectedIndexChanged
);
//
// btnPointEditEnable
//
this
.
btnPointEditEnable
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnPointEditEnable
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnPointEditEnable
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.8F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnPointEditEnable
.
Location
=
new
System
.
Drawing
.
Point
(
625
,
262
);
this
.
btnPointEditEnable
.
Name
=
"btnPointEditEnable"
;
this
.
btnPointEditEnable
.
Size
=
new
System
.
Drawing
.
Size
(
163
,
40
);
this
.
btnPointEditEnable
.
TabIndex
=
230
;
this
.
btnPointEditEnable
.
Text
=
"启用点位编辑"
;
this
.
btnPointEditEnable
.
UseVisualStyleBackColor
=
false
;
this
.
btnPointEditEnable
.
Click
+=
new
System
.
EventHandler
(
this
.
btnPointEditEnable_Click
);
//
// FrmInputEquip
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
9F
,
20
F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17
F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1000
,
596
);
this
.
Controls
.
Add
(
this
.
tabControl1
);
...
...
source/XLRStoreClient/inputForm/FrmInputEquip.cs
查看文件 @
119952f
...
...
@@ -656,6 +656,11 @@ namespace OnlineStore.XLRStore
private
void
BtnInStoreTest_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
IsServerConnected
)
{
MessageBox
.
Show
(
"等待服务器通讯"
);
return
;
}
int
startShelf
=
cmbInstoreShelf
.
SelectedIndex
+
1
;
string
pos
=
cmbInstorePos
.
Text
;
if
(
String
.
IsNullOrEmpty
(
pos
))
...
...
@@ -672,6 +677,11 @@ namespace OnlineStore.XLRStore
private
void
btnOutStoreTest_Click
(
object
sender
,
EventArgs
e
)
{
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
IsServerConnected
)
{
MessageBox
.
Show
(
"等待服务器通讯"
);
return
;
}
int
startShelf
=
cmbOutShelf
.
SelectedIndex
+
1
;
string
pos
=
cmbOutstorePos
.
Text
;
if
(
String
.
IsNullOrEmpty
(
pos
))
...
...
@@ -818,9 +828,18 @@ namespace OnlineStore.XLRStore
}
#
endregion
#
endregion
private
void
btn_ct_Click
(
object
sender
,
EventArgs
e
)
{
BoxPosition
posiiton
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
PosIDManger
.
APosList
.
DRAWER
[
1
][
0
].
PosID
);
InOutParam
param
=
new
InOutParam
(
new
InOutPosInfo
(
"InstoreSTEST"
,
posiiton
.
PositionNum
,
posiiton
.
BagHigh
,
posiiton
.
BagWidth
));
param
.
ShelfType
=
1
;
LogUtil
.
info
(
"点击 "
+
BtnInStoreTest
.
Text
+
" :料串["
+
1
+
"]->"
+
param
.
PosInfo
.
ToStr
());
inputEquip
.
StartInstore
(
param
);
}
}
}
...
...
source/XLRStoreClient/useControl/AxisMoveControl.Designer.cs
查看文件 @
119952f
...
...
@@ -64,6 +64,7 @@
this
.
lblAxisPrfMode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label50
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
btnIOJog
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnEndHome
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
linkLabel1
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
btnAxisStop
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -90,7 +91,6 @@
this
.
txtAxisDeviceName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblServerOn
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
btnIOJog
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupAxis
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
...
...
@@ -510,6 +510,17 @@
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
469
,
236
);
this
.
panel1
.
TabIndex
=
219
;
//
// btnIOJog
//
this
.
btnIOJog
.
BackColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnIOJog
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
188
);
this
.
btnIOJog
.
Name
=
"btnIOJog"
;
this
.
btnIOJog
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
37
);
this
.
btnIOJog
.
TabIndex
=
335
;
this
.
btnIOJog
.
Text
=
"IO点动"
;
this
.
btnIOJog
.
UseVisualStyleBackColor
=
false
;
this
.
btnIOJog
.
Click
+=
new
System
.
EventHandler
(
this
.
btnIOJog_Click
);
//
// btnEndHome
//
this
.
btnEndHome
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
...
...
@@ -585,7 +596,7 @@
this
.
btnDelMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnDelMove
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnDelMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDelMove
.
Location
=
new
System
.
Drawing
.
Point
(
312
,
1
8
1
);
this
.
btnDelMove
.
Location
=
new
System
.
Drawing
.
Point
(
312
,
1
9
1
);
this
.
btnDelMove
.
Name
=
"btnDelMove"
;
this
.
btnDelMove
.
Size
=
new
System
.
Drawing
.
Size
(
146
,
45
);
this
.
btnDelMove
.
TabIndex
=
332
;
...
...
@@ -614,9 +625,9 @@
//
this
.
txtMiddleSpeed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtMiddleSpeed
.
Location
=
new
System
.
Drawing
.
Point
(
83
,
156
);
this
.
txtMiddleSpeed
.
MaxLength
=
6
;
this
.
txtMiddleSpeed
.
MaxLength
=
8
;
this
.
txtMiddleSpeed
.
Name
=
"txtMiddleSpeed"
;
this
.
txtMiddleSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
73
,
26
);
this
.
txtMiddleSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
141
,
26
);
this
.
txtMiddleSpeed
.
TabIndex
=
331
;
this
.
txtMiddleSpeed
.
Text
=
"100"
;
//
...
...
@@ -641,7 +652,7 @@
this
.
btnAddMove
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
btnAddMove
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnAddMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnAddMove
.
Location
=
new
System
.
Drawing
.
Point
(
160
,
1
80
);
this
.
btnAddMove
.
Location
=
new
System
.
Drawing
.
Point
(
160
,
1
91
);
this
.
btnAddMove
.
Name
=
"btnAddMove"
;
this
.
btnAddMove
.
Size
=
new
System
.
Drawing
.
Size
(
146
,
45
);
this
.
btnAddMove
.
TabIndex
=
330
;
...
...
@@ -840,17 +851,6 @@
//
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// btnIOJog
//
this
.
btnIOJog
.
BackColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
btnIOJog
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
188
);
this
.
btnIOJog
.
Name
=
"btnIOJog"
;
this
.
btnIOJog
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
37
);
this
.
btnIOJog
.
TabIndex
=
335
;
this
.
btnIOJog
.
Text
=
"IO点动"
;
this
.
btnIOJog
.
UseVisualStyleBackColor
=
false
;
this
.
btnIOJog
.
Click
+=
new
System
.
EventHandler
(
this
.
btnIOJog_Click
);
//
// AxisMoveControl
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
...
source/XLRStoreClient/useControl/CT.Designer.cs
0 → 100644
查看文件 @
119952f
namespace
OnlineStore.XLRStore.useControl
{
partial
class
CT
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private
void
InitializeComponent
()
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
panBase
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
chbMoveStop
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lbl_t1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblMoveInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_ct
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btn_ttout
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_ttin
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lbl_t2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
flowLayoutPanel1
=
new
System
.
Windows
.
Forms
.
FlowLayoutPanel
();
this
.
lblMoveInfo2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
axisMoveControl1
=
new
OnlineStore
.
XLRStore
.
AxisMoveControl
();
this
.
panBase
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// panBase
//
this
.
panBase
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panBase
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
panBase
.
Controls
.
Add
(
this
.
chbMoveStop
);
this
.
panBase
.
Controls
.
Add
(
this
.
lblName
);
this
.
panBase
.
Controls
.
Add
(
this
.
btnStop
);
this
.
panBase
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
panBase
.
Name
=
"panBase"
;
this
.
panBase
.
Size
=
new
System
.
Drawing
.
Size
(
1021
,
50
);
this
.
panBase
.
TabIndex
=
261
;
//
// chbMoveStop
//
this
.
chbMoveStop
.
AutoSize
=
true
;
this
.
chbMoveStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbMoveStop
.
Location
=
new
System
.
Drawing
.
Point
(
369
,
12
);
this
.
chbMoveStop
.
Name
=
"chbMoveStop"
;
this
.
chbMoveStop
.
Size
=
new
System
.
Drawing
.
Size
(
84
,
24
);
this
.
chbMoveStop
.
TabIndex
=
262
;
this
.
chbMoveStop
.
Text
=
"暂停运动"
;
this
.
chbMoveStop
.
UseVisualStyleBackColor
=
true
;
this
.
chbMoveStop
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged
);
//
// lblName
//
this
.
lblName
.
BackColor
=
System
.
Drawing
.
Color
.
DodgerBlue
;
this
.
lblName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblName
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
lblName
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
3
);
this
.
lblName
.
Name
=
"lblName"
;
this
.
lblName
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
40
);
this
.
lblName
.
TabIndex
=
250
;
this
.
lblName
.
Text
=
"CT测试"
;
this
.
lblName
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// btnStop
//
this
.
btnStop
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnStop
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnStop
.
Location
=
new
System
.
Drawing
.
Point
(
131
,
3
);
this
.
btnStop
.
Name
=
"btnStop"
;
this
.
btnStop
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
40
);
this
.
btnStop
.
TabIndex
=
87
;
this
.
btnStop
.
Text
=
"停止"
;
this
.
btnStop
.
UseVisualStyleBackColor
=
false
;
this
.
btnStop
.
Click
+=
new
System
.
EventHandler
(
this
.
btnStop_Click
);
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
lbl_t1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btn_ct
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
59
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
368
,
151
);
this
.
groupBox1
.
TabIndex
=
262
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"入料机构"
;
//
// lbl_t1
//
this
.
lbl_t1
.
AutoSize
=
true
;
this
.
lbl_t1
.
Location
=
new
System
.
Drawing
.
Point
(
177
,
80
);
this
.
lbl_t1
.
Name
=
"lbl_t1"
;
this
.
lbl_t1
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
12
);
this
.
lbl_t1
.
TabIndex
=
287
;
this
.
lbl_t1
.
Text
=
"时间:"
;
this
.
lbl_t1
.
Click
+=
new
System
.
EventHandler
(
this
.
lbl_t1_Click
);
//
// lblMoveInfo
//
this
.
lblMoveInfo
.
AutoSize
=
true
;
this
.
lblMoveInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblMoveInfo
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
26
);
this
.
lblMoveInfo
.
Name
=
"lblMoveInfo"
;
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
59
,
17
);
this
.
lblMoveInfo
.
TabIndex
=
286
;
this
.
lblMoveInfo
.
Text
=
"运动信息:"
;
//
// btn_ct
//
this
.
btn_ct
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btn_ct
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn_ct
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_ct
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
80
);
this
.
btn_ct
.
Name
=
"btn_ct"
;
this
.
btn_ct
.
Size
=
new
System
.
Drawing
.
Size
(
113
,
43
);
this
.
btn_ct
.
TabIndex
=
285
;
this
.
btn_ct
.
Text
=
"CT测试"
;
this
.
btn_ct
.
UseVisualStyleBackColor
=
false
;
this
.
btn_ct
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_ct_Click
);
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
btn_ttout
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btn_ttin
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lbl_t2
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
groupBox3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
lblMoveInfo2
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
377
,
59
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
384
,
263
);
this
.
groupBox2
.
TabIndex
=
262
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"存储机构"
;
//
// btn_ttout
//
this
.
btn_ttout
.
Location
=
new
System
.
Drawing
.
Point
(
118
,
221
);
this
.
btn_ttout
.
Name
=
"btn_ttout"
;
this
.
btn_ttout
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
29
);
this
.
btn_ttout
.
TabIndex
=
290
;
this
.
btn_ttout
.
Text
=
"天通库位出"
;
this
.
btn_ttout
.
UseVisualStyleBackColor
=
true
;
this
.
btn_ttout
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_ttout_Click
);
//
// btn_ttin
//
this
.
btn_ttin
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
221
);
this
.
btn_ttin
.
Name
=
"btn_ttin"
;
this
.
btn_ttin
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
29
);
this
.
btn_ttin
.
TabIndex
=
290
;
this
.
btn_ttin
.
Text
=
"天通库位入"
;
this
.
btn_ttin
.
UseVisualStyleBackColor
=
true
;
this
.
btn_ttin
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_ttin_Click
);
//
// lbl_t2
//
this
.
lbl_t2
.
AutoSize
=
true
;
this
.
lbl_t2
.
ForeColor
=
System
.
Drawing
.
SystemColors
.
ActiveCaptionText
;
this
.
lbl_t2
.
Location
=
new
System
.
Drawing
.
Point
(
239
,
65
);
this
.
lbl_t2
.
Name
=
"lbl_t2"
;
this
.
lbl_t2
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
12
);
this
.
lbl_t2
.
TabIndex
=
287
;
this
.
lbl_t2
.
Text
=
"时间:"
;
this
.
lbl_t2
.
Click
+=
new
System
.
EventHandler
(
this
.
lbl_t1_Click
);
//
// groupBox3
//
this
.
groupBox3
.
Controls
.
Add
(
this
.
flowLayoutPanel1
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
80
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
346
,
138
);
this
.
groupBox3
.
TabIndex
=
289
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"存取测试"
;
//
// flowLayoutPanel1
//
this
.
flowLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
flowLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
flowLayoutPanel1
.
Name
=
"flowLayoutPanel1"
;
this
.
flowLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
340
,
118
);
this
.
flowLayoutPanel1
.
TabIndex
=
288
;
//
// lblMoveInfo2
//
this
.
lblMoveInfo2
.
AutoSize
=
true
;
this
.
lblMoveInfo2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveInfo2
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblMoveInfo2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
26
);
this
.
lblMoveInfo2
.
Name
=
"lblMoveInfo2"
;
this
.
lblMoveInfo2
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
lblMoveInfo2
.
TabIndex
=
287
;
this
.
lblMoveInfo2
.
Text
=
"运动信息:"
;
//
// timer1
//
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// panel1
//
this
.
panel1
.
AutoScroll
=
true
;
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
panel1
.
Controls
.
Add
(
this
.
axisMoveControl1
);
this
.
panel1
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1027
,
546
);
this
.
panel1
.
TabIndex
=
263
;
//
// groupBox4
//
this
.
groupBox4
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
377
,
328
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
371
,
134
);
this
.
groupBox4
.
TabIndex
=
288
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Text
=
"DI列表"
;
//
// tableLayoutPanel1
//
this
.
tableLayoutPanel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
tableLayoutPanel1
.
AutoScroll
=
true
;
this
.
tableLayoutPanel1
.
ColumnCount
=
2
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
50F
));
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
14
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
2
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
17F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
360
,
114
);
this
.
tableLayoutPanel1
.
TabIndex
=
102
;
//
// axisMoveControl1
//
this
.
axisMoveControl1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
216
);
this
.
axisMoveControl1
.
Name
=
"axisMoveControl1"
;
this
.
axisMoveControl1
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
403
);
this
.
axisMoveControl1
.
TabIndex
=
287
;
//
// CT
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Controls
.
Add
(
this
.
panBase
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
Name
=
"CT"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
1027
,
546
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
CT_Load
);
this
.
panBase
.
ResumeLayout
(
false
);
this
.
panBase
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox3
.
ResumeLayout
(
false
);
this
.
panel1
.
ResumeLayout
(
false
);
this
.
groupBox4
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
#
endregion
protected
System
.
Windows
.
Forms
.
Panel
panBase
;
protected
System
.
Windows
.
Forms
.
CheckBox
chbMoveStop
;
protected
System
.
Windows
.
Forms
.
Label
lblName
;
protected
System
.
Windows
.
Forms
.
Button
btnStop
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
Button
btn_ct
;
private
System
.
Windows
.
Forms
.
Label
lblMoveInfo
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
Label
lblMoveInfo2
;
private
System
.
Windows
.
Forms
.
FlowLayoutPanel
flowLayoutPanel1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox3
;
private
AxisMoveControl
axisMoveControl1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Label
lbl_t1
;
private
System
.
Windows
.
Forms
.
Label
lbl_t2
;
private
System
.
Windows
.
Forms
.
Button
btn_ttout
;
private
System
.
Windows
.
Forms
.
Button
btn_ttin
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox4
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
}
}
source/XLRStoreClient/useControl/CT.cs
0 → 100644
查看文件 @
119952f
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Windows.Forms
;
using
UserFromControl
;
namespace
OnlineStore.XLRStore.useControl
{
public
partial
class
CT
:
UserControl
{
private
InputEquip
inputEquip
;
private
BoxEquip
boxBean
;
private
BatchMoveBean
moveBean
;
public
CT
()
{
InitializeComponent
();
StoreManager
.
Loadfinishevent
+=
StoreManager_Loadfinishevent
;
this
.
Enabled
=
false
;
}
private
void
StoreManager_Loadfinishevent
(
object
sender
,
bool
e
)
{
inputEquip
=
StoreManager
.
XLRStore
.
inputEquip
;
boxBean
=
StoreManager
.
XLRStore
.
boxEquip
;
timer1
.
Enabled
=
true
;
this
.
Enabled
=
true
;
axisMoveControl1
.
LoadData
(
StoreManager
.
XLRStore
.
inputEquip
,
new
AxisBean
[]
{
inputEquip
.
BatchMove_A
.
BatchAxis
,
inputEquip
.
BatchMove_B
.
BatchAxis
});
boxBean
.
cttime
+=
BoxBean_cttime
;
inputEquip
.
cttime
+=
InputEquip_cttime
;
LoadIOList
();
}
private
void
InputEquip_cttime
(
object
sender
,
double
e
)
{
var
cc
=
DateTime
.
Now
-
cttime
;
lbl_t1
.
Text
=
$
"CT:{cc.TotalSeconds:F2}"
;
}
private
void
BoxBean_cttime
(
object
sender
,
double
e
)
{
lbl_t2
.
Text
=
$
"CT:{e:F2}"
;
}
DateTime
cttime
;
private
void
btn_ct_Click
(
object
sender
,
EventArgs
e
)
{
if
(
StoreManager
.
XLRStore
.
runStatus
!=
RunStatus
.
Runing
)
{
MessageBox
.
Show
(
"请先启动设备"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
)
||
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
LOW
))
{
MessageBox
.
Show
(
"请在出库缓存位上放上料盘"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UnderArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
)
||
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UnderArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
))
{
MessageBox
.
Show
(
"请清空入库缓存上的料盘"
);
return
;
}
BoxPosition
posiiton
=
CSVPositionReader
<
BoxPosition
>.
GetPositon
(
PosIDManger
.
APosList
.
DRAWER
[
1
][
0
].
PosID
);
InOutParam
param
=
new
InOutParam
(
new
InOutPosInfo
(
"InstoreSTEST"
,
posiiton
.
PositionNum
,
posiiton
.
BagHigh
,
posiiton
.
BagWidth
));
param
.
ShelfType
=
1
;
LogUtil
.
info
(
"点击 CT测试"
);
cttime
=
DateTime
.
Now
;
inputEquip
.
StartInstore
(
param
);
}
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
lblMoveInfo
.
Text
=
inputEquip
.
GetMoveStr
();
lblMoveInfo2
.
Text
=
boxBean
.
GetMoveStr
();
ReadIOList
();
}
private
void
CT_Load
(
object
sender
,
EventArgs
e
)
{
for
(
int
i
=
1
;
i
<=
13
;
i
++)
{
// 创建按钮
Button
button
=
new
Button
();
button
.
Text
=
"位置 "
+
i
;
// 设置按钮文本
button
.
Tag
=
i
;
// 设置按钮的Tag属性
button
.
Click
+=
new
EventHandler
(
Button_Click
);
// 为按钮添加点击事件
button
.
Width
=
100
;
button
.
Height
=
40
;
// 将按钮添加到FlowLayoutPanel
flowLayoutPanel1
.
Controls
.
Add
(
button
);
}
}
private
void
Button_Click
(
object
sender
,
EventArgs
e
)
{
// 获取触发事件的按钮
Button
clickedButton
=
sender
as
Button
;
// 检查Tag属性并显示提示
if
(
clickedButton
!=
null
&&
clickedButton
.
Tag
is
int
tag
)
{
btn_auto_Click
(
tag
);
}
}
private
void
btn_auto_Click
(
int
drawerindex
)
{
if
(
StoreManager
.
XLRStore
.
runStatus
!=
RunStatus
.
Runing
)
{
MessageBox
.
Show
(
"请先启动设备"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
)
||
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
))
{
MessageBox
.
Show
(
"请清空出库缓存位上的料盘"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UnderArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
)
||
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UnderArea_Check_B
).
Equals
(
IO_VALUE
.
LOW
))
{
MessageBox
.
Show
(
"请在入库缓存位上放上料盘"
);
return
;
}
//int drawerindex = int.Parse(cb_poslist.SelectedItem.ToString());
string
apos
=
""
,
bpos
=
""
,
aout
=
""
,
bout
=
""
;
//if (drawerindex == 20)
//{
// apos = "01AA15060420";
// bpos = "01BB14050401";
//}
//else
PosIDManger
.
GetDarwerPoslist
(
drawerindex
,
out
apos
,
out
bpos
,
out
aout
,
out
bout
);
if
(
string
.
IsNullOrEmpty
(
apos
))
{
MessageBox
.
Show
(
$
"位置{drawerindex} A侧没有可用库位"
);
return
;
}
if
(
string
.
IsNullOrEmpty
(
bpos
))
{
MessageBox
.
Show
(
$
"位置{drawerindex} B侧没有可用库位"
);
return
;
}
if
(
PosIDManger
.
GetPosHasReel
(
apos
))
{
MessageBox
.
Show
(
$
"库位{apos} 已有物料,不能入库"
);
return
;
}
if
(
PosIDManger
.
GetPosHasReel
(
bpos
))
{
MessageBox
.
Show
(
$
"库位{bpos} 已有物料,不能入库"
);
return
;
}
LogUtil
.
info
(
$
"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}"
);
InOutParam
inp
;
if
(
apos
.
IndexOf
(
"AA"
)
>
0
)
{
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
AInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
BInStoreInfo
};
if
(!
string
.
IsNullOrEmpty
(
aout
))
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
if
(!
string
.
IsNullOrEmpty
(
bout
))
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
}
else
{
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
BInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
AInStoreInfo
};
if
(!
string
.
IsNullOrEmpty
(
bout
))
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
if
(!
string
.
IsNullOrEmpty
(
aout
))
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
}
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
StartInstore
(
inp
))
{
MessageBox
.
Show
(
"启动失败"
);
return
;
}
//LogUtil.info("手动入库测试...");
//string apos = PosIDManger.APosList.DRAWER[selindex][0].PosID;
//string aout = PosIDManger.APosList.DRAWER[selindex][1].PosID;
//string bpos = PosIDManger.BPosList.DRAWER[selindex][0].PosID;
//string bout = PosIDManger.BPosList.DRAWER[selindex][1].PosID;
//LogUtil.info($"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}");
//BufferDataManager.AInStoreInfo = new InOutPosInfo("STEST", apos, 7, 8);
//BufferDataManager.BInStoreInfo = new InOutPosInfo("STEST", bpos, 7, 8);
//var inp = new InOutParam() { PosInfo = BufferDataManager.AInStoreInfo, PosInfoBack = BufferDataManager.BInStoreInfo };
//if (!string.IsNullOrEmpty(aout))
// inp.AOutPosInfo = new InOutPosInfo("STEST", aout, 7, 8);
//if (!string.IsNullOrEmpty(bout))
// inp.BOutPosInfo = new InOutPosInfo("STEST", bout, 7, 8);
//if (!StoreManager.XLRStore.boxEquip.StartInstore(inp))
//{
// MessageBox.Show("启动失败");
// return;
//}
//else
//{
// StoreManager.XLRStore.boxEquip.MoveInfo.NextMoveStep(StepEnum.SO_15_ToBufferArea);
// LogUtil.info($"直接前往缓存放料");
//}
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
boxBean
.
MoveStop
=
chbMoveStop
.
Checked
;
inputEquip
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
inputEquip
.
Name
+
"用户切换是否暂停: "
+
inputEquip
.
MoveStop
);
}
private
void
btnStop_Click
(
object
sender
,
EventArgs
e
)
{
StoreManager
.
XLRStore
.
StopRun
();
LogUtil
.
info
(
"手动停止"
);
}
private
void
lbl_t1_Click
(
object
sender
,
EventArgs
e
)
{
}
private
void
btn_ttin_Click
(
object
sender
,
EventArgs
e
)
{
if
(
StoreManager
.
XLRStore
.
runStatus
!=
RunStatus
.
Runing
)
{
MessageBox
.
Show
(
"请先启动设备"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UnderArea_Check_A
).
Equals
(
IO_VALUE
.
LOW
)
||
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UnderArea_Check_B
).
Equals
(
IO_VALUE
.
LOW
))
{
MessageBox
.
Show
(
"请在入库缓存位上放上料盘"
);
return
;
}
//int drawerindex = int.Parse(cb_poslist.SelectedItem.ToString());
string
apos
=
"01AA15060420"
,
bpos
=
"01BB14050401"
,
aout
=
""
,
bout
=
""
;
if
(
PosIDManger
.
GetPosHasReel
(
apos
))
{
MessageBox
.
Show
(
$
"库位{apos} 已有物料,不能入库"
);
apos
=
""
;
}
if
(
PosIDManger
.
GetPosHasReel
(
bpos
))
{
MessageBox
.
Show
(
$
"库位{bpos} 已有物料,不能入库"
);
bpos
=
""
;
}
if
(
apos
==
""
&&
bpos
==
""
)
return
;
LogUtil
.
info
(
$
"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}"
);
InOutParam
inp
;
BufferDataManager
.
AInStoreInfo
=
apos
==
""
?
null
:
new
InOutPosInfo
(
"STEST"
,
apos
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
bpos
==
""
?
null
:
new
InOutPosInfo
(
"STEST"
,
bpos
,
7
,
8
);
if
(
BufferDataManager
.
AInStoreInfo
!=
null
)
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
AInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
BInStoreInfo
};
else
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
BInStoreInfo
};
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
StartInstore
(
inp
))
{
MessageBox
.
Show
(
"启动失败"
);
return
;
}
}
private
void
btn_ttout_Click
(
object
sender
,
EventArgs
e
)
{
if
(
StoreManager
.
XLRStore
.
runStatus
!=
RunStatus
.
Runing
)
{
MessageBox
.
Show
(
"请先启动设备"
);
return
;
}
if
(
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_A
).
Equals
(
IO_VALUE
.
HIGH
)
||
StoreManager
.
XLRStore
.
boxEquip
.
IOValue
(
IO_Type
.
UpperArea_Check_B
).
Equals
(
IO_VALUE
.
HIGH
))
{
MessageBox
.
Show
(
"请清空出库缓存位上的料盘"
);
return
;
}
//int drawerindex = int.Parse(cb_poslist.SelectedItem.ToString());
string
apos
=
""
,
bpos
=
""
,
aout
=
"01AA15060420"
,
bout
=
"01BB14050401"
;
if
(!
PosIDManger
.
GetPosHasReel
(
aout
))
{
MessageBox
.
Show
(
$
"库位{aout} 没有物料,不能出库"
);
aout
=
""
;
//return;
}
if
(!
PosIDManger
.
GetPosHasReel
(
bout
))
{
MessageBox
.
Show
(
$
"库位{bout} 没有物料,不能出库"
);
bout
=
""
;
//return;
}
if
(
aout
==
""
&&
bout
==
""
)
return
;
LogUtil
.
info
(
$
"工作库位: apos:{apos}, bpos:{bpos}, aout:{aout}, bout:{bout}"
);
InOutParam
inp
;
BufferDataManager
.
AInStoreInfo
=
new
InOutPosInfo
(
"OUTSTEST"
,
aout
,
7
,
8
);
BufferDataManager
.
BInStoreInfo
=
new
InOutPosInfo
(
"OUTSTEST"
,
bout
,
7
,
8
);
inp
=
new
InOutParam
();
if
(!
string
.
IsNullOrEmpty
(
aout
))
{
inp
.
AOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
aout
,
7
,
8
);
inp
.
PosInfo
=
BufferDataManager
.
AInStoreInfo
;
}
if
(!
string
.
IsNullOrEmpty
(
bout
))
{
inp
.
BOutPosInfo
=
new
InOutPosInfo
(
"STEST"
,
bout
,
7
,
8
);
inp
.
PosInfo
=
BufferDataManager
.
BInStoreInfo
;
}
if
(!
string
.
IsNullOrEmpty
(
aout
)
&&
!
string
.
IsNullOrEmpty
(
bout
))
inp
=
new
InOutParam
()
{
PosInfo
=
BufferDataManager
.
AInStoreInfo
,
PosInfoBack
=
BufferDataManager
.
BInStoreInfo
};
if
(!
StoreManager
.
XLRStore
.
boxEquip
.
StartInstore
(
inp
))
{
MessageBox
.
Show
(
"启动失败"
);
return
;
}
}
protected
Dictionary
<
string
,
IOTextControl
>
DIControlList
=
new
Dictionary
<
string
,
IOTextControl
>();
protected
void
ReadIOList
()
{
foreach
(
string
key
in
DIControlList
.
Keys
)
{
IOTextControl
control
=
DIControlList
[
key
];
int
iov
=
(
int
)
IOManager
.
IOValue
(
key
,
inputEquip
.
DeviceID
);
if
(
iov
!=
control
.
IOValue
)
{
control
.
IOValue
=
iov
;
control
.
ShowData
();
}
}
}
private
void
LoadIOList
()
{
int
maxCount
=
20
;
int
roleindex
=
0
;
this
.
tableLayoutPanel1
.
RowStyles
.
Clear
();
this
.
tableLayoutPanel1
.
RowCount
=
maxCount
;
//this.tableLayoutPanel3.RowStyles.Clear();
//this.tableLayoutPanel3.RowCount = maxCount;
int
i
=
0
;
foreach
(
ConfigIO
ioValue
in
inputEquip
.
Config
.
DIList
.
Values
)
{
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
ioValue
.
Explain
,
ioValue
.
ProName
);
{
// 为每个控件添加一个新的行样式
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
// 计算列索引,每两个控件换一行
int
columnIndex
=
i
%
2
;
// 将控件添加到正确的列和行
this
.
tableLayoutPanel1
.
Controls
.
Add
(
control
,
columnIndex
,
i
/
2
);
}
roleindex
++;
i
++;
DIControlList
.
Add
(
ioValue
.
ProName
,
control
);
}
this
.
SuspendLayout
();
//此处为不闪屏,一定要有的!
}
}
}
source/XLRStoreClient/useControl/CT.resx
0 → 100644
查看文件 @
119952f
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论