Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7daf9d25
由
jimi
编写于
2018-12-11 18:53:40 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
598a720a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
427 行增加
和
278 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/记录.txt
source/Common/util/AcSerialBean.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
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
source/DeviceLibrary/store/StoreMoveStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
source/ACSingleStore/App.config
查看文件 @
7daf9d2
...
...
@@ -29,9 +29,9 @@
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"
3
000"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"
10
000"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--
5000
脉冲对应
1
mm
-->
<
add
key
=
"AxisChangeValue"
value
=
"5000"
/>
</
appSettings
>
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
7daf9d2
...
...
@@ -1573,35 +1573,26 @@ namespace OnlineStore.AutoInOutStore
}
private
void
btnBatchInStore_Click
(
object
sender
,
EventArgs
e
)
{
//if (AutomaticBaiting.DoorStatus.Equals(2))
//{
// MessageBox.Show("请先关闭批量上下料门");
// return;
//}
if
(!
AutomaticBaiting
.
DoorIsClose
())
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
return
;
}
AutomaticBaiting
.
IsNeedStartInout
=
true
;
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
();
AutomaticBaiting
.
Reset
(
true
);
}
private
void
btnStartBatchInStore_Click
(
object
sender
,
EventArgs
e
)
{
//if (AutomaticBaiting.DoorStatus.Equals(1))
//{
// MessageBox.Show("请先关闭批量上下料门");
// return;
//}
{
if
(!
AutomaticBaiting
.
DoorIsClose
())
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
return
;
}
AutomaticBaiting
.
BatchDoorClose
(
false
);
AutomaticBaiting
.
Reset
();
AutomaticBaiting
.
Reset
(
false
);
}
private
void
btnGetOutTray_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -1625,11 +1616,7 @@ namespace OnlineStore.AutoInOutStore
private
void
btnBatchOutEnd_Click
(
object
sender
,
EventArgs
e
)
{
if
(
AutomaticBaiting
.
DoorStatus
.
Equals
(
1
))
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
return
;
}
if
(!
AutomaticBaiting
.
DoorIsClose
())
{
MessageBox
.
Show
(
"请先关闭批量上下料门"
);
...
...
@@ -1637,7 +1624,7 @@ namespace OnlineStore.AutoInOutStore
}
AutomaticBaiting
.
BatchDoorClose
(
false
);
bool
result
=
AutomaticBaiting
.
Reset
();
bool
result
=
AutomaticBaiting
.
Reset
(
false
);
}
private
void
btnTempInit_Click
(
object
sender
,
EventArgs
e
)
...
...
source/ACSingleStore/记录.txt
查看文件 @
7daf9d2
...
...
@@ -31,6 +31,22 @@
20181210
光栅:光栅不用实时获取,开关门之前判断光栅就可以
批量上料开始按钮没有锁门
批量上料模块报警,出入库不影响
轴在原点的时候再次原点返回需要反向走相对量。
上料过程中报警了,复位后又开始自动上料
压紧轴原点返回之前,先相对走-2000;
...
...
source/Common/util/AcSerialBean.cs
查看文件 @
7daf9d2
...
...
@@ -358,9 +358,8 @@ namespace OnlineStore.Common
if
(
_serialPort
.
IsOpen
)
{
if
(
Monitor
.
TryEnter
(
lockObj
,
10
))
if
(
Monitor
.
TryEnter
(
lockObj
,
5
))
{
//Monitor.Enter(lockObj);
try
{
_serialPort
.
DiscardInBuffer
();
//清空接收缓冲区
...
...
@@ -373,7 +372,7 @@ namespace OnlineStore.Common
}
while
(
num
++
<
Overtime
)
{
if
(
_serialPort
.
BytesToRead
>=
Receive
Data
.
Length
)
if
(
_serialPort
.
BytesToRead
>=
ReceiveLength
)
break
;
System
.
Threading
.
Thread
.
Sleep
(
1
);
}
...
...
@@ -381,10 +380,10 @@ namespace OnlineStore.Common
{
LogUtil
.
error
(
PortName
+
" 发送数据"
+
ByteToString
(
SendData
)
+
"等待接受数据超时"
);
}
if
(
_serialPort
.
BytesToRead
>=
Receive
Data
.
Length
)
if
(
_serialPort
.
BytesToRead
>=
ReceiveLength
)
{
ret
=
_serialPort
.
Read
(
ReceiveData
,
0
,
Receive
Data
.
Length
);
ret
=
_serialPort
.
Read
(
ReceiveData
,
0
,
ReceiveLength
);
}
else
{
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
7daf9d2
...
...
@@ -40,7 +40,7 @@
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>
C:\Program Files\MVTec\HALCON-12.0\bin\dotnet35
\halcondotnet.dll</HintPath>
<HintPath>
..\..\dll
\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
7daf9d2
...
...
@@ -294,25 +294,42 @@ namespace OnlineStore.DeviceLibrary
public
static
void
HomeMove
(
string
portName
,
int
slvAddr
,
int
speed
)
{
//byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, ACCMDManager.Block_HomeMove1, 2);
//SendData(portName, data);
//旋转轴回正方向,其他轴回负方向
//if (portName.Equals(ACStoreManager.store.Config.Middle_Axis.DeviceName))
//{
// UpdateBlock(portName, slvAddr, ACCMDManager.Block_HomeMove0);
// LogUtil.info("旋转轴原点返回方向:正方向");
//}
//else if (portName.Equals(ACStoreManager.store.Config.InOut_Axis.DeviceName))
//{
// UpdateBlock(portName, slvAddr, ACCMDManager.Block_HomeMove0);
// LogUtil.info("进出轴原点返回方向:正方向");
//}
//else
//{
try
{
//先判断是否在原点,如果已经在原点,先向正方向走2000
int
homeSingle
=
GetHomeSingle
(
portName
,
slvAddr
);
if
(
homeSingle
.
Equals
(
1
))
{
int
value
=
2000
;
if
(
portName
.
Equals
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
))
{
value
=
8000
;
}
LogUtil
.
info
(
"轴【"
+
portName
+
"】原点返回时发现原点已亮,需要先相对走"
+
value
);
RelMove
(
portName
,
slvAddr
,
value
);
bool
isStop
=
false
;
for
(
int
i
=
0
;
i
<=
10
;
i
++)
{
Thread
.
Sleep
(
200
);
if
(
GetBusyStatus
(
portName
,
slvAddr
).
Equals
(
0
))
{
isStop
=
true
;
LogUtil
.
info
(
"轴【"
+
portName
+
"】 相对走"
+
value
+
"已结束"
);
break
;
}
}
if
(!
isStop
)
{
LogUtil
.
info
(
"轴【"
+
portName
+
"】 相对走"
+
value
+
"已等待2分钟,直接停止"
);
SuddenStop
(
portName
,
slvAddr
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"轴【"
+
portName
+
"】原点返回前验证是否在原点出错:"
+
ex
.
StackTrace
);
}
//默认负方向原点返回
UpdateBlock
(
portName
,
slvAddr
,
ACCMDManager
.
Block_HomeMove1
);
//}
UpdateBlock
(
portName
,
slvAddr
,
ACCMDManager
.
Block_HomeMove1
);
Thread
.
Sleep
(
SleepMSendons
);
OpenAndCloseSTB
(
portName
,
slvAddr
);
}
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
7daf9d2
...
...
@@ -480,7 +480,7 @@ namespace OnlineStore.DeviceLibrary
PreReadCoilAddr
=
ACCMDManager
.
BUSYStatus
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
BUSYStatus
,
"0000"
,
1
);
//SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
10
0
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
8
0
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
BUSYStatus
);
}
...
...
@@ -489,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
PreReadCoilAddr
=
ACCMDManager
.
HOME_CMP_Status
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
HOME_CMP_Status
,
"0000"
,
1
);
//SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
10
0
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
8
0
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
HOME_CMP_Status
);
}
...
...
@@ -497,7 +497,7 @@ namespace OnlineStore.DeviceLibrary
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Home_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
10
0
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
5
0
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
/// <summary>
...
...
@@ -507,7 +507,7 @@ namespace OnlineStore.DeviceLibrary
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Negative_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
10
0
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
5
0
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
/// <summary>
...
...
@@ -531,7 +531,7 @@ namespace OnlineStore.DeviceLibrary
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Positive_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
10
0
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
5
0
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
}
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
7daf9d2
...
...
@@ -45,17 +45,17 @@ AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,35500
7
,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,35500
0
,,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,355002,,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,350008,,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#
355001;12#350001
;,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,26
00
00,,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#
403400;12#350000
;,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,26
32
00,,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-
4
0000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-
1
0000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,
0
,,,,,,,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,
1
,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
...
...
@@ -78,7 +78,7 @@ PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,30,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,20,,,,,,,
,,,
,,,,,,,
PRO,升降轴(轴二)到仓门速度,UpDownAxis_Door_Speed,50
,,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,250,,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,250,,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,250,,,,,,,
...
...
@@ -112,33 +112,34 @@ PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,, ,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayWidth,7,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM2,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,
1
5000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
5
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
30
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,
15
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,
15
000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,
15
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,5000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,
1
0000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,
8
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,
6
000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,
6
000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,
6
000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,
2
00,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,
3
00,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1
73
0000,,,,,, ,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1
50
0000,,,,,, ,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,
2
00,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,
3
00,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.20
0
.11#16;192.168.200.12#4,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.20
0
.11#16;192.168.200.12#4,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.20
2
.11#16;192.168.200.12#4,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.20
2
.11#16;192.168.200.12#4,,,,,,,
source/DeviceLibrary/StoreConfig/AC/linePositions.csv
查看文件 @
7daf9d2
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
DI,急停,SuddenStop_BTN,200,192.168.200.11,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,201,192.168.200.11,0,复位,X02,DI-02,0,
DI,自动启动,AutoRun_Single,202,192.168.200.11,0,自动启动,X03,DI-03,0,
DI,安全光栅,SafetyLightCurtains,203,192.168.200.11,0,安全光栅,X04,DI-04,0,
DI,进料口门上升端,Door_Up,204,192.168.200.11,0,进料口门上升端,X05,DI-05,0,
DI,进料口门下降端,Door_Down,205,192.168.200.11,0,进料口门下降端,X06,DI-06,0,
DI,吸盘气缸上升端,SuckingDisc_Up,206,192.168.200.11,0,吸盘气缸上升端,X07,DI-07,0,
DI,吸盘气缸下降端,SuckingDisc_Down,207,192.168.200.11,0,吸盘气缸下降端,X08,DI-08,0,
DI,料盘宽度检测1,WidthCheck1,208,192.168.200.11,0,料盘宽度检测1,X09,DI-09,0,
DI,料盘宽度检测2,WidthCheck2,209,192.168.200.11,0,料盘宽度检测2,X10,DI-10,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,210,192.168.200.11,0,料盘检测1(上料机构),X11,DI-11,0,
DI,上料机构出料检测,OutCheck,211,192.168.200.11,0,上料机构出料检测,X12,DI-12,0,
DI,门锁气缸打开端,BatchDoor_Open,212,192.168.200.11,0,门锁气缸打开端,X13,DI-13,0,
DI,门锁气缸关闭端,BatchDoor_Close,213,192.168.200.11,0,门锁气缸关闭端,X14,DI-14,0,
DI,料盘检测2(料叉机构),TrayCheck_Fixture,214,192.168.200.11,0,料盘检测2(料叉机构),X15,DI-15,0,
DI,压紧机构计量检测,CompressAxis_Check,215,192.168.200.11,0,压紧机构计量检测,X16,DI-16,0,
DO,自动指示灯,AutoRun_HddLed,100,192.168.200.11,0,自动指示灯,Y01,DO-01,0,
DO,故障指示灯,Alarm_HddLed,101,192.168.200.11,0,故障指示灯,Y02,DO-02,0,
DO,待机指示灯,RunSign_HddLed,102,192.168.200.11,0,待机指示灯,Y03,DO-03,0,
DO,吹气SOL ON,StartOrStopBlow,103,192.168.200.11,0,吹气SOL ON,Y04,DO-04,0,
DO,料仓运转ON,Run_Sign,104,192.168.200.11,0,料仓运转ON,Y05,DO-05,0,
DO,轴2刹车电源ON,Axis_Brake,105,192.168.200.11,0,轴2刹车电源ON,Y06,DO-06,0,
DO,相机照明开,CameraLight_Power,106,192.168.200.11,0,相机照明开,Y07,DO-07,0,
DO,吸盘吸料SOL,SuckingDisc_Work,107,192.168.200.11,0,吸盘吸料SOL,Y08,DO-08,0,
DO,进料口门上升SOL,Door_Up,108,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0,
DO,进料口门下降SOL,Door_Down,109,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0,
DO,吸盘气缸上升SOL,SuckingDisc_Up,110,192.168.200.11,0,吸盘气缸上升SOL,Y11,DO-11,0,
DO,吸盘气缸下降SOL,SuckingDisc_Down,111,192.168.200.11,0,吸盘气缸下降SOL,Y12,DO-12,0,
DO,门锁气缸打开SOL,BatchDoor_Open,112,192.168.200.11,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸关闭SOL,BatchDoor_Close,113,192.168.200.11,0,门锁气缸关闭SOL,Y14,DO-14,0,
,,,114,192.168.200.11,0,,Y15,DO-15,0,
,,,115,192.168.200.11,0,,Y16,DO-16,0,
DI,上料机构门关闭,DoorClose_LoadMaterial,200,192.168.200.12,0,上料机构门关闭,X21,DI-21,0,
DI,气压检测,Airpressure_Check,201,192.168.200.12,0,气压检测,X22,DI-22,0,
DI,吸盘压力确认信号,SuckingDisc_Air,202,192.168.200.12,0,吸盘压力确认信号,X23,DI-23,0,
DI,左侧门关闭,DoorColse_Single,203,192.168.200.12,0,左侧门关闭,X24,DI-24,0,
,,,100,192.168.200.12,0,,Y17,DO-21,0,
,,,101,192.168.200.12,0,,Y18,DO-22,0,
,,,102,192.168.200.12,0,,Y19,DO-23,0,
,,,103,192.168.200.12,0,,Y20,DO-24,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM4,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,1,COM6,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,355000,,,,,,,
PRO,升降轴 出库高点P2,UpDownAxis_OutHigh_P2,355002,,,,,,,
PRO,升降轴 出库低点P8,UpDownAxis_OutLow_P8,350008,,,,,,,
PRO,升降轴 入库P1点集合,UpDownAxis_P1_List,8#403400;12#350000;,,,,,,,
PRO,旋转轴(轴一)P1 待机原位点,MiddleAxis_P1_Position,263200,,,,,,,
PRO,进出轴(轴三)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,-10000,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
PRO,设备是否调试状态(1=调试,0=正常),IsInDebug,1,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
,,,,,,,,,,
PRO,预警温度,WarnTemperate,80,,,,,,,
PRO,预警湿度,WarnHumidity,80,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,100,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,150,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,40,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,40,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,10,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,20,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,20,,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,30,,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,30,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,20,,,,,,,
PRO,升降轴(轴二)到仓门速度,UpDownAxis_Door_Speed,50,,,,,,,
PRO,升降轴(轴二)P1速度,UpDownAxis_P1_Speed,250,,,,,,,
PRO,升降轴(轴二)P2速度,UpDownAxis_P2_Speed,250,,,,,,,
PRO,升降轴(轴二)P3速度,UpDownAxis_P3_Speed,250,,,,,,,
PRO,升降轴(轴二)P4速度,UpDownAxis_P4_Speed,150,,,,,,,
PRO,升降轴(轴二)P5速度,UpDownAxis_P5_Speed,250,,,,,,,
PRO,升降轴(轴二)P6速度,UpDownAxis_P6_Speed,100,,,,,,,
PRO,升降轴(轴二)到仓门P7速度,UpDownAxis_P7_Speed,100,,,,,,,
PRO,升降轴(轴二)P8速度,UpDownAxis_P8_Speed,100,,,,,,,
PRO,旋转轴(轴一)P1速度,MiddleAxis_P1_Speed,120,,,,,,,
PRO,旋转轴(轴一)P2速度,MiddleAxis_P2_Speed,120,,,,,,,
PRO,进出轴(轴三)P1速度,InOutAxis_P1_Speed,100,,,,,,,
PRO,进出轴(轴三)P2速度,InOutAxis_P2_Speed,100,,,,,,,
PRO,进出轴(轴三)P3速度,InOutAxis_P3_Speed,100,,,,,,,
PRO,(轴一)旋转轴最小误差脉冲值,MiddleAxis_ErrorCountMin,10,,,,,, ,
PRO,(轴二)升降轴轴最小误差脉冲值,UpdownAxis_ErrorCountMin,10,,,,,,,
PRO,(轴三)进出轴最小误差脉冲值,InoutAxis_ErrorCountMin,10,,,,,,,
PRO,(轴一)旋转轴最大误差脉冲值,MiddleAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴二)升降轴轴最大误差脉冲值,UpdownAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴三)进出轴最大误差脉冲值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,, ,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,, ,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,默认的料盘宽度(不可更改),Default_TrayWidth,7,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,,,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM2,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,5000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,10000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,8000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,6000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,6000,,,,,,,
PRO,硕科步进电机(压紧轴)原点返回速度,CompressAxis_HomeSpeed,6000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
PRO,(轴五)上料轴目标速度,BatchAxis_TargetSpeed,300,,,,,,,
PRO,(轴五)上料轴加速度,BatchAxis_AddSpeed,300,,,,,,,
PRO,(轴五)上料轴减速度,BatchAxis_DelSpeed,300,,,,,,,
PRO,(轴五)上料轴原点低速,BatchAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴五)上料轴原点高速,BatchAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴五)上料轴原点加速度,BatchAxis_HomeAddSpeed,200,,,,,,,
PRO,(轴五)上料轴P1点(出库时接料盘的位置),BatchAxis_P1,1500000,,,,,, ,
PRO,(轴五)上料轴最小误差脉冲值,BatchAxis_ErrorCountMin,10,,,,,,,
PRO,(轴五)上料轴最大误差脉冲值,BatchAxis_ErrorCountMax,1000,,,,,,,
PRO,(轴五)上料轴最小限位,BatchAxis_PositionMin,0,,,,,,,
PRO,(轴五)上料轴最大限位,BatchAxis_PositionMax,0,,,,,,,
PRO,(轴五)上料轴P1速度,BatchAxis_P1_Speed,300,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.202.11#16;192.168.200.12#4,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.202.11#16;192.168.200.12#4,,,,,,,
位置,优先级,高度,宽度,料仓ID,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,进出轴仓门取料点P2,进出轴吸盘取料点P2
1#AC1_1_1_4,774,8,7,1,
211783,51884,55245,55245,51884,68000,-110000,-75000,50
00,5000
1#AC1_1_1_5,773,12,7,
1,211783,67807,71168,71168,67807,68
000,-110000,-75000,5000,5000
1#AC1_1_1_4,774,8,7,1,
80750,407400,415100,415100,407400,73000,-22000,-10000,836
00,5000
1#AC1_1_1_5,773,12,7,
s,211783,67807,71168,71168,67807,5
000,-110000,-75000,5000,5000
1#AC1_1_1_6,772,8,7,,211783,83730,87091,87091,83730,68000,-110000,-75000,81000,81000
1#AC1_1_1_7,771,8,7,,211783,99653,103014,103014,99653,68000,-110000,-75000,81000,81000
1#AC1_1_1_8,770,8,7,,211783,115576,118937,118937,115576,68000,-110000,-75000,81000,81000
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
7daf9d2
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
7daf9d2
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
7daf9d2
...
...
@@ -106,8 +106,9 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
false
);
BatchDoorClose
(
false
);
}
public
static
bool
Reset
()
public
static
bool
Reset
(
bool
isNeedInout
)
{
AutomaticBaiting
.
IsNeedStartInout
=
isNeedInout
;
if
(!
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
None
))
{
StopMove
();
...
...
@@ -122,12 +123,7 @@ namespace OnlineStore.DeviceLibrary
DoorStatus
=
2
;
AutoBaitingStatus
=
StoreRunStatus
.
Reset
;
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R01_CloseDoor
);
//关闭门,轴回原点,检测
BatchDoorClose
(
true
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
LogUtil
.
info
(
Name
+
"复位中:关闭门锁"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R00_Start
);
return
true
;
}
...
...
@@ -145,6 +141,14 @@ namespace OnlineStore.DeviceLibrary
}
switch
(
StoreMove
.
MoveStep
)
{
case
StoreMoveStep
.
AUTO_R00_Start
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R01_CloseDoor
);
//关闭门,轴回原点,检测
BatchDoorClose
(
true
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
LogUtil
.
info
(
Name
+
"复位中:关闭门锁"
);
break
;
case
StoreMoveStep
.
AUTO_R01_CloseDoor
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_R02_AutoAxisHome
);
LogUtil
.
info
(
Name
+
"复位中:批量上下料轴原点返回"
);
...
...
@@ -259,8 +263,17 @@ namespace OnlineStore.DeviceLibrary
if
(
KND
.
IOValue
(
IO_Type
.
SuckingDisc_Air
).
Equals
(
IO_VALUE
.
HIGH
))
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_I04_SuckingDisc_Up
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升"
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
LogUtil
.
info
(
Name
+
"入料: 吸盘上升,等待宽度到达"
+
StoreManager
.
Config
.
Default_TrayWidth
);
CylinderMove
(
IO_Type
.
SuckingDisc_Up
,
IO_Type
.
SuckingDisc_Down
,
true
);
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
7
))
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck1
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck2
,
IO_VALUE
.
LOW
));
}
else
if
(
StoreManager
.
Config
.
Default_TrayWidth
.
Equals
(
13
))
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck1
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
WidthCheck2
,
IO_VALUE
.
HIGH
));
}
}
else
if
(
SuckingDisc_WorkCount
<
3
)
{
...
...
@@ -270,6 +283,7 @@ namespace OnlineStore.DeviceLibrary
{
//TODO 报警
WarnMsg
=
"吸盘已经尝试三次,仍然吸不到物料!"
;
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchAlarm
,
"吸盘吸料失败"
,
WarnMsg
,
StoreMoveType
.
InStore
);
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_I04_SuckingDisc_Up
))
{
...
...
@@ -294,7 +308,8 @@ namespace OnlineStore.DeviceLibrary
//计算高度
EndMovePosition
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
.
DeviceName
,
StoreManager
.
Config
.
Batch_Axis
.
GetAxisValue
());
LastHeight
=
Math
.
Abs
(
EndMovePosition
-
StartMovePosition
)
/
AxisChangeValue
;
LastSize
=
GetSize
();
LogUtil
.
info
(
Name
+
"入料: 计算高度:上升前位置【"
+
StartMovePosition
+
"】实时位置【"
+
EndMovePosition
+
"】,计算后高度【"
+
LastHeight
+
"】"
);
LastSize
=
StoreManager
.
Config
.
Default_TrayWidth
;
LogUtil
.
info
(
Name
+
"入料: 从服务器获取入库PosId,尺寸:【"
+
LastSize
+
"*"
+
LastHeight
+
"】二维码【"
+
LastCode
+
"】"
);
GetInStorePosId
(
ProcessMsg
());
...
...
@@ -333,23 +348,7 @@ namespace OnlineStore.DeviceLibrary
{
IsNeedScanCode
();
}
}
//else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I011_WaitTakeTray))
//{
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_I09_TrayLeaveWaitTime);
// LogUtil.info(Name + "入料: 未扫到二维码,料盘已拿走,等待1秒后关门");
// StoreMove.WaitList.Add(WaitResultInfo.WaitTime(1000));
//}
//else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I09_TrayLeaveWaitTime))
//{
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_I10_CloseDoor);
// LogUtil.info(Name + "入料: 未扫到二维码,料盘已拿走,关闭仓门");
// CylinderMove(IO_Type.Door_Down, IO_Type.Door_Up, true);
//}
//else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I10_CloseDoor))
//{
// IsNeedScanCode();
//}
}
else
{
LogUtil
.
error
(
Name
+
"未找到步骤:"
+
StoreMove
.
MoveType
);
...
...
@@ -391,106 +390,7 @@ namespace OnlineStore.DeviceLibrary
AutoBaitingStatus
=
StoreRunStatus
.
Runing
;
}
}
//public static bool StartOutStore(string PosId)
//{
// AutoStorePosition position = CSVPositionReader<AutoStorePosition>.GetPositon(PosId);
// if (position == null)
// {
// LogUtil.error(Name + " 启动出料失败,PosId【" + PosId + "】未找到库位信息" );
// return false;
// }
// if (AutoBaitingStatus == StoreRunStatus.Runing && StoreMove.MoveType.Equals(StoreMoveType.None))
// {
// AutoBaitingStatus = StoreRunStatus.Busy;
// StoreMove.NewMove(StoreMoveType.InStore);
// StoreMove.PosId = PosId;
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_O01_SuckingDisc_Work);
// if (KND.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
// {
// LogUtil.info(Name + " 启动出料 ,已检测到料盘,轴不需要上升");
// }
// else
// {
// LogUtil.info(Name + " 启动出料 ,轴上升到检测到料盘");
// ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.Batch_Axis.TargetSpeed);
// }
// return true;
// }
// else
// {
// LogUtil.error(Name + " 启动出料失败,AutoBaitingStatus=" + AutoBaitingStatus + ",MoveType=" + StoreMove.MoveType);
// return false;
// }
//}
//private static void OutStoreProcess()
//{
// if (StoreMove.IsInWait)
// {
// CheckWait();
// }
// if (StoreMove.IsInWait)
// {
// return;
// }
// if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O01_SuckingDisc_Work))
// {
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_O02_WaitTimeDown);
// LogUtil.info(Name + " 出料:等待叉子后退后,吸盘下降");
// StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
// }
// else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O02_WaitTimeDown))
// {
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_O03_SuckingDisc_Down);
// LogUtil.info(Name + " 出料:吸盘下降,上料轴向下运动");
// CylinderMove(IO_Type.SuckingDisc_Down, IO_Type.SuckingDisc_Up, true);
// //上料轴需要向下走
// AutoStorePosition position = CSVPositionReader<AutoStorePosition>.GetPositon(StoreMove.PosId);
// int axisValue = AxisChangeValue * position.BagHeight;
// int currPosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue());
// int targetValue = currPosition - axisValue;
// //判断盘满后,需要报警?
// if (targetValue < 0)
// {
// WarnMsg = "库已满,请先拿走!";
// LogUtil.error(Name + WarnMsg);
// }
// else
// {
// ACAxisRelMove(StoreManager.Config.InOut_Axis, StoreManager.Config.InOut_Axis.TargetSpeed, targetValue);
// }
// }
// else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O03_SuckingDisc_Down))
// {
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_O04_PutTrayDown);
// LogUtil.info(Name + " 出料:放下物料");
// KND.IOMove(IO_Type.SuckingDisc_Work, IO_VALUE.LOW);
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_LoadMaterial, IO_VALUE.HIGH));
// }
// else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O04_PutTrayDown))
// {
// StoreMove.NextMoveStep(StoreMoveStep.AUTO_O05_SuckingDisc_Up);
// LogUtil.info(Name + " 出料:吸盘上升");
// CylinderMove(IO_Type.SuckingDisc_Up, IO_Type.SuckingDisc_Down, true);
// }
// else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_O05_SuckingDisc_Up))
// {
// LogUtil.info(Name + "出料:出料结束");
// StoreMove.EndMove();
// AutoBaitingStatus = StoreRunStatus.Runing;
// }
// else
// {
// LogUtil.error(Name + "未找到步骤:" + StoreMove.MoveType);
// }
//}
public
static
bool
DoorIsClose
()
{
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
7daf9d2
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/store/AC_Store.cs
查看文件 @
7daf9d2
...
...
@@ -33,8 +33,7 @@ namespace OnlineStore.DeviceLibrary
/// 是否没有检测到气压
/// </summary>
public
bool
isNoAirCheck
=
false
;
protected
int
NeedCheckSafetyLight
=
0
;
/// <summary>
/// 是否再报警中
/// </summary>
...
...
@@ -95,7 +94,7 @@ namespace OnlineStore.DeviceLibrary
serverConnectTimer
.
Enabled
=
false
;
//serverConnectTimer.Elapsed += server_connect_timer_Tick;
IoCheckTimer
=
new
System
.
Timers
.
Timer
();
IoCheckTimer
.
Interval
=
2
00
;
IoCheckTimer
.
Interval
=
3
00
;
IoCheckTimer
.
AutoReset
=
true
;
IoCheckTimer
.
Enabled
=
false
;
//IoCheckTimer.Elapsed += IoCheckTimer_Elapsed;
...
...
@@ -299,10 +298,10 @@ namespace OnlineStore.DeviceLibrary
case
StoreAlarmType
.
IoSingleTimeOut
:
aType
=
3
;
break
;
case
StoreAlarmType
.
StellAlarm
:
aType
=
2
;
alarmDetial
=
"5"
;
break
;
//
case StoreAlarmType.StellAlarm:
//
aType = 2;
//
alarmDetial = "5";
//
break;
default
:
break
;
}
alarmInfo
=
new
AlarmInfo
(
StoreID
,
aType
,
alarmDetial
,
alarmMsg
,
inoutStatus
);
...
...
@@ -370,15 +369,15 @@ namespace OnlineStore.DeviceLibrary
string
deviceName
=
moveAxis
.
DeviceName
;
short
axisNo
=
moveAxis
.
GetAxisValue
();
//如果是进出轴,并且光栅被遮挡,直接返回false
if
(
NeedCheckSafetyLight
.
Equals
(
2
))
{
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
)
||
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_05
_DeviceToDoor
))
{
return
false
;
}
}
//
//
如果是进出轴,并且光栅被遮挡,直接返回false
//
if (NeedCheckSafetyLight.Equals(2))
//
{
//
if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor) ||
// StoreMove.MoveStep.Equals(StoreMoveStep.SI_04
_DeviceToDoor))
//
{
//
return false;
//
}
//
}
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
int
errorCount
=
Math
.
Abs
(
outCount
-
targetPosition
);
...
...
@@ -386,14 +385,14 @@ namespace OnlineStore.DeviceLibrary
{
if
(
errorCount
>
moveAxis
.
CanErrorCountMax
)
{
if
(
NeedCheckSafetyLight
.
Equals
(
2
))
{
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
)
||
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SI_05
_DeviceToDoor
))
{
return
false
;
}
}
//
if (NeedCheckSafetyLight.Equals(2))
//
{
//
if (StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor) ||
// StoreMove.MoveStep.Equals(StoreMoveStep.SI_04
_DeviceToDoor))
//
{
//
return false;
//
}
//
}
//判断是否需要重新运动
if
(
StoreMove
.
CanWhileCount
>
0
)
{
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
7daf9d2
...
...
@@ -300,19 +300,23 @@ namespace OnlineStore.DeviceLibrary
/// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
/// </summary>
SI_03_ReturnHome
=
203
,
/// <summary>
/// 入库。。压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P3(压紧前点)
/// </summary>
SI_04_CompressWare
=
204
,
///
//
<summary>
///
//
入库。。压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P3(压紧前点)
///
//
</summary>
//
SI_04_CompressWare = 204,
/// <summary>
/// 入库。。叉子进入入料口,轴3( 叉子) 至P2( 进料口取料点)
/// </summary>
SI_0
5_DeviceToDoor
=
205
,
SI_0
4_DeviceToDoor
=
204
,
/// <summary>
/// 入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点)
/// 批量入库:此步骤表示吸盘放物品
/// </summary>
SI_06_DoorWarToDevice
=
206
,
SI_05_DoorWarToDevice
=
205
,
/// <summary>
/// 压紧轴压紧
/// </summary>
SI_06_CompressWork
=
206
,
/// <summary>
/// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点)
...
...
@@ -354,9 +358,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SI_21_DeviceToDoor
=
221
,
/// <summary>
///入库未取到PosID,, 打开仓门
/// </summary>
SI_22_OpenDoor
=
222
,
/// <summary>
/// 入库未取到PosID,,等待料盘拿走
/// </summary>
SI_2
2_WaitTrayGo
=
222
,
SI_2
3_WaitTrayGo
=
223
,
///// <summary>
///// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
...
...
@@ -373,6 +381,10 @@ namespace OnlineStore.DeviceLibrary
#
region
自动上下料机构复位
/// <summary>
/// 开始复位
/// </summary>
AUTO_R00_Start
=
1100
,
/// <summary>
/// 关闭门锁
/// </summary>
AUTO_R01_CloseDoor
=
1101
,
...
...
@@ -399,44 +411,44 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 先上升到料盘检测1(上料机构)信号亮
/// </summary>
AUTO_I00_MoveToUp
,
AUTO_I00_MoveToUp
=
1200
,
/// <summary>
/// 扫码
/// </summary>
AUTO_I01_ScanCode
,
AUTO_I01_ScanCode
=
1201
,
/// <summary>
/// 吸盘下降
/// </summary>
AUTO_I02_SuckingDisc_Down
,
AUTO_I02_SuckingDisc_Down
=
1202
,
/// <summary>
/// 吸盘吸料盘
/// </summary>
AUTO_I03_SuckingDisc_Work
,
AUTO_I03_SuckingDisc_Work
=
1203
,
/// <summary>
/// 吸盘上升 ,
/// </summary>
AUTO_I04_SuckingDisc_Up
,
AUTO_I04_SuckingDisc_Up
=
1204
,
/// <summary>
/// 批量上下料料轴上升
/// </summary>
AUTO_I05_BatchAxisUp
,
AUTO_I05_BatchAxisUp
=
1205
,
/// <summary>
/// 从服务器获取PosID
/// </summary>
AUTO_I06_GetPosId
,
AUTO_I06_GetPosId
=
1206
,
/// <summary>
/// 等待料盘被叉子拿走
/// </summary>
AUTO_I07_WaitTrayLeave
,
AUTO_I07_WaitTrayLeave
=
1207
,
/// <summary>
/// 未扫到码:等待操作人员拿走料盘
/// </summary>
AUTO_I10_WaitTrayGo
,
AUTO_I10_WaitTrayGo
=
1210
,
///// <summary>
/////未扫到码: 把料盘放到叉子上
///// </summary>
...
...
@@ -517,9 +529,14 @@ namespace OnlineStore.DeviceLibrary
/// io信号超时未收到
/// </summary>
IoSingleTimeOut
=
30
,
/// <summary>
/// io信号超时未收到
/// </summary>
BatchIoTimeOut
=
100
,
/// <summary>
///
电钢
报警
///
批量上下料模块
报警
/// </summary>
StellAlarm
=
5
0
,
BatchAlarm
=
11
0
,
}
}
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
7daf9d2
...
...
@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
2
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
IOMove_
2
;
wait
.
IoType
=
ioType
;
wait
.
IoValue
=
ioValue
;
wait
.
IsEnd
=
false
;
...
...
@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
1
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
AxisMove_
1
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
...
...
@@ -168,7 +168,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
1
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
AxisMove_
1
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
...
...
@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
10
;
wait
.
WaitType
=
4
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
StellMove_
4
;
wait
.
SlvAddr
=
slvAddr
;
wait
.
IsHomeMove
=
false
;
wait
.
TargetPosition
=
targetPosition
;
...
...
@@ -190,7 +190,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
10
;
wait
.
WaitType
=
4
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
StellMove_
4
;
wait
.
SlvAddr
=
slvAddr
;
wait
.
IsHomeMove
=
true
;
wait
.
TargetPosition
=
0
;
...
...
@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
5
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
ShuoKe_5
;
wait
.
SlvAddr
=(
byte
)
slvAddr
;
wait
.
TargetPosition
=
targetPosition
;
wait
.
IsHomeMove
=
isHome
;
...
...
@@ -212,7 +212,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
3
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
Time_
3
;
wait
.
TimeMSeconds
=
MScends
;
wait
.
IsEnd
=
false
;
return
wait
;
...
...
@@ -227,7 +227,7 @@ namespace OnlineStore.DeviceLibrary
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
6
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
AxisHomeSingle_
6
;
wait
.
AxisInfo
=
axis
;
wait
.
IsHomeMove
=
true
;
wait
.
IoValue
=
value
;
...
...
@@ -257,20 +257,20 @@ namespace OnlineStore.DeviceLibrary
// wait.IsEnd = false;
// return wait;
//}
/// <summary>
///9= 等待轴的正限位为指定值
/// </summary>
public
static
WaitResultInfo
WaitAxistPositiveLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
WaitType
=
9
;
wait
.
AxisInfo
=
moveAxis
;
wait
.
IsHomeMove
=
true
;
wait
.
IoValue
=
ioValue
;
wait
.
IsEnd
=
false
;
return
wait
;
}
///
//
<summary>
///
//
9= 等待轴的正限位为指定值
///
//
</summary>
//
public static WaitResultInfo WaitAxistPositiveLimit(ConfigMoveAxis moveAxis, IO_VALUE ioValue)
//
{
//
WaitResultInfo wait = new WaitResultInfo();
//
wait.CanWhileMoveCount = 0;
//
wait.WaitType = 9;
//
wait.AxisInfo = moveAxis;
//
wait.IsHomeMove = true;
//
wait.IoValue = ioValue;
//
wait.IsEnd = false;
//
return wait;
//
}
/// <summary>
...
...
@@ -282,7 +282,7 @@ namespace OnlineStore.DeviceLibrary
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
AxisInfo
=
moveAxis
;
wait
.
WaitType
=
10
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
BatchAxisMove_
10
;
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
return
wait
;
...
...
@@ -294,7 +294,7 @@ namespace OnlineStore.DeviceLibrary
public
static
WaitResultInfo
WaitCodeOK
()
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
11
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
ScanCode_
11
;
return
wait
;
}
/// <summary>
...
...
@@ -304,12 +304,12 @@ namespace OnlineStore.DeviceLibrary
public
static
WaitResultInfo
WaitTakeTray
()
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
12
;
wait
.
WaitType
=
(
int
)
Wait_Type
.
TakeTrayGo_
12
;
return
wait
;
}
public
string
ToStr
()
{
if
(
WaitType
==
1
)
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisMove_
1
)
{
if
(
IsHomeMove
)
{
...
...
@@ -320,44 +320,47 @@ namespace OnlineStore.DeviceLibrary
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】绝对运动,目标位置【"
+
TargetPosition
+
"】"
;
}
}
else
if
(
WaitType
==
2
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
IOMove_
2
)
{
return
"IO信号等待,IO类型【"
+
IoType
+
"】,等待值【"
+
IoValue
+
"】"
;
}
else
if
(
WaitType
==
3
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
Time_
3
)
{
return
"时间等待:【"
+
TimeMSeconds
+
"】毫秒"
;
}
else
if
(
WaitType
==
4
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
StellMove_
4
)
{
return
"电钢目标位置:【"
+
TargetPosition
+
"】 "
;
}
else
if
(
WaitType
==
5
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ShuoKe_
5
)
{
return
"硕科电机目标位置:【"
+
TargetPosition
+
"】 "
;
}
else
if
(
WaitType
==
6
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisHomeSingle_
6
)
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
7
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
WaitHeight_
7
)
{
return
"料盘高度【"
+
HeightValue
+
"】 "
;
}
else
if
(
WaitType
==
8
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitNegativeSingle_
8
)
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】负限位:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
9
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
AxisLimitPositiveSingle_
9
)
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】正限位:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
10
)
else
if
(
WaitType
==
(
int
)
Wait_Type
.
BatchAxisMove_
10
)
{
return
"上料轴运动停止 "
;
}
else
if
(
WaitType
==
11
)
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
ScanCode_
11
)
{
return
"等待扫码结束"
;
}
else
if
(
WaitType
==
(
int
)
Wait_Type
.
TakeTrayGo_12
)
{
return
"等待操作人员拿走料盘"
;
}
else
{
...
...
@@ -419,6 +422,60 @@ namespace OnlineStore.DeviceLibrary
}
public
enum
Wait_Type
{
None_0
=
0
,
/// <summary>
/// 1=轴运动,
/// </summary>
AxisMove_1
=
1
,
/// <summary>
/// 2=IO运动,
/// </summary>
IOMove_2
=
2
,
/// <summary>
/// 3=时间
/// </summary>
Time_3
=
3
,
/// <summary>
/// ,4=电钢,
/// </summary>
StellMove_4
=
4
,
/// <summary>
/// 5=硕科电机
/// </summary>
ShuoKe_5
=
5
,
/// <summary>
/// ,6=等待轴原点信号
/// </summary>
AxisHomeSingle_6
=
6
,
/// <summary>
/// 7=等待高度为0,
/// </summary>
WaitHeight_7
=
7
,
/// <summary>
/// 8=等待轴的负限位,
/// </summary>
AxisLimitNegativeSingle_8
=
8
,
/// <summary>
/// 9=等待轴的正限位。
/// </summary>
AxisLimitPositiveSingle_9
=
9
,
/// <summary>
/// 10=上料轴运动停止
/// </summary>
BatchAxisMove_10
=
10
,
/// <summary>
/// 11=扫码结束。
/// </summary>
ScanCode_11
=
11
,
/// <summary>
/// 12=操作人员拿走料盘,并点击确定。
/// </summary>
TakeTrayGo_12
=
12
,
}
public
enum
StoreMoveType
{
/// <summary>
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
7daf9d2
...
...
@@ -155,13 +155,19 @@ namespace OnlineStore.LoadCSVLibrary
/// 使用康泰克板卡表示轴编号,使用Ac伺服电机表示伺服地址
/// </summary>
/// <returns></returns>
///
private
short
axisValue
=
-
1
;
public
short
GetAxisValue
()
{
if
(
ProVale
.
Equals
(
""
)
||
ProVale
.
Equals
(
"-1"
))
{
return
-
1
;
}
return
(
short
)
Convert
.
ToInt32
(
ProVale
);
if
(
axisValue
.
Equals
(-
1
))
{
axisValue
=
(
short
)
Convert
.
ToInt32
(
ProVale
);
}
return
axisValue
;
}
public
override
string
ToString
()
...
...
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
查看文件 @
7daf9d2
...
...
@@ -563,8 +563,13 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[
ConfigProAttribute
(
"BatchAxis_P1_Speed"
,
true
)]
public
int
BatchAxis_P1_Speed
{
get
;
set
;
}
/// <summary>
/// PRO,默认的料盘宽度(不可更改),Default_TrayWidth,7
/// </summary>
[
ConfigProAttribute
(
"Default_TrayWidth"
)]
public
int
Default_TrayWidth
{
get
;
set
;
}
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论