Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO775-DUOStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 44f88ec1
由
刘韬
编写于
2021-01-22 11:51:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加p2,p3压紧皱列表
1 个父辈
e42042fd
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
39 个修改的文件
包含
927 行增加
和
436 行删除
source/Common/Common.csproj
source/Common/Setting_Init.cs
source/Common/util/LogUtil.cs
source/DUOStore/App.config
source/DUOStore/DUOStore.csproj
source/DUOStore/FrmAxisDebug.Designer.cs
source/DUOStore/FrmAxisMove.Designer.cs
source/DUOStore/FrmAxisMove.cs
source/DUOStore/FrmBox.Designer.cs
source/DUOStore/FrmBox.cs
source/DUOStore/FrmIOStatus.Designer.cs
source/DUOStore/FrmIOStatus.cs
source/DUOStore/FrmStore.Designer.cs
source/DUOStore/FrmStore.cs
source/DUOStore/useControl/AxisMoveControl.Designer.cs
source/DUOStore/useControl/AxisMoveControl.cs
source/DUOStore/useControl/AxisMoveControl.resx
source/DeviceLibrary/AXIS/AxisManager.cs
source/DeviceLibrary/AgvClient/AgvClient.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
source/DeviceLibrary/StoreConfig/StoreConfig.csv
source/DeviceLibrary/StoreConfig/linePositions_1.csv
source/DeviceLibrary/StoreConfig/linePositions_2.csv
source/DeviceLibrary/device/halcon/CodeManager.cs
source/DeviceLibrary/duoStore/BoxBean.cs
source/DeviceLibrary/duoStore/DUOStoreBean.cs
source/DeviceLibrary/duoStore/DUOStoreBean_Partial.cs
source/DeviceLibrary/duoStore/DUOStoreBean_RaiseStation.cs
source/DeviceLibrary/duoStore/ElectricGripper - 复制.cs
source/DeviceLibrary/duoStore/ElectricGripper.cs
source/DeviceLibrary/duoStore/EquipBase.cs
source/DeviceLibrary/duoStore/StoreManager.cs
source/LoadCVSLibrary/LoadCSVLibrary.csproj
source/LoadCVSLibrary/position/ACBoxPosition.cs
source/LoadCVSLibrary/storeConfig/config/Box_Config.cs
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
source/LoadCVSLibrary/storeConfig/config/Store_Config.cs
source/Common/Common.csproj
查看文件 @
44f88ec
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.
0
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
5
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
...
...
@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=
1.2.15
.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=
2.0.8
.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\
dll
\log4net.dll</HintPath>
<HintPath>..\..\
..\增广夹爪
\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath>
...
...
source/Common/Setting_Init.cs
查看文件 @
44f88ec
...
...
@@ -104,5 +104,9 @@ namespace OnlineStore.Common
//是否有T4进出轴
public
static
string
HasT4Axis
=
"HasT4Axis"
;
public
static
string
AgvServerIp
=
"AgvServerIp"
;
}
}
source/Common/util/LogUtil.cs
查看文件 @
44f88ec
...
...
@@ -19,6 +19,7 @@ namespace OnlineStore.Common
public
static
Dictionary
<
int
,
DateTime
>
lastErrorLogTime
=
new
Dictionary
<
int
,
DateTime
>();
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
event
ShowLog
showLogEvent
;
public
static
int
showCount
=
30
;
public
static
bool
debug_opened
=
false
;
...
...
@@ -117,7 +118,11 @@ namespace OnlineStore.Common
text
+=
str
;
}
System
.
DateTime
now
=
System
.
DateTime
.
Now
;
logList
.
Add
(
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
);
string
newmsg
=
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
;
logList
.
Add
(
newmsg
);
showLogEvent
?.
Invoke
(
text
+
newmsg
,
Color
.
Black
);
if
(
logBox
==
null
)
{
return
;
...
...
source/DUOStore/App.config
查看文件 @
44f88ec
...
...
@@ -12,7 +12,7 @@
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<
add
key
=
"StopBlowValue"
value
=
"4"
/>
<!--
Server
address
-->
<
!--<
add
key
=
"http.server"
value
=
"http://10.85.160.25/myproject/"
/>--
>
<
add
key
=
"http.server"
value
=
"http://localhost/myproject/"
/
>
<!--
storeType
-->
<
add
key
=
"store_count"
value
=
"2"
/>
<
add
key
=
"Store_ConfigPath"
value
=
"\StoreConfig\StoreConfig.csv"
/>
...
...
@@ -39,12 +39,12 @@
<!--
IO
模块是否主动上传-->
<
add
key
=
"AIOAutoUpload"
value
=
"0"
/>
<
add
key
=
"CodeCount"
value
=
"3"
/>
<
add
key
=
"Tool_P3_Offset"
value
=
"70
00
"
/>
<
add
key
=
"Tool_P4_Offset"
value
=
"-20
00
"
/>
<
add
key
=
"Tool_P5_Offset"
value
=
"-20
00
"
/>
<
add
key
=
"Tool_P6_Offset"
value
=
"70
00
"
/>
<
add
key
=
"Tool_P3_Offset"
value
=
"70"
/>
<
add
key
=
"Tool_P4_Offset"
value
=
"-20"
/>
<
add
key
=
"Tool_P5_Offset"
value
=
"-20"
/>
<
add
key
=
"Tool_P6_Offset"
value
=
"70"
/>
<
add
key
=
"Tool_TargetSpeed"
value
=
"20"
/>
<
add
key
=
"Tool_TargetPosition"
value
=
"1
83500
0"
/>
<
add
key
=
"Tool_TargetPosition"
value
=
"1
042
0"
/>
<
add
key
=
"Agv_Log_Open"
value
=
"1"
/>
<!--进出轴位置-->
...
...
@@ -54,6 +54,7 @@
<!--当前料架信息-料架类型,
0
=空料架,
1
=入库料架,
2
=出库料架-->
<
add
key
=
"CurrShelfType"
value
=
"-1"
/>
<
add
key
=
"HasT4Axis"
value
=
"true"
/>
<
add
key
=
"AgvServerIp"
value
=
"192.168.11.11"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
@@ -66,6 +67,16 @@
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
appender
name
=
"Rmaxis"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/Rmaxis.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"
/>
</
layout
>
</
appender
>
<
appender
name
=
"AIOBOX"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/aio/AIOBOX.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
...
...
@@ -84,6 +95,10 @@
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
</
logger
>
<
logger
name
=
"Rmaxis"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"Rmaxis"
/>
</
logger
>
<!--<
root
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
source/DUOStore/DUOStore.csproj
查看文件 @
44f88ec
...
...
@@ -38,14 +38,20 @@
<ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
<Reference Include="CodeLibrary, Version=1.0.7380.18241, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>..\..\dll\log4net.dll</HintPath>
<Reference Include="HuichuanLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
...
...
source/DUOStore/FrmAxisDebug.Designer.cs
查看文件 @
44f88ec
...
...
@@ -427,7 +427,7 @@
this
.
MaximizeBox
=
false
;
this
.
MinimizeBox
=
false
;
this
.
Name
=
"FrmAxisDebug"
;
this
.
Text
=
"
轴点动
调试"
;
this
.
Text
=
"
运动轴
调试"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmAxisDebug_Load
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmAxisDebug_Shown
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar1
)).
EndInit
();
...
...
source/DUOStore/FrmAxisMove.Designer.cs
查看文件 @
44f88ec
此文件的差异被折叠,
点击展开。
source/DUOStore/FrmAxisMove.cs
查看文件 @
44f88ec
...
...
@@ -34,7 +34,8 @@ namespace OnlineStore.DUOStore
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
axisMoveControl1
.
LoadData
(
null
,
new
AxisBean
[]
{
StoreManager
.
Store
.
T1_BatchAxis
,
StoreManager
.
Store
.
T2_MiddleAxis
,
StoreManager
.
Store
.
T3_UpdownAxis
,
StoreManager
.
Store
.
T4_InOut_Axis
});
axisMoveControl1
.
LoadData
(
StoreManager
.
Store
);
//new AxisBean[] { StoreManager.Store.T1_BatchAxis, StoreManager.Store.T2_MiddleAxis, StoreManager.Store.T3_UpdownAxis, StoreManager.Store.T4_InOut_Axis }
LoadPostion
();
}
...
...
source/DUOStore/FrmBox.Designer.cs
查看文件 @
44f88ec
此文件的差异被折叠,
点击展开。
source/DUOStore/FrmBox.cs
查看文件 @
44f88ec
...
...
@@ -50,7 +50,7 @@ namespace OnlineStore.DUOStore
}
// this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this
.
Text
=
BoxBean
.
Name
;
axisMoveControl1
.
LoadData
(
BoxBean
,
new
AxisBean
[]
{
BoxBean
.
MiddleAxis
,
BoxBean
.
UpdownAxis
,
BoxBean
.
InoutAxis
,
BoxBean
.
ComAxis
}
);
axisMoveControl1
.
LoadData
(
BoxBean
);
ACBoxPosition
acPosition
=
null
;
if
(
BoxBean
.
PositionNumList
.
Count
>
0
)
{
...
...
@@ -70,8 +70,8 @@ namespace OnlineStore.DUOStore
txtUpDownP2
.
Text
=
BoxBean
.
Config
.
UpDownAxis_P2
.
ToString
();
txtMiddleP11
.
Text
=
BoxBean
.
Config
.
MiddleAxis_P11
.
ToString
();
txtInoutP11
.
Text
=
BoxBean
.
Config
.
InOutAxis_P11
.
ToString
();
txtComP3
.
Text
=
BoxBean
.
Config
.
CompAxis_P3
.
ToString
();
txtInOutP2
.
Text
=
BoxBean
.
Config
.
InOutAxis_P2
.
ToString
();
//
txtComP3.Text = BoxBean.Config.CompAxis_P3.ToString();
//
txtInOutP2.Text = BoxBean.Config.InOutAxis_P2.ToString();
LoadPData
(
acPosition
);
chbDebug
.
Checked
=
BoxBean
.
IsDebug
;
...
...
@@ -278,8 +278,10 @@ namespace OnlineStore.DUOStore
txtUpDownP6
.
Text
=
acPosition
.
UpdownAxis_OL_P6
.
ToString
();
txtInOutP3
.
Text
=
acPosition
.
InoutAxis_P3
.
ToString
();
txtMiddleP2
.
Text
=
acPosition
.
MiddleAxis_P2
.
ToString
();
int
comP2
=
BoxBean
.
Config
.
GetComP2
(
acPosition
.
BagHigh
);
txtComP2
.
Text
=
comP2
.
ToString
();
txtComP2
.
Text
=
acPosition
.
ComAxis_P2
.
ToString
();
txtComP3
.
Text
=
acPosition
.
ComAxis_P3
.
ToString
();
//int comP2 = BoxBean.Config.GetComP2(acPosition.BagHigh);
//txtComP2.Text = comP2.ToString();
lblSize
.
Text
=
"尺寸:"
+
acPosition
.
BagWidth
+
"*"
+
acPosition
.
BagHigh
;
}
}
...
...
@@ -298,6 +300,8 @@ namespace OnlineStore.DUOStore
acPosition
.
UpdownAxis_IL_P4
=
FormUtil
.
GetIntValue
(
txtUpDownP4
);
acPosition
.
UpdownAxis_OH_P5
=
FormUtil
.
GetIntValue
(
txtUpDownP5
);
acPosition
.
UpdownAxis_OL_P6
=
FormUtil
.
GetIntValue
(
txtUpDownP6
);
acPosition
.
ComAxis_P2
=
FormUtil
.
GetIntValue
(
txtComP2
);
acPosition
.
ComAxis_P3
=
FormUtil
.
GetIntValue
(
txtComP3
);
}
//位置配置
string
appPath
=
Application
.
StartupPath
;
...
...
@@ -384,16 +388,16 @@ namespace OnlineStore.DUOStore
if
(
BoxBean
.
Config
.
CompAxis_P3
!=
comp3
)
{
BoxBean
.
Config
.
CompAxis_P3
=
comp3
;
needUpdate
=
true
;
}
if
(
BoxBean
.
Config
.
GetComP2
(
acPosition
.
BagHigh
)
!=
comp2
)
{
BoxBean
.
Config
.
UpdateComP2
(
acPosition
.
BagHigh
,
comp2
);
needUpdate
=
true
;
}
//
if (BoxBean.Config.CompAxis_P3 != comp3)
//
{
//
BoxBean.Config.CompAxis_P3 = comp3;
//
needUpdate = true;
//
}
//
if (BoxBean.Config.GetComP2(acPosition.BagHigh) != comp2)
//
{
//
BoxBean.Config.UpdateComP2(acPosition.BagHigh, comp2);
//
needUpdate = true;
//
}
if
(
BoxBean
.
Config
.
CompAxis_P1
!=
comp1
)
{
BoxBean
.
Config
.
CompAxis_P1
=
comp1
;
...
...
@@ -717,7 +721,7 @@ namespace OnlineStore.DUOStore
if
(
BoxBean
.
Config
.
DIList
.
ContainsKey
(
IO_Type
.
Fixture_Check
))
{
ioIP
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_Check
].
IO_IP
;
ioIndex
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_
Check
].
GetIOAddr
();
ioIndex
=
BoxBean
.
Config
.
DIList
[
IO_Type
.
Fixture_
Laser
].
GetIOAddr
();
}
FrmPositionTool
frm
=
new
FrmPositionTool
(
PortName
,
slvAddr
,
ioIP
,
ioIndex
,
Text
,
BoxBean
.
ID
);
frm
.
ShowDialog
();
...
...
source/DUOStore/FrmIOStatus.Designer.cs
查看文件 @
44f88ec
...
...
@@ -17,8 +17,9 @@
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnCloseGate
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOpenGate
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCloseAll
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnRelax
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClamp
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -56,22 +57,12 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// button1
//
this
.
button1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
689
,
563
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
125
,
37
);
this
.
button1
.
TabIndex
=
254
;
this
.
button1
.
Text
=
"关闭"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// groupBox1
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnCloseGate
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnOpenGate
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnCloseAll
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnRelax
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnClamp
);
...
...
@@ -98,12 +89,36 @@
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
524
,
3
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
322
,
536
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
577
,
536
);
this
.
groupBox1
.
TabIndex
=
105
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"DO写入"
;
this
.
groupBox1
.
Enter
+=
new
System
.
EventHandler
(
this
.
groupBox1_Enter
);
//
// btnCloseGate
//
this
.
btnCloseGate
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnCloseGate
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCloseGate
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
206
);
this
.
btnCloseGate
.
Name
=
"btnCloseGate"
;
this
.
btnCloseGate
.
Size
=
new
System
.
Drawing
.
Size
(
125
,
34
);
this
.
btnCloseGate
.
TabIndex
=
304
;
this
.
btnCloseGate
.
Text
=
"大门关闭"
;
this
.
btnCloseGate
.
UseVisualStyleBackColor
=
false
;
this
.
btnCloseGate
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCloseGate_Click
);
//
// btnOpenGate
//
this
.
btnOpenGate
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOpenGate
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenGate
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
169
);
this
.
btnOpenGate
.
Name
=
"btnOpenGate"
;
this
.
btnOpenGate
.
Size
=
new
System
.
Drawing
.
Size
(
125
,
34
);
this
.
btnOpenGate
.
TabIndex
=
303
;
this
.
btnOpenGate
.
Text
=
"大门打开"
;
this
.
btnOpenGate
.
UseVisualStyleBackColor
=
false
;
this
.
btnOpenGate
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOpenGate_Click
);
//
// btnCloseAll
//
this
.
btnCloseAll
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
...
...
@@ -196,7 +211,7 @@
this
.
btnTopDown
.
Name
=
"btnTopDown"
;
this
.
btnTopDown
.
Size
=
new
System
.
Drawing
.
Size
(
125
,
34
);
this
.
btnTopDown
.
TabIndex
=
289
;
this
.
btnTopDown
.
Text
=
"
线体
顶升气缸下降"
;
this
.
btnTopDown
.
Text
=
"
横移
顶升气缸下降"
;
this
.
btnTopDown
.
UseVisualStyleBackColor
=
false
;
this
.
btnTopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTopDown_Click
);
//
...
...
@@ -208,7 +223,7 @@
this
.
btnTopUp
.
Name
=
"btnTopUp"
;
this
.
btnTopUp
.
Size
=
new
System
.
Drawing
.
Size
(
125
,
34
);
this
.
btnTopUp
.
TabIndex
=
288
;
this
.
btnTopUp
.
Text
=
"
线体
顶升气缸上升"
;
this
.
btnTopUp
.
Text
=
"
横移
顶升气缸上升"
;
this
.
btnTopUp
.
UseVisualStyleBackColor
=
false
;
this
.
btnTopUp
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTopUp_Click
);
//
...
...
@@ -338,13 +353,13 @@
this
.
btn_Down
.
TabIndex
=
250
;
this
.
btn_Down
.
Text
=
"定位销下降"
;
this
.
btn_Down
.
UseVisualStyleBackColor
=
false
;
this
.
btn_Down
.
Click
+=
new
System
.
EventHandler
(
this
.
btnLocation
Up
_Click
);
this
.
btn_Down
.
Click
+=
new
System
.
EventHandler
(
this
.
btnLocation
Down
_Click
);
//
// btn_Up
//
this
.
btn_Up
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn_Up
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_Up
.
Location
=
new
System
.
Drawing
.
Point
(
3
4
,
286
);
this
.
btn_Up
.
Location
=
new
System
.
Drawing
.
Point
(
3
1
,
286
);
this
.
btn_Up
.
Name
=
"btn_Up"
;
this
.
btn_Up
.
Size
=
new
System
.
Drawing
.
Size
(
125
,
34
);
this
.
btn_Up
.
TabIndex
=
250
;
...
...
@@ -439,8 +454,7 @@
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
858
,
621
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1132
,
621
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
Controls
.
Add
(
this
.
groupBox3
);
...
...
@@ -476,7 +490,6 @@
private
System
.
Windows
.
Forms
.
TextBox
txtDoName
;
private
System
.
Windows
.
Forms
.
Button
btnBack
;
private
System
.
Windows
.
Forms
.
Button
btnFoward
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
btnOpenDo
;
private
System
.
Windows
.
Forms
.
Button
btnCloseDO
;
private
System
.
Windows
.
Forms
.
Button
btnTopDown
;
...
...
@@ -491,6 +504,8 @@
private
System
.
Windows
.
Forms
.
Button
btn_Stop
;
private
System
.
Windows
.
Forms
.
Button
btn_Down
;
private
System
.
Windows
.
Forms
.
Button
btn_Up
;
private
System
.
Windows
.
Forms
.
Button
btnCloseGate
;
private
System
.
Windows
.
Forms
.
Button
btnOpenGate
;
}
}
source/DUOStore/FrmIOStatus.cs
查看文件 @
44f88ec
...
...
@@ -242,11 +242,6 @@ namespace OnlineStore.DUOStore
{
timer1
.
Start
();
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
}
private
void
btnOpenDo_Click
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -289,7 +284,7 @@ namespace OnlineStore.DUOStore
private
void
btnStoreOn_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btn
Camer
Led
,
"打开设备照明"
,
"关闭设备照明"
,
IO_Type
.
Device_Led
);
BtnMove
(
btn
Device
Led
,
"打开设备照明"
,
"关闭设备照明"
,
IO_Type
.
Device_Led
);
}
private
void
btnCloseCyDo_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -305,12 +300,12 @@ namespace OnlineStore.DUOStore
private
void
btnClamp_Click
(
object
sender
,
EventArgs
e
)
{
ElectricGripper
.
Clamp
();
StoreManager
.
Store
.
electricClamp
.
Clamp
();
}
private
void
btnRelax_Click
(
object
sender
,
EventArgs
e
)
{
ElectricGripper
.
Release
();
StoreManager
.
Store
.
electricClamp
.
Release
();
}
private
void
btnLDoorUp_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -355,7 +350,7 @@ namespace OnlineStore.DUOStore
}
private
void
btn_Stop_Click
(
object
sender
,
EventArgs
e
)
{
{
StoreManager
.
Store
.
InOutStation_Stop
();
}
...
...
@@ -368,5 +363,15 @@ namespace OnlineStore.DUOStore
{
StoreManager
.
Store
.
InOutStation_GoOut
();
}
private
void
btnOpenGate_Click
(
object
sender
,
EventArgs
e
)
{
StoreManager
.
Store
.
OpenGate
();
}
private
void
btnCloseGate_Click
(
object
sender
,
EventArgs
e
)
{
StoreManager
.
Store
.
CloseGate
();
}
}
}
source/DUOStore/FrmStore.Designer.cs
查看文件 @
44f88ec
...
...
@@ -33,6 +33,7 @@
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbInstoreEnd
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chkDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblMoveInfo
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -72,7 +73,6 @@
this
.
toolStripSeparator8
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
...
...
@@ -129,6 +129,19 @@
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
182
,
623
);
this
.
panel1
.
TabIndex
=
271
;
//
// button1
//
this
.
button1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
button1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
490
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
button1
.
TabIndex
=
272
;
this
.
button1
.
Text
=
"测试"
;
this
.
button1
.
UseVisualStyleBackColor
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// chbInstoreEnd
//
this
.
chbInstoreEnd
.
AutoSize
=
true
;
...
...
@@ -320,54 +333,54 @@
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
// 启动AToolStripMenuItem
//
this
.
启动
AToolStripMenuItem
.
Name
=
"启动AToolStripMenuItem"
;
this
.
启动
AToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
启动
AToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
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
14
,
6
);
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
// 复位RToolStripMenuItem
//
this
.
复位
RToolStripMenuItem
.
Name
=
"复位RToolStripMenuItem"
;
this
.
复位
RToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
复位
RToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
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
14
,
6
);
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
// 停止TToolStripMenuItem
//
this
.
停止
TToolStripMenuItem
.
Name
=
"停止TToolStripMenuItem"
;
this
.
停止
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
停止
TToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
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
14
,
6
);
this
.
toolStripSeparator5
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
//
// toolStripSeparator2
//
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
14
,
6
);
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator2
.
Visible
=
false
;
//
// 退出ToolStripMenuItem
//
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
26
);
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
退出
ToolStripMenuItem
.
Text
=
"退出"
;
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click_1
);
//
...
...
@@ -477,19 +490,6 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// button1
//
this
.
button1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
button1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
490
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
button1
.
TabIndex
=
272
;
this
.
button1
.
Text
=
"测试"
;
this
.
button1
.
UseVisualStyleBackColor
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// FrmStore
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
source/DUOStore/FrmStore.cs
查看文件 @
44f88ec
...
...
@@ -33,6 +33,7 @@ namespace OnlineStore.DUOStore
startTimer
.
Enabled
=
false
;
startTimer
.
AutoReset
=
false
;
Control
.
CheckForIllegalCrossThreadCalls
=
false
;
LogUtil
.
showLogEvent
+=
LogUtil_showLogEvent
;
}
...
...
@@ -63,7 +64,8 @@ namespace OnlineStore.DUOStore
chbInstoreEnd
.
Checked
=
store
.
InstoreEndSendShelf
;
chbOutstoreEnd
.
Checked
=
store
.
OutstoreEndSendShelf
;
LoadOk
=
true
;
LogUtil
.
logBox
=
this
.
logBox
;
//LogUtil.logBox = this.logBox;
this
.
timer1
.
Start
();
}
catch
(
Exception
ex
)
...
...
@@ -73,6 +75,16 @@ namespace OnlineStore.DUOStore
}
}
private
void
LogUtil_showLogEvent
(
string
msg
,
Color
color
)
{
this
.
Invoke
(
new
Action
(()
=>
{
logBox
.
Text
=
msg
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
logBox
.
ScrollToCaret
();
}));
}
private
void
AddForm
(
string
text
,
Form
form
)
{
text
=
text
.
PadLeft
(
12
,
' '
);
...
...
@@ -271,6 +283,7 @@ namespace OnlineStore.DUOStore
IOManager
.
instance
.
CloseAllConnection
();
HumitureController
.
CloseAllPort
();
AxisManager
.
instance
.
CloseAllPort
();
AxisManager
.
instance
.
CloseCard
();
if
(
Camera
.
_cam
!=
null
)
{
Camera
.
_cam
.
CloseAll
();
...
...
@@ -651,8 +664,8 @@ namespace OnlineStore.DUOStore
{
if
(
LogUtil
.
logBox
==
null
)
{
LogUtil
.
logBox
=
logBox
;
LogUtil
.
UpdateLogbox
();
//
LogUtil.logBox = logBox;
//
LogUtil.UpdateLogbox();
}
}
}
...
...
source/DUOStore/useControl/AxisMoveControl.Designer.cs
查看文件 @
44f88ec
此文件的差异被折叠,
点击展开。
source/DUOStore/useControl/AxisMoveControl.cs
查看文件 @
44f88ec
此文件的差异被折叠,
点击展开。
source/DUOStore/useControl/AxisMoveControl.resx
查看文件 @
44f88ec
...
...
@@ -117,4 +117,7 @@
<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
source/DeviceLibrary/AXIS/AxisManager.cs
查看文件 @
44f88ec
...
...
@@ -29,6 +29,11 @@ namespace OnlineStore.DeviceLibrary
}
#
region
485
通信方法
/// <summary>
/// 废弃return true
/// </summary>
/// <param name="portName"></param>
/// <returns></returns>
public
abstract
bool
OpenPort
(
string
portName
);
/// <summary>
/// 松下专用
...
...
source/DeviceLibrary/AgvClient/AgvClient.cs
0 → 100644
查看文件 @
44f88ec
using
Asa
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
AgvClient
{
public
static
bool
CurrCancelState
=
false
;
private
static
string
ServerIp
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
AgvServerIp
);
private
static
Asa
.
AgvClient
agvClient
;
public
static
Dictionary
<
string
,
Asa
.
ClientAction
>
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
public
static
List
<
string
>
NodeList
=
new
List
<
string
>();
private
static
bool
isInit
=
false
;
public
static
void
Init
()
{
try
{
// LogUtil.info("开始 Init agvclient");
if
(!
isInit
)
{
isInit
=
true
;
agvClient
=
new
Asa
.
AgvClient
(
ServerIp
);
agvClient
.
CancelState
=
true
;
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
Ready
+=
AgvClient_Ready
;
agvClient
.
CloseDoor
+=
AgvClient_CloseDoor
;
}
actionMap
=
new
Dictionary
<
string
,
Asa
.
ClientAction
>();
LogUtil
.
info
(
" 开始 agvClient.Connect"
);
agvClient
.
Connect
();
foreach
(
string
str
in
NodeList
)
{
SetStatus
(
str
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"初始化agvClient "
+
ServerIp
+
" 出错:"
,
ex
);
}
}
public
static
void
SetCancelState
(
bool
isCancel
)
{
CurrCancelState
=
isCancel
;
if
(
agvClient
!=
null
)
{
agvClient
.
CancelState
=
isCancel
;
}
}
public
static
void
SetStatus
(
string
id
,
string
shelfId
=
""
,
ClientAction
action
=
ClientAction
.
None
,
ClientLevel
level
=
ClientLevel
.
Low
,
bool
isMust
=
false
)
{
if
(!
isMust
)
{
if
(
actionMap
.
ContainsKey
(
id
))
{
ClientAction
currA
=
actionMap
[
id
];
//相同状态就设置一次
if
(
currA
.
Equals
(
action
))
{
return
;
}
}
}
string
mark
=
""
;
if
(
shelfId
!=
""
)
{
int
index
=
shelfId
.
IndexOf
(
','
);
if
(
index
>
0
)
{
//紧急出料模块,料串离开时,mark=紧急料或者分配料,rfid=料串号
mark
=
shelfId
.
Substring
(
index
+
1
,
shelfId
.
Length
-
index
-
1
);
shelfId
=
shelfId
.
Substring
(
0
,
index
);
}
}
agvClient
.
SetStatus
(
id
,
mark
,
shelfId
,
action
,
level
);
UpdateAction
(
id
,
action
);
LogUtil
.
info
(
"AgvClient SetStatus id:"
+
id
+
",mark:"
+
mark
+
",shelfId:"
+
shelfId
+
",action:"
+
action
.
ToString
()
+
",level:"
+
level
.
ToString
());
}
private
static
void
AgvClient_Ready
(
string
id
,
string
rfid
)
{
try
{
//UpdateAction(id, ClientAction.Ready);
LogUtil
.
info
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] "
+
GetAction
(
id
).
ToString
());
if
(
GetAction
(
id
)
==
ClientAction
.
NeedEnter
||
id
==
"D1"
)
{
SetStatus
(
id
,
""
,
ClientAction
.
MayEnter
);
}
else
if
(
GetAction
(
id
)
==
ClientAction
.
NeedLeave
||
id
==
"D2"
)
{
SetStatus
(
id
,
""
,
ClientAction
.
MayLeave
);
}
else
{
LogUtil
.
error
(
"收到 AgvClient_Arrive ["
+
id
+
"] ["
+
rfid
+
"] 未找到对应的设备 ,暂不处理"
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"AgvClient_Ready ["
+
id
+
"] ["
+
rfid
+
"] 处理出错:"
+
ex
.
ToString
());
}
}
private
static
void
AgvClient_CloseDoor
(
string
id
,
string
rfid
)
{
LogUtil
.
info
(
"收到 AgvClient_CloseDoor ["
+
id
+
"] ["
+
rfid
+
"] 暂无需处理 "
);
}
private
static
void
AgvClient_Arrive
(
string
id
,
string
rfid
)
{
// UpdateAction(id, ClientAction.Arrive);
LogUtil
.
info
(
"收到 AgvClient_Arrive ["
+
id
+
"] ["
+
rfid
+
"]暂无需处理 "
);
}
internal
static
bool
ISConnected
()
{
if
(
agvClient
==
null
)
{
return
false
;
}
return
agvClient
.
IsConn
;
}
public
static
bool
SetToNone
(
string
id
,
string
shelfId
=
""
)
{
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
None
);
return
true
;
}
return
false
;
}
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
=
""
,
ClientLevel
level
=
ClientLevel
.
Low
)
{
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedEnter
,
level
);
return
true
;
}
return
false
;
}
public
static
bool
NeedLeave
(
string
id
,
string
shelfId
=
""
,
ClientLevel
level
=
ClientLevel
.
Low
)
{
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedLeave
,
level
);
return
true
;
}
return
false
;
}
private
static
bool
isLog
=
true
;
//ConfigAppSettings.GetIntValue(Setting_Init.Agv_Log_Open).Equals(1);
private
static
void
AgvClient_Log
(
string
s
)
{
try
{
if
(
isLog
)
{
LogUtil
.
info
(
" AGV "
+
ServerIp
+
" Log : "
+
s
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"AgvClient_Log 出错:"
+
ex
.
ToString
());
}
}
public
static
Asa
.
ClientAction
GetAction
(
string
NodeName
)
{
if
(
actionMap
.
ContainsKey
(
NodeName
))
{
return
actionMap
[
NodeName
];
}
return
Asa
.
ClientAction
.
None
;
}
public
static
void
UpdateAction
(
string
name
,
Asa
.
ClientAction
action
)
{
if
(
actionMap
.
ContainsKey
(
name
))
{
actionMap
[
name
]
=
action
;
}
else
{
actionMap
.
Add
(
name
,
action
);
}
}
public
static
void
Dispose
()
{
try
{
if
(
agvClient
!=
null
)
{
agvClient
.
Close
();
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"释放 agvClient "
+
ServerIp
+
" 出错:"
,
ex
);
}
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
44f88ec
...
...
@@ -43,8 +43,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\Client.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
<Reference Include="CodeLibrary, Version=1.0.7380.18241, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\GeneralClassLibrary\CodeLibraryProject\CodeLibrary\bin\Debug\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
...
...
@@ -52,9 +53,13 @@
<Reference Include="HuichuanLibrary">
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\log4net.dll</HintPath>
</Reference>
<Reference Include="Neotel.Rmaxis, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\
dll\log4net
.dll</HintPath>
<HintPath>..\..\
..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis
.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
...
...
@@ -67,6 +72,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AgvClient\AgvClient.cs" />
<Compile Include="AXIS\AxisManager.cs" />
<Compile Include="AXIS\HC\HCAxisManager.cs" />
<Compile Include="AXIS\PanasonicServo\ACCMDManager.cs" />
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
查看文件 @
44f88ec
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,L1_旋转轴,Middle_Axis,
1,COM1,,150,1000,1000,80,60,5
0,10,1000,0,0
AXIS,,L2_上下轴,UpDown_Axis,
2,COM1,,300,400,400,400,400,4
00,10,1000,0,0
AXIS,,L3_进出轴,InOut_Axis,
3,COM1,,100,300,300,20,60,2
00,10,1000,0,0
AXIS,,L4_压紧轴,Comp_Axis,
4,COM1,,100,300,300,20,60,2
00,10,1000,0,0
AXIS,,L1_旋转轴,Middle_Axis,
0,HC,,800,2400,2400,50,250,300
0,10,1000,0,0
AXIS,,L2_上下轴,UpDown_Axis,
1,HC,,2000,6000,6000,50,250,30
00,10,1000,0,0
AXIS,,L3_进出轴,InOut_Axis,
2,HC,,1000,5000,5000,50,300,80
00,10,1000,0,0
AXIS,,L4_压紧轴,Comp_Axis,
3,HC,,10000,25000,25000,3000,10000,200
00,10,1000,0,0
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P1待机点/入料口低点,UpDownAxis_P1,
58500
0,,,,,,,,,,,,
PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,
60450
0,,,,,,,,,,,,
PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,
30720
0,,,,,,,,,,,,
PRO,,L3_进出轴_P1待机点,InOutAxis_P1,10
00
,,,,,,,,,,,,
PRO,,L4_压紧轴_P1待机点,CompAxis_P1,1
4000
0,,,,,,,,,,,,
PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,1
8000
0,,,,,,,,,,,,
PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=
385001;12=383001;16=379001
;,,,,,,,,,,,,
PRO,,L2_上下轴_P1待机点/入料口低点,UpDownAxis_P1,
1
0,,,,,,,,,,,,
PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,
1
0,,,,,,,,,,,,
PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,
1
0,,,,,,,,,,,,
PRO,,L3_进出轴_P1待机点,InOutAxis_P1,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P1待机点,CompAxis_P1,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,10,,,,,,,,,,,,
PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=
42835;12=38557;16=34550;20=30540;24=26030
;,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,10
00000
,,,,,,,,,,,,
PRO,,L2_上下轴_P12-出料口-高点,UpDownAxis_P12,10
23000
,,,,,,,,,,,,
PRO,,L1_旋转轴_P11-出料口位置,MiddleAxis_P11,
30690
0,,,,,,,,,,,,
PRO,,L3_进出轴_P2-入料口取放料点,InOutAxis_P2,1
4080
0,,,,,,,,,,,,
PRO,,L3_进出轴_P11-出料口取放料点,InOutAxis_P11,1
4800
0,,,,,,,,,,,,
PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,10,,,,,,,,,,,,
PRO,,L2_上下轴_P12-出料口-高点,UpDownAxis_P12,10,,,,,,,,,,,,
PRO,,L1_旋转轴_P11-出料口位置,MiddleAxis_P11,
1
0,,,,,,,,,,,,
PRO,,L3_进出轴_P2-入料口取放料点,InOutAxis_P2,10,,,,,,,,,,,,
PRO,,L3_进出轴_P11-出料口取放料点,InOutAxis_P11,10,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,
6
00,,,,,,,,,,,,
PRO,,L2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,
6
00,,,,,,,,,,,,
PRO,,L2_上下轴_P3速度,UpDownAxis_P3_Speed,
1
000,,, ,,,,,,,,,
PRO,,L2_上下轴_P4速度,UpDownAxis_P4_Speed,
20
0,,,,,,,,,,,,
PRO,,L2_上下轴_P5速度,UpDownAxis_P5_Speed,
1
000,,,,,,,,,,,,
PRO,,L2_上下轴_P6速度,UpDownAxis_P6_Speed,
20
0,,,,,,,,,,,,
PRO,,L2_上下轴_P7速度,UpDownAxis_P7_Speed,
6
00,,,,,,,,,,,,
PRO,,L2_上下轴_P8速度,UpDownAxis_P8_Speed,
6
00,,,,,,,,,,,,
PRO,,L1_旋转轴_P1速度,MiddleAxis_P1_Speed,
3
00,,,,,,,,,,,,
PRO,,L1_旋转轴_P2速度,MiddleAxis_P2_Speed,
3
00,,,,,,,,,,,,
PRO,,L3_进出轴_P1速度,InOutAxis_P1_Speed,
3
00,,,,,,,,,,,,
PRO,,L3_进出轴_P2速度,InOutAxis_P2_Speed,
3
00,,,,,,,,,,,,
PRO,,L3_进出轴_P3速度,InOutAxis_P3_Speed,
3
00,,,,,,,,,,,,
PRO,,L4_压紧轴_P1速度,CompAxis_P1_Speed,
4
00,,,,,,,,,,,,
PRO,,L4_压紧轴_P2速度,CompAxis_P2_Speed,
4
00,,,,,,,,,,,,
PRO,,L4_压紧轴_P3速度,CompAxis_P3_Speed,
4
00,,,,,,,,,,,,
PRO,,L2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,
20
00,,,,,,,,,,,,
PRO,,L2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,
20
00,,,,,,,,,,,,
PRO,,L2_上下轴_P3速度,UpDownAxis_P3_Speed,
2
000,,, ,,,,,,,,,
PRO,,L2_上下轴_P4速度,UpDownAxis_P4_Speed,
15
0,,,,,,,,,,,,
PRO,,L2_上下轴_P5速度,UpDownAxis_P5_Speed,
2
000,,,,,,,,,,,,
PRO,,L2_上下轴_P6速度,UpDownAxis_P6_Speed,
15
0,,,,,,,,,,,,
PRO,,L2_上下轴_P7速度,UpDownAxis_P7_Speed,
20
00,,,,,,,,,,,,
PRO,,L2_上下轴_P8速度,UpDownAxis_P8_Speed,
1
00,,,,,,,,,,,,
PRO,,L1_旋转轴_P1速度,MiddleAxis_P1_Speed,
8
00,,,,,,,,,,,,
PRO,,L1_旋转轴_P2速度,MiddleAxis_P2_Speed,
8
00,,,,,,,,,,,,
PRO,,L3_进出轴_P1速度,InOutAxis_P1_Speed,
16
00,,,,,,,,,,,,
PRO,,L3_进出轴_P2速度,InOutAxis_P2_Speed,
18
00,,,,,,,,,,,,
PRO,,L3_进出轴_P3速度,InOutAxis_P3_Speed,
18
00,,,,,,,,,,,,
PRO,,L4_压紧轴_P1速度,CompAxis_P1_Speed,
50
00,,,,,,,,,,,,
PRO,,L4_压紧轴_P2速度,CompAxis_P2_Speed,
85
00,,,,,,,,,,,,
PRO,,L4_压紧轴_P3速度,CompAxis_P3_Speed,
85
00,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,
6
00,,,,,,,,,,,,
PRO,,L2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,
6
00,,,,,,,,,,,,
PRO,,L3_进出轴_P11速度,InOutAxis_P11_Speed,
3
00,,,,,,,,,,,,
PRO,,L1_旋转轴_P11速度,MiddleAxis_P11_Speed,
3
00,,,,,,,,,,,,
PRO,,L2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,
10
00,,,,,,,,,,,,
PRO,,L2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,
20
00,,,,,,,,,,,,
PRO,,L3_进出轴_P11速度,InOutAxis_P11_Speed,
18
00,,,,,,,,,,,,
PRO,,L1_旋转轴_P11速度,MiddleAxis_P11_Speed,
8
00,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,,
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
查看文件 @
44f88ec
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,R1_旋转轴,Middle_Axis,
1,COM2,,250,1000,1000,80,60,5
0,10,1000,0,0
AXIS,,R2_上下轴,UpDown_Axis,
2,COM2,,300,400,400,400,400,4
00,10,1000,0,0
AXIS,,R3_进出轴,InOut_Axis,
3,COM2,,100,300,300,20,60,2
00,10,1000,0,0
AXIS,,R4_压紧轴,Comp_Axis,
4,COM2,,100,300,300,20,60,2
00,10,1000,0,0
AXIS,,R1_旋转轴,Middle_Axis,
8,HC,,800,2400,2400,50,250,300
0,10,1000,0,0
AXIS,,R2_上下轴,UpDown_Axis,
9,HC,,2000,6000,6000,50,250,30
00,10,1000,0,0
AXIS,,R3_进出轴,InOut_Axis,
10,HC,,1000,5000,5000,50,300,80
00,10,1000,0,0
AXIS,,R4_压紧轴,Comp_Axis,
11,HC,,10000,25000,25000,3000,10000,200
00,10,1000,0,0
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P1待机点/扫码放料低点,UpDownAxis_P1,
58500
0,,,,,,,,,,,,
PRO,,R2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,
60450
0,,,,,,,,,,,,
PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,
30720
0,,,,,,,,,,,,
PRO,,R3_进出轴_P1待机点,InOutAxis_P1,10
00
,,,,,,,,,,,,
PRO,,R4_压紧轴_P1待机点,CompAxis_P1,1
4000
0,,,,,,,,,,,,
PRO,,R4_压紧轴_P3压紧前点,CompAxis_P3,1
8000
0,,,,,,,,,,,,
PRO,,R4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=
201264;12=383001;16=379001
;,,,,,,,,,,,,
PRO,,R2_上下轴_P1待机点/扫码放料低点,UpDownAxis_P1,
1
0,,,,,,,,,,,,
PRO,,R2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,
1
0,,,,,,,,,,,,
PRO,,R1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,
1
0,,,,,,,,,,,,
PRO,,R3_进出轴_P1待机点,InOutAxis_P1,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P1待机点,CompAxis_P1,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P3压紧前点,CompAxis_P3,10,,,,,,,,,,,,
PRO,,R4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=
42835;12=38557;16=34550;20=30540;24=26030
;,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,10
00000
,,,,,,,,,,,,
PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,10
23000
,,,,,,,,,,,,
PRO,,R1_旋转轴_P11-出料口位置,MiddleAxis_P11,
30690
0,,,,,,,,,,,,
PRO,,R3_进出轴_P2-入料口取放料点,InOutAxis_P2,1
4080
0,,,,,,,,,,,,
PRO,,R3_进出轴_P11-出料口取放料点,InOutAxis_P11,1
4800
0,,,,,,,,,,,,
PRO,,R2_上下轴_P11-出料口-低点,UpDownAxis_P11,10,,,,,,,,,,,,
PRO,,R2_上下轴_P12-出料口-高点,UpDownAxis_P12,10,,,,,,,,,,,,
PRO,,R1_旋转轴_P11-出料口位置,MiddleAxis_P11,
1
0,,,,,,,,,,,,
PRO,,R3_进出轴_P2-入料口取放料点,InOutAxis_P2,10,,,,,,,,,,,,
PRO,,R3_进出轴_P11-出料口取放料点,InOutAxis_P11,10,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,
6
00,,,,,,,,,,,,
PRO,,R2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,
6
00,,,,,,,,,,,,
PRO,,R2_上下轴_P3速度,UpDownAxis_P3_Speed,
1
000,,, ,,,,,,,,,
PRO,,R2_上下轴_P4速度,UpDownAxis_P4_Speed,
20
0,,,,,,,,,,,,
PRO,,R2_上下轴_P5速度,UpDownAxis_P5_Speed,
1
000,,,,,,,,,,,,
PRO,,R2_上下轴_P6速度,UpDownAxis_P6_Speed,
20
0,,,,,,,,,,,,
PRO,,R2_上下轴_P7速度,UpDownAxis_P7_Speed,
6
00,,,,,,,,,,,,
PRO,,R2_上下轴_P8速度,UpDownAxis_P8_Speed,
6
00,,,,,,,,,,,,
PRO,,R1_旋转轴_P1速度,MiddleAxis_P1_Speed,
3
00,,,,,,,,,,,,
PRO,,R1_旋转轴_P2速度,MiddleAxis_P2_Speed,
3
00,,,,,,,,,,,,
PRO,,R3_进出轴_P1速度,InOutAxis_P1_Speed,
3
00,,,,,,,,,,,,
PRO,,R3_进出轴_P2速度,InOutAxis_P2_Speed,
3
00,,,,,,,,,,,,
PRO,,R3_进出轴_P3速度,InOutAxis_P3_Speed,
3
00,,,,,,,,,,,,
PRO,,R4_压紧轴_P1速度,CompAxis_P1_Speed,
4
00,,,,,,,,,,,,
PRO,,R4_压紧轴_P2速度,CompAxis_P2_Speed,
4
00,,,,,,,,,,,,
PRO,,R4_压紧轴_P3速度,CompAxis_P3_Speed,
4
00,,,,,,,,,,,,
PRO,,R2_上下轴_P1速度/高速,UpDownAxis_P1_Speed,
20
00,,,,,,,,,,,,
PRO,,R2_上下轴_P2速度/低速,UpDownAxis_P2_Speed,
20
00,,,,,,,,,,,,
PRO,,R2_上下轴_P3速度,UpDownAxis_P3_Speed,
2
000,,, ,,,,,,,,,
PRO,,R2_上下轴_P4速度,UpDownAxis_P4_Speed,
15
0,,,,,,,,,,,,
PRO,,R2_上下轴_P5速度,UpDownAxis_P5_Speed,
2
000,,,,,,,,,,,,
PRO,,R2_上下轴_P6速度,UpDownAxis_P6_Speed,
15
0,,,,,,,,,,,,
PRO,,R2_上下轴_P7速度,UpDownAxis_P7_Speed,
20
00,,,,,,,,,,,,
PRO,,R2_上下轴_P8速度,UpDownAxis_P8_Speed,
1
00,,,,,,,,,,,,
PRO,,R1_旋转轴_P1速度,MiddleAxis_P1_Speed,
8
00,,,,,,,,,,,,
PRO,,R1_旋转轴_P2速度,MiddleAxis_P2_Speed,
8
00,,,,,,,,,,,,
PRO,,R3_进出轴_P1速度,InOutAxis_P1_Speed,
16
00,,,,,,,,,,,,
PRO,,R3_进出轴_P2速度,InOutAxis_P2_Speed,
18
00,,,,,,,,,,,,
PRO,,R3_进出轴_P3速度,InOutAxis_P3_Speed,
18
00,,,,,,,,,,,,
PRO,,R4_压紧轴_P1速度,CompAxis_P1_Speed,
50
00,,,,,,,,,,,,
PRO,,R4_压紧轴_P2速度,CompAxis_P2_Speed,
85
00,,,,,,,,,,,,
PRO,,R4_压紧轴_P3速度,CompAxis_P3_Speed,
85
00,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,
6
00,,,,,,,,,,,,
PRO,,R2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,
6
00,,,,,,,,,,,,
PRO,,R3_进出轴_P11速度,InOutAxis_P11_Speed,
3
00,,,,,,,,,,,,
PRO,,R1_旋转轴_P11速度,MiddleAxis_P11_Speed,
3
00,,,,,,,,,,,,
PRO,,R2_上下轴_P11速度/低速,UpDownAxis_P11_Speed,
10
00,,,,,,,,,,,,
PRO,,R2_上下轴_P12速度/高速,UpDownAxis_P12_Speed,
20
00,,,,,,,,,,,,
PRO,,R3_进出轴_P11速度,InOutAxis_P11_Speed,
18
00,,,,,,,,,,,,
PRO,,R1_旋转轴_P11速度,MiddleAxis_P11_Speed,
8
00,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,,
source/DeviceLibrary/StoreConfig/StoreConfig.csv
查看文件 @
44f88ec
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,T1_提升机构升降轴,T1_Batch_Axis,
1
,HC,,250,500,500,100,200,1000,10,1000,0,0
AXIS,,T2_取料机构旋转轴,T2_Middle_Axis,
2
,HC,,1000,1000,1000,200,500,500,10,1000,0,0
AXIS,,T3_取料机构上下轴,T3_Updown_Axis,
3
,HC,,800,1000,1000,200,500,500,10,1000,0,0
AXIS,,T4_取料机构进出轴,T4_InOut_Axis,
4
,HC,,800,1000,1000,200,500,500,10,1000,0,0
AXIS,,T1_提升机构升降轴,T1_Batch_Axis,
4
,HC,,250,500,500,100,200,1000,10,1000,0,0
AXIS,,T2_取料机构旋转轴,T2_Middle_Axis,
5
,HC,,1000,1000,1000,200,500,500,10,1000,0,0
AXIS,,T3_取料机构上下轴,T3_Updown_Axis,
6
,HC,,800,1000,1000,200,500,500,10,1000,0,0
AXIS,,T4_取料机构进出轴,T4_InOut_Axis,
7
,HC,,800,1000,1000,200,500,500,10,1000,0,0
,,,,,,,,,,,,,,,,
PRO,,IO模块对应的DI数量,IO_DILength,192.168.201.21#16;192.168.201.22#16;192.168.200.23#8,,,,,,,,,,,,
PRO,,IO模块对应的DO数量,IO_DOLength,192.168.201.21#16;192.168.201.22#16;192.168.200.23#8,,,,,,,,,,,,
...
...
@@ -134,6 +134,10 @@ PRO,0,T4_进出轴7寸取料点P2Speed,InOutAxis_P2Speed,5000,,,,,,,,,,,,
PRO,0,T4_进出轴13寸取料点P3Speed,InOutAxis_P3Speed,5000,,,,,,,,,,,,
PRO,0,T4_进出轴放料点P4Speed,InOutAxis_P4Speed,5000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,AgvInName,AgvInName,D1,,,,,,,,,,,,
PRO,0,AgvOutName,AgvOutName,D2,,,,,,,,,,,,
PRO,0,电夹爪1端口,Clamp1Port,COM12,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,,
PRO,,预警湿度,WarnHumidity,80,,,,,,,,,,,,
PRO,,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,,,,,
...
...
@@ -148,4 +152,4 @@ PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,,,,
PRO,0,是否调试状态(1=调试,0=正常),IsDebug,1,,,,,,,,,,,,
PRO,,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,
PRO,,所有料仓的CID(用#号分隔),All_CIDs,packing-1#packing-2,,,,,,,,,,,,
PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00
D76546875
),,,,,,,,,,,,
PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00
E96448339
),,,,,,,,,,,,
source/DeviceLibrary/StoreConfig/linePositions_1.csv
查看文件 @
44f88ec
位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3
1#AC1_1_1_4,259,32,15,1,306200,1290614,1299614,1299614,1290614,140800
1#AC1_1_1_5,258,32,15,1,306200,1334970,1343970,1343970,1334970,140800
1#AC1_1_1_6,257,32,15,1,306200,1381622,1392122,1392122,1381622,140800
1#AC1_1_1_7,256,32,15,1,306200,1424390,1433390,1433390,1424390,140800
1#AC1_1_1_8,255,32,15,1,306200,1471088,1481488,1481488,1471088,140800
1#AC1_1_1_9,254,32,15,1,306200,1514627,1525627,1525627,1514627,140800
1#AC1_1_1_10,253,32,15,1,306200,1561503,1570503,1570503,1561503,140800
1#AC1_1_1_11,252,32,15,1,306200,1603404,1612404,1612404,1603404,140800
1#AC1_1_1_12,251,32,15,1,306200,1650000,1660593,1660593,1650000,140800
1#AC1_1_1_13,250,32,15,1,306200,1693078,1702078,1702078,1693078,140800
1#AC1_1_1_14,249,32,15,1,306200,1738576,1747576,1747576,1738576,140800
1#AC1_1_1_15,248,32,15,1,306200,1785295,1794295,1794295,1785295,140800
1#AC1_1_1_16,247,12,15,1,436077,9671,20171,20171,9671,140800
1#AC1_1_1_17,246,12,15,1,436077,39893,50393,50393,39893,140800
1#AC1_1_1_18,245,12,15,1,436077,70661,81161,81161,70661,140800
1#AC1_1_1_19,244,12,15,1,436077,98713,109213,109213,98713,140800
1#AC1_1_1_20,243,12,15,1,436077,128728,139228,139228,128728,140800
1#AC1_1_1_21,242,12,15,1,436077,159195,169695,169695,159195,140800
1#AC1_1_2_4,241,12,15,1,436077,189134,199634,199634,189134,140800
1#AC1_1_2_5,240,12,15,1,436077,219845,230345,230345,219845,140800
1#AC1_1_2_6,239,12,15,1,436077,252000,262500,262500,252000,140800
1#AC1_1_2_7,238,12,15,1,436077,280421,290921,290921,280421,140800
1#AC1_1_2_8,237,12,15,1,436077,312224,322724,322724,312224,140800
1#AC1_1_2_9,236,12,15,1,436077,342256,352756,352756,342256,140800
1#AC1_1_2_10,235,12,15,1,436077,369382,379882,379882,369382,140800
1#AC1_1_2_11,234,12,15,1,436077,399751,410251,410251,399751,140800
1#AC1_1_2_12,233,12,15,1,436200,430923,441423,441423,430923,140800
1#AC1_1_2_13,232,12,15,1,436157,459859,470359,470359,459859,140800
1#AC1_1_2_14,231,12,15,1,436214,489685,500185,500185,489685,140800
1#AC1_1_2_15,230,12,15,1,436271,522581,533081,533081,522581,140800
1#AC1_1_2_16,229,12,15,1,435628,550105,560605,560605,550105,140800
1#AC1_1_2_17,228,12,15,1,435585,583474,593974,593974,583474,140800
1#AC1_1_2_18,227,12,15,1,435542,612943,623443,623443,612943,140800
1#AC1_1_2_19,226,12,15,1,435499,642389,652889,652889,642389,140800
1#AC1_1_2_20,225,12,15,1,435456,670221,680721,680721,670221,140800
1#AC1_1_2_21,224,12,15,1,435413,700236,713736,713736,700236,140800
位置,优先级,高度,宽度,料仓ID,旋转轴库位点P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3
1#AC1_1_1_4,259,32,15,1,306200,1290614,1299614,1299614,1290614,140800,,
1#AC1_1_1_5,258,32,15,1,306200,1334970,1343970,1343970,1334970,140800,,
1#AC1_1_1_6,257,32,15,1,306200,1381622,1392122,1392122,1381622,140800,,
1#AC1_1_1_7,256,32,15,1,306200,1424390,1433390,1433390,1424390,140800,,
1#AC1_1_1_8,255,32,15,1,306200,1471088,1481488,1481488,1471088,140800,,
1#AC1_1_1_9,254,32,15,1,306200,1514627,1525627,1525627,1514627,140800,,
1#AC1_1_1_10,253,32,15,1,306200,1561503,1570503,1570503,1561503,140800,,
1#AC1_1_1_11,252,32,15,1,306200,1603404,1612404,1612404,1603404,140800,,
1#AC1_1_1_12,251,32,15,1,306200,1650000,1660593,1660593,1650000,140800,,
1#AC1_1_1_13,250,32,15,1,306200,1693078,1702078,1702078,1693078,140800,,
1#AC1_1_1_14,249,32,15,1,306200,1738576,1747576,1747576,1738576,140800,,
1#AC1_1_1_15,248,32,15,1,306200,1785295,1794295,1794295,1785295,140800,,
1#AC1_1_1_16,247,12,15,1,436077,9671,20171,20171,9671,140800,,
1#AC1_1_1_17,246,12,15,1,436077,39893,50393,50393,39893,140800,,
1#AC1_1_1_18,245,12,15,1,436077,70661,81161,81161,70661,140800,,
1#AC1_1_1_19,244,12,15,1,436077,98713,109213,109213,98713,140800,,
1#AC1_1_1_20,243,12,15,1,436077,128728,139228,139228,128728,140800,,
1#AC1_1_1_21,242,12,15,1,436077,159195,169695,169695,159195,140800,,
1#AC1_1_2_4,241,12,15,1,436077,189134,199634,199634,189134,140800,,
1#AC1_1_2_5,240,12,15,1,436077,219845,230345,230345,219845,140800,,
1#AC1_1_2_6,239,12,15,1,436077,252000,262500,262500,252000,140800,,
1#AC1_1_2_7,238,12,15,1,436077,280421,290921,290921,280421,140800,,
1#AC1_1_2_8,237,12,15,1,436077,312224,322724,322724,312224,140800,,
1#AC1_1_2_9,236,12,15,1,436077,342256,352756,352756,342256,140800,,
1#AC1_1_2_10,235,12,15,1,436077,369382,379882,379882,369382,140800,,
1#AC1_1_2_11,234,12,15,1,436077,399751,410251,410251,399751,140800,,
1#AC1_1_2_12,233,12,15,1,436200,430923,441423,441423,430923,140800,,
1#AC1_1_2_13,232,12,15,1,436157,459859,470359,470359,459859,140800,,
1#AC1_1_2_14,231,12,15,1,436214,489685,500185,500185,489685,140800,,
1#AC1_1_2_15,230,12,15,1,436271,522581,533081,533081,522581,140800,,
1#AC1_1_2_16,229,12,15,1,435628,550105,560605,560605,550105,140800,,
1#AC1_1_2_17,228,12,15,1,435585,583474,593974,593974,583474,140800,,
1#AC1_1_2_18,227,12,15,1,435542,612943,623443,623443,612943,140800,,
1#AC1_1_2_19,226,12,15,1,435499,642389,652889,652889,642389,140800,,
1#AC1_1_2_20,225,12,15,1,435456,670221,680721,680721,670221,140800,,
1#AC1_1_2_21,224,12,15,1,435413,700236,713736,713736,700236,140800,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
,,,,,,,,,,,,
source/DeviceLibrary/StoreConfig/linePositions_2.csv
查看文件 @
44f88ec
此文件的差异太大,无法显示。
source/DeviceLibrary/device/halcon/CodeManager.cs
查看文件 @
44f88ec
...
...
@@ -8,6 +8,7 @@ using System.IO;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
OnlineStore.DeviceLibrary
...
...
@@ -112,81 +113,117 @@ namespace OnlineStore.DeviceLibrary
}
try
{
foreach
(
string
cameraName
in
cameraList
)
Task
[]
cameraTask
=
new
Task
[
cameraList
.
Count
()];
for
(
int
i
=
0
;
i
<
cameraList
.
Count
();
i
++)
{
if
(
cameraName
.
Trim
().
Equals
(
""
))
{
continue
;
}
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】开始取图片"
);
HalconDotNet
.
HObject
ho_Image
=
null
;
try
var
cameraName
=
cameraList
[
i
];
cameraTask
[
i
]
=
Task
.
Run
(()
=>
{
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
);
if
(
ho_Image
==
null
)
if
(
cameraName
.
Trim
().
Equals
(
""
))
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
continue
;
}
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
string
r
=
""
;
foreach
(
string
codeType
in
codeTypeList
)
return
;
}
DateTime
startTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 【"
+
cameraName
+
"】开始取图片"
);
HalconDotNet
.
HObject
ho_Image
=
null
;
Bitmap
bmp
=
null
;
try
{
//判断是否是一维码
if
(
codeType
.
ToLower
().
Equals
(
"barcode"
))
bool
nohalcon
=
true
;
ho_Image
=
Camera
.
_cam
.
CaptureOnImage
(
cameraName
,
out
bmp
,
nohalcon
);
if
(
ho_Image
==
null
&&
!
nohalcon
)
{
cc
=
HDCodeHelper
.
DecodeBarCode
(
ho_Image
);
LogUtil
.
error
(
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
return
;
}
else
LogUtil
.
info
(
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
string
r
=
""
;
List
<
CodeInfo
>
tlci
=
EyemDecode
.
Decoder
(
ref
bmp
);
foreach
(
CodeInfo
code
in
tlci
)
{
cc
=
HDCodeHelper
.
DecodeCode
(
ho_Image
,
codeType
,
GetCodeParamFilePath
(
codeType
),
codeCount
,
timeOut
);
LogUtil
.
info
(
" 【"
+
cameraName
+
"】[eyemDecode]"
+
code
.
CodeType
+
"(X: "
+
code
.
X
+
",Y: "
+
code
.
Y
+
") "
+
code
.
CodeStr
);
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
lock
(
codeList
)
{
if
(!
codeList
.
Contains
(
str
))
{
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
}
}
}
foreach
(
CodeInfo
c
in
cc
)
/*
* List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
{
string
str
=
CodeManager
.
ReplaceCode
(
c
.
CodeStr
);
if
(!
codeList
.
Contains
(
str
))
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, codeType, GetCodeParamFilePath(codeType), codeCount, 2000);
}
foreach (CodeInfo c in cc)
{
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
string str = CodeManager.ReplaceCode(c.CodeStr);
lock (codeList)
{
if (!codeList.Contains(str))
{
codeList.Add(str);
r = r + "##" + str;
}
}
}
}
*/
if
(
codeList
.
Count
()
==
0
)
{
SaveImageToFile
(
"mimo"
,
cameraName
,
bmp
);
}
LogUtil
.
info
(
" 【"
+
cameraName
+
"】"
+
" 扫码完成【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】 :"
+
r
);
}
if
(
String
.
IsNullOrEmpty
(
r
)
)
catch
(
AccessViolationException
e
)
{
// SaveImageToFile(deviceName, cameraName, bit);
LogUtil
.
error
(
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
// GC.Collect();
}
LogUtil
.
info
(
deviceName
+
" 【"
+
cameraName
+
"】扫码完成【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】 :"
+
r
);
}
catch
(
AccessViolationException
e
)
{
LogUtil
.
error
(
deviceName
+
" 扫码出现AccessViolationException异常,关闭相机【"
+
cameraName
+
"】:"
+
e
.
ToString
());
Camera
.
_cam
.
Close
(
cameraName
);
// GC.Collect();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" 扫码出错:"
+
ex
.
ToString
());
}
finally
{
if
(
ho_Image
!=
null
)
catch
(
Exception
ex
)
{
ho_Image
.
Dispose
(
);
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
()
);
}
}
finally
{
if
(
ho_Image
!=
null
)
{
ho_Image
.
Dispose
();
}
if
(
bmp
!=
null
)
bmp
.
Dispose
();
}
});
//cameraTask[i].Wait();
}
Task
.
WaitAll
(
cameraTask
);
}
catch
(
AccessViolationException
e
)
{
LogUtil
.
error
(
deviceName
+
" 扫码出现AccessViolationException异常:"
+
e
.
ToString
());
LogUtil
.
error
(
" 扫码出现AccessViolationException异常:"
+
e
.
ToString
());
// GC.Collect();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" 扫码出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
" 扫码出错:"
+
ex
.
ToString
());
}
return
codeList
;
}
...
...
source/DeviceLibrary/duoStore/BoxBean.cs
查看文件 @
44f88ec
...
...
@@ -16,10 +16,10 @@ namespace OnlineStore.DeviceLibrary
{
public
AutoInoutInfo
AutoInout
=
new
AutoInoutInfo
();
public
string
CID
=
""
;
public
BOX_Config
Config
;
public
override
BOX_Config
Config
{
get
;
set
;
}
=
null
;
public
string
lastPosId
=
""
;
public
StoreStatus
lastPosIdStatus
=
StoreStatus
.
StoreOnline
;
p
rivate
List
<
ConfigMoveAxis
>
moveAxisList
=
new
List
<
ConfigMoveAxis
>();
p
ublic
override
List
<
ConfigMoveAxis
>
moveAxisList
{
get
;
set
;
}
=
new
List
<
ConfigMoveAxis
>();
public
List
<
string
>
PositionNumList
=
new
List
<
string
>();
public
HumitureBean
humBean
=
null
;
...
...
source/DeviceLibrary/duoStore/DUOStoreBean.cs
查看文件 @
44f88ec
...
...
@@ -19,20 +19,37 @@ namespace OnlineStore.DeviceLibrary
{
internal
Dictionary
<
int
,
BOX_Config
>
BoxConfigMap
{
get
;
set
;
}
public
Dictionary
<
int
,
BoxBean
>
BoxMap
=
new
Dictionary
<
int
,
BoxBean
>();
public
Store_Config
Config
{
get
;
set
;
}
private
Store_Config
_config
;
public
new
Store_Config
Config
{
get
{
return
_config
;
}
set
{
//base.Config = (BaseConfig)value;
_config
=
value
;
}
}
public
bool
UseBuzzer
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseBuzzer
).
Equals
(
1
);
/// <summary>
/// 取料提升机构气缸
/// </summary>
//public HoisterCylinder hoisterCylinder = new HoisterCylinder(0);
public
ElectricGripper
electricClamp
=
new
ElectricGripper
(
0
);
public
ElectricGripper
electricClamp
=
new
ElectricGripper
();
public
AxisBean
T1_BatchAxis
=
null
;
public
AxisBean
T2_MiddleAxis
=
null
;
public
AxisBean
T3_UpdownAxis
=
null
;
public
AxisBean
T4_InOut_Axis
=
null
;
public
bool
HasT4Axis
=
false
;
/// <summary>
/// 轴列表
/// </summary>
public
override
List
<
ConfigMoveAxis
>
moveAxisList
{
get
;
set
;
}
=
new
List
<
ConfigMoveAxis
>();
#
region
初始化
internal
bool
canStart
=
false
;
...
...
@@ -45,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
lineConfig
.
IOSingle_TimerOut
=
5000
;
}
Init
();
IoCheckTimer
.
Elapsed
+=
IoCheckTimerProcess
;
serverConTimer
.
Elapsed
+=
ServerConnectTimer_Elapsed
;
baseConfig
=
lineConfig
;
...
...
@@ -70,6 +87,17 @@ namespace OnlineStore.DeviceLibrary
T2_MiddleAxis
=
new
AxisBean
(
Config
.
T2_Middle_Axis
,
Name
);
T3_UpdownAxis
=
new
AxisBean
(
Config
.
T3_Updown_Axis
,
Name
);
T4_InOut_Axis
=
new
AxisBean
(
Config
.
T4_InOut_Axis
,
Name
);
moveAxisList
=
new
List
<
ConfigMoveAxis
>();
moveAxisList
.
Add
(
Config
.
T1_Batch_Axis
);
moveAxisList
.
Add
(
Config
.
T2_Middle_Axis
);
moveAxisList
.
Add
(
Config
.
T3_Updown_Axis
);
moveAxisList
.
Add
(
Config
.
T4_InOut_Axis
);
AgvClient
.
NodeList
.
Add
(
Config
.
AgvInName
);
AgvClient
.
NodeList
.
Add
(
Config
.
AgvOutName
);
IOManager
.
Init
();
CodeManager
.
LoadConfig
();
...
...
@@ -78,9 +106,16 @@ namespace OnlineStore.DeviceLibrary
HasT4Axis
=
Convert
.
ToBoolean
(
ConfigAppSettings
.
GetValue
(
Setting_Init
.
HasT4Axis
));
Task
.
Factory
.
StartNew
(
delegate
{
if
(!
electricClamp
.
OpenPort
(
Config
.
Clamp1Port
))
throw
new
Exception
(
$
"电动夹爪打开失败 端口:{Config.Clamp1Port}"
);
else
{
LogUtil
.
info
(
Name
+
$
"加载电夹爪成功:{Config.Clamp1Port}"
);
electricClamp
.
HomeReset
();
}
//RFIDManager.RfidReader.Open(rfidList.ToArray());
IOManager
.
instance
.
ConnectionIOList
(
ioList
);
AxisManager
.
Init
();
//AgvClient.Init();
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
...
...
@@ -221,7 +256,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LR_03_BatchAxisHome
);
LogUtil
.
info
(
Name
+
"复位 "
+
MoveInfo
.
MoveStep
+
" :夹爪回原点,提升轴回原点,上下轴回原点,流水线停止"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ElectricGripper
.
HomeReset
(
MoveInfo
);
electricClamp
.
HomeReset
(
MoveInfo
);
T1_BatchAxis
.
HomeMove
(
MoveInfo
);
T3_UpdownAxis
.
HomeMove
(
MoveInfo
);
...
...
@@ -234,7 +269,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
T1_BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxis_P1
,
Config
.
BatchAxis_P1Speed
);
T3_UpdownAxis
.
AbsMove
(
MoveInfo
,
Config
.
UpdownAxis_P2
,
Config
.
UpdownAxis_P2Speed
);
ElectricGripper
.
Release
(
MoveInfo
);
electricClamp
.
Release
(
MoveInfo
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LR_04_BatchToP1
))
{
...
...
@@ -649,6 +684,15 @@ namespace OnlineStore.DeviceLibrary
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
}
public
void
OpenGate
(
StoreMoveInfo
move
=
null
)
{
CylinderMove
(
move
,
IO_Type
.
RightDoor_Close
,
IO_Type
.
RightDoor_Open
);
CylinderMove
(
move
,
IO_Type
.
LeftDoor_Close
,
IO_Type
.
LeftDoor_Open
);
}
public
void
CloseGate
(
StoreMoveInfo
move
=
null
)
{
CylinderMove
(
move
,
IO_Type
.
RightDoor_Open
,
IO_Type
.
RightDoor_Close
);
CylinderMove
(
move
,
IO_Type
.
LeftDoor_Open
,
IO_Type
.
LeftDoor_Close
);
}
public
bool
OpenAllAxis
(
bool
isCheck
=
true
)
{
if
(
RunMultiAxis
(
isCheck
,
new
AxisBean
[]{
T3_UpdownAxis
,
T2_MiddleAxis
,
T4_InOut_Axis
,
T1_BatchAxis
}))
...
...
source/DeviceLibrary/duoStore/DUOStoreBean_Partial.cs
查看文件 @
44f88ec
...
...
@@ -277,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LO_14_CylinderTighten
);
InOutStoreLog
(
"取料:夹爪气缸夹紧"
);
ElectricGripper
.
Clamp
(
MoveInfo
);
electricClamp
.
Clamp
(
MoveInfo
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LO_14_CylinderTighten
))
{
...
...
@@ -317,7 +317,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LO_19_CylinderRelax
);
InOutStoreLog
(
"料盘移栽: 夹爪气缸放松"
);
ElectricGripper
.
Release
(
MoveInfo
);
electricClamp
.
Release
(
MoveInfo
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LO_19_CylinderRelax
))
{
...
...
@@ -674,7 +674,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_13_CylinderTighten
);
InOutStoreLog
(
"取料:夹爪气缸夹紧"
);
ElectricGripper
.
Clamp
(
MoveInfo
);
electricClamp
.
Clamp
(
MoveInfo
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_13_CylinderTighten
))
{
...
...
@@ -796,7 +796,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
LI_24_CylinderRelax
);
InOutStoreLog
(
"料盘移栽: 上料气缸放松"
);
ElectricGripper
.
Release
(
MoveInfo
);
electricClamp
.
Release
(
MoveInfo
);
}
else
if
(
MoveInfo
.
IsStep
(
StoreMoveStep
.
LI_24_CylinderRelax
))
{
...
...
source/DeviceLibrary/duoStore/DUOStoreBean_RaiseStation.cs
查看文件 @
44f88ec
...
...
@@ -14,10 +14,11 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
void
InOutStation_GoIn
()
{
IOMove
(
IO_Type
.
RaiseStation_GoIn
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
RaiseStation_GoIn1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
RaiseStation_GoOut
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RaiseStation_GoOut1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
RaiseStation_GoIn
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
RaiseStation_GoIn1
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RaiseStation_FrontCheck
,
IO_VALUE
.
HIGH
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
RaiseStation_BackendCheck
,
IO_VALUE
.
HIGH
));
}
...
...
source/DeviceLibrary/duoStore/ElectricGripper - 复制.cs
0 → 100644
查看文件 @
44f88ec
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
ElectricGripper
{
private
static
int
subType
=
0
;
public
static
Enum
GripperType
=
GripperTypeE
.
None
;
public
ElectricGripper
(
int
subType
)
{
//this.subType = subType;
}
public
static
void
Clamp
(
StoreMoveInfo
moveInfo
=
null
)
{
GripperType
=
GripperTypeE
.
Gripper
;
if
(!
IsBusy
)
{
setAction
(
"01000"
);
IOManager
.
IOMove
(
IO_Type
.
Clamp_DoAction
,
IO_VALUE
.
HIGH
,
subType
);
}
if
(
moveInfo
!=
null
)
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAction
(
new
Func
<
WaitResultInfo
,
bool
>(
WaitAction
)));
}
public
static
bool
Release
(
StoreMoveInfo
moveInfo
=
null
)
{
GripperType
=
GripperTypeE
.
Release
;
if
(!
IsBusy
)
{
setAction
(
"10000"
);
IOManager
.
IOMove
(
IO_Type
.
Clamp_DoAction
,
IO_VALUE
.
HIGH
,
subType
);
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
return
true
;
}
else
{
if
(
moveInfo
!=
null
)
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAction
(
new
Func
<
WaitResultInfo
,
bool
>(
WaitAction
)));
return
false
;
}
}
public
static
void
HomeReset
(
StoreMoveInfo
moveInfo
=
null
)
{
GripperType
=
GripperTypeE
.
Reset
;
if
(!
IsBusy
)
{
setAction
(
"11111"
);
IOManager
.
IOMove
(
IO_Type
.
Clamp_DoAction
,
IO_VALUE
.
HIGH
,
subType
);
}
if
(
moveInfo
!=
null
)
//moveInfo.WaitList.Add(WaitResultInfo.WaitElectricClamp());
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAction
(
new
Func
<
WaitResultInfo
,
bool
>(
WaitAction
)));
}
public
static
bool
IsBusy
{
get
{
return
IOManager
.
IOValue
(
IO_Type
.
Clamp_Busy
,
subType
).
Equals
(
IO_VALUE
.
HIGH
);
}
}
public
static
bool
IsClamp
{
get
{
return
IOManager
.
IOValue
(
IO_Type
.
Clamp_OnPosition
,
subType
).
Equals
(
IO_VALUE
.
HIGH
);
}
}
static
bool
WaitAction
(
WaitResultInfo
w
)
{
if
(
ElectricGripper
.
IsBusy
)
return
false
;
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Gripper
))
{
if
(
ElectricGripper
.
IsClamp
)
return
true
;
else
{
ElectricGripper
.
Clamp
();
return
false
;
;
}
}
else
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Release
))
{
return
ElectricGripper
.
Release
();
}
else
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Reset
))
{
return
ElectricGripper
.
IsBusy
;
}
else
{
return
true
;
}
}
public
static
int
state
{
get
{
int
s1
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_Abnormal1
,
subType
);
int
s2
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_Abnormal2
,
subType
);
int
s3
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_ObjRecognize1
,
subType
);
int
s4
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_ObjRecognize2
,
subType
);
int
s5
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_ObjRecognize3
,
subType
);
string
b
=
s1
.
ToString
()
+
s2
+
s3
+
s4
+
s5
;
return
Convert
.
ToInt32
(
b
,
2
);
}
}
public
static
void
setAction
(
string
s
)
{
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
IOManager
.
IOMove
(
"Clamp_SetPos"
+
i
,
s
[
i
]==
'1'
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
,
subType
);
}
}
public
enum
GripperTypeE
{
Gripper
,
Release
,
Reset
,
None
}
}
}
source/DeviceLibrary/duoStore/ElectricGripper.cs
查看文件 @
44f88ec
...
...
@@ -9,31 +9,39 @@ namespace OnlineStore.DeviceLibrary
{
public
class
ElectricGripper
{
private
static
int
subType
=
0
;
public
static
Enum
GripperType
=
GripperTypeE
.
None
;
public
ElectricGripper
(
int
subType
)
private
int
subType
=
0
;
private
Neotel
.
Rmaxis
axis
;
public
Enum
GripperType
=
GripperTypeE
.
None
;
public
bool
OpenPort
(
string
port
)
{
//this.subType = subType;
axis
=
new
Neotel
.
Rmaxis
();
bool
rtn
=
axis
.
OpenPort
(
port
);
//var s = "版本号\r\n" + axis.GetVersion();
return
rtn
;
}
public
static
void
Clamp
(
StoreMoveInfo
moveInfo
=
null
)
public
void
ClosePort
()
{
axis
.
ClosePort
();
}
public
void
Clamp
(
StoreMoveInfo
moveInfo
=
null
)
{
GripperType
=
GripperTypeE
.
Gripper
;
if
(!
IsBusy
)
{
setAction
(
"01000"
);
IOManager
.
IOMove
(
IO_Type
.
Clamp_DoAction
,
IO_VALUE
.
HIGH
,
subType
);
axis
.
Push
(
30
,
7
,
500
);
if
(
moveInfo
!=
null
)
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
100
));
}
if
(
moveInfo
!=
null
)
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAction
(
new
Func
<
WaitResultInfo
,
bool
>(
WaitAction
)));
}
public
static
bool
Release
(
StoreMoveInfo
moveInfo
=
null
)
public
bool
Release
(
StoreMoveInfo
moveInfo
=
null
)
{
GripperType
=
GripperTypeE
.
Release
;
if
(!
IsBusy
)
{
setAction
(
"10000"
);
IOManager
.
IOMove
(
IO_Type
.
Clamp_DoAction
,
IO_VALUE
.
HIGH
,
subType
);
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5
00
));
axis
.
GoHome
(
);
if
(
moveInfo
!=
null
)
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1
00
));
return
true
;
}
else
...
...
@@ -43,80 +51,56 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
}
public
static
void
HomeReset
(
StoreMoveInfo
moveInfo
=
null
)
{
public
void
HomeReset
(
StoreMoveInfo
moveInfo
=
null
)
{
GripperType
=
GripperTypeE
.
Reset
;
if
(!
IsBusy
)
{
setAction
(
"11111"
);
IOManager
.
IOMove
(
IO_Type
.
Clamp_DoAction
,
IO_VALUE
.
HIGH
,
subType
);
}
//
if (!IsBusy)
//
{
axis
.
ResetError
(
);
axis
.
GoHome
(
);
//
}
if
(
moveInfo
!=
null
)
//moveInfo.WaitList.Add(WaitResultInfo.WaitElectricClamp());
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAction
(
new
Func
<
WaitResultInfo
,
bool
>(
WaitAction
)));
}
public
static
bool
IsBusy
{
public
bool
IsBusy
{
get
{
return
IOManager
.
IOValue
(
IO_Type
.
Clamp_Busy
,
subType
).
Equals
(
IO_VALUE
.
HIGH
)
;
return
!
axis
.
IsReached
;
}
}
public
static
bool
IsClamp
{
public
bool
IsClamp
{
get
{
return
IOManager
.
IOValue
(
IO_Type
.
Clamp_OnPosition
,
subType
).
Equals
(
IO_VALUE
.
HIGH
)
;
return
!
axis
.
IsPushEmpty
;
}
}
static
bool
WaitAction
(
WaitResultInfo
w
)
bool
WaitAction
(
WaitResultInfo
w
)
{
if
(
ElectricGripper
.
IsBusy
)
if
(
this
.
IsBusy
)
return
false
;
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Gripper
))
if
(
this
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Gripper
))
{
if
(
ElectricGripper
.
IsClamp
)
if
(
this
.
IsClamp
)
return
true
;
else
{
ElectricGripper
.
Clamp
();
this
.
Clamp
();
return
false
;
;
}
}
else
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Release
))
else
if
(
this
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Release
))
{
return
ElectricGripper
.
Release
();
return
this
.
Release
();
}
else
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Reset
))
else
if
(
this
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Reset
))
{
return
ElectricGripper
.
IsBusy
;
return
this
.
IsBusy
;
}
else
{
return
true
;
}
}
public
static
int
state
{
get
{
int
s1
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_Abnormal1
,
subType
);
int
s2
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_Abnormal2
,
subType
);
int
s3
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_ObjRecognize1
,
subType
);
int
s4
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_ObjRecognize2
,
subType
);
int
s5
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
Clamp_ObjRecognize3
,
subType
);
string
b
=
s1
.
ToString
()
+
s2
+
s3
+
s4
+
s5
;
return
Convert
.
ToInt32
(
b
,
2
);
}
}
public
static
void
setAction
(
string
s
)
{
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
IOManager
.
IOMove
(
"Clamp_SetPos"
+
i
,
s
[
i
]==
'1'
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
,
subType
);
}
}
public
enum
GripperTypeE
{
Gripper
,
...
...
source/DeviceLibrary/duoStore/EquipBase.cs
查看文件 @
44f88ec
...
...
@@ -11,6 +11,8 @@ namespace OnlineStore.DeviceLibrary
{
public
abstract
class
EquipBase
:
KTK_Store
{
public
virtual
List
<
ConfigMoveAxis
>
moveAxisList
{
get
;
set
;
}=
null
;
public
virtual
BOX_Config
Config
{
get
;
set
;
}
=
null
;
internal
int
logType
=
1000
;
public
DateTime
LastAlarmTime
=
DateTime
.
Now
;
public
override
void
Alarm
(
AlarmType
alarmType
,
string
alarmDetial
=
""
,
string
alarmMsg
=
""
,
MoveType
storeMoveType
=
MoveType
.
None
)
...
...
@@ -235,10 +237,6 @@ namespace OnlineStore.DeviceLibrary
{
IOMove
(
wait
.
IoType
,
wait
.
IoValue
);
}
else
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
Clamp_OnPosition
))
{
ElectricGripper
.
Clamp
();
}
else
if
(
span
.
TotalMilliseconds
>
timeOutMs
&&
NoAlarm
())
{
...
...
@@ -262,26 +260,6 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
wait
.
Action
.
Invoke
(
wait
);
LogUtil
.
info
(
$
"{Name} 自定义等待 IsEnd={wait.IsEnd},Type={wait.Action.GetType()}"
);
}
else
if
(
wait
.
WaitType
.
Equals
(
WaitEnum
.
W012_ElectricGripperEvent
))
{
if
(
ElectricGripper
.
IsBusy
)
break
;
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Gripper
))
{
if
(
ElectricGripper
.
IsClamp
)
wait
.
IsEnd
=
true
;
else
{
ElectricGripper
.
Clamp
();
break
;
}
}
else
if
(
ElectricGripper
.
GripperType
.
Equals
(
ElectricGripper
.
GripperTypeE
.
Release
))
{
wait
.
IsEnd
=
ElectricGripper
.
Release
();
}
}
else
{
wait
.
IsEnd
=
CheckWaitResult
(
MoveInfo
,
wait
);
...
...
source/DeviceLibrary/duoStore/StoreManager.cs
查看文件 @
44f88ec
...
...
@@ -218,8 +218,11 @@ namespace OnlineStore.DeviceLibrary
{
param
.
PlateW
=
position
.
BagWidth
;
}
p
.
ComPress_P2
=
box
.
Config
.
GetComP2
(
position
.
BagHigh
);
p
.
ComPress_P3
=
box
.
Config
.
CompAxis_P3
;
//p.ComPress_P2 = box.Config.GetComP2(position.BagHigh);
//p.ComPress_P3 = box.Config.CompAxis_P3;
p
.
ComPress_P2
=
position
.
ComAxis_P2
;
p
.
ComPress_P3
=
position
.
ComAxis_P3
;
p
.
InOut_P3
=
position
.
InoutAxis_P3
;
p
.
Middle_P2
=
position
.
MiddleAxis_P2
;
p
.
UpDown_P3
=
position
.
UpdownAxis_IH_P3
;
...
...
source/LoadCVSLibrary/LoadCSVLibrary.csproj
查看文件 @
44f88ec
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.
0
</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.
5
</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
...
...
@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=
1.2.15
.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=
2.0.8
.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\
dll
\log4net.dll</HintPath>
<HintPath>..\..\
..\增广夹爪
\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
...
...
source/LoadCVSLibrary/position/ACBoxPosition.cs
查看文件 @
44f88ec
...
...
@@ -46,16 +46,16 @@ namespace OnlineStore.LoadCSVLibrary
[
CSVAttribute
(
"进出轴库位点取料点P3"
)]
public
int
InoutAxis_P3
{
get
;
set
;
}
///
//
<summary>
///
//
压紧轴(压紧点)P2
///
//
</summary>
//
[CSVAttribute("压紧轴压紧点P2")]
//
public int ComAxis_P2 { get; set; }
///
//
<summary>
///
//
压紧轴(压紧前点)P3
///
//
</summary>
//
[CSVAttribute("压紧轴压紧前点P3")]
//
public int ComAxis_P3 { get; set; }
/// <summary>
/// 压紧轴(压紧点)P2
/// </summary>
[
CSVAttribute
(
"压紧轴压紧点P2"
)]
public
int
ComAxis_P2
{
get
;
set
;
}
/// <summary>
/// 压紧轴(压紧前点)P3
/// </summary>
[
CSVAttribute
(
"压紧轴压紧前点P3"
)]
public
int
ComAxis_P3
{
get
;
set
;
}
///// <summary>
///// 轴3(进出轴) 扫码放料点P2
...
...
source/LoadCVSLibrary/storeConfig/config/Box_Config.cs
查看文件 @
44f88ec
...
...
@@ -63,16 +63,16 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[
ConfigProAttribute
(
"CompAxis_P1"
)]
public
int
CompAxis_P1
{
get
;
set
;
}
/// <summary>
/// PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,180000
/// </summary>
[
ConfigProAttribute
(
"CompAxis_P3"
)]
public
int
CompAxis_P3
{
get
;
set
;
}
/// <summary>
/// PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=385001;12=383001;16=379001;
/// </summary>
[
ConfigProAttribute
(
"CompAxis_P2_List"
)]
public
string
CompAxis_P2_List
{
get
;
set
;
}
///
//
<summary>
///
//
PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,180000
///
//
</summary>
//
[ConfigProAttribute("CompAxis_P3")]
//
public int CompAxis_P3 { get; set; }
///
//
<summary>
///
//
PRO,,L4_压紧轴_P2压紧点范围对应值,CompAxis_P2_List,8=385001;12=383001;16=379001;
///
//
</summary>
//
[ConfigProAttribute("CompAxis_P2_List")]
//
public string CompAxis_P2_List { get; set; }
/// <summary>
/// PRO,,L2_上下轴_P11-出料口-低点,UpDownAxis_P11,1000000
/// </summary>
...
...
@@ -211,68 +211,68 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"IsInDebug"
)]
public
int
IsInDebug
{
get
;
set
;
}
private
Dictionary
<
int
,
int
>
ComP2Map
=
null
;
public
int
GetComP2
(
int
plateh
)
{
//查找指定的高度
analysisComP2
();
if
(
ComP2Map
.
ContainsKey
(
plateh
))
{
return
ComP2Map
[
plateh
];
}
return
new
List
<
int
>(
ComP2Map
.
Values
).
First
<
int
>();
}
//
private Dictionary< int,int > ComP2Map =null ;
//
public int GetComP2(int plateh)
//
{
//
//查找指定的高度
//
analysisComP2();
//
if (ComP2Map.ContainsKey(plateh))
//
{
//
return ComP2Map[plateh];
//
}
//
return new List<int>(ComP2Map.Values).First<int>();
//
}
public
void
UpdateComP2
(
int
height
,
int
p2
)
{
analysisComP2
();
if
(
ComP2Map
.
ContainsKey
(
height
))
{
ComP2Map
[
height
]
=
p2
;
}
else
{
ComP2Map
.
Add
(
height
,
p2
);
}
string
tt
=
""
;
foreach
(
int
p
in
ComP2Map
.
Keys
)
{
tt
+=
p
+
"="
+
ComP2Map
[
p
]
+
";"
;
}
CompAxis_P2_List
=
tt
;
}
//
public void UpdateComP2(int height, int p2)
//
{
//
analysisComP2();
//
if (ComP2Map.ContainsKey(height))
//
{
//
ComP2Map[height] = p2;
//
}
//
else
//
{
//
ComP2Map.Add(height, p2);
//
}
//
string tt = "";
//
foreach (int p in ComP2Map.Keys)
//
{
//
tt += p + "=" + ComP2Map[p] + ";";
//
}
//
CompAxis_P2_List = tt;
//
}
private
void
analysisComP2
()
{
if
(
ComP2Map
==
null
)
{
try
{
// 8=385001;424000#12=383001;385000#16=379001;
ComP2Map
=
new
Dictionary
<
int
,
int
>();
string
[]
arrayList
=
CompAxis_P2_List
.
Split
(
';'
);
foreach
(
string
str
in
arrayList
)
{
if
(
str
.
Equals
(
""
))
{
continue
;
}
string
[]
com2A
=
str
.
Split
(
'='
);
if
(
com2A
.
Length
.
Equals
(
2
))
{
int
plateH
=
Convert
.
ToInt32
(
com2A
[
0
]);
int
p2
=
Convert
.
ToInt32
(
com2A
[
1
]);
ComP2Map
.
Add
(
plateH
,
p2
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"解析CompAxis_P2_List【"
+
CompAxis_P2_List
+
"】出错:"
+
ex
.
ToString
());
}
}
}
//
private void analysisComP2()
//
{
//
if (ComP2Map == null)
//
{
//
try
//
{
//
// 8=385001;424000#12=383001;385000#16=379001;
//
ComP2Map = new Dictionary<int, int>();
//
string[] arrayList = CompAxis_P2_List.Split(';');
//
foreach (string str in arrayList)
//
{
//
if (str.Equals(""))
//
{
//
continue;
//
}
//
string[] com2A = str.Split('=');
//
if (com2A.Length.Equals(2))
//
{
//
int plateH = Convert.ToInt32(com2A[0]);
//
int p2 = Convert.ToInt32(com2A[1]);
//
ComP2Map.Add(plateH, p2);
//
}
//
}
//
}
//
catch (Exception ex)
//
{
//
LogUtil.error("解析CompAxis_P2_List【" + CompAxis_P2_List + "】出错:" + ex.ToString());
//
}
//
}
//
}
...
...
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
查看文件 @
44f88ec
...
...
@@ -256,6 +256,7 @@ namespace OnlineStore.LoadCSVLibrary
///DI 0 提升工位定位2下降端 X34
/// </summary>
public
static
string
RaiseStation_DownLocation2
=
"RaiseStation_DownLocation2"
;
/*
/// <summary>
///DI 0 卡爪到位确认 X39
/// </summary>
...
...
@@ -288,6 +289,7 @@ namespace OnlineStore.LoadCSVLibrary
///DI 0 卡爪物件辨识3 X46
/// </summary>
public static string Clamp_ObjRecognize3 = "Clamp_ObjRecognize3";
*/
}
public
enum
IO_VALUE
{
...
...
source/LoadCVSLibrary/storeConfig/config/Store_Config.cs
查看文件 @
44f88ec
...
...
@@ -287,9 +287,12 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"InOutAxis_P4Speed"
)]
public
int
InOutAxis_P4Speed
{
get
;
set
;
}
[
ConfigProAttribute
(
"AgvInName"
)]
public
string
AgvInName
{
get
;
set
;
}
[
ConfigProAttribute
(
"AgvOutName"
)]
public
string
AgvOutName
{
get
;
set
;
}
[
ConfigProAttribute
(
"Clamp1Port"
)]
public
string
Clamp1Port
{
get
;
set
;
}
private
List
<
string
>
CameraList
=
new
List
<
string
>();
public
List
<
string
>
GetCameraList
()
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论