Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a8c0887a
由
LN
编写于
2020-09-19 07:25:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
复位修改。
1 个父辈
5838f53a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
36 行增加
和
41 行删除
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/store/StoreStep.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a8c0887
...
...
@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
else
{
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
LOW
))
{
{
LogUtil
.
error
(
LOGGER
,
" ("
+
StoreName
+
")启动出现错误:急停没开 !启动失败!"
);
}
else
...
...
@@ -255,8 +255,6 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"开始原点返回,先把进出轴回原点"
);
//设置速度
//SetShuokeSpeed();
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
public
void
MoveToP1
()
...
...
@@ -282,22 +280,18 @@ namespace OnlineStore.DeviceLibrary
{
CurrInOutCount
=
0
;
CurrInOutACount
=
0
;
ClearInoutFail
();
IOManager
.
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
//复位之前先停止运行
if
(
isNeedClearAuto
)
{
autoNext
=
false
;
}
ACServerManager
.
SuddenStop
(
Config
.
Middle_Axis
.
DeviceName
,
Config
.
Middle_Axis
.
GetAxisValue
());
ACServerManager
.
SuddenStop
(
Config
.
UpDown_Axis
.
DeviceName
,
Config
.
UpDown_Axis
.
GetAxisValue
());
ACServerManager
.
SuddenStop
(
Config
.
InOut_Axis
.
DeviceName
,
Config
.
InOut_Axis
.
GetAxisValue
());
ACServerManager
.
SuddenStop
(
Config
.
Middle_Axis
);
ACServerManager
.
SuddenStop
(
Config
.
UpDown_Axis
);
ACServerManager
.
SuddenStop
(
Config
.
InOut_Axis
);
IOManager
.
IOMove
(
IO_Type
.
Alarm_HddLed
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
AutoRun_HddLed
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
RunSign_HddLed
,
IO_VALUE
.
LOW
);
isInSuddenDown
=
false
;
isNoAirCheck
=
false
;
alarmType
=
StoreAlarmType
.
None
;
...
...
@@ -305,27 +299,33 @@ namespace OnlineStore.DeviceLibrary
storeStatus
=
StoreStatus
.
ResetMove
;
StoreMove
.
NewMove
(
StoreMoveType
.
StoreReset
);
SetWarnMsg
();
if
(
IOManager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位失败,急停未开"
);
return
;
}
if
(
IOManager
.
IOValue
(
IO_Type
.
Airpressure_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位失败,没有气压信号"
);
return
;
}
if
(!
RunAxis
(
true
))
////打开四个轴
//if (!OpenAllAxis())
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位时打开轴失败,需要再次复位,直接报警停止复位"
);
return
;
}
mainTimer
.
Enabled
=
false
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_LocationCylinderBack
);
if
(
IsHasCompress_Axis
||
Config
.
IsHasLocationCylinder
.
Equals
(
0
))
{
InoutStartReset
();
//硕科压紧轴回原点
//SetShuokeSpeed();
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
}
else
{
LogUtil
.
info
(
LOGGER
,
StoreName
+
"开始复位:先定位气缸下降"
);
// 复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_LocationCylinderBack
);
LocationDownAndWait
();
}
mainTimer
.
Enabled
=
true
;
isInPro
=
false
;
}
private
void
InoutStartReset
()
...
...
@@ -334,9 +334,9 @@ namespace OnlineStore.DeviceLibrary
int
slvAddr
=
Config
.
InOut_Axis
.
GetAxisValue
();
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中,进出轴开始原点返回"
);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
/// <summary>
/// 复位处理
...
...
@@ -354,39 +354,32 @@ namespace OnlineStore.DeviceLibrary
switch
(
StoreMove
.
MoveStep
)
{
case
StoreMoveStep
.
BOX_H_LocationCylinderBack
:
//StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack);
//ACAxisHomeMove(Config.InOut_Axis);
//LogUtil.info(LOGGER, StoreName + "复位中:进出轴回原点。。");
//StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
InoutStartReset
();
break
;
case
StoreMoveStep
.
BOX_H_InOutMove
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutBack
);
ACAxisHomeMove
(
Config
.
InOut_Axis
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:进出轴开始原点返回"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
break
;
//case StoreMoveStep.BOX_H_InOutMove:
// InoutStartReset();
// break;
case
StoreMoveStep
.
BOX_H_InOutBack
:
Thread
.
Sleep
(
200
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_InOutToP1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:进出轴到待机点P1,关闭舱门"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
//进出轴原点返回完成,将进出轴的位置设置=0
AxisCountClear
(
Config
.
InOut_Axis
);
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
// ComBeforeHomeMove();
//判断叉子没有料盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
ACAxisMove
(
Config
.
InOut_Axis
,
Config
.
InOutAxis_P1_Position
,
Config
.
InOutAxis_P1_Speed
);
CloseDoorAndWait
();
break
;
case
StoreMoveStep
.
BOX_H_InOutToP1
:
//如果此时轴三还在报警,需要提示错误并等待
if
(
ACServerManager
.
GetAlarmStatus
(
Config
.
InOut_Axis
.
DeviceName
,
Config
.
InOut_Axis
.
GetAxisValue
())
>
0
)
{
LogUtil
.
error
(
LOGGER
,
"进出轴报警!复位失败,请检查!"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
"复位["
+
StoreMove
.
MoveStep
+
"]过程中,进出轴报警!复位失败,请检查!"
);
return
;
}
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中: 压紧轴,旋转轴,上下轴开始 原点返回"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_OtherAxisBack
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
if
(
IsHasCompress_Axis
)
{
ACAxisHomeMove
(
Config
.
Comp_Axis
);
...
...
@@ -397,6 +390,7 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
BOX_H_OtherAxisBack
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_H_MiddleAxisToP1
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"
);
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
...
...
@@ -426,6 +420,7 @@ namespace OnlineStore.DeviceLibrary
case
StoreMoveStep
.
BOX_M_H_TOP1_CompressHome
:
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
BOX_M_H_TOP1_OtherAxisToP1
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"复位中:旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ACAxisMove
(
Config
.
Middle_Axis
,
Config
.
MiddleAxis_P1_Position
,
Config
.
MiddleAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
ComMoveToPosition
(
Config
.
CompressAxis_P1_Position
,
Config
.
CompAxis_P1_Speed
);
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
a8c0887
...
...
@@ -125,10 +125,10 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
BOX_H_LocationCylinderBack
=
010
,
/// <summary>
///
料仓原点返回和重置步骤,轴三先相对走3000
/// </summary>
BOX_H_InOutMove
=
011
,
///
//
<summary>
///
// 料仓原点返回和重置步骤,等待开始原点返回
///
//
</summary>
//
BOX_H_InOutMove=011,
/// <summary>
/// 料仓原点返回和重置步骤,,轴三进出轴先返回原点
/// </summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论