Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2fff9226
由
LN
编写于
2019-10-14 09:11:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加DeviceType
1 个父辈
459a7efc
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
201 行增加
和
85 行删除
dll/CodeLibrary.dll
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/MoveEquip.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/model/KTK_Store.cs
source/DeviceLibrary/model/StoreStep.cs
source/LoadCVSLibrary/storeConfig/config/DischargeLine_Config.cs
source/LoadCVSLibrary/storeConfig/config/FeedingEquip_Config.cs
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
source/LoadCVSLibrary/storeConfig/config/Line_Config.cs
source/LoadCVSLibrary/storeConfig/config/MoveEquip_Config.cs
source/LoadCVSLibrary/storeConfig/config/ProvidingEquip_Config.cs
source/LoadCVSLibrary/storeConfig/config/StoreConfig.cs
dll/CodeLibrary.dll
查看文件 @
2fff922
此文件类型无法预览
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
2fff922
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
查看文件 @
2fff922
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
2fff922
...
@@ -42,13 +42,18 @@ namespace OnlineStore.DeviceLibrary
...
@@ -42,13 +42,18 @@ namespace OnlineStore.DeviceLibrary
BaseTimerProcess
();
BaseTimerProcess
();
}
}
public
override
void
Alarm
(
LineAlarmType
alarmType
,
string
alarmDetial
,
string
alarmMsg
,
LineMoveType
storeMoveType
)
public
override
void
Alarm
(
LineAlarmType
alarmType
)
{
{
if
(
this
.
alarmType
.
Equals
(
alarmType
))
if
(
this
.
alarmType
.
Equals
(
alarmType
))
{
{
return
;
return
;
}
}
this
.
alarmType
=
alarmType
;
this
.
alarmType
=
alarmType
;
if
(
alarmType
.
Equals
(
LineAlarmType
.
SuddenStop
)
||
alarmType
.
Equals
(
LineAlarmType
.
NoAirCheck
))
{
StopMove
();
}
}
}
/// <summary>
/// <summary>
/// 运动处理
/// 运动处理
...
@@ -106,13 +111,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -106,13 +111,10 @@ namespace OnlineStore.DeviceLibrary
private
void
BaseTimerProcess
()
private
void
BaseTimerProcess
()
{
{
if
(
isInPro
)
TimeSpan
span
=
DateTime
.
Now
-
lastProTimer
;
if
(
isInPro
&&
span
.
TotalSeconds
<
20
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
lastAirCloseTime
;
return
;
if
(
span
.
TotalSeconds
<
20
)
{
return
;
}
}
}
isInPro
=
true
;
isInPro
=
true
;
lastProTimer
=
DateTime
.
Now
;
lastProTimer
=
DateTime
.
Now
;
...
@@ -123,10 +125,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -123,10 +125,7 @@ namespace OnlineStore.DeviceLibrary
isInPro
=
false
;
isInPro
=
false
;
return
;
return
;
}
}
BusyMoveProcess
();
TimerProcess
();
TimerProcess
();
IOTimeOutProcess
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -168,22 +167,25 @@ namespace OnlineStore.DeviceLibrary
...
@@ -168,22 +167,25 @@ namespace OnlineStore.DeviceLibrary
}
}
public
void
ChangeDebug
(
bool
isDebug
)
public
void
ChangeDebug
(
bool
isDebug
)
{
{
if
(
isDebug
)
if
(
baseConfig
.
DType
.
Equals
(
DeviceType
.
MoveEquip
)
||
baseConfig
.
DType
.
Equals
(
DeviceType
.
ProvidingEquip
)
)
{
{
IsDebug
=
true
;
if
(
isDebug
)
//两个阻挡气缸下降
{
lineStatus
=
LineStatus
.
Debugging
;
IsDebug
=
true
;
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
//两个阻挡气缸下降
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
lineStatus
=
LineStatus
.
Debugging
;
LogInfo
(
"从正常状态切换到调试状态!"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
}
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
else
if
(
lineStatus
.
Equals
(
LineStatus
.
Debugging
))
LogInfo
(
"从正常状态切换到调试状态!"
);
{
}
IsDebug
=
false
;
else
if
(
lineStatus
.
Equals
(
LineStatus
.
Debugging
))
lineStatus
=
LineStatus
.
StoreOnline
;
{
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
IsDebug
=
false
;
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
lineStatus
=
LineStatus
.
StoreOnline
;
LogInfo
(
"从调试状态切换到正常状态!"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
LogInfo
(
"从调试状态切换到正常状态!"
);
}
}
}
}
}
...
@@ -194,30 +196,36 @@ namespace OnlineStore.DeviceLibrary
...
@@ -194,30 +196,36 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
internal
void
OpenStopCylinder
()
internal
void
OpenStopCylinder
()
{
{
LogInfo
(
"下降阻挡气缸,上下气缸上升,顶升气缸下降"
);
if
(
baseConfig
.
DType
.
Equals
(
DeviceType
.
MoveEquip
)
||
baseConfig
.
DType
.
Equals
(
DeviceType
.
ProvidingEquip
))
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
//上下气缸上升
if
(
UseAxis
.
Equals
(
false
))
{
{
IOMove
(
IO_Type
.
UpDownCylinder_Down
,
IO_VALUE
.
LOW
);
LogInfo
(
"下降阻挡气缸,上下气缸上升,顶升气缸下降"
);
IOMove
(
IO_Type
.
UpDownCylinder_Up
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
//上下气缸上升
if
(
UseAxis
.
Equals
(
false
))
{
IOMove
(
IO_Type
.
UpDownCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
UpDownCylinder_Up
,
IO_VALUE
.
HIGH
);
}
//顶升气缸下降
IOMove
(
IO_Type
.
TopCylinder_UP
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
TopCylinder_Down
,
IO_VALUE
.
HIGH
);
}
}
//顶升气缸下降
IOMove
(
IO_Type
.
TopCylinder_UP
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
TopCylinder_Down
,
IO_VALUE
.
HIGH
);
}
}
internal
void
CloseCylinderStop
()
internal
void
CloseCylinderStop
()
{
{
LogInfo
(
"上升阻挡气缸,关闭上下气缸,顶升气缸IO"
);
if
(
baseConfig
.
DType
.
Equals
(
DeviceType
.
MoveEquip
)
||
baseConfig
.
DType
.
Equals
(
DeviceType
.
ProvidingEquip
))
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
{
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
LogInfo
(
"上升阻挡气缸,关闭上下气缸,顶升气缸IO"
);
//上下气缸上升
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
UpDownCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
UpDownCylinder_Up
,
IO_VALUE
.
LOW
);
//上下气缸上升
//顶升气缸下降
IOMove
(
IO_Type
.
UpDownCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
TopCylinder_UP
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
UpDownCylinder_Up
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
TopCylinder_Down
,
IO_VALUE
.
LOW
);
//顶升气缸下降
IOMove
(
IO_Type
.
TopCylinder_UP
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
TopCylinder_Down
,
IO_VALUE
.
LOW
);
}
}
}
#
region
伺服运动
#
region
伺服运动
...
@@ -292,7 +300,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -292,7 +300,7 @@ namespace OnlineStore.DeviceLibrary
ACServerManager
.
ServoOff
(
portName
,
slvAddr
);
ACServerManager
.
ServoOff
(
portName
,
slvAddr
);
WarnMsg
=
Name
+
"打开轴"
+
axis
.
Explain
+
"失败 "
;
WarnMsg
=
Name
+
"打开轴"
+
axis
.
Explain
+
"失败 "
;
LogUtil
.
info
(
Name
+
WarnMsg
);
LogUtil
.
info
(
Name
+
WarnMsg
);
Alarm
(
LineAlarmType
.
AxisAlarm
,
5.
ToString
(),
WarnMsg
,
MoveInfo
.
MoveType
);
Alarm
(
LineAlarmType
.
AxisAlarm
);
return
false
;
return
false
;
}
}
}
}
...
@@ -444,7 +452,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -444,7 +452,7 @@ namespace OnlineStore.DeviceLibrary
{
{
isOk
=
false
;
isOk
=
false
;
WarnMsg
=
msg
;
WarnMsg
=
msg
;
Alarm
(
LineAlarmType
.
AxisMoveError
,
5.
ToString
(),
WarnMsg
,
moveInfo
.
MoveType
);
Alarm
(
LineAlarmType
.
AxisMoveError
);
break
;
break
;
}
}
}
}
...
@@ -474,7 +482,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -474,7 +482,7 @@ namespace OnlineStore.DeviceLibrary
{
{
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
ConfigIO
io
=
baseConfig
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
Name
+
"等待"
+
NotOkMsg
+
" 超时"
;
WarnMsg
=
Name
+
"等待"
+
NotOkMsg
+
" 超时"
;
Alarm
(
LineAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
MoveInfo
.
MoveType
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
13
);
LogUtil
.
error
(
MoveInfo
.
Name
+
WarnMsg
,
13
);
}
}
else
if
(
rwSpan
.
TotalSeconds
>
3
&&
span
.
TotalSeconds
>
3
)
else
if
(
rwSpan
.
TotalSeconds
>
3
&&
span
.
TotalSeconds
>
3
)
...
@@ -540,7 +548,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -540,7 +548,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待["
+
NotOkMsg
WarnMsg
=
moveInfo
.
Name
+
"["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]等待["
+
NotOkMsg
+
"]超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
+
"]超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
18
);
LogUtil
.
error
(
WarnMsg
,
18
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
,
""
,
WarnMsg
,
moveInfo
.
MoveType
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
2fff922
...
@@ -78,6 +78,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -78,6 +78,7 @@ namespace OnlineStore.DeviceLibrary
public
override
void
TimerProcess
()
public
override
void
TimerProcess
()
{
{
BusyMoveProcess
();
//判断流水线打开了才可以运行
//判断流水线打开了才可以运行
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
...
@@ -88,6 +89,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -88,6 +89,7 @@ namespace OnlineStore.DeviceLibrary
// StartCheckFixture();
// StartCheckFixture();
}
}
}
}
IOTimeOutProcess
();
}
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip.cs
查看文件 @
2fff922
...
@@ -84,7 +84,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -84,7 +84,8 @@ namespace OnlineStore.DeviceLibrary
public
override
void
TimerProcess
()
public
override
void
TimerProcess
()
{
{
BusyMoveProcess
();
//判断流水线打开了才可以运行
//判断流水线打开了才可以运行
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
查看文件 @
2fff922
...
@@ -73,7 +73,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -73,7 +73,8 @@ namespace OnlineStore.DeviceLibrary
}
}
public
override
void
TimerProcess
()
public
override
void
TimerProcess
()
{
{
BusyMoveProcess
();
//判断流水线打开了才可以运行
//判断流水线打开了才可以运行
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
...
...
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
2fff922
...
@@ -52,24 +52,35 @@ namespace OnlineStore.DeviceLibrary
...
@@ -52,24 +52,35 @@ namespace OnlineStore.DeviceLibrary
conTimer
.
Start
();
conTimer
.
Start
();
}
}
}
}
private
bool
isProcess
=
false
;
private
DateTime
lastTime
=
DateTime
.
Now
;
private
void
ConTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
ConTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
lastTime
;
if
(
span
.
TotalMinutes
<
IoIPLIst
.
Count
&&
isProcess
)
{
return
;
}
isProcess
=
true
;
lastTime
=
DateTime
.
Now
;
try
try
{
{
List
<
string
>
list
=
new
List
<
string
>(
IoIPLIst
);
List
<
string
>
list
=
new
List
<
string
>(
IoIPLIst
);
if
(
list
.
Count
>
0
)
if
(
list
.
Count
>
0
)
{
{
LogUtil
.
info
(
"开始重连IO模块 ------------"
);
foreach
(
string
ip
in
list
)
foreach
(
string
ip
in
list
)
{
{
LogUtil
.
info
(
"重连AOI :"
+
ip
);
ConnectionIP
(
ip
);
ConnectionIP
(
ip
);
}
}
LogUtil
.
info
(
"结束重连IO模块 ------------"
);
}
}
GC
.
Collect
();
}
catch
(
Exception
ex
)
}
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"AOI ConTimer_Elapsed 出错: "
+
ex
.
ToString
());
LogUtil
.
error
(
"AOI ConTimer_Elapsed 出错: "
+
ex
.
ToString
());
}
}
isProcess
=
false
;
}
}
public
void
ConnectionIP
(
string
ioIp
)
public
void
ConnectionIP
(
string
ioIp
)
...
@@ -127,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -127,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
//aioBox.Log_RxTx_Event += AioBox_Log_RxTx_Event;
//aioBox.Log_RxTx_Event += AioBox_Log_RxTx_Event;
AIOMap
.
Add
(
ioIp
,
aioBox
);
AIOMap
.
Add
(
ioIp
,
aioBox
);
LogUtil
.
debug
(
"开始连接"
+
logName
+
",尝试重连5
次"
);
LogUtil
.
debug
(
"开始连接"
+
logName
+
",尝试重连3
次"
);
for
(
int
i
=
1
;
i
<=
3
;
i
++)
for
(
int
i
=
1
;
i
<=
3
;
i
++)
{
{
bool
result
=
aioBox
.
Connect
();
bool
result
=
aioBox
.
Connect
();
...
@@ -147,7 +158,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -147,7 +158,8 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
"第【"
+
i
+
"】次连接 "
+
logName
+
" 失败:"
+
aioBox
.
ErrInfo
+
""
);
LogUtil
.
error
(
"第【"
+
i
+
"】次连接 "
+
logName
+
" 失败:"
+
aioBox
.
ErrInfo
+
""
);
}
}
Thread
.
Sleep
(
2
);
Thread
.
Sleep
(
5
);
GC
.
Collect
();
}
}
}
}
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
2fff922
...
@@ -24,9 +24,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -24,9 +24,9 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 初始化摄像机名称和二维码类型
/// 初始化摄像机名称和二维码类型
/// </summary>
/// </summary>
public
static
void
LoadConfig
(
)
public
static
void
LoadConfig
()
{
{
//
string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
//
string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
string
codeStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CodeType
);
string
codeStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CodeType
);
// cameraNameList = new List<string>();
// cameraNameList = new List<string>();
codeTypeList
=
new
List
<
string
>();
codeTypeList
=
new
List
<
string
>();
...
@@ -36,43 +36,73 @@ namespace OnlineStore.DeviceLibrary
...
@@ -36,43 +36,73 @@ namespace OnlineStore.DeviceLibrary
//string[] nameArray = nameStr.Split(spiltChar);
//string[] nameArray = nameStr.Split(spiltChar);
//foreach (string str in nameArray)
//foreach (string str in nameArray)
//{
//{
// LogUtil.info("加载到配置摄像机名称:" + str.Trim());
// if (str.Trim().Equals(""))
// {
// continue;
// }
// //LogUtil.info("加载到配置摄像机名称:" + str.Trim());
// cameraNameList.Add(str.Trim());
// cameraNameList.Add(str.Trim());
//}
//}
string
[]
codeArray
=
codeStr
.
Split
(
spiltChar
);
string
[]
codeArray
=
codeStr
.
Split
(
spiltChar
);
foreach
(
string
str
in
codeArray
)
foreach
(
string
str
in
codeArray
)
{
{
if
(
str
.
Trim
().
Equals
(
""
))
{
continue
;
}
LogUtil
.
info
(
"加载到配置二维码类型:"
+
str
.
Trim
());
LogUtil
.
info
(
"加载到配置二维码类型:"
+
str
.
Trim
());
codeTypeList
.
Add
(
str
.
Trim
());
codeTypeList
.
Add
(
str
.
Trim
());
}
}
LoadCamera
(
false
);
LoadCamera
(
false
);
CodeLibrary
.
HDCodeLearnHelper
.
LoadConfig
(
""
,
codeStr
);
CodeLibrary
.
HDCodeLearnHelper
.
LoadConfig
(
""
,
codeStr
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"解析摄像机配置出错:"
+
ex
.
ToString
()
);
LogUtil
.
error
(
"解析摄像机配置出错:"
+
ex
.
StackTrace
);
}
}
}
}
private
static
void
LoadCamera
(
bool
isReLoad
)
private
static
void
LoadCamera
(
bool
isReLoad
)
{
{
if
(
isReLoad
)
if
(
isReLoad
)
{
{
CodeLibrary
.
HIKCamera
.
Instance
.
Load
();
try
CodeLibrary
.
BaslerCamera
.
Instance
.
Load
();
{
CodeLibrary
.
HIKCamera
.
Instance
.
Load
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"加载HIK相机出错:"
+
ex
.
ToString
());
}
try
{
CodeLibrary
.
BaslerCamera
.
Instance
.
Load
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"加载Basler相机出错:"
+
ex
.
ToString
());
}
}
}
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
string
[]
names
=
CodeLibrary
.
HIKCamera
.
Instance
.
CameraName
;
hikNameList
.
AddRange
(
names
);
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
balserNameList
.
AddRange
(
names
);
if
(
names
!=
null
)
foreach
(
string
name
in
hikNameList
)
{
{
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
hikNameList
.
AddRange
(
names
);
foreach
(
string
name
in
hikNameList
)
{
LogUtil
.
info
(
"加载到HIK相机:"
+
name
);
}
}
}
foreach
(
string
name
in
balserNameList
)
names
=
CodeLibrary
.
BaslerCamera
.
Instance
.
CameraName
;
if
(
names
!=
null
)
{
{
LogUtil
.
info
(
"加载到Balser相机:"
+
name
);
balserNameList
.
AddRange
(
names
);
foreach
(
string
name
in
balserNameList
)
{
LogUtil
.
info
(
"加载到Balser相机:"
+
name
);
}
}
}
}
}
public
static
void
CloseCamera
()
public
static
void
CloseCamera
()
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
2fff922
...
@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
/// 报警
/// 报警
/// </summary>
/// </summary>
/// <param name="alarmType"></param>
/// <param name="alarmType"></param>
public
abstract
void
Alarm
(
LineAlarmType
alarmType
,
string
alarmDetial
,
string
alarmMsg
,
LineMoveType
storeMoveType
);
public
abstract
void
Alarm
(
LineAlarmType
alarmType
);
/// <summary>
/// <summary>
/// 重置(夹料装置状态不变)
/// 重置(夹料装置状态不变)
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
2fff922
...
@@ -472,6 +472,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -472,6 +472,23 @@ namespace OnlineStore.DeviceLibrary
PO_10_BeforeAfterCylinderAfter
=
20010
,
PO_10_BeforeAfterCylinderAfter
=
20010
,
#
endregion
#
endregion
#
region
出料流水线处理,
30000
开始
/// <summary>
/// 出料流水线复位,定位气缸下降
/// </summary>
DL_R_CylinderDown
=
30001
,
/// <summary>
/// 转动皮带开始运行
/// </summary>
DL_R_StartRun
=
30002
,
/// <summary>
/// 皮带线检测处理
/// </summary>
DL_R_LineCheck
=
30100
,
#
endregion
}
}
public
enum
LineAlarmType
public
enum
LineAlarmType
...
...
source/LoadCVSLibrary/storeConfig/config/DischargeLine_Config.cs
查看文件 @
2fff922
...
@@ -16,8 +16,9 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -16,8 +16,9 @@ namespace OnlineStore.LoadCSVLibrary
{
{
}
}
public
DischargeLine_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
public
DischargeLine_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
:
base
(
id
,
cid
,
typ
e
,
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
DischargeLin
e
,
filepath
)
{
{
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/FeedingEquip_Config.cs
查看文件 @
2fff922
...
@@ -16,7 +16,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -16,7 +16,7 @@ namespace OnlineStore.LoadCSVLibrary
{
{
}
}
public
FeedingEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
public
FeedingEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
:
base
(
id
,
cid
,
type
,
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
FeedingEquip
,
filepath
)
{
{
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
查看文件 @
2fff922
...
@@ -331,6 +331,16 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -331,6 +331,16 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// DI 出料皮带线体1急停 DLine_SuddenStop X021
/// </summary>
public
static
string
DLine_SuddenStop
=
"DLine_SuddenStop"
;
/// <summary>
/// DI 出料皮带线体1复位 DLine_Reset X022
/// </summary>
public
static
string
DLine_Reset
=
"DLine_Reset"
;
/// <summary>
/// DI 皮带线1定位检测,Location_Check1, ,X021
/// DI 皮带线1定位检测,Location_Check1, ,X021
/// </summary>
/// </summary>
public
static
string
Location_Check1
=
"Location_Check1"
;
public
static
string
Location_Check1
=
"Location_Check1"
;
...
@@ -381,21 +391,31 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -381,21 +391,31 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// DI 分盘装置1料盘检测,SeparateDevice_Check, ,X033
/// DI 分盘装置1料盘检测,SeparateDevice_Check, ,X033
/// </summary>
/// </summary>
public
static
string
SeparateDevice_Check
=
"SeparateDevice_Check"
;
public
static
string
SeparateDevice_Check
=
"SeparateDevice_Check"
;
/// <summary>
/// DI 出料皮带线体1运行状态 DLine_RunStatus Y021
/// </summary>
public
static
string
DLine_RunStatus
=
"DLine_RunStatus"
;
/// <summary>
/// DI 出料皮带线体1故障状态 DLine_RunAlarm Y022
/// </summary>
public
static
string
DLine_RunAlarm
=
"DLine_RunAlarm"
;
/// <summary>
/// <summary>
/// DO 0 出料皮带线1运转
LineRun_
1,Y021
/// DO 0 出料皮带线1运转
DLine_Run
1,Y021
/// </summary>
/// </summary>
public
static
string
LineRun_1
=
"LineRun_
1"
;
public
static
string
DLine_Run1
=
"DLine_Run
1"
;
/// <summary>
/// <summary>
/// DO 0 出料皮带线2运转
LineRun_
2,Y022
/// DO 0 出料皮带线2运转
DLine_Run
2,Y022
/// </summary>
/// </summary>
public
static
string
LineRun_2
=
"LineRun_
2"
;
public
static
string
DLine_Run2
=
"DLine_Run
2"
;
/// <summary>
/// <summary>
/// DO 0 出料皮带线3运转
LineRun_
3,Y023
/// DO 0 出料皮带线3运转
DLine_Run
3,Y023
/// </summary>
/// </summary>
public
static
string
LineRun_3
=
"LineRun_
3"
;
public
static
string
DLine_Run3
=
"DLine_Run
3"
;
/// <summary>
/// <summary>
/// DO 0 分盘装置电机驱动 SeparateDevice_Run,Y024
/// DO 0 分盘装置电机驱动 SeparateDevice_Run,Y024
/// </summary>
/// </summary>
...
...
source/LoadCVSLibrary/storeConfig/config/Line_Config.cs
查看文件 @
2fff922
...
@@ -25,7 +25,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -25,7 +25,7 @@ namespace OnlineStore.LoadCSVLibrary
/// <param name="type">类型</param>
/// <param name="type">类型</param>
/// <param name="filepath">配置文件</param>
/// <param name="filepath">配置文件</param>
public
Line_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
public
Line_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
:
base
(
id
,
cid
,
typ
e
,
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
Lin
e
,
filepath
)
{
{
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/MoveEquip_Config.cs
查看文件 @
2fff922
...
@@ -16,7 +16,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -16,7 +16,7 @@ namespace OnlineStore.LoadCSVLibrary
{
{
}
}
public
MoveEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
public
MoveEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
:
base
(
id
,
cid
,
type
,
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
MoveEquip
,
filepath
)
{
{
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/ProvidingEquip_Config.cs
查看文件 @
2fff922
...
@@ -16,7 +16,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -16,7 +16,7 @@ namespace OnlineStore.LoadCSVLibrary
{
{
}
}
public
ProvidingEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
public
ProvidingEquip_Config
(
int
id
,
string
cid
,
string
type
,
string
filepath
)
:
base
(
id
,
cid
,
type
,
filepath
)
:
base
(
id
,
cid
,
LoadCSVLibrary
.
DeviceType
.
ProvidingEquip
,
filepath
)
{
{
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/StoreConfig.cs
查看文件 @
2fff922
...
@@ -21,9 +21,9 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -21,9 +21,9 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
/// </summary>
public
string
CID
{
get
;
set
;
}
public
string
CID
{
get
;
set
;
}
/// <summary>
/// <summary>
///
料层
类型
///
设备
类型
/// </summary>
/// </summary>
public
string
Store
Type
{
get
;
set
;
}
public
string
D
Type
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 配置文件路径
/// 配置文件路径
/// </summary>
/// </summary>
...
@@ -75,7 +75,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -75,7 +75,7 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList
=
new
List
<
string
>();
MustHaveDOList
=
new
List
<
string
>();
this
.
Id
=
id
;
this
.
Id
=
id
;
this
.
CID
=
cid
;
this
.
CID
=
cid
;
this
.
Store
Type
=
type
;
this
.
D
Type
=
type
;
this
.
ConfigFilePath
=
filepath
;
this
.
ConfigFilePath
=
filepath
;
}
}
...
@@ -300,4 +300,28 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -300,4 +300,28 @@ namespace OnlineStore.LoadCSVLibrary
return
io
.
DisplayStr
;
return
io
.
DisplayStr
;
}
}
}
}
public
class
DeviceType
{
/// <summary>
/// 流水线线体
/// </summary>
public
static
string
Line
=
"Line"
;
/// <summary>
/// 出入库移栽
/// </summary>
public
static
string
MoveEquip
=
"MoveEquip"
;
/// <summary>
/// 入料模块
/// </summary>
public
static
string
FeedingEquip
=
"FeedingEquip"
;
/// <summary>
/// 出料模块
/// </summary>
public
static
string
ProvidingEquip
=
"ProvidingEquip"
;
/// <summary>
/// 出料流水线
/// </summary>
public
static
string
DischargeLine
=
"DischargeLine"
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论