Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC30-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d49e19f7
由
几米阳光
编写于
2019-05-09 13:46:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
轴报警时,直接停止运动
1 个父辈
e2cf57d8
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
42 行增加
和
23 行删除
source/Common/util/AcSerialBean.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
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/Common/util/AcSerialBean.cs
查看文件 @
d49e19f
...
@@ -358,7 +358,7 @@ namespace OnlineStore.Common
...
@@ -358,7 +358,7 @@ namespace OnlineStore.Common
if
(
_serialPort
.
IsOpen
)
if
(
_serialPort
.
IsOpen
)
{
{
if
(
Monitor
.
TryEnter
(
lockObj
,
5
))
if
(
Monitor
.
TryEnter
(
lockObj
,
200
))
{
{
try
try
{
{
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
d49e19f
...
@@ -16,7 +16,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -16,7 +16,7 @@ namespace OnlineStore.DeviceLibrary
{
{
public
static
bool
IsShowMsg
=
false
;
public
static
bool
IsShowMsg
=
false
;
private
static
int
SleepMSendons
=
20
;
private
static
int
SleepMSendons
=
20
;
private
static
int
ReviceOutTimeMS
=
100
;
private
static
Dictionary
<
string
,
Dictionary
<
string
,
int
>>
ComAddrValue
=
new
Dictionary
<
string
,
Dictionary
<
string
,
int
>>();
private
static
Dictionary
<
string
,
Dictionary
<
string
,
int
>>
ComAddrValue
=
new
Dictionary
<
string
,
Dictionary
<
string
,
int
>>();
private
static
string
mapObj
=
""
;
private
static
string
mapObj
=
""
;
...
@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary
PreReadCoilAddr
=
ACCMDManager
.
ServerOn_Addr
;
PreReadCoilAddr
=
ACCMDManager
.
ServerOn_Addr
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
PreReadCoilAddr
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
PreReadCoilAddr
,
"0000"
,
1
);
//SendData(portName,dataArray);
//SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
100
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
int
result
=
GetCoilData
(
portName
,
reviceData
,
PreReadCoilAddr
);
int
result
=
GetCoilData
(
portName
,
reviceData
,
PreReadCoilAddr
);
//TODO
//TODO
return
result
>=
1
;
return
result
>=
1
;
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
d49e19f
...
@@ -77,7 +77,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -77,7 +77,7 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
byte
[]
returnData
=
SendCommand
(
portName
,
data
,
50
,
reviceLength
);
byte
[]
returnData
=
SendCommand
(
portName
,
data
,
ReviceOutTimeMS
,
reviceLength
);
string
strSend
=
""
;
string
strSend
=
""
;
for
(
int
i
=
0
;
i
<
returnData
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
returnData
.
Length
;
i
++)
{
{
...
@@ -94,7 +94,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -94,7 +94,7 @@ namespace OnlineStore.DeviceLibrary
{
{
return
;
return
;
}
}
byte
[]
returnData
=
SendCommand
(
portName
,
data
,
50
,
8
);
byte
[]
returnData
=
SendCommand
(
portName
,
data
,
ReviceOutTimeMS
,
8
);
if
(
returnData
!=
null
)
if
(
returnData
!=
null
)
{
{
string
strSend
=
""
;
string
strSend
=
""
;
...
@@ -116,9 +116,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -116,9 +116,9 @@ namespace OnlineStore.DeviceLibrary
/// <returns>返回值的长度</returns>
/// <returns>返回值的长度</returns>
public
static
byte
[]
SendCommand
(
string
portName
,
byte
[]
data
,
int
outTime
,
int
reviceLength
)
public
static
byte
[]
SendCommand
(
string
portName
,
byte
[]
data
,
int
outTime
,
int
reviceLength
)
{
{
if
(
outTime
>
8
0
)
if
(
outTime
<
10
0
)
{
{
outTime
=
8
0
;
outTime
=
10
0
;
}
}
byte
[]
returnData
=
null
;
byte
[]
returnData
=
null
;
...
@@ -148,7 +148,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -148,7 +148,11 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
bean
.
SendCommand
(
data
,
ref
returnData
,
outTime
,
reviceLength
);
int
ret
=
bean
.
SendCommand
(
data
,
ref
returnData
,
outTime
,
reviceLength
);
if
(!
ret
.
Equals
(
reviceLength
))
{
LogUtil
.
error
(
"串口"
+
portName
+
" 写入数据:"
+
strSend
+
",预计返回字节数【"
+
reviceLength
+
"】实际返回【"
+
ret
+
"】"
);
}
System
.
Threading
.
Thread
.
Sleep
(
2
);
System
.
Threading
.
Thread
.
Sleep
(
2
);
}
}
}
}
...
@@ -216,7 +220,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -216,7 +220,7 @@ namespace OnlineStore.DeviceLibrary
public
static
void
OpenAndCloseSTB
(
string
portName
,
int
slvAddr
)
public
static
void
OpenAndCloseSTB
(
string
portName
,
int
slvAddr
)
{
{
OnlyOpenSTB
(
portName
,
slvAddr
);
OnlyOpenSTB
(
portName
,
slvAddr
);
System
.
Threading
.
Thread
.
Sleep
(
1
00
);
System
.
Threading
.
Thread
.
Sleep
(
2
00
);
CloseSTB
(
portName
,
slvAddr
);
CloseSTB
(
portName
,
slvAddr
);
System
.
Threading
.
Thread
.
Sleep
(
SleepMSendons
);
System
.
Threading
.
Thread
.
Sleep
(
SleepMSendons
);
}
}
...
@@ -310,7 +314,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -310,7 +314,7 @@ namespace OnlineStore.DeviceLibrary
PreReadAddr
=
ACCMDManager
.
TargetPostion
;
PreReadAddr
=
ACCMDManager
.
TargetPostion
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadRegisters
,
ACCMDManager
.
TargetPostion
,
"0000"
,
2
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadRegisters
,
ACCMDManager
.
TargetPostion
,
"0000"
,
2
);
// SendData(portName,dataArray);
// SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
100
,
9
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
9
);
return
GetRegisterData
(
portName
,
reviceData
,
ACCMDManager
.
TargetPostion
);
return
GetRegisterData
(
portName
,
reviceData
,
ACCMDManager
.
TargetPostion
);
}
}
...
@@ -323,7 +327,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -323,7 +327,7 @@ namespace OnlineStore.DeviceLibrary
PreReadAddr
=
ACCMDManager
.
ActualPosition
;
PreReadAddr
=
ACCMDManager
.
ActualPosition
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadRegisters
,
ACCMDManager
.
ActualPosition
,
"0000"
,
2
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadRegisters
,
ACCMDManager
.
ActualPosition
,
"0000"
,
2
);
// SendData(portName,dataArray);
// SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
100
,
9
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
9
);
int
result
=
-
1
;
int
result
=
-
1
;
for
(
int
i
=
1
;
i
<=
3
;
i
++)
for
(
int
i
=
1
;
i
<=
3
;
i
++)
...
@@ -375,7 +379,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -375,7 +379,7 @@ namespace OnlineStore.DeviceLibrary
PreReadCoilAddr
=
ACCMDManager
.
Alarm_Status
;
PreReadCoilAddr
=
ACCMDManager
.
Alarm_Status
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
PreReadCoilAddr
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
PreReadCoilAddr
,
"0000"
,
1
);
//SendData(portName,dataArray);
//SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
100
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
PreReadCoilAddr
);
return
GetCoilData
(
portName
,
reviceData
,
PreReadCoilAddr
);
}
}
...
@@ -384,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -384,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
PreReadCoilAddr
=
ACCMDManager
.
BUSYStatus
;
PreReadCoilAddr
=
ACCMDManager
.
BUSYStatus
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
BUSYStatus
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
BUSYStatus
,
"0000"
,
1
);
//SendData(portName,dataArray);
//SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
80
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
BUSYStatus
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
BUSYStatus
);
}
}
...
@@ -393,7 +397,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -393,7 +397,7 @@ namespace OnlineStore.DeviceLibrary
PreReadCoilAddr
=
ACCMDManager
.
HOME_CMP_Status
;
PreReadCoilAddr
=
ACCMDManager
.
HOME_CMP_Status
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
HOME_CMP_Status
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
HOME_CMP_Status
,
"0000"
,
1
);
//SendData(portName,dataArray);
//SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
80
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
HOME_CMP_Status
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
HOME_CMP_Status
);
}
}
...
@@ -401,7 +405,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -401,7 +405,7 @@ namespace OnlineStore.DeviceLibrary
{
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Home_Single
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Home_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
50
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
}
/// <summary>
/// <summary>
...
@@ -411,7 +415,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -411,7 +415,7 @@ namespace OnlineStore.DeviceLibrary
{
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Negative_Single
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Negative_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
50
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
}
/// <summary>
/// <summary>
...
@@ -435,7 +439,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -435,7 +439,7 @@ namespace OnlineStore.DeviceLibrary
{
{
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
PreReadCoilAddr
=
ACCMDManager
.
Home_Single
;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Positive_Single
,
"0000"
,
1
);
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadCoil
,
ACCMDManager
.
Limit_Positive_Single
,
"0000"
,
1
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
50
,
6
);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
6
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
return
GetCoilData
(
portName
,
reviceData
,
ACCMDManager
.
Home_Single
);
}
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
d49e19f
...
@@ -871,6 +871,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -871,6 +871,7 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
"轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
"轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"
);
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
StoreMove
.
EndMove
();
StopMove
(
true
);
StopMove
(
true
);
}
}
else
if
(
alarmType
==
StoreAlarmType
.
SuddenStop
)
else
if
(
alarmType
==
StoreAlarmType
.
SuddenStop
)
...
@@ -1206,6 +1207,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1206,6 +1207,10 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
preProTime
=
DateTime
.
Now
;
preProTime
=
DateTime
.
Now
;
if
(!
alarmType
.
Equals
(
StoreAlarmType
.
None
))
{
return
;
}
if
(!
AutomaticBaiting
.
CanOpenBatchDoor
())
if
(!
AutomaticBaiting
.
CanOpenBatchDoor
())
{
{
return
;
return
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
d49e19f
...
@@ -150,8 +150,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -150,8 +150,9 @@ namespace OnlineStore.DeviceLibrary
{
{
isOk
=
false
;
isOk
=
false
;
WarnMsg
=
msg
;
WarnMsg
=
msg
;
LogUtil
.
info
(
msg
);
//
LogUtil.info(msg);
Alarm
(
StoreAlarmType
.
AxisMoveError
,
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
Alarm
(
StoreAlarmType
.
AxisMoveError
,
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
return
;
break
;
break
;
}
}
}
}
...
@@ -170,6 +171,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -170,6 +171,7 @@ namespace OnlineStore.DeviceLibrary
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
LogUtil
.
error
(
StoreName
+
wait
.
IoType
+
ResourceControl
.
GetString
(
ResourceControl
.
WaitSingle
,
" 等待信号"
)
+
"("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") "
+
ResourceControl
.
GetString
(
ResourceControl
.
TimeOut
,
"超时"
),
14
);
LogUtil
.
error
(
StoreName
+
wait
.
IoType
+
ResourceControl
.
GetString
(
ResourceControl
.
WaitSingle
,
" 等待信号"
)
+
"("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") "
+
ResourceControl
.
GetString
(
ResourceControl
.
TimeOut
,
"超时"
),
14
);
isOk
=
false
;
isOk
=
false
;
return
;
break
;
break
;
}
}
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
d49e19f
...
@@ -487,7 +487,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -487,7 +487,7 @@ namespace OnlineStore.DeviceLibrary
addHeight
=
StoreManager
.
Config
.
LastTrayAddHeight
;
addHeight
=
StoreManager
.
Config
.
LastTrayAddHeight
;
}
}
LastHeight
+=
addHeight
;
LastHeight
+=
addHeight
;
LogUtil
.
debug
(
Name
+
"入料: 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后高度【"
+
LastHeight
+
"】"
);
string
msg
=
Name
+
" 计算盘高:上升前【"
+
StartMovePosition
+
"】实时【"
+
EndMovePosition
+
"】补充【"
+
addHeight
+
"】计算后【"
+
LastHeight
+
"】"
;
if
(
LastHeight
<
0
)
if
(
LastHeight
<
0
)
{
{
LastHeight
=
StoreManager
.
Config
.
GetDefaultHeight
();
LastHeight
=
StoreManager
.
Config
.
GetDefaultHeight
();
...
@@ -516,6 +516,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -516,6 +516,7 @@ namespace OnlineStore.DeviceLibrary
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
LastHeight
=
(
int
)
Math
.
Ceiling
(
1F
*
LastHeight
/
4
)
*
4
;
}
}
}
}
LogUtil
.
info
(
msg
+
",归类为"
+
LastHeight
);
return
LastHeight
;
return
LastHeight
;
}
}
private
static
List
<
AutoStorePosition
>
AllPosList
=
null
;
private
static
List
<
AutoStorePosition
>
AllPosList
=
null
;
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
d49e19f
...
@@ -90,7 +90,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -90,7 +90,12 @@ namespace OnlineStore.DeviceLibrary
NotOkMsg
=
wait
.
ToStr
();
NotOkMsg
=
wait
.
ToStr
();
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
AxisMove_1
)
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
AxisMove_1
)
{
{
wait
.
IsEnd
=
AxisMoveISEnd
(
wait
);
bool
isAlarm
=
false
;
wait
.
IsEnd
=
AxisMoveISEnd
(
wait
,
ref
isAlarm
);
if
(
isAlarm
)
{
return
;
}
}
}
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
IOMove_2
)
else
if
(
wait
.
WaitType
==
(
int
)
Wait_Type
.
IOMove_2
)
{
{
...
@@ -156,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -156,7 +161,7 @@ namespace OnlineStore.DeviceLibrary
{
{
StoreMove
.
EndStepWait
();
StoreMove
.
EndStepWait
();
}
}
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
StoreMove
.
TimeOutSeconds
)
{
{
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"]"
+
ResourceControl
.
GetString
(
ResourceControl
.
TimeOut
,
"超时"
)
+
" ["
+
NotOkMsg
+
"]["
+
Math
.
Round
(
span
.
TotalSeconds
,
0
)
+
"秒]"
;
WarnMsg
=
"["
+
StoreMove
.
MoveStep
+
"]"
+
ResourceControl
.
GetString
(
ResourceControl
.
TimeOut
,
"超时"
)
+
" ["
+
NotOkMsg
+
"]["
+
Math
.
Round
(
span
.
TotalSeconds
,
0
)
+
"秒]"
;
LogUtil
.
error
(
WarnMsg
,
102
);
LogUtil
.
error
(
WarnMsg
,
102
);
...
@@ -199,8 +204,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -199,8 +204,9 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
private
static
bool
AxisMoveISEnd
(
WaitResultInfo
wait
)
private
static
bool
AxisMoveISEnd
(
WaitResultInfo
wait
,
ref
bool
isAlarm
)
{
{
isAlarm
=
false
;
string
msg
=
""
;
string
msg
=
""
;
if
(
wait
.
IsHomeMove
)
if
(
wait
.
IsHomeMove
)
{
{
...
@@ -213,8 +219,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -213,8 +219,9 @@ namespace OnlineStore.DeviceLibrary
if
(!
msg
.
Equals
(
""
))
if
(!
msg
.
Equals
(
""
))
{
{
isAlarm
=
true
;
WarnMsg
=
msg
;
WarnMsg
=
msg
;
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchAlarm
,
StoreManager
.
Store
.
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
StoreManager
.
Store
.
Alarm
(
StoreAlarmType
.
BatchA
xisA
larm
,
StoreManager
.
Store
.
GetAlarmCodeByAxis
(
wait
.
AxisInfo
).
ToString
(),
WarnMsg
,
StoreMove
.
MoveType
);
}
}
return
wait
.
IsEnd
;
return
wait
.
IsEnd
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论