Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 279e5762
由
renym1968
编写于
2018-11-26 12:52:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
同步
1 个父辈
122c4d64
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
48 行增加
和
11 行删除
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
279e576
...
@@ -39,7 +39,8 @@
...
@@ -39,7 +39,8 @@
<Reference Include="CodeLibrary">
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
</Reference>
<Reference Include="halcondotnet">
<Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
</Reference>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
279e576
...
@@ -145,11 +145,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -145,11 +145,15 @@ namespace OnlineStore.DeviceLibrary
moveAxisList
.
Add
(
Config
.
Middle_Axis
);
moveAxisList
.
Add
(
Config
.
Middle_Axis
);
moveAxisList
.
Add
(
Config
.
UpDown_Axis
);
moveAxisList
.
Add
(
Config
.
UpDown_Axis
);
moveAxisList
.
Add
(
Config
.
InOut_Axis
);
moveAxisList
.
Add
(
Config
.
InOut_Axis
);
//2018-11-22
moveAxisList
.
Add
(
Config
.
Charging_Axis
);
this
.
AxisAlarmCodeMap
=
new
Dictionary
<
string
,
AxisAlarmInfo
>();
this
.
AxisAlarmCodeMap
=
new
Dictionary
<
string
,
AxisAlarmInfo
>();
this
.
AxisAlarmCodeMap
.
Add
(
Config
.
UpDown_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
this
.
AxisAlarmCodeMap
.
Add
(
Config
.
UpDown_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
this
.
AxisAlarmCodeMap
.
Add
(
Config
.
InOut_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
this
.
AxisAlarmCodeMap
.
Add
(
Config
.
InOut_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
this
.
AxisAlarmCodeMap
.
Add
(
this
.
Config
.
Middle_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
this
.
AxisAlarmCodeMap
.
Add
(
this
.
Config
.
Middle_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
//add 2018-11-22
if
(
this
.
Config
.
Charging_Axis
!=
null
)
this
.
AxisAlarmCodeMap
.
Add
(
this
.
Config
.
Charging_Axis
.
DeviceName
,
new
AxisAlarmInfo
());
}
}
/// <summary>
/// <summary>
...
@@ -256,7 +260,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -256,7 +260,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_M_H_TOP1_InOutToP1
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_M_H_TOP1_InOutToP1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态,进出轴到P1,判断叉子没有料盘"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"到待机状态,进出轴到P1,判断叉子没有料盘"
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
//判断叉子没有料盘
//判断叉子没有料盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
}
}
...
@@ -297,7 +301,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -297,7 +301,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
WarnMsg
=
""
;
WarnMsg
=
""
;
if
(!
RunAxis
(
true
))
if
(!
RunAxis
(
true
))
////打开四个轴
////打开四个轴
//if (!OpenAllAxis())
//if (!OpenAllAxis())
{
{
...
@@ -452,7 +456,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -452,7 +456,7 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
IsHasCompress_Axis
)
if
(
IsHasCompress_Axis
)
{
{
LogUtil
.
debug
(
"压紧轴绝对运动目标位置:"
+
targetPosition
);
LogUtil
.
debug
(
"压紧轴绝对运动目标位置:"
+
targetPosition
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
targetPosition
,
false
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitShuoKe
(
Config
.
CompressAxis_Slv
,
targetPosition
,
false
));
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
targetPosition
);
ShuoKeControls
.
AbsMove
(
Config
.
CompressAxis_Slv
,
targetPosition
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
...
@@ -622,7 +626,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -622,7 +626,7 @@ namespace OnlineStore.DeviceLibrary
public
void
CloseAllAxis
()
public
void
CloseAllAxis
()
{
{
LogUtil
.
info
(
StoreName
+
"关闭刹车,关闭伺服"
);
LogUtil
.
info
(
StoreName
+
"关闭刹车,关闭伺服"
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
foreach
(
ConfigMoveAxis
axis
in
moveAxisList
)
foreach
(
ConfigMoveAxis
axis
in
moveAxisList
)
{
{
...
@@ -700,7 +704,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -700,7 +704,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
"轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
"轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
StopMove
(
true
);
StopMove
(
true
);
}
}
else
if
(
alarmType
==
StoreAlarmType
.
SuddenStop
)
else
if
(
alarmType
==
StoreAlarmType
.
SuddenStop
)
{
{
...
@@ -717,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -717,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 "
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 "
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
StopMove
(
true
);
StopMove
(
true
);
storeStatus
=
StoreStatus
.
SuddenStop
;
storeStatus
=
StoreStatus
.
SuddenStop
;
}
}
//if (alarmType != StoreAlarmType.IoSingleTimeOut)
//if (alarmType != StoreAlarmType.IoSingleTimeOut)
...
@@ -754,7 +758,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -754,7 +758,7 @@ namespace OnlineStore.DeviceLibrary
TimerProcess
();
TimerProcess
();
ShowTimeLog
(
"TimerProcess"
);
ShowTimeLog
(
"TimerProcess"
);
//检查运动轴报警
//检查运动轴报警
if
(
storeRunStatus
>
StoreRunStatus
.
Wait
&&
(!
isInSuddenDown
)
&&
(!
isNoAirCheck
))
if
(
storeRunStatus
>
StoreRunStatus
.
Wait
&&
(!
isInSuddenDown
)
&&
(!
isNoAirCheck
))
{
{
ShowTimeLog
(
"开始检测轴报警"
);
ShowTimeLog
(
"开始检测轴报警"
);
CheckAxisAlarm
();
CheckAxisAlarm
();
...
@@ -928,7 +932,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -928,7 +932,7 @@ namespace OnlineStore.DeviceLibrary
{
{
//取新的Io状态
//取新的Io状态
IO_VALUE
autoSingle
=
KNDIOValue
(
IO_Type
.
AutoRun_Single
);
IO_VALUE
autoSingle
=
KNDIOValue
(
IO_Type
.
AutoRun_Single
);
if
(
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
)
.
Equals
(
1
))
if
(
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
)
.
Equals
(
1
))
{
{
if
(
autoSingle
.
Equals
(
IO_VALUE
.
HIGH
)
&&
lastAutoRun
.
Equals
(
IO_VALUE
.
LOW
))
if
(
autoSingle
.
Equals
(
IO_VALUE
.
HIGH
)
&&
lastAutoRun
.
Equals
(
IO_VALUE
.
LOW
))
{
{
...
@@ -1005,7 +1009,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1005,7 +1009,7 @@ namespace OnlineStore.DeviceLibrary
//}
//}
}
}
private
object
safetyInProcess
=
""
;
private
object
safetyInProcess
=
""
;
/// <summary>
/// <summary>
/// 光栅处理
/// 光栅处理
/// </summary>
/// </summary>
...
@@ -1018,6 +1022,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1018,6 +1022,7 @@ namespace OnlineStore.DeviceLibrary
//遮挡光栅信号
//遮挡光栅信号
if
(
KNDIOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
LOW
))
if
(
KNDIOValue
(
IO_Type
.
SafetyLightCurtains
).
Equals
(
IO_VALUE
.
LOW
))
{
{
if
(
NeedCheckSafetyLight
.
Equals
(
1
))
if
(
NeedCheckSafetyLight
.
Equals
(
1
))
{
{
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
))
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
))
...
@@ -1036,6 +1041,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1036,6 +1041,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
if
(
NeedCheckSafetyLight
.
Equals
(
2
))
if
(
NeedCheckSafetyLight
.
Equals
(
2
))
{
{
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
))
if
(
StoreMove
.
MoveType
.
Equals
(
StoreMoveType
.
OutStore
)
&&
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_10_DeviceToDoor
))
...
@@ -1051,6 +1057,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1051,6 +1057,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"光栅处理出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"光栅处理出错:"
+
ex
.
ToString
());
...
@@ -1059,6 +1066,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1059,6 +1066,8 @@ namespace OnlineStore.DeviceLibrary
{
{
Monitor
.
Exit
(
safetyInProcess
);
Monitor
.
Exit
(
safetyInProcess
);
}
}
}
}
}
}
public
void
TimerProcess
()
public
void
TimerProcess
()
...
@@ -1497,9 +1506,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1497,9 +1506,13 @@ namespace OnlineStore.DeviceLibrary
//}
//}
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
List
<
string
>
codeList
=
CodeManager
.
CameraScan
();
foreach
(
string
str
in
codeList
)
foreach
(
string
str
in
codeList
)
{
{
message
=
message
+
"=1+0x0-7x"
+
height
+
" ="
+
str
+
spiltStr
;
message
=
message
+
"=1+0x0-7x"
+
height
+
" ="
+
str
+
spiltStr
;
}
}
if
(!
outMsg
.
Equals
(
""
))
if
(!
outMsg
.
Equals
(
""
))
{
{
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
279e576
...
@@ -192,6 +192,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -192,6 +192,7 @@ namespace OnlineStore.DeviceLibrary
NotOkMsg
+=
""
+
info
.
ToShowStr
();
NotOkMsg
+=
""
+
info
.
ToShowStr
();
}
}
ShuoKeControls
.
GetStatus
(
wait
.
SlvAddr
);
ShuoKeControls
.
GetStatus
(
wait
.
SlvAddr
);
}
}
}
}
...
@@ -774,6 +775,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -774,6 +775,28 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
#
endregion
#
endregion
#
region
自动上料上料机构处理
public
void
ChargingLoad
()
{
//1、上料门是否关闭
if
(
KNDIOValue
(
IO_Type
.
Load_DoorClose
).
Equals
(
IO_VALUE
.
HIGH
))
//上料门关闭
{
//2、 进/料轴是否退回
//3、吸盘在最高端
if
(
KNDIOValue
(
IO_Type
.
Chuck_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
}
//if (KNDIOValue(IO_Type.Load_DoorClose).Equals(IO_VALUE.HIGH))
//通过读伺服线圈信息,判断伺服在最高位置还是在最低位置
int
value
=
ACServerManager
.
GetNotStatus
(
Config
.
Charging_Axis
.
DeviceName
,
Config
.
Charging_Axis
.
GetAxisValue
());
//4、判断上料机构是否在最高点? 是---》无料盘 TrayCheck_Door
//5、是否检测到料盘?检测到,不运行;检测不到伺服运行
//电机运动 ACAxisMove(Config.Charging_Axis, ??, Config.Charging_Axis.TargetSpeed);
}
}
#
endregion
public
List
<
FixtureCodeInfo
>
waitOutStoreList
=
new
List
<
FixtureCodeInfo
>();
public
List
<
FixtureCodeInfo
>
waitOutStoreList
=
new
List
<
FixtureCodeInfo
>();
public
object
waitOutListLock
=
""
;
public
object
waitOutListLock
=
""
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论