Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0c4b4886
由
几米阳光
编写于
2019-05-16 10:25:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修改AIO
1 个父辈
8e192785
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
350 行增加
和
55 行删除
dll/AIOBOX.xml → dll/AIO/AIOBOX.xml
dll/AIO/Asa.IOModule.AIOBOX.dll
dll/Asa.IOModule.AIOBOX.dll → dll/AIO/Asa.IOModule.AIOBOX.dll.20190515
dll/Asa.IOModule.AIOBOX.xml → dll/AIO/Asa.IOModule.AIOBOX.xml
dll/AIOBOX.dll
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/BLL.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/Common.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/AC_Store.cs
dll/AIOBOX.xml
→
dll/AIO
/AIO
BOX.xml
查看文件 @
0c4b488
文件被删除
dll/AIO/Asa.IOModule.AIOBOX.dll
0 → 100644
查看文件 @
0c4b488
此文件类型无法预览
dll/A
sa.IOModule.AIOBOX.dll
→
dll/A
IO/Asa.IOModule.AIOBOX.dll.20190515
查看文件 @
0c4b488
此文件类型无法预览
dll/Asa.IOModule.AIOBOX.xml
→
dll/A
IO/A
sa.IOModule.AIOBOX.xml
查看文件 @
0c4b488
文件被删除
dll/AIOBOX.dll
deleted
100644 → 0
查看文件 @
8e19278
此文件类型无法预览
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
0c4b488
...
...
@@ -36,9 +36,6 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
...
...
@@ -66,6 +63,8 @@
<Compile Include="acSingleStore\AutomaticBaiting.cs" />
<Compile Include="DeviceLibrary\halcon\CodeManager.cs" />
<Compile Include="DeviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="DeviceLibrary\IO\AIOBOX\BLL.cs" />
<Compile Include="DeviceLibrary\IO\AIOBOX\Common.cs" />
<Compile Include="DeviceLibrary\IO\IOManager.cs" />
<Compile Include="DeviceLibrary\IO\KangNaiDe\KNDManager.cs" />
<Compile Include="DeviceLibrary\IO\KangNaiDe\MasterTcpClient.cs" />
...
...
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
0c4b488
...
...
@@ -69,6 +69,7 @@ namespace OnlineStore.DeviceLibrary
aioBox
.
AutoReadDO
(
true
,
DOMS
);
aioBox
.
LogOut
=
true
;
aioBox
.
Reconnect_Event
+=
AioBox_Reconnect_Event
;
if
(
StoreManager
.
Config
.
GetDILength
(
ioIp
).
Equals
(
8
))
{
aioBox
.
Type
=
Box_Type
.
DIO_16
;
...
...
@@ -82,7 +83,7 @@ namespace OnlineStore.DeviceLibrary
aioBox
.
Log_Out_Event
+=
AioBox_Log_Out_Event
;
aioBox
.
Log_RxTx_Event
+=
AioBox_Log_RxTx_Event
;
AIOMap
.
Add
(
ioIp
,
aioBox
);
LogUtil
.
info
(
"开始连接IO模块["
+
ioIp
+
"["
+
DIMS
+
"]["
+
DOMS
+
"],尝试重连三次"
);
LogUtil
.
info
(
"开始连接IO模块["
+
ioIp
+
"
]
["
+
DIMS
+
"]["
+
DOMS
+
"],尝试重连三次"
);
for
(
int
i
=
1
;
i
<=
3
;
i
++)
{
bool
result
=
aioBox
.
Connect
();
...
...
@@ -115,10 +116,16 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
AioBox_Reconnect_Event
(
AIOBOX
box
,
int
times
,
ref
bool
conn
)
private
void
AioBox_Reconnect_Event
(
AIOBOX
box
,
int
times
,
ref
bool
conn
,
Dictionary
<
string
,
string
>
dict
)
{
conn
=
true
;
LogUtil
.
error
(
"重连AIO模块【"
+
box
.
IP
+
"】次数:"
+
times
+
"【"
+
box
.
ErrInfo
+
"】"
);
string
msg
=
"重连AIO块【"
+
box
.
IP
+
"】次数:"
+
times
+
"【"
+
box
.
ErrInfo
+
"】,连接信息如下\r\n"
;
foreach
(
string
key
in
dict
.
Keys
)
{
msg
=
msg
+
"\t"
+
"["
+
key
+
"]=["
+
dict
[
key
]
+
"],"
;
}
LogUtil
.
error
(
msg
);
}
private
DateTime
lastLogTime
=
DateTime
.
Now
;
...
...
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/BLL.cs
0 → 100644
查看文件 @
0c4b488
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/Common.cs
0 → 100644
查看文件 @
0c4b488
namespace
Asa.IOModule
{
/// <summary>
/// IO模块寄存器
/// </summary>
public
class
Reg
{
/// <summary>
/// 标识
/// </summary>
public
int
ID
;
/// <summary>
/// 文本,仅用于显示
/// </summary>
public
string
Text
;
/// <summary>
/// 寄存器地址
/// </summary>
public
Box_Addr
Address
;
/// <summary>
/// 当前的状态
/// </summary>
public
Box_Sta
Status
;
/// <summary>
/// 寄存器,文本空,状态OFF
/// </summary>
/// <param name="address">地址</param>
public
Reg
(
Box_Addr
address
)
:
this
(
0
,
""
,
address
,
Box_Sta
.
Off
)
{
}
/// <summary>
/// 寄存器,状态OFF
/// </summary>
/// <param name="text">文本</param>
/// <param name="addr">地址</param>
public
Reg
(
string
text
,
Box_Addr
addr
)
:
this
(
0
,
text
,
addr
,
Box_Sta
.
Off
)
{
}
/// <summary>
/// 寄存器,状态OFF
/// </summary>
/// <param name="id">标志</param>
/// <param name="text">文本</param>
/// <param name="addr">地址</param>
public
Reg
(
int
id
,
string
text
,
Box_Addr
addr
)
:
this
(
id
,
text
,
addr
,
Box_Sta
.
Off
)
{
}
/// <summary>
/// 寄存器
/// </summary>
/// <param name="text">文本</param>
/// <param name="addr">地址</param>
/// <param name="status">状态</param>
public
Reg
(
string
text
,
Box_Addr
addr
,
Box_Sta
status
)
:
this
(
0
,
text
,
addr
,
status
)
{
}
/// <summary>
/// 寄存器
/// </summary>
/// <param name="id">标志</param>
/// <param name="text">文本</param>
/// <param name="address">地址</param>
/// <param name="status">状态</param>
public
Reg
(
int
id
,
string
text
,
Box_Addr
address
,
Box_Sta
status
)
{
ID
=
id
;
Text
=
text
;
Address
=
address
;
Status
=
status
;
}
}
/// <summary>
/// IO模块寄存器地址
/// </summary>
public
enum
Box_Addr
:
int
{
/// <summary>
/// 输入点,DI01
/// </summary>
DI_1
,
/// <summary>
/// 输入点,DI02
/// </summary>
DI_2
,
/// <summary>
/// 输入点,DI03
/// </summary>
DI_3
,
/// <summary>
/// 输入点,DI04
/// </summary>
DI_4
,
/// <summary>
/// 输入点,DI05
/// </summary>
DI_5
,
/// <summary>
/// 输入点,DI06
/// </summary>
DI_6
,
/// <summary>
/// 输入点,DI07
/// </summary>
DI_7
,
/// <summary>
/// 输入点,DI08
/// </summary>
DI_8
,
/// <summary>
/// 输入点,DI09
/// </summary>
DI_9
,
/// <summary>
/// 输入点,DI10
/// </summary>
DI_10
,
/// <summary>
/// 输入点,DI11
/// </summary>
DI_11
,
/// <summary>
/// 输入点,DI12
/// </summary>
DI_12
,
/// <summary>
/// 输入点,DI13
/// </summary>
DI_13
,
/// <summary>
/// 输入点,DI14
/// </summary>
DI_14
,
/// <summary>
/// 输入点,DI15
/// </summary>
DI_15
,
/// <summary>
/// 输入点,DI16
/// </summary>
DI_16
,
/// <summary>
/// 输出点,DO01
/// </summary>
DO_1
,
/// <summary>
/// 输出点,DO02
/// </summary>
DO_2
,
/// <summary>
/// 输出点,DO03
/// </summary>
DO_3
,
/// <summary>
/// 输出点,DO04
/// </summary>
DO_4
,
/// <summary>
/// 输出点,DO05
/// </summary>
DO_5
,
/// <summary>
/// 输出点,DO06
/// </summary>
DO_6
,
/// <summary>
/// 输出点,DO07
/// </summary>
DO_7
,
/// <summary>
/// 输出点,DO08
/// </summary>
DO_8
,
/// <summary>
/// 输出点,DO09
/// </summary>
DO_9
,
/// <summary>
/// 输出点,DO10
/// </summary>
DO_10
,
/// <summary>
/// 输出点,DO11
/// </summary>
DO_11
,
/// <summary>
/// 输出点,DO12
/// </summary>
DO_12
,
/// <summary>
/// 输出点,DO13
/// </summary>
DO_13
,
/// <summary>
/// 输出点,DO14
/// </summary>
DO_14
,
/// <summary>
/// 输出点,DO15
/// </summary>
DO_15
,
/// <summary>
/// 输出点,DO16
/// </summary>
DO_16
,
/// <summary>
/// 无
/// </summary>
NONE
=
255
}
/// <summary>
/// IO模块类型
/// </summary>
public
enum
Box_Type
:
int
{
/// <summary>
/// 16位,8DI + 8DO
/// </summary>
DIO_16
,
/// <summary>
/// 32位,16DI + 16DO
/// </summary>
DIO_32
,
/// <summary>
/// 16位DO
/// </summary>
DO_16
}
/// <summary>
/// IO模块寄存器状态
/// </summary>
public
enum
Box_Sta
:
int
{
/// <summary>
/// 断开,关闭,低电平
/// </summary>
Off
=
0
,
/// <summary>
/// 闭合,打开,高电平
/// </summary>
On
=
255
}
}
\ No newline at end of file
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
0c4b488
...
...
@@ -49,15 +49,15 @@ AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,4,COM1,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,34
755
0,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,34
500
0,,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,247000,,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,230000,,,,,,,
PRO,升降轴从吸盘下方接料后下降的高度,UpDownAxis_DownValue,10000,,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#398000;12#398000;16#393000;20#393000;24#390500;28#390500;32#390500;36#390500;40#390500;52#390500;,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,21
74
00,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,21
89
00,,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-25000,,,,,,,
PRO,压紧轴(轴4)P2压紧点集合,CompressAxis_P2_List,8#-1
10000;12#-110000;16#-90000;20#-90000;24#-110000;28#-70000;32#-7
0000;36#-70000;40#-70000;44#-70000;48#-70000;52#-70000;,,,,,,,
PRO,压紧轴(轴4)P2压紧点集合,CompressAxis_P2_List,8#-1
35000;12#-135000;16#-125000;20#-120000;24#-115000;28#-90000;32#-8
0000;36#-70000;40#-70000;44#-70000;48#-70000;52#-70000;,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,,,,
...
...
@@ -74,8 +74,8 @@ PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,1000,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,1000,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,1000,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,200,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,
20
0,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,
20
0,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,
15
0,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,
15
0,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,200,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,,,
...
...
@@ -85,20 +85,20 @@ PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,200,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,200,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,200,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,200,,,,,,,
PRO,升降轴(轴二)到仓门速度,UpDownAxis_Door_Speed,
25
0,,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,
10
00,,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,
10
00,,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,
10
00,,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,
5
00,,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,
10
00,,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,
5
00,,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,
1
000,,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,
5
00,,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,
5
00,,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,
5
00,,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,
5
00,,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,
5
00,,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,
5
00,,,,,,,
PRO,升降轴(轴二)到仓门速度,UpDownAxis_Door_Speed,
30
0,,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,
22
00,,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,
22
00,,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,
22
00,,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,
4
00,,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,
22
00,,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,
4
00,,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,
2
000,,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,
4
00,,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,
8
00,,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,
8
00,,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,
8
00,,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,
8
00,,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,
8
00,,,,,,,
PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,10,,,,,, ,
PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,10,,,,,,,
PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,10,,,,,,,
...
...
@@ -125,12 +125,12 @@ PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM6,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,
3
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
4
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
4
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,4000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,4000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,
4
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,
6
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
10
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
10
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,4000
0
,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,4000
0
,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,
10
000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,800,,,,,,,
...
...
@@ -142,16 +142,16 @@ PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1750000,,,,,, ,
PRO,(轴五)上料轴P2点(待机点),BatchAxis_P2,30000,,,,,, ,
PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,2
5
00,,,,,,,
PRO,(轴五)上料轴P2速度,BatchAxis_P2_Speed,2
8
00,,,,,,,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,2
0
00,,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,
8
0000,,,,,,,
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,
36
0,,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,
12
,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,2
8
00,,,,,,,
PRO,(轴五)上料轴出料时距离检测信号需要下降的高度,BatchAxis_OutDownPosition,
10
0000,,,,,,,
PRO,(轴五)上料轴最最大料盘高度,到达后无法批量出库,BatchAxis_MaxHeight,
25
0,,,,,,,
PRO,最后一盘料需要补充的高度,LastTrayAddHeight,
4
,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.
11#16;192.168.200.1
2#4,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.
11#16;192.168.200.1
2#4,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.
21#16;192.168.200.2
2#4,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.
21#16;192.168.200.2
2#4,,,,,,,
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
0c4b488
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
0c4b488
...
...
@@ -866,7 +866,7 @@ namespace OnlineStore.DeviceLibrary
//如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置
if
(
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_LoadMaterial
).
Equals
(
IO_VALUE
.
LOW
))
{
StoreMove
.
TimeOutSeconds
=
120
;
StoreMove
.
TimeOutSeconds
=
120
;
//ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P1
,
IO_Type
.
TrayCheck_LoadMaterial
));
BatchAxisController
.
StartCheck
(
IO_Type
.
TrayCheck_LoadMaterial
);
...
...
@@ -874,10 +874,10 @@ namespace OnlineStore.DeviceLibrary
int
speed
=
Config
.
BatchAxis_P1_Speed
;
if
(
AutomaticBaiting
.
BatchOutStoreHeight
>
0
)
{
speed
=
Config
.
BatchAxis_
P1_Speed
/
2
;
speed
=
Config
.
BatchAxis_
SlowSpeed
*
2
;
}
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
speed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴到P1点【"
+
Config
.
BatchAxis_P1
+
"】 "
);
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
speed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴到P1点【"
+
Config
.
BatchAxis_P1
+
"】速度【"
+
speed
+
"】 "
);
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
0c4b488
...
...
@@ -255,8 +255,9 @@ namespace OnlineStore.DeviceLibrary
if
(
IsNeedStartInout
)
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R03_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:检测是否有料盘,批量轴匀速上升【"
+
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
StoreManager
.
Config
.
Batch_Axis
.
TargetSpeed
,
IO_Type
.
TrayCheck_LoadMaterial
);
int
speed
=
StoreManager
.
Config
.
BatchAxis_SlowSpeed
*
2
;
LogUtil
.
info
(
Name
+
"复位中:检测是否有料盘,批量轴匀速上升【"
+
speed
+
"】"
);
ACAxisSpeedMove
(
StoreManager
.
Config
.
Batch_Axis
,
speed
,
IO_Type
.
TrayCheck_LoadMaterial
);
}
else
{
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
0c4b488
...
...
@@ -91,7 +91,7 @@ namespace OnlineStore.DeviceLibrary
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
AxisMove_1
)
{
bool
isAlarm
=
false
;
wait
.
IsEnd
=
AxisMoveISEnd
(
wait
,
ref
isAlarm
);
wait
.
IsEnd
=
AxisMoveISEnd
(
wait
,
ref
isAlarm
);
if
(
isAlarm
)
{
return
;
...
...
@@ -112,14 +112,14 @@ namespace OnlineStore.DeviceLibrary
// break;
//}
//如果是气缸动作,若Do未输出,重新写一遍
if
(!
wait
.
IsEnd
&&
span
.
TotalSeconds
>
1
&&
(
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Down
)
||
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Up
)))
{
if
(!
wait
.
IsEnd
&&
span
.
TotalSeconds
>
1
&&
(
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Down
)
||
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Up
)))
{
IO_VALUE
doValue
=
IOManager
.
DOValue
(
wait
.
IoType
);
if
(!
doValue
.
Equals
(
wait
.
IoValue
))
{
LogUtil
.
error
(
"等待["
+
NotOkMsg
+
"],重写DO("
+
wait
.
IoType
+
"="
+
wait
.
IoValue
+
")"
);
IOManager
.
IOMove
(
wait
.
IoType
,
wait
.
IoValue
);
}
}
}
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
Time_3
)
...
...
@@ -134,7 +134,7 @@ namespace OnlineStore.DeviceLibrary
IO_VALUE
value
=
(
IO_VALUE
)
ACServerManager
.
GetHomeSingle
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
());
wait
.
IsEnd
=
wait
.
IoValue
.
Equals
(
value
);
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_10
)
{
wait
.
IsEnd
=
BatchAxisIsEnd
(
wait
);
...
...
@@ -146,7 +146,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
ScanCode_11
)
{
wait
.
IsEnd
=
(
LastCode
.
Equals
(
""
).
Equals
(
false
));
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
StoreRuning_13
)
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
StoreRuning_13
)
{
wait
.
IsEnd
=
(
StoreManager
.
Store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
StoreManager
.
Store
.
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
));
}
...
...
@@ -171,12 +172,39 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove
.
EndStepWait
();
}
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
{
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"]"
+
ResourceControl
.
GetString
(
ResourceControl
.
TimeOut
,
"超时"
)
+
" ["
+
NotOkMsg
+
"]["
+
Math
.
Round
(
span
.
TotalSeconds
,
0
)
+
"秒]"
;
LogUtil
.
error
(
WarnMsg
,
102
);
LogUtil
.
error
(
WarnMsg
,
102
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchIoTimeOut
,
""
,
WarnMsg
,
StoreMove
.
MoveType
);
}
if
(!
isOk
)
{
//重写气缸
foreach
(
WaitResultInfo
wait
in
list
)
{
if
(
wait
.
IsEnd
.
Equals
(
false
)
&&
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
IOMove_2
))
{
if
(!
wait
.
IsEnd
&&
span
.
TotalSeconds
>
1
&&
(
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Down
)
||
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Up
)))
{
IO_VALUE
doValue
=
IOManager
.
DOValue
(
wait
.
IoType
);
if
(!
doValue
.
Equals
(
wait
.
IoValue
))
{
LogUtil
.
error
(
"等待["
+
wait
.
ToStr
()
+
"],重写DO("
+
wait
.
IoType
+
"="
+
wait
.
IoValue
+
")"
);
IOManager
.
IOMove
(
wait
.
IoType
,
wait
.
IoValue
);
string
ioType
=
wait
.
IoType
.
Equals
(
IO_Type
.
SuckingDisc_Down
)
?
IO_Type
.
SuckingDisc_Up
:
IO_Type
.
SuckingDisc_Down
;
IO_VALUE
ioValue
=
wait
.
IoValue
.
Equals
(
IO_VALUE
.
LOW
)
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
;
LogUtil
.
error
(
"等待["
+
wait
.
ToStr
()
+
"],重写DO("
+
ioType
+
"="
+
ioValue
+
")"
);
IOManager
.
IOMove
(
ioType
,
ioValue
);
}
}
}
}
}
}
catch
(
Exception
ex
)
{
...
...
@@ -261,20 +289,26 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Busy
)
&&
StoreMove
.
CanWhileCount
>
0
)
TimeSpan
span
=
DateTime
.
Now
-
AxisResetMoveTime
;
if
(
AutoBaitingStatus
.
Equals
(
StoreRunStatus
.
Busy
)
&&
span
.
TotalSeconds
>
3
)
//if (AutoBaitingStatus.Equals(StoreRunStatus.Busy) && StoreMove.CanWhileCount > 0)
{
AxisResetMoveTime
=
DateTime
.
Now
;
//如果批量轴已经停止运动,重新开始
bool
isEnd
=
ACServerManager
.
GetBusyStatus
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
()).
Equals
(
0
);
if
(
isEnd
)
{
//判断是否需要重新运动
StoreMove
.
CanWhileCount
--;
LogUtil
.
error
(
wait
.
ToStr
()
+
"未收到信号且停止运动,重新匀速"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
StoreMove
.
CanWhileCount
--;
LogUtil
.
error
(
wait
.
ToStr
()
+
"未收到信号且停止运动,重新匀速"
+
StoreManager
.
Config
.
BatchAxis_SlowSpeed
+
"运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
SuddenStop
(
wait
.
AxisInfo
);
Thread
.
Sleep
(
300
);
ACServerManager
.
SpeedMove
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
(),
StoreManager
.
Config
.
BatchAxis_SlowSpeed
);
}
}
}
return
result
;
}
private
static
DateTime
AxisResetMoveTime
=
DateTime
.
Now
;
#
region
Halcon
扫码枪代码
public
bool
IsTestCamera
=
false
;
...
...
source/DeviceLibrary/store/AC_Store.cs
查看文件 @
0c4b488
...
...
@@ -375,6 +375,8 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"目标位置["
+
targetPosition
+
"]当前位置["
+
outCount
+
"],误差过大,重新开始运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
SuddenStop
(
moveAxis
);
Thread
.
Sleep
(
300
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
StoreMove
.
CanWhileCount
--;
return
false
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论