Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6522a61a
由
几米阳光
编写于
2018-12-04 16:08:05 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上料部分代码
1 个父辈
d35479f7
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
427 行增加
和
190 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmAxisDebug.cs
source/ACSingleStore/FrmIOStatus.Designer.cs
source/ACSingleStore/FrmIOStatus.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/Common/Setting_Init.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/KangNaiDe/KNDManager.cs
source/DeviceLibrary/PanasonicServo/ACCMDManager.cs
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
source/DeviceLibrary/ShuoKe/ShuoKeControls.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig.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/acSingleStore/ACStoreManager.cs → source/DeviceLibrary/acSingleStore/StoreManager.cs
source/DeviceLibrary/store/KTK_DeviceBase.cs → source/DeviceLibrary/store/AC_DeviceBase.cs
source/DeviceLibrary/store/KTK_Store.cs → source/DeviceLibrary/store/AC_Store.cs
source/DeviceLibrary/store/LineAlarm.cs
source/DeviceLibrary/store/StoreMoveStep.cs
source/DeviceLibrary/store/model/StoreMoveInfo.cs
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
source/ACSingleStore/App.config
查看文件 @
6522a61
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"CodeParamPath"
value
=
"\CodeParam\"
/>
<
add
key
=
"AI_ConvertPosition"
value
=
"55"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"3000"
/>
<
add
key
=
"InOutDefaultPosition"
value
=
"3000"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"AxisChangeValue"
value
=
"100"
/>
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
source/ACSingleStore/FrmAxisDebug.cs
查看文件 @
6522a61
...
@@ -51,7 +51,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -51,7 +51,7 @@ namespace OnlineStore.AutoInOutStore
txtInOutSpeed
.
Text
=
inout
.
TargetSpeed
.
ToString
();
txtInOutSpeed
.
Text
=
inout
.
TargetSpeed
.
ToString
();
txtUpDownSpeed
.
Text
=
updown
.
TargetSpeed
.
ToString
();
txtUpDownSpeed
.
Text
=
updown
.
TargetSpeed
.
ToString
();
txtAutoSpeed
.
Text
=
auto
.
TargetSpeed
.
ToString
();
txtAutoSpeed
.
Text
=
auto
.
TargetSpeed
.
ToString
();
txtComSpeed
.
Text
=
Auto
StoreManager
.
Config
.
CompressAxis_EndSpeed
.
ToString
();
txtComSpeed
.
Text
=
StoreManager
.
Config
.
CompressAxis_EndSpeed
.
ToString
();
timer1
.
Start
();
timer1
.
Start
();
}
}
/// <summary>
/// <summary>
...
@@ -135,7 +135,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -135,7 +135,7 @@ namespace OnlineStore.AutoInOutStore
{
{
if
(
this
.
btnInOutMove
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
if
(
this
.
btnInOutMove
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
{
if
(
Auto
StoreManager
.
Store
.
InOutAxisCanMove
().
Equals
(
false
))
if
(
StoreManager
.
Store
.
InOutAxisCanMove
().
Equals
(
false
))
{
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
return
;
...
@@ -222,7 +222,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -222,7 +222,7 @@ namespace OnlineStore.AutoInOutStore
{
{
if
(
btnInOutMovej
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
if
(
btnInOutMovej
.
BackColor
.
Equals
(
System
.
Drawing
.
SystemColors
.
Control
))
{
{
if
(
Auto
StoreManager
.
Store
.
InOutAxisCanMove
().
Equals
(
false
))
if
(
StoreManager
.
Store
.
InOutAxisCanMove
().
Equals
(
false
))
{
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
return
;
...
...
source/ACSingleStore/FrmIOStatus.Designer.cs
查看文件 @
6522a61
此文件的差异被折叠,
点击展开。
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
6522a61
...
@@ -234,25 +234,25 @@ namespace OnlineStore.AutoInOutStore
...
@@ -234,25 +234,25 @@ namespace OnlineStore.AutoInOutStore
}
}
private
void
btnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
HIGH
);
boxBean
.
KND
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
LOW
);
}
}
private
void
btnCloseDoor_Click
(
object
sender
,
EventArgs
e
)
private
void
btnCloseDoor_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
boxBean
.
KND
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
}
}
private
void
btnLocationUp_Click
(
object
sender
,
EventArgs
e
)
private
void
btnLocationUp_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
);
boxBean
.
KND
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
);
}
}
private
void
btnLocationDown_Click
(
object
sender
,
EventArgs
e
)
private
void
btnLocationDown_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
);
boxBean
.
KND
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
);
}
}
private
void
FrmIOStatus_Shown
(
object
sender
,
EventArgs
e
)
private
void
FrmIOStatus_Shown
(
object
sender
,
EventArgs
e
)
...
@@ -262,12 +262,12 @@ namespace OnlineStore.AutoInOutStore
...
@@ -262,12 +262,12 @@ namespace OnlineStore.AutoInOutStore
private
void
btnOpenAxisBreak_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenAxisBreak_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
HIGH
);
}
}
private
void
btnCloseAxisBreak_Click
(
object
sender
,
EventArgs
e
)
private
void
btnCloseAxisBreak_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
}
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
...
@@ -277,12 +277,46 @@ namespace OnlineStore.AutoInOutStore
...
@@ -277,12 +277,46 @@ namespace OnlineStore.AutoInOutStore
private
void
btnOpenLed_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenLed_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KND
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
HIGH
);
}
}
private
void
btnCloseLed_Click
(
object
sender
,
EventArgs
e
)
private
void
btnCloseLed_Click
(
object
sender
,
EventArgs
e
)
{
{
boxBean
.
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
}
private
void
btnSuckingDiscUp_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Down
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Up
,
IO_VALUE
.
HIGH
);
}
private
void
btnSuckingDiscDown_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Up
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Down
,
IO_VALUE
.
HIGH
);
}
private
void
btnDOpen_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
AutoDoor_Close
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
AutoDoor_Open
,
IO_VALUE
.
HIGH
);
}
private
void
btnDClose_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
AutoDoor_Open
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
AutoDoor_Close
,
IO_VALUE
.
HIGH
);
}
private
void
btnSXi_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
HIGH
);
}
private
void
btnSXil_Click
(
object
sender
,
EventArgs
e
)
{
KND
.
IOMove
(
IO_Type
.
SuckingDisc_Work
,
IO_VALUE
.
LOW
);
}
}
}
}
}
}
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
6522a61
此文件的差异被折叠,
点击展开。
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
6522a61
此文件的差异被折叠,
点击展开。
source/Common/Setting_Init.cs
查看文件 @
6522a61
...
@@ -61,15 +61,16 @@ namespace OnlineStore.Common
...
@@ -61,15 +61,16 @@ namespace OnlineStore.Common
/// 配置文件路径 Data Matrix ECC 200.dcm
/// 配置文件路径 Data Matrix ECC 200.dcm
/// </summary>
/// </summary>
public
static
string
CodeParamPath
=
"CodeParamPath"
;
public
static
string
CodeParamPath
=
"CodeParamPath"
;
/// <summary>
/// 高度传感器转换系数
/// </summary>
public
static
string
AI_ConvertPosition
=
"AI_ConvertPosition"
;
/// <summary>
/// <summary>
/// 进出轴最大待机点,需要小于3000
/// 进出轴最大待机点,需要小于3000
/// </summary>
/// </summary>
public
static
string
InOutDefaultPosition
=
"InOutDefaultPosition"
;
public
static
string
InOutDefaultPosition
=
"InOutDefaultPosition"
;
public
static
string
Config_Pwd
=
"Config_Pwd"
;
public
static
string
Config_Pwd
=
"Config_Pwd"
;
/// <summary>
/// 上料轴转换系数,plus/mm
/// </summary>
public
static
string
AxisChangeValue
=
"AxisChangeValue"
;
}
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
6522a61
...
@@ -58,7 +58,9 @@
...
@@ -58,7 +58,9 @@
<ItemGroup>
<ItemGroup>
<Compile Include="acSingleStore\AC_SA_BoxBean.cs" />
<Compile Include="acSingleStore\AC_SA_BoxBean.cs" />
<Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" />
<Compile Include="acSingleStore\AC_SA_BoxBean_Partial.cs" />
<Compile Include="acSingleStore\ACStoreManager.cs" />
<Compile Include="acSingleStore\AutomaticBaiting_Partial.cs" />
<Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="acSingleStore\AutomaticBaiting.cs" />
<Compile Include="halcon\CodeManager.cs" />
<Compile Include="halcon\CodeManager.cs" />
<Compile Include="KangNaiDe\KNDManager.cs" />
<Compile Include="KangNaiDe\KNDManager.cs" />
<Compile Include="KangNaiDe\MasterTcpClient.cs" />
<Compile Include="KangNaiDe\MasterTcpClient.cs" />
...
@@ -76,7 +78,7 @@
...
@@ -76,7 +78,7 @@
<Compile Include="ShuoKe\ShuoKeControls.cs" />
<Compile Include="ShuoKe\ShuoKeControls.cs" />
<Compile Include="store\model\AxisAlarmInfo.cs" />
<Compile Include="store\model\AxisAlarmInfo.cs" />
<Compile Include="store\model\FixtureCodeInfo.cs" />
<Compile Include="store\model\FixtureCodeInfo.cs" />
<Compile Include="store\
KTK
_DeviceBase.cs" />
<Compile Include="store\
AC
_DeviceBase.cs" />
<Compile Include="store\InOrOutStoreParam.cs">
<Compile Include="store\InOrOutStoreParam.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
...
@@ -84,7 +86,7 @@
...
@@ -84,7 +86,7 @@
<Compile Include="store\model\StoreMoveInfo.cs">
<Compile Include="store\model\StoreMoveInfo.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
<Compile Include="store\
KTK
_Store.cs" />
<Compile Include="store\
AC
_Store.cs" />
<Compile Include="store\StoreMoveStep.cs">
<Compile Include="store\StoreMoveStep.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
...
...
source/DeviceLibrary/KangNaiDe/KNDManager.cs
查看文件 @
6522a61
...
@@ -12,6 +12,49 @@ using System.Threading;
...
@@ -12,6 +12,49 @@ using System.Threading;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
public
class
KND
{
#
region
KNDIO
public
static
void
IOMove
(
string
ioType
,
IO_VALUE
ioValue
)
{
if
(
StoreManager
.
Config
.
StoreDOList
.
ContainsKey
(
ioType
))
{
ConfigIO
configIo
=
StoreManager
.
Config
.
StoreDOList
[
ioType
];
KNDManager
.
WriteSingleDO
(
configIo
.
DeviceName
,
configIo
.
SlaveID
,
configIo
.
GetIOAddr
(),
ioValue
);
Thread
.
Sleep
(
60
);
}
else
{
LogUtil
.
error
(
"没有DO="
+
ioType
);
}
}
public
static
IO_VALUE
IOValue
(
string
ioType
)
{
IO_VALUE
ioValue
=
IO_VALUE
.
LOW
;
if
(
StoreManager
.
Config
.
StoreDIList
.
ContainsKey
(
ioType
))
{
ConfigIO
configIo
=
StoreManager
.
Config
.
StoreDIList
[
ioType
];
ioValue
=
KNDManager
.
GetDIValue
(
configIo
.
DeviceName
,
configIo
.
SlaveID
,
configIo
.
GetIOAddr
());
//UpdateDoValue(ioType, ioValue);
}
else
if
(
StoreManager
.
Config
.
StoreDOList
.
ContainsKey
(
ioType
))
{
ConfigIO
configIo
=
StoreManager
.
Config
.
StoreDOList
[
ioType
];
ioValue
=
KNDManager
.
GetDOValue
(
configIo
.
DeviceName
,
configIo
.
SlaveID
,
configIo
.
GetIOAddr
());
}
else
{
LogUtil
.
error
(
"没有DO="
+
ioType
);
}
return
ioValue
;
}
#
endregion
}
/// <summary>
/// <summary>
/// 康奈德IO控制模块
/// 康奈德IO控制模块
/// </summary>
/// </summary>
...
@@ -30,6 +73,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -30,6 +73,8 @@ namespace OnlineStore.DeviceLibrary
private
static
object
DOMapLock
=
""
;
private
static
object
DOMapLock
=
""
;
public
static
System
.
Timers
.
Timer
timer
=
null
;
public
static
System
.
Timers
.
Timer
timer
=
null
;
private
static
ushort
port
=
502
;
private
static
ushort
port
=
502
;
public
static
void
ConnectionIP
(
string
ioIp
)
public
static
void
ConnectionIP
(
string
ioIp
)
{
{
if
(
timer
==
null
)
if
(
timer
==
null
)
...
@@ -80,7 +125,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -80,7 +125,7 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
10
);
Thread
.
Sleep
(
10
);
//读取所有的DO
//读取所有的DO
ReadMultipleDO
(
ioIp
,
DefualtSlaveID
,
DoStartAddress
,
Auto
StoreManager
.
Config
.
GetDOLength
(
ioIp
));
ReadMultipleDO
(
ioIp
,
DefualtSlaveID
,
DoStartAddress
,
StoreManager
.
Config
.
GetDOLength
(
ioIp
));
}
}
catch
(
Exception
error
)
catch
(
Exception
error
)
...
@@ -192,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -192,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
foreach
(
string
key
in
mastMap
.
Keys
)
foreach
(
string
key
in
mastMap
.
Keys
)
{
{
byte
[]
data
=
new
byte
[]
{
0
,
0
};
byte
[]
data
=
new
byte
[]
{
0
,
0
};
WriteMultipleDO
(
key
,
DefualtSlaveID
,
DoStartAddress
,
Auto
StoreManager
.
Config
.
GetDOLength
(
key
),
data
);
WriteMultipleDO
(
key
,
DefualtSlaveID
,
DoStartAddress
,
StoreManager
.
Config
.
GetDOLength
(
key
),
data
);
}
}
}
}
...
@@ -209,7 +254,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -209,7 +254,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
void
CloseAllDO
(
string
ioIp
,
byte
slaveId
)
public
static
void
CloseAllDO
(
string
ioIp
,
byte
slaveId
)
{
{
ushort
length
=
Auto
StoreManager
.
Config
.
GetDOLength
(
ioIp
);
ushort
length
=
StoreManager
.
Config
.
GetDOLength
(
ioIp
);
byte
[]
bytes
=
new
byte
[
length
];
byte
[]
bytes
=
new
byte
[
length
];
for
(
int
i
=
0
;
i
<
length
;
i
++)
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
{
...
@@ -394,7 +439,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -394,7 +439,7 @@ namespace OnlineStore.DeviceLibrary
{
{
try
try
{
{
ushort
DILength
=
Auto
StoreManager
.
Config
.
GetDILength
(
ioIp
);
ushort
DILength
=
StoreManager
.
Config
.
GetDILength
(
ioIp
);
string
finalData
=
""
;
string
finalData
=
""
;
if
(
values
.
Length
==
2
&&
DILength
.
Equals
(
16
))
if
(
values
.
Length
==
2
&&
DILength
.
Equals
(
16
))
{
{
...
@@ -444,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -444,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
private
static
void
SaveDOData
(
string
ioIp
,
ushort
ID
,
byte
[]
values
)
private
static
void
SaveDOData
(
string
ioIp
,
ushort
ID
,
byte
[]
values
)
{
{
ushort
DoLength
=
Auto
StoreManager
.
Config
.
GetDOLength
(
ioIp
);
ushort
DoLength
=
StoreManager
.
Config
.
GetDOLength
(
ioIp
);
string
finalData
=
""
;
string
finalData
=
""
;
if
(
values
.
Length
==
2
&&
DoLength
.
Equals
(
16
))
if
(
values
.
Length
==
2
&&
DoLength
.
Equals
(
16
))
{
{
...
...
source/DeviceLibrary/PanasonicServo/ACCMDManager.cs
查看文件 @
6522a61
...
@@ -11,8 +11,18 @@ namespace OnlineStore.DeviceLibrary
...
@@ -11,8 +11,18 @@ namespace OnlineStore.DeviceLibrary
/// 0132h 原点接近传感器输入 (HOME) 状态 ReadOnly 0: 输入 OFF 1: 输入 ON
/// 0132h 原点接近传感器输入 (HOME) 状态 ReadOnly 0: 输入 OFF 1: 输入 ON
/// </summary>
/// </summary>
public
static
string
Home_Single
=
"0132"
;
public
static
string
Home_Single
=
"0132"
;
//
//
/// <summary>
/// 0022h 负方向驱动禁止输入(NOT) ReadOnly 0: 输入 OFF、 1: 输入 ON
/// </summary>
public
static
string
Limit_Negative_Single
=
"0022"
;
/// <summary>
/// <summary>
/// 0023h 正方向驱动禁止输入(POT) ReadOnly 0: 输入 OFF、 1: 输入 ON
/// </summary>
public
static
string
Limit_Positive_Single
=
"0023"
;
/// <summary>
///速度 4601
///速度 4601
/// </summary>
/// </summary>
public
static
string
Speed_Addr
=
"4601"
;
public
static
string
Speed_Addr
=
"4601"
;
...
...
source/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
6522a61
...
@@ -496,6 +496,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -496,6 +496,21 @@ namespace OnlineStore.DeviceLibrary
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
}
public
static
int
GetLimitNegativeSingle
(
string
portName
,
int
slvAddr
)
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Negative_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
100
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
public
static
int
GetLimitPositiveSingle
(
string
portName
,
int
slvAddr
)
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Positive_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
100
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
}
}
/// <summary>
/// <summary>
/// 记录最后一次获得的寄存器的值
/// 记录最后一次获得的寄存器的值
...
...
source/DeviceLibrary/ShuoKe/ShuoKeControls.cs
查看文件 @
6522a61
using
log4net
;
using
log4net
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO.Ports
;
using
System.IO.Ports
;
...
@@ -241,6 +242,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -241,6 +242,23 @@ namespace OnlineStore.DeviceLibrary
byte
[]
sendData
=
WriteData
(
slvAddr
,
ShuoKeCMD
.
HomeMove
,
0x01
,
homeType
);
byte
[]
sendData
=
WriteData
(
slvAddr
,
ShuoKeCMD
.
HomeMove
,
0x01
,
homeType
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
}
}
public
static
void
SetConfigSpeed
(
AUTO_SA_Config
Config
)
{
ShuoKeControls
.
SetSpeed
(
Config
.
CompressAxis_Slv
,
ShuoKeCMD
.
SetAddSpeed
,
Config
.
CompressAxis_AddSpeed
);
Thread
.
Sleep
(
60
);
ShuoKeControls
.
SetSpeed
(
Config
.
CompressAxis_Slv
,
ShuoKeCMD
.
SetDelSpeed
,
Config
.
CompressAxis_DelSpeed
);
Thread
.
Sleep
(
60
);
ShuoKeControls
.
SetSpeed
(
Config
.
CompressAxis_Slv
,
ShuoKeCMD
.
SetEndSpeed
,
Config
.
CompressAxis_EndSpeed
);
Thread
.
Sleep
(
60
);
ShuoKeControls
.
SetSpeed
(
Config
.
CompressAxis_Slv
,
ShuoKeCMD
.
SetHomeSpeed
,
Config
.
CompressAxis_HomeSpeed
);
Thread
.
Sleep
(
60
);
ShuoKeControls
.
SetSpeed
(
Config
.
CompressAxis_Slv
,
ShuoKeCMD
.
SetMaxSpeed
,
Config
.
CompressAxis_MaxSpeed
);
Thread
.
Sleep
(
60
);
ShuoKeControls
.
SetSpeed
(
Config
.
CompressAxis_Slv
,
ShuoKeCMD
.
SetStartSpeed
,
Config
.
CompressAxis_StartSpeed
);
}
public
static
void
VolMove
(
int
slvAddr
,
int
speed
)
public
static
void
VolMove
(
int
slvAddr
,
int
speed
)
{
{
byte
[]
sendData
=
WriteData
(
slvAddr
,
ShuoKeCMD
.
VolMove
,
0x04
,
speed
);
byte
[]
sendData
=
WriteData
(
slvAddr
,
ShuoKeCMD
.
VolMove
,
0x04
,
speed
);
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
6522a61
...
@@ -11,8 +11,8 @@ DI,料盘宽度检测1,WidthCheck1,208,192.168.200.10,0,料盘宽度检测1,X09,DI-09,0,
...
@@ -11,8 +11,8 @@ DI,料盘宽度检测1,WidthCheck1,208,192.168.200.10,0,料盘宽度检测1,X09,DI-09,0,
DI,料盘宽度检测2,WidthCheck2,209,192.168.200.10,0,料盘宽度检测2,X10,DI-10,0,
DI,料盘宽度检测2,WidthCheck2,209,192.168.200.10,0,料盘宽度检测2,X10,DI-10,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial ,210,192.168.200.10,0,料盘检测1(上料机构),X11,DI-11,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial ,210,192.168.200.10,0,料盘检测1(上料机构),X11,DI-11,0,
DI,上料机构出料检测,OutCheck,211,192.168.200.10,0,上料机构出料检测,X12,DI-12,0,
DI,上料机构出料检测,OutCheck,211,192.168.200.10,0,上料机构出料检测,X12,DI-12,0,
DI,门锁气缸打开端,Door_Open,212,192.168.200.10,0,门锁气缸打开端,X13,DI-13,0,
DI,门锁气缸打开端,
Auto
Door_Open,212,192.168.200.10,0,门锁气缸打开端,X13,DI-13,0,
DI,门锁气缸关闭端,Door_Close,213,192.168.200.10,0,门锁气缸关闭端,X14,DI-14,0,
DI,门锁气缸关闭端,
Auto
Door_Close,213,192.168.200.10,0,门锁气缸关闭端,X14,DI-14,0,
DI,料盘检测2(料叉机构),TrayCheck_Fixture,214,192.168.200.10,0,料盘检测2(料叉机构),X15,DI-15,0,
DI,料盘检测2(料叉机构),TrayCheck_Fixture,214,192.168.200.10,0,料盘检测2(料叉机构),X15,DI-15,0,
DI,压紧机构计量检测,CompressAxis_Check,215,192.168.200.10,0,压紧机构计量检测,X16,DI-16,0,
DI,压紧机构计量检测,CompressAxis_Check,215,192.168.200.10,0,压紧机构计量检测,X16,DI-16,0,
DO,自动指示灯,AutoRun_HddLed,100,192.168.200.10,0,自动指示灯,Y01,DO-01,0,
DO,自动指示灯,AutoRun_HddLed,100,192.168.200.10,0,自动指示灯,Y01,DO-01,0,
...
@@ -27,8 +27,8 @@ DO,进料口门上升SOL,Door_Up,108,192.168.200.10,0,进料口门上升SOL,Y09,DO-09,0,
...
@@ -27,8 +27,8 @@ DO,进料口门上升SOL,Door_Up,108,192.168.200.10,0,进料口门上升SOL,Y09,DO-09,0,
DO,进料口门下降SOL,Door_Down,109,192.168.200.10,0,进料口门下降SOL,Y10,DO-10,0,
DO,进料口门下降SOL,Door_Down,109,192.168.200.10,0,进料口门下降SOL,Y10,DO-10,0,
DO,吸盘气缸上升SOL,SuckingDisc_Up,110,192.168.200.10,0,吸盘气缸上升SOL,Y11,DO-11,0,
DO,吸盘气缸上升SOL,SuckingDisc_Up,110,192.168.200.10,0,吸盘气缸上升SOL,Y11,DO-11,0,
DO,吸盘气缸下降SOL,SuckingDisc_Down,111,192.168.200.10,0,吸盘气缸下降SOL,Y12,DO-12,0,
DO,吸盘气缸下降SOL,SuckingDisc_Down,111,192.168.200.10,0,吸盘气缸下降SOL,Y12,DO-12,0,
DO,门锁气缸打开SOL,Door_Open,112,192.168.200.10,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸打开SOL,
Auto
Door_Open,112,192.168.200.10,0,门锁气缸打开SOL,Y13,DO-13,0,
DO,门锁气缸关闭SOL,Door_Close,113,192.168.200.10,0,门锁气缸关闭SOL,Y14,DO-14,0,
DO,门锁气缸关闭SOL,
Auto
Door_Close,113,192.168.200.10,0,门锁气缸关闭SOL,Y14,DO-14,0,
,,,114,192.168.200.10,0,,Y15,DO-15,0,
,,,114,192.168.200.10,0,,Y15,DO-15,0,
,,,115,192.168.200.10,0,,Y16,DO-16,0,
,,,115,192.168.200.10,0,,Y16,DO-16,0,
DI,上料机构门关闭,DoorClose_LoadMaterial,200,192.168.200.11,0,上料机构门关闭,X17,DI-21,0,
DI,上料机构门关闭,DoorClose_LoadMaterial,200,192.168.200.11,0,上料机构门关闭,X17,DI-21,0,
...
@@ -125,11 +125,7 @@ PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,,
...
@@ -125,11 +125,7 @@ PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制归零速度(原点返回速度),CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制归零速度(原点返回速度),CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,, ,
,,,,,,,,,,
,,,,,,,,,,
PRO,模拟量IO模块的IP地址,AIDevice_IP,192.168.200.12,,,,,,,
PRO,(轴五)自动轴目标速度,AutoAxis_TargetSpeed,50,,,,,,,
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,2500,,,,,,,
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,2500,,,,,,,
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,2500,,,,,,,
PRO,(轴五)自动轴目标速度,AutoAxis_TargetSpeed,1000,,,,,,,
PRO,(轴五)自动轴加速度,AutoAxis_AddSpeed,300,,,,,,,
PRO,(轴五)自动轴加速度,AutoAxis_AddSpeed,300,,,,,,,
PRO,(轴五)自动轴减速度,AutoAxis_DelSpeed,300,,,,,,,
PRO,(轴五)自动轴减速度,AutoAxis_DelSpeed,300,,,,,,,
PRO,(轴五)自动轴原点低速,AutoAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴五)自动轴原点低速,AutoAxis_HomeLowSpeed,20,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
6522a61
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
6522a61
...
@@ -144,7 +144,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -144,7 +144,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
wait
.
WaitType
==
2
)
else
if
(
wait
.
WaitType
==
2
)
{
{
wait
.
IsEnd
=
KNDIOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
wait
.
IsEnd
=
KND
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
{
{
...
@@ -165,11 +165,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -165,11 +165,7 @@ namespace OnlineStore.DeviceLibrary
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
else
if
(
wait
.
WaitType
==
7
)
}
else
if
(
wait
.
WaitType
==
7
)
{
{
wait
.
IsEnd
=
(
wait
.
HeightValue
.
Equals
(
GetHeight
()));
//wait.IsEnd = (wait.HeightValue.Equals(GetHeight()));
if
(
wait
.
IsEnd
)
{
LogUtil
.
info
(
"等待height="
+
wait
.
HeightValue
+
"完成"
);
}
}
}
else
if
(
wait
.
WaitType
==
5
)
else
if
(
wait
.
WaitType
==
5
)
{
{
...
@@ -256,7 +252,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -256,7 +252,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动入库【"
+
posId
+
"】出错,找不到库位信息"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动入库【"
+
posId
+
"】出错,找不到库位信息"
);
return
;
return
;
}
}
if
(
KNDIOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动入库【"
+
posId
+
"】出错,叉子料盘检测有料"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动入库【"
+
posId
+
"】出错,叉子料盘检测有料"
);
return
;
return
;
...
@@ -407,8 +403,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -407,8 +403,8 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P2_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
//关闭舱门
//关闭舱门
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
}
}
else
else
{
{
...
@@ -424,8 +420,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -424,8 +420,8 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P2
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_P3
,
Config
.
UpDownAxis_P3_Speed
);
//关闭舱门
//关闭舱门
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
Door_Up
,
IO_VALUE
.
LOW
);
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_09_MoveToBag
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_09_MoveToBag
)
{
{
...
@@ -444,7 +440,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -444,7 +440,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_10_LocationCylinder_Down
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SI_10_LocationCylinder_Down
)
{
{
//KNDIOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
//KND
.
IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
InStoreLog
(
"入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) "
);
InStoreLog
(
"入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_DeviceToBag
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_11_DeviceToBag
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P3
,
Config
.
InOutAxis_P3_Speed
);
...
@@ -528,7 +524,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -528,7 +524,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动出库【"
+
posId
+
"】出错,找不到库位信息"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动出库【"
+
posId
+
"】出错,找不到库位信息"
);
return
;
return
;
}
}
if
(
KNDIOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
KND
.
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动出库【"
+
posId
+
"】出错,叉子料盘检测有料"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 启动出库【"
+
posId
+
"】出错,叉子料盘检测有料"
);
return
;
return
;
...
@@ -646,7 +642,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -646,7 +642,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
Middle_Axis
,
moveP
.
Middle_P1
,
Config
.
MiddleAxis_P1_Speed
);
//此处需要等待box门口没有盘
//此处需要等待box门口没有盘
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
TrayCheck_Door
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitHeight
(
0
));
//
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
//打开舱门
//打开舱门
OpenDoorAndWait
();
OpenDoorAndWait
();
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_2, IO_VALUE.LOW));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_2, IO_VALUE.LOW));
...
@@ -705,7 +701,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -705,7 +701,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_WaitTake
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_14_WaitTake
);
OutStoreLog
(
"出库:SO_14_WaitTake 等待拿走物品,最多等待10000"
);
OutStoreLog
(
"出库:SO_14_WaitTake 等待拿走物品,最多等待10000"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
10000
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitHeight
(
0
));
//
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove
.
OneWaitCanEndStep
=
true
;
StoreMove
.
OneWaitCanEndStep
=
true
;
}
}
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
else
if
(
StoreMove
.
MoveStep
==
StoreMoveStep
.
SO_14_WaitTake
)
...
@@ -735,15 +731,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -735,15 +731,15 @@ namespace OnlineStore.DeviceLibrary
}
}
public
bool
InOutAxisCanMove
()
public
bool
InOutAxisCanMove
()
{
{
if
(
Auto
StoreManager
.
Store
.
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
if
(
StoreManager
.
Store
.
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
{
return
true
;
return
true
;
}
}
if
(
KNDIOValue
(
IO_Type
.
LocationCylinder_Down
).
Equals
(
IO_VALUE
.
HIGH
)
if
(
KND
.
IOValue
(
IO_Type
.
LocationCylinder_Down
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KNDIOValue
(
IO_Type
.
LocationCylinder_Up
).
Equals
(
IO_VALUE
.
LOW
)
&&
KND
.
IOValue
(
IO_Type
.
LocationCylinder_Up
).
Equals
(
IO_VALUE
.
LOW
)
&&
KNDIOValue
(
IO_Type
.
LocationCylinder2_Down
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KND
.
IOValue
(
IO_Type
.
LocationCylinder2_Down
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KNDIOValue
(
IO_Type
.
LocationCylinder2_Up
).
Equals
(
IO_VALUE
.
LOW
))
&&
KND
.
IOValue
(
IO_Type
.
LocationCylinder2_Up
).
Equals
(
IO_VALUE
.
LOW
))
{
{
return
true
;
return
true
;
}
}
...
@@ -753,8 +749,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -753,8 +749,8 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
Config
.
IsHasLocationCylinder
>=
1
)
if
(
Config
.
IsHasLocationCylinder
>=
1
)
{
{
KNDIOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder2_Up
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder2_Up
,
IO_VALUE
.
HIGH
));
...
@@ -765,8 +761,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -765,8 +761,8 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
Config
.
IsHasLocationCylinder
>=
1
)
if
(
Config
.
IsHasLocationCylinder
>=
1
)
{
{
KNDIOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
);
KNDIOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
);
KND
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder2_Down
,
IO_VALUE
.
HIGH
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
LocationCylinder2_Down
,
IO_VALUE
.
HIGH
));
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
0 → 100644
查看文件 @
6522a61
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
0 → 100644
查看文件 @
6522a61
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/acSingleStore/
AC
StoreManager.cs
→
source/DeviceLibrary/acSingleStore/StoreManager.cs
查看文件 @
6522a61
...
@@ -11,8 +11,15 @@ using System.Windows.Forms;
...
@@ -11,8 +11,15 @@ using System.Windows.Forms;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
public
class
Auto
StoreManager
public
class
StoreManager
{
{
/// <summary>
/// 当前出入库的模式
/// </summary>
public
static
int
CurrInOutType
=
0
;
private
static
string
api_communication
=
"service/store/communication"
;
//流水线状态通信接口
private
static
string
api_communication
=
"service/store/communication"
;
//流水线状态通信接口
private
static
string
api_nextFeeder
=
"service/store/nextFeeder"
;
// 出库站位列表切换接口
private
static
string
api_nextFeeder
=
"service/store/nextFeeder"
;
// 出库站位列表切换接口
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
...
@@ -20,7 +27,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -20,7 +27,7 @@ namespace OnlineStore.DeviceLibrary
public
static
AUTO_SA_Config
Config
=
null
;
public
static
AUTO_SA_Config
Config
=
null
;
private
static
bool
isInit
=
false
;
private
static
bool
isInit
=
false
;
public
static
bool
IsConnectServer
=!
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
).
Equals
(
""
);
public
static
bool
IsConnectServer
=!
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
).
Equals
(
""
);
public
Auto
StoreManager
()
public
StoreManager
()
{
{
}
}
public
static
bool
OpenShuoKe
(
AC_SA_BoxBean
box
)
public
static
bool
OpenShuoKe
(
AC_SA_BoxBean
box
)
...
@@ -95,10 +102,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -95,10 +102,9 @@ namespace OnlineStore.DeviceLibrary
CSVPositionReader
<
AutoStorePosition
>.
ReloadCSVFile
(
positionConfigFile
);
CSVPositionReader
<
AutoStorePosition
>.
ReloadCSVFile
(
positionConfigFile
);
}
}
Config
=
(
AUTO_SA_Config
)
storeConfig
;
Config
=
(
AUTO_SA_Config
)
storeConfig
;
AC_SA_BoxBean
storeBean
=
new
AC_SA_BoxBean
(
Config
);
Store
=
new
AC_SA_BoxBean
(
Config
);
storeBean
.
CID
=
CID
;
Store
.
CID
=
CID
;
LogUtil
.
info
(
LOGGER
,
"加载料仓完成!"
);
LogUtil
.
info
(
LOGGER
,
"加载料仓完成!"
);
Store
=
storeBean
;
return
Store
;
return
Store
;
}
}
}
}
...
...
source/DeviceLibrary/store/
KTK
_DeviceBase.cs
→
source/DeviceLibrary/store/
AC
_DeviceBase.cs
查看文件 @
6522a61
...
@@ -10,7 +10,7 @@ using System.Text;
...
@@ -10,7 +10,7 @@ using System.Text;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
public
abstract
class
KTK
_DeviceBase
public
abstract
class
AC
_DeviceBase
{
{
/// <summary>
/// <summary>
/// 料仓单个调试状态(默认不是调试状态)
/// 料仓单个调试状态(默认不是调试状态)
...
@@ -53,13 +53,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -53,13 +53,15 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(!
isInit
)
if
(!
isInit
)
{
{
StoreMove
=
new
StoreMoveInfo
(
Store
ID
);
StoreMove
=
new
StoreMoveInfo
(
Store
Name
);
mainTimer
=
new
System
.
Timers
.
Timer
();
mainTimer
=
new
System
.
Timers
.
Timer
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
mainTimer
.
Interval
=
300
;
mainTimer
.
Interval
=
300
;
mainTimer
.
Elapsed
+=
timersTimer_Elapsed
;
mainTimer
.
Elapsed
+=
timersTimer_Elapsed
;
mainTimer
.
AutoReset
=
true
;
mainTimer
.
AutoReset
=
true
;
isInit
=
true
;
isInit
=
true
;
}
}
}
}
...
...
source/DeviceLibrary/store/
KTK
_Store.cs
→
source/DeviceLibrary/store/
AC
_Store.cs
查看文件 @
6522a61
...
@@ -3,6 +3,7 @@ using OnlineStore.Common;
...
@@ -3,6 +3,7 @@ using OnlineStore.Common;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -14,24 +15,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -14,24 +15,14 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 康泰克单台自动料仓
/// 康泰克单台自动料仓
/// </summary>
/// </summary>
public
abstract
class
KTK_Store
:
KTK
_DeviceBase
public
abstract
class
AC_Store
:
AC
_DeviceBase
{
{
public
KTK
_Store
()
public
AC
_Store
()
{
{
}
}
/// <summary>
public
Stopwatch
runTimeWatch
=
new
Stopwatch
();
/// 开始运行的时间
/// </summary>
public
DateTime
StartTime
{
get
;
set
;
}
public
DateTime
statusTime
=
DateTime
.
Now
;
/// <summary>
/// 伺服运行时间列表,key=轴,key=开始时间,value=结束时间
/// </summary>
//public Dictionary<int, Dictionary<DateTime, DateTime>> AxisRunTimeMap = new Dictionary<int, Dictionary<DateTime, DateTime>>();
//public Dictionary<int, DateTime> AxisLastStartTime = new Dictionary<int, DateTime>();
/// <summary>
/// <summary>
/// 最后一次气压检测变为0的时间
/// 最后一次气压检测变为0的时间
/// </summary>
/// </summary>
...
@@ -60,8 +51,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -60,8 +51,7 @@ namespace OnlineStore.DeviceLibrary
public
object
lastDiListLock
=
""
;
public
object
lastDiListLock
=
""
;
public
void
addLastDI
(
string
type
,
IO_VALUE
value
)
public
void
addLastDI
(
string
type
,
IO_VALUE
value
)
{
{
try
try
{
{
lock
(
lastDiListLock
)
lock
(
lastDiListLock
)
...
@@ -78,45 +68,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -78,45 +68,14 @@ namespace OnlineStore.DeviceLibrary
LOGGER
.
Error
(
ex
.
ToString
());
LOGGER
.
Error
(
ex
.
ToString
());
}
}
}
}
/// <summary>
/// 获取料仓运行的时间
/// </summary>
/// <returns></returns>
public
TimeSpan
GetStoreRunTime
()
{
if
(
StartTime
!=
null
)
{
return
DateTime
.
Now
-
StartTime
;
}
else
{
return
new
TimeSpan
(
0
);
}
}
protected
void
AddAxisMoveTime
(
ConfigMoveAxis
axis
)
{
//int axisNo = axis.GetAxisValue();
//if (AxisLastStartTime.ContainsKey(axisNo))
//{
// AxisLastStartTime.Remove(axisNo);
//}
//AxisLastStartTime.Add(axisNo, DateTime.Now);
}
/// <summary>
/// <summary>
/// 运动处理
/// 运动处理
/// </summary>
/// </summary>
protected
bool
isInPro
=
false
;
protected
bool
isInPro
=
false
;
protected
virtual
void
BusyMoveProcess
()
protected
virtual
void
BusyMoveProcess
()
{
{
//if (isInPro)
//{
// return;
//}
isInPro
=
true
;
isInPro
=
true
;
try
try
{
{
...
@@ -226,8 +185,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -226,8 +185,7 @@ namespace OnlineStore.DeviceLibrary
{
{
moveAxis
.
TargetPosition
=
0
;
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
LOGGER
,
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
LogUtil
.
debug
(
LOGGER
,
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
AddAxisMoveTime
(
moveAxis
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
}
}
...
@@ -237,8 +195,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -237,8 +195,7 @@ namespace OnlineStore.DeviceLibrary
protected
void
ACAxisMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
protected
void
ACAxisMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
{
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
moveAxis
.
TargetPosition
=
targetPosition
;
moveAxis
.
TargetPosition
=
targetPosition
;
AddAxisMoveTime
(
moveAxis
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
}
}
...
@@ -309,44 +266,33 @@ namespace OnlineStore.DeviceLibrary
...
@@ -309,44 +266,33 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
protected
bool
ACHomeMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
out
string
msg
)
protected
bool
ACHomeMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
out
string
msg
)
{
{
msg
=
""
;
msg
=
""
;
if
(
ACServerManager
.
IsHomeMoveEnd
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
())
)
if
(
ACServerManager
.
IsHomeMoveEnd
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
()))
{
{
//原点完成并且位置=0
//原点完成并且位置=0
int
outCount
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
int
outCount
=
ACServerManager
.
GetActualtPosition
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
int
errorCount
=
Math
.
Abs
(
outCount
);
int
errorCount
=
Math
.
Abs
(
outCount
);
if
(
errorCount
>
moveAxis
.
CanErrorCountMax
)
if
(
errorCount
<=
moveAxis
.
CanErrorCountMax
)
{
{
//判断是否需要重新运动
return
true
;
if
(
StoreMove
.
CanWhileCount
>
0
)
{
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
//LogUtil.error(LOGGER, StoreName + moveAxis.DisplayStr + "重新回原点");
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
StoreMove
.
CanWhileCount
--;
}
else
{
msg
=
StoreName
+
" storeMoveStep="
+
StoreMove
.
MoveStep
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
LOGGER
,
msg
);
return
false
;
}
}
}
else
//判断是否需要重新运动
if
(
StoreMove
.
CanWhileCount
>
0
)
{
{
return
true
;
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
StoreMove
.
CanWhileCount
--;
}
}
return
true
;
else
{
msg
=
StoreName
+
" storeMoveStep="
+
StoreMove
.
MoveStep
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
LOGGER
,
msg
);
}
}
}
return
false
;
return
false
;
}
}
protected
bool
AxisCountClear
(
ConfigMoveAxis
moveAxis
)
{
return
true
;
}
}
}
...
...
source/DeviceLibrary/store/LineAlarm.cs
查看文件 @
6522a61
...
@@ -37,6 +37,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -37,6 +37,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
static
int
CompressAxisAlarm
=
14
;
public
static
int
CompressAxisAlarm
=
14
;
/// <summary>
/// <summary>
/// 轴五(自动轴)报警
/// </summary>
public
static
int
AutoAxisAlarm
=
20
;
/// <summary>
/// 轴异常停止(没有走到对应的位置就停止)
/// 轴异常停止(没有走到对应的位置就停止)
/// </summary>
/// </summary>
public
static
int
AxisErrorStop
=
15
;
public
static
int
AxisErrorStop
=
15
;
...
...
source/DeviceLibrary/store/StoreMoveStep.cs
查看文件 @
6522a61
...
@@ -307,10 +307,102 @@ namespace OnlineStore.DeviceLibrary
...
@@ -307,10 +307,102 @@ namespace OnlineStore.DeviceLibrary
SI_14_GoBack
=
214
,
SI_14_GoBack
=
214
,
#
endregion
#
endregion
#
region
自动上下料机构复位
/// <summary>
/// 关闭门锁
/// </summary>
AUTO_R01_CloseDoor
=
1101
,
/// <summary>
/// 自动轴原点返回
/// </summary>
AUTO_R02_AutoAxisHome
=
1102
,
/// <summary>
/// 检测机构内是否有料盘
/// </summary>
AUTO_R03_AutoAxisHome
=
1103
,
/// <summary>
/// 上料轴返回0点
/// </summary>
AUTO_R04_AutoBack
=
1104
,
#
endregion
#
region
自动上下料上料功能
/// <summary>
/// 先上升到料盘检测1(上料机构)信号亮
/// </summary>
AUTO_I01_MoveToUp
,
/// <summary>
/// 吸盘下降
/// </summary>
AUTO_I02_SuckingDisc_Down
,
/// <summary>
/// 吸盘吸料盘
/// </summary>
AUTO_I03_SuckingDisc_Work
,
/// <summary>
/// 吸盘上升 ,同时上料轴也要上升
/// </summary>
AUTO_I04_SuckingDisc_Up
,
/// <summary>
/// 扫码
/// </summary>
AUTO_I05_ScanCode
,
/// <summary>
/// 等待料盘被叉子拿走
/// </summary>
AUTO_I06_WaitTrayLeave
,
/// <summary>
/// 打开仓门
/// </summary>
AUTO_I07_OpenDoor
,
/// <summary>
/// 等待拿走料盘
/// </summary>
AUTO_I08_WaitTakeTray
,
/// <summary>
/// 料盘已手动拿走,需要等一秒钟后关闭仓门
/// </summary>
AUTO_I09_TrayLeaveWaitTime
,
/// <summary>
/// 关闭仓门
/// </summary>
AUTO_I10_CloseDoor
,
#
endregion
#
region
自动上下料出料功能
/// <summary>
/// 吸盘吸走料盘,同时上料轴开始上升
/// </summary>
AUTO_O01_SuckingDisc_Work
,
/// <summary>
/// 等待1秒后吸盘下降
/// </summary>
AUTO_O02_WaitTimeDown
,
/// <summary>
/// 吸盘下降
/// </summary>
AUTO_O03_SuckingDisc_Down
,
/// <summary>
/// 放下料盘
/// </summary>
AUTO_O04_PutTrayDown
,
#
endregion
}
}
public
enum
StoreAlarmType
public
enum
StoreAlarmType
...
...
source/DeviceLibrary/store/model/StoreMoveInfo.cs
查看文件 @
6522a61
...
@@ -18,12 +18,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -18,12 +18,12 @@ namespace OnlineStore.DeviceLibrary
/// 超时时间
/// 超时时间
/// </summary>
/// </summary>
public
int
TimeOutSeconds
=
60
;
public
int
TimeOutSeconds
=
60
;
public
StoreMoveInfo
(
int
storeId
)
public
StoreMoveInfo
(
string
deviceName
)
{
{
moveType
=
StoreMoveType
.
None
;
moveType
=
StoreMoveType
.
None
;
MoveParam
=
new
InOutStoreParam
();
MoveParam
=
new
InOutStoreParam
();
this
.
storeId
=
storeId
;
this
.
DeviceName
=
deviceName
;
this
.
moveStep
=
StoreMoveStep
.
Wait
;
this
.
moveStep
=
StoreMoveStep
.
Wait
;
IsInWait
=
false
;
IsInWait
=
false
;
MoveNum
=
0
;
MoveNum
=
0
;
...
@@ -54,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -54,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 当前运动是哪个料仓
/// 当前运动是哪个料仓
/// </summary>
/// </summary>
public
int
storeId
{
get
;
set
;
}
public
string
DeviceName
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 是否再当前步骤等待中
/// 是否再当前步骤等待中
...
@@ -144,6 +144,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -144,6 +144,7 @@ namespace OnlineStore.DeviceLibrary
{
{
private
WaitResultInfo
()
private
WaitResultInfo
()
{
{
IsEnd
=
false
;
}
}
public
static
WaitResultInfo
WaitIO
(
string
ioType
,
IO_VALUE
ioValue
)
public
static
WaitResultInfo
WaitIO
(
string
ioType
,
IO_VALUE
ioValue
)
...
@@ -233,14 +234,65 @@ namespace OnlineStore.DeviceLibrary
...
@@ -233,14 +234,65 @@ namespace OnlineStore.DeviceLibrary
return
wait
;
return
wait
;
}
}
public
static
WaitResultInfo
WaitHeight
(
int
height
)
//public static WaitResultInfo WaitHeight(int height)
//{
// WaitResultInfo wait = new WaitResultInfo();
// wait.WaitType = 7;
// wait.HeightValue = height;
// wait.IsEnd = false;
// return wait;
//}
/// <summary>
/// 等待轴的反限位为指定值
/// </summary>
public
static
WaitResultInfo
WaitAxistNegativeLimit
(
ConfigMoveAxis
moveAxis
,
IO_VALUE
ioValue
)
{
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
7
;
wait
.
CanWhileMoveCount
=
0
;
wait
.
HeightValue
=
height
;
wait
.
WaitType
=
8
;
wait
.
AxisInfo
=
moveAxis
;
wait
.
IsHomeMove
=
true
;
wait
.
IoValue
=
ioValue
;
wait
.
IsEnd
=
false
;
wait
.
IsEnd
=
false
;
return
wait
;
return
wait
;
}
}
/// <summary>
/// 等待轴的正限位为指定值
/// </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>
/// 等待上料轴运动 停止
/// </summary>
/// <returns></returns>
public
static
WaitResultInfo
WaitAutoAxisStop
(
ConfigMoveAxis
moveAxis
)
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
CanWhileMoveCount
=
0
;
wait
.
AxisInfo
=
moveAxis
;
wait
.
WaitType
=
10
;
wait
.
IsHomeMove
=
true
;
wait
.
IsEnd
=
false
;
return
wait
;
}
public
static
WaitResultInfo
WaitCodeOK
()
{
WaitResultInfo
wait
=
new
WaitResultInfo
();
wait
.
WaitType
=
11
;
return
wait
;
}
public
string
ToStr
()
public
string
ToStr
()
{
{
if
(
WaitType
==
1
)
if
(
WaitType
==
1
)
...
@@ -273,10 +325,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -273,10 +325,26 @@ namespace OnlineStore.DeviceLibrary
else
if
(
WaitType
==
6
)
else
if
(
WaitType
==
6
)
{
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】ORG信号:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
7
)
}
else
if
(
WaitType
==
7
)
{
{
return
"料盘高度【"
+
HeightValue
+
"】 "
;
return
"料盘高度【"
+
HeightValue
+
"】 "
;
}
}
else
if
(
WaitType
==
8
)
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】负限位:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
9
)
{
return
"轴【"
+
AxisInfo
.
DisplayStr
+
"】正限位:【"
+
IoValue
+
"】 "
;
}
else
if
(
WaitType
==
10
)
{
return
"上料轴运动停止 "
;
}
else
if
(
WaitType
==
11
)
{
return
"等待扫码结束"
;
}
else
else
{
{
return
"Wait位置类型:WaitType=【"
+
WaitType
+
"】"
;
return
"Wait位置类型:WaitType=【"
+
WaitType
+
"】"
;
...
@@ -288,6 +356,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -288,6 +356,8 @@ namespace OnlineStore.DeviceLibrary
public
int
CanWhileMoveCount
{
get
;
set
;
}
public
int
CanWhileMoveCount
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 等待结果,1=轴运动,2=IO运动,3=时间,4=电钢,5=硕科电机,6=等待轴原点信号
/// 等待结果,1=轴运动,2=IO运动,3=时间,4=电钢,5=硕科电机,6=等待轴原点信号
/// 7=等待高度为0,8=等待轴的负限位,9=等待轴的正限位。10=上料轴运动停止
/// 11=扫码结束。
/// </summary>
/// </summary>
public
int
WaitType
{
get
;
set
;
}
public
int
WaitType
{
get
;
set
;
}
/// <summary>
/// <summary>
...
...
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
查看文件 @
6522a61
...
@@ -471,27 +471,27 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -471,27 +471,27 @@ namespace OnlineStore.LoadCSVLibrary
public
string
Humiture_Port
{
get
;
set
;
}
public
string
Humiture_Port
{
get
;
set
;
}
/// <summary>
///
//
<summary>
/// PRO 模拟量IO模块的IP地址 AIDevice_IP 192.168.200.11
///
//
PRO 模拟量IO模块的IP地址 AIDevice_IP 192.168.200.11
/// </summary>
///
//
</summary>
[
ConfigProAttribute
(
"AIDevice_IP"
,
true
)]
//
[ConfigProAttribute("AIDevice_IP", true)]
public
string
AIDevice_IP
{
get
;
set
;
}
//
public string AIDevice_IP { get; set; }
/// <summary>
///
//
<summary>
/// PRO,模拟信号1默认高度,AIDI1_DefaultPosition,1,,,,,,,
///
//
PRO,模拟信号1默认高度,AIDI1_DefaultPosition,1,,,,,,,
/// </summary>
///
//
</summary>
[
ConfigProAttribute
(
"AIDI1_DefaultPosition"
,
true
)]
//
[ConfigProAttribute("AIDI1_DefaultPosition", true)]
public
double
AIDI1_DefaultPosition
{
get
;
set
;
}
//
public double AIDI1_DefaultPosition { get; set; }
/// <summary>
///
//
<summary>
/// PRO,模拟信号2默认高度,AIDI2_DefaultPosition,1,,,,,,,
///
//
PRO,模拟信号2默认高度,AIDI2_DefaultPosition,1,,,,,,,
/// </summary>
///
//
</summary>
[
ConfigProAttribute
(
"AIDI2_DefaultPosition"
,
true
)]
//
[ConfigProAttribute("AIDI2_DefaultPosition", true)]
public
double
AIDI2_DefaultPosition
{
get
;
set
;
}
//
public double AIDI2_DefaultPosition { get; set; }
/// <summary>
///
//
<summary>
/// PRO,模拟信号3默认高度,AIDI3_DefaultPosition,1,,,,,,,
///
//
PRO,模拟信号3默认高度,AIDI3_DefaultPosition,1,,,,,,,
/// </summary>
///
//
</summary>
[
ConfigProAttribute
(
"AIDI3_DefaultPosition"
,
true
)]
//
[ConfigProAttribute("AIDI3_DefaultPosition", true)]
public
double
AIDI3_DefaultPosition
{
get
;
set
;
}
//
public double AIDI3_DefaultPosition { get; set; }
/// <summary>
/// <summary>
...
@@ -647,8 +647,8 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -647,8 +647,8 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDIList
.
Add
(
IO_Type
.
WidthCheck2
);
MustHaveDIList
.
Add
(
IO_Type
.
WidthCheck2
);
MustHaveDIList
.
Add
(
IO_Type
.
TrayCheck_LoadMaterial
);
MustHaveDIList
.
Add
(
IO_Type
.
TrayCheck_LoadMaterial
);
MustHaveDIList
.
Add
(
IO_Type
.
OutCheck
);
MustHaveDIList
.
Add
(
IO_Type
.
OutCheck
);
MustHaveDIList
.
Add
(
IO_Type
.
Door_Open
);
MustHaveDIList
.
Add
(
IO_Type
.
Auto
Door_Open
);
MustHaveDIList
.
Add
(
IO_Type
.
Door_Close
);
MustHaveDIList
.
Add
(
IO_Type
.
Auto
Door_Close
);
MustHaveDIList
.
Add
(
IO_Type
.
TrayCheck_Fixture
);
MustHaveDIList
.
Add
(
IO_Type
.
TrayCheck_Fixture
);
MustHaveDIList
.
Add
(
IO_Type
.
CompressAxis_Check
);
MustHaveDIList
.
Add
(
IO_Type
.
CompressAxis_Check
);
...
@@ -671,8 +671,8 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -671,8 +671,8 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList
.
Add
(
IO_Type
.
Door_Down
);
MustHaveDOList
.
Add
(
IO_Type
.
Door_Down
);
MustHaveDOList
.
Add
(
IO_Type
.
SuckingDisc_Up
);
MustHaveDOList
.
Add
(
IO_Type
.
SuckingDisc_Up
);
MustHaveDOList
.
Add
(
IO_Type
.
SuckingDisc_Down
);
MustHaveDOList
.
Add
(
IO_Type
.
SuckingDisc_Down
);
MustHaveDOList
.
Add
(
IO_Type
.
Door_Open
);
MustHaveDOList
.
Add
(
IO_Type
.
Auto
Door_Open
);
MustHaveDOList
.
Add
(
IO_Type
.
Door_Close
);
MustHaveDOList
.
Add
(
IO_Type
.
Auto
Door_Close
);
}
}
public
static
void
ConfigAxis
(
AUTO_SA_Config
Config
)
public
static
void
ConfigAxis
(
AUTO_SA_Config
Config
)
{
{
...
...
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
查看文件 @
6522a61
...
@@ -138,11 +138,11 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -138,11 +138,11 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// 门锁气缸打开端 Door_Open X13 DI-13
/// 门锁气缸打开端 Door_Open X13 DI-13
/// </summary>
/// </summary>
public
static
string
Door_Open
=
"Door_Open"
;
public
static
string
Auto
Door_Open
=
"Door_Open"
;
/// <summary>
/// <summary>
/// 门锁气缸关闭端 Door_Close X14 DI-14
/// 门锁气缸关闭端 Door_Close X14 DI-14
/// </summary>
/// </summary>
public
static
string
Door_Close
=
"Door_Close"
;
public
static
string
Auto
Door_Close
=
"Door_Close"
;
/// <summary>
/// <summary>
/// 料盘检测2(料叉机构) TrayCheck_Fixture X15 DI-15
/// 料盘检测2(料叉机构) TrayCheck_Fixture X15 DI-15
/// </summary>
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论