Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b16c6142
由
几米阳光
编写于
2018-12-09 11:14:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
0fdd68d1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
172 行增加
和
84 行删除
doc/设备IP地址分配.xlsx
source/ACServoDriveTest/FrmACTest.cs
source/ACSingleStore/FrmIOStatus.Designer.cs
source/ACSingleStore/FrmIOStatus.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/KangNaiDe/MasterTcpClient.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/IOUtil.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
doc/设备IP地址分配.xlsx
查看文件 @
b16c614
此文件类型无法预览
source/ACServoDriveTest/FrmACTest.cs
查看文件 @
b16c614
...
...
@@ -130,7 +130,7 @@ namespace ACServoDriveTest
formStatus
(
false
);
}
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
{
ACServerManager
.
IsShowMsg
=
true
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
//ACServerManager.richeBox = this.richTextBox1;
...
...
source/ACSingleStore/FrmIOStatus.Designer.cs
查看文件 @
b16c614
此文件的差异被折叠,
点击展开。
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
b16c614
...
...
@@ -318,5 +318,25 @@ namespace OnlineStore.AutoInOutStore
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
}
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
}
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
HIGH
);
}
private
void
button4_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
}
}
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
b16c614
...
...
@@ -223,6 +223,10 @@
this
.
btnGetOutTray
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblDoorStatus
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnBatchInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
批量上下轴
ONToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
批量上下轴
OFFToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator13
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator14
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -1894,55 +1898,55 @@
// 启动ToolStripMenuItem
//
this
.
启动
ToolStripMenuItem
.
Name
=
"启动ToolStripMenuItem"
;
this
.
启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
启动
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
启动
ToolStripMenuItem
.
Text
=
"启动"
;
this
.
启动
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
启动
ToolStripMenuItem_Click
);
//
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
// 停止ToolStripMenuItem
//
this
.
停止
ToolStripMenuItem
.
Name
=
"停止ToolStripMenuItem"
;
this
.
停止
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
停止
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
停止
ToolStripMenuItem
.
Text
=
"停止"
;
this
.
停止
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
停止
ToolStripMenuItem_Click
);
//
// toolStripSeparator2
//
this
.
toolStripSeparator2
.
Name
=
"toolStripSeparator2"
;
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator2
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
// 复位ToolStripMenuItem
//
this
.
复位
ToolStripMenuItem
.
Name
=
"复位ToolStripMenuItem"
;
this
.
复位
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
复位
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
复位
ToolStripMenuItem
.
Text
=
"复位"
;
this
.
复位
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
复位
ToolStripMenuItem_Click
);
//
// toolStripSeparator3
//
this
.
toolStripSeparator3
.
Name
=
"toolStripSeparator3"
;
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator3
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
// 回待机点ToolStripMenuItem
//
this
.
回待机点
ToolStripMenuItem
.
Name
=
"回待机点ToolStripMenuItem"
;
this
.
回待机点
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
回待机点
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
回待机点
ToolStripMenuItem
.
Text
=
"回待机点"
;
this
.
回待机点
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
回待机点
ToolStripMenuItem_Click
);
//
// toolStripSeparator4
//
this
.
toolStripSeparator4
.
Name
=
"toolStripSeparator4"
;
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
77
,
6
);
this
.
toolStripSeparator4
.
Size
=
new
System
.
Drawing
.
Size
(
1
41
,
6
);
//
// 退出ToolStripMenuItem
//
this
.
退出
ToolStripMenuItem
.
Name
=
"退出ToolStripMenuItem"
;
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
退出
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
退出
ToolStripMenuItem
.
Text
=
"退出系统"
;
this
.
退出
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
退出
ToolStripMenuItem_Click
);
//
...
...
@@ -1956,8 +1960,12 @@
this
.
料仓运转
OFFToolStripMenuItem
,
this
.
toolStripSeparator7
,
this
.
打开舱门
ToolStripMenuItem
,
this
.
toolStripSeparator14
,
this
.
关闭仓门
ToolStripMenuItem
,
this
.
toolStripSeparator8
,
this
.
关闭仓门
ToolStripMenuItem
});
this
.
批量上下轴
ONToolStripMenuItem
,
this
.
toolStripSeparator13
,
this
.
批量上下轴
OFFToolStripMenuItem
});
this
.
iO
状态查看
ToolStripMenuItem
.
Name
=
"iO状态查看ToolStripMenuItem"
;
this
.
iO
状态查看
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
25
);
this
.
iO
状态查看
ToolStripMenuItem
.
Text
=
"IO状态查看"
;
...
...
@@ -2528,6 +2536,30 @@
this
.
btnBatchInStore
.
UseVisualStyleBackColor
=
true
;
this
.
btnBatchInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBatchInStore_Click
);
//
// 批量上下轴ONToolStripMenuItem
//
this
.
批量上下轴
ONToolStripMenuItem
.
Name
=
"批量上下轴ONToolStripMenuItem"
;
this
.
批量上下轴
ONToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
批量上下轴
ONToolStripMenuItem
.
Text
=
"批量上下轴ON"
;
this
.
批量上下轴
ONToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
批量上下轴
ONToolStripMenuItem_Click
);
//
// 批量上下轴OFFToolStripMenuItem
//
this
.
批量上下轴
OFFToolStripMenuItem
.
Name
=
"批量上下轴OFFToolStripMenuItem"
;
this
.
批量上下轴
OFFToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
批量上下轴
OFFToolStripMenuItem
.
Text
=
"批量上下轴OFF"
;
this
.
批量上下轴
OFFToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
批量上下轴
OFFToolStripMenuItem_Click
);
//
// toolStripSeparator13
//
this
.
toolStripSeparator13
.
Name
=
"toolStripSeparator13"
;
this
.
toolStripSeparator13
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
6
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
189
,
6
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -2773,6 +2805,10 @@
private
System
.
Windows
.
Forms
.
Button
btnReadLimit1
;
private
System
.
Windows
.
Forms
.
TextBox
txtLimit1
;
public
System
.
Windows
.
Forms
.
Button
btnUpdateStatus
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
批量上下轴
ONToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
批量上下轴
OFFToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator14
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator13
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
b16c614
...
...
@@ -1524,5 +1524,32 @@ namespace OnlineStore.AutoInOutStore
btnReadLimit1_Click
(
null
,
null
);
btnReadLimit2_Click
(
null
,
null
);
}
private
void
批量上下轴
ONToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
Thread
.
Sleep
(
1000
);
string
portName
=
store
.
Config
.
Batch_Axis
.
DeviceName
;
int
slvAddr
=
store
.
Config
.
Batch_Axis
.
GetAxisValue
();
ACServerManager
.
OpenPort
(
portName
);
Thread
.
Sleep
(
50
);
ACServerManager
.
InitSlvAddr
(
portName
,
slvAddr
,
store
.
Config
.
Batch_Axis
.
TargetSpeed
,
store
.
Config
.
Batch_Axis
.
AddSpeed
,
store
.
Config
.
Batch_Axis
.
DelSpeed
);
Thread
.
Sleep
(
100
);
ACServerManager
.
AlarmClear
(
portName
,
slvAddr
);
Thread
.
Sleep
(
50
);
ACServerManager
.
ServoOn
(
portName
,
slvAddr
);
}
private
void
批量上下轴
OFFToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
ACServerManager
.
ServoOff
(
store
.
Config
.
Batch_Axis
.
DeviceName
,
store
.
Config
.
Batch_Axis
.
GetAxisValue
());
//关闭串口,等下次重新打开
ACServerManager
.
ColsePort
(
store
.
Config
.
Batch_Axis
.
DeviceName
);
Thread
.
Sleep
(
100
);
KND
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
b16c614
...
...
@@ -71,9 +71,6 @@
<Compile Include="store\LineAlarm.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="store\IOUtil.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ShuoKe\ShuoKeControls.cs" />
<Compile Include="store\model\AxisAlarmInfo.cs" />
...
...
source/DeviceLibrary/KangNaiDe/MasterTcpClient.cs
查看文件 @
b16c614
...
...
@@ -9,6 +9,7 @@ using System.Diagnostics;
using
log4net
;
using
System.Reflection
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
namespace
OnlineStore.DeviceLibrary
{
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
b16c614
...
...
@@ -42,7 +42,7 @@ DI,左侧门关闭,DoorColse_Single,203,192.168.200.11,0,左侧门关闭,X20,DI-24,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM4,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM5,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM6,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM
7
,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM
3
,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorOPosition_P1,403000,,,,,,,
...
...
@@ -114,7 +114,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM
3
,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM
2
,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
b16c614
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
b16c614
...
...
@@ -13,21 +13,22 @@ namespace OnlineStore.DeviceLibrary
/// 0=未知。1=门打开,2=门关闭
/// </summary>
public
static
int
DoorStatus
=
2
;
p
ublic
static
int
LastHeight
=
0
;
p
ublic
static
int
LastSize
=
0
;
p
ublic
static
string
LastCode
=
""
;
p
ublic
static
string
LastPosId
=
""
;
p
rivate
static
int
LastHeight
=
0
;
p
rivate
static
int
LastSize
=
0
;
p
rivate
static
string
LastCode
=
""
;
p
rivate
static
string
LastPosId
=
""
;
public
static
int
AxisChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
AxisChangeValue
);
public
static
string
WarnMsg
=
""
;
public
static
string
Name
=
"自动上下料"
;
public
static
StoreMoveInfo
StoreMove
=
null
;
public
static
string
CodeMsg
=
""
;
public
static
string
Name
=
"批量上下料 "
;
public
static
StoreMoveInfo
StoreMove
=
null
;
public
static
StoreRunStatus
AutoBaitingStatus
=
StoreRunStatus
.
Wait
;
//记录没开门状态下,已经出库的数量
public
static
int
BatchOutStoreCount
=
0
;
public
static
int
BatchOutStoreHeight
=
0
;
/// <summary>
/// 初始化数据
/// </summary>
...
...
@@ -61,16 +62,16 @@ namespace OnlineStore.DeviceLibrary
/// 判断是否可以启动
/// </summary>
/// <returns></returns>
public
static
string
CanStart
()
public
static
string
CanStart
()
{
string
msg
=
""
;
//需要判断门关闭
if
(!
DoorIsClose
())
{
msg
=
"上料机构门未关闭"
;
msg
=
"上料机构门未关闭"
;
return
msg
;
}
return
msg
;
}
...
...
@@ -80,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
BatchOutStoreHeight
=
0
;
LastCode
=
""
;
LastPosId
=
""
;
LastHeight
=
0
;
LastHeight
=
0
;
LastSize
=
0
;
}
...
...
@@ -90,7 +91,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
EndMove
();
ClearInOutInfo
();
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
BatchDoorClose
(
false
);
}
public
static
bool
Reset
()
...
...
@@ -98,7 +99,7 @@ namespace OnlineStore.DeviceLibrary
string
msg
=
CanStart
();
if
(!
String
.
IsNullOrEmpty
(
msg
))
{
LogUtil
.
info
(
Name
+
"复位失败:"
+
msg
);
LogUtil
.
info
(
Name
+
"复位失败:"
+
msg
);
return
false
;
}
ClearInOutInfo
();
...
...
@@ -129,11 +130,11 @@ namespace OnlineStore.DeviceLibrary
{
case
StoreMoveStep
.
AUTO_R01_CloseDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R02_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:
自动
轴原点返回"
);
LogUtil
.
info
(
Name
+
"复位中:
批量上下料
轴原点返回"
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
break
;
case
StoreMoveStep
.
AUTO_R02_AutoAxisHome
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:匀速向上运动,检测 是否有料盘"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
);
break
;
...
...
@@ -142,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
Name
+
"复位中: 没有料盘,不需要上料,上料轴回0点"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R04_AutoBack
);
ACAxisHomeMove
(
StoreManager
.
Config
.
Batch_Axis
);
}
else
...
...
@@ -152,8 +153,8 @@ namespace OnlineStore.DeviceLibrary
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
//TODO
StartInOut
();
}
break
;
}
break
;
case
StoreMoveStep
.
AUTO_R04_AutoBack
:
LogUtil
.
info
(
Name
+
"复位完成"
);
StoreMove
.
EndMove
();
...
...
@@ -166,7 +167,7 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
StartInOut
()
{
if
((!
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
||
if
((!
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
))
||
(!
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
)))
{
LogUtil
.
error
(
Name
+
" 启动入料失败,料仓不在待机状态"
+
StoreManager
.
Store
.
storeRunStatus
+
",MoveType"
+
StoreManager
.
Store
.
StoreMove
.
MoveType
);
...
...
@@ -190,11 +191,11 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil
.
error
(
Name
+
" 启动入料失败, Status="
+
AutoBaitingStatus
+
",MoveType="
+
StoreMove
.
MoveType
);
LogUtil
.
error
(
Name
+
" 启动入料失败, Status="
+
AutoBaitingStatus
+
",MoveType="
+
StoreMove
.
MoveType
);
return
false
;
}
}
private
static
int
SuckingDisc_WorkCount
=
0
;
private
static
int
SuckingDisc_WorkCount
=
0
;
private
static
void
InStoreProcess
()
{
...
...
@@ -249,24 +250,24 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
IO_Type
.
Door_Up
,
IO_Type
.
Door_Down
,
true
);
}
else
if
(
StoreManager
.
Store
.
CanStarInOut
())
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I05_GetPosId
);
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
int
h
eight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
int
s
ize
=
GetSize
();
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
size
+
"*"
+
h
eight
+
"】二维码【"
+
LastCode
+
"】"
);
LastHeight
=
height
;
LastSize
=
size
;
LastH
eight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
LastS
ize
=
GetSize
();
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastSize
+
"*"
+
LastH
eight
+
"】二维码【"
+
LastCode
+
"】"
);
GetInStorePosId
(
ProcessMsg
())
;
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I05_GetPosId
))
{
//判断是否开始入库
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
))
if
(
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
InStore
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I06_WaitTrayLeave
);
LogUtil
.
info
(
Name
+
"入料: 开始入料,等待料盘拿走"
);
...
...
@@ -319,15 +320,15 @@ namespace OnlineStore.DeviceLibrary
}
}
private
static
void
SuckingDiscWork
()
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I03_SuckingDisc_Work
);
SuckingDisc_WorkCount
++;
LogUtil
.
info
(
Name
+
"入料: 吸盘开始第"
+
SuckingDisc_WorkCount
+
"次工作"
);
LogUtil
.
info
(
Name
+
"入料: 吸盘开始第"
+
SuckingDisc_WorkCount
+
"次工作"
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
HIGH
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SuckingDisc_Air
,
IO_VALUE
.
HIGH
));
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
private
static
void
IsNeedScanCode
()
{
LastCode
=
""
;
...
...
@@ -338,7 +339,7 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I01_ScanCode
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码 "
);
LogUtil
.
info
(
Name
+
"入料: 开始扫码 "
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitCodeOK
());
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
GetCameraCode
();
...
...
@@ -352,7 +353,7 @@ namespace OnlineStore.DeviceLibrary
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
}
}
//public static bool StartOutStore(string PosId)
//{
...
...
@@ -452,10 +453,10 @@ namespace OnlineStore.DeviceLibrary
// }
//}
public
static
bool
DoorIsClose
()
{
if
(
KND
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
DoorClose_LoadMaterial
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
}
...
...
@@ -473,11 +474,10 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
HIGH
));
}
}
}
public
static
void
BatchDoorClose
(
bool
isWait
)
{
{
ClearInOutInfo
();
DoorStatus
=
2
;
if
(
isWait
)
...
...
@@ -488,6 +488,6 @@ namespace OnlineStore.DeviceLibrary
KND
.
IOMove
(
IO_Type
.
BatchDoor_Open
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
BatchDoor_Close
,
IO_VALUE
.
HIGH
);
}
}
}
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
b16c614
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/store/IOUtil.cs
查看文件 @
b16c614
...
...
@@ -6,19 +6,17 @@ using System.Text;
namespace
OnlineStore.DeviceLibrary
{
public
enum
IO_VALUE
public
enum
IO_VALUE
{
/// <summary>
/// 低位
/// </summary>
LOW
=
0
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
/// <summary>
/// 低位
/// </summary>
LOW
=
0
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
}
}
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
b16c614
...
...
@@ -129,20 +129,7 @@ namespace OnlineStore.DeviceLibrary
IsInWait
=
false
;
WaitList
=
new
List
<
WaitResultInfo
>();
CanWhileCount
=
0
;
}
//public StoreMoveInfo clone()
//{
// return (StoreMoveInfo)this.MemberwiseClone();
//}
///// <summary>
///// 重置之后继续出入库时,退回上一个步骤执行
///// </summary>
//public void BackStep()
//{
// moveStep = PreMoveStep;
// IsInWait = false;
//}
}
}
public
class
WaitResultInfo
...
...
@@ -227,6 +214,12 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
return
wait
;
}
/// <summary>
/// 6=等待轴原点信号亮
/// </summary>
/// <param name="axis"></param>
/// <param name="value"></param>
/// <returns></returns>
public
static
WaitResultInfo
WaitAxisOrg
(
ConfigMoveAxis
axis
,
IO_VALUE
value
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
...
...
@@ -248,7 +241,7 @@ namespace OnlineStore.DeviceLibrary
// return wait;
//}
/// <summary>
/// 等待轴的反限位为指定值
///
8=
等待轴的反限位为指定值
/// </summary>
public
static
WaitResultInfo
WaitAxistNegativeLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
...
...
@@ -262,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
return
wait
;
}
/// <summary>
/// 等待轴的正限位为指定值
///
9=
等待轴的正限位为指定值
/// </summary>
public
static
WaitResultInfo
WaitAxistPositiveLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
...
...
@@ -278,7 +271,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 等待上料轴运动 停止
///
10=
等待上料轴运动 停止
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitAutoAxisStop
(
ConfigMoveAxis
moveAxis
)
...
...
@@ -291,6 +284,10 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
false
;
return
wait
;
}
/// <summary>
/// 11=扫码OK
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitCodeOK
()
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
...
...
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
查看文件 @
b16c614
...
...
@@ -7,6 +7,18 @@ using System.Text;
namespace
OnlineStore.LoadCSVLibrary
{
public
enum
IO_VALUE
{
/// <summary>
/// 低位
/// </summary>
LOW
=
0
,
/// <summary>
/// 高位
/// </summary>
HIGH
=
1
,
}
public
class
IO_Type
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论