Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 615ba250
由
LN
编写于
2019-12-21 11:58:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
叉子伸出前判断门是否上升到位。
1 个父辈
56a72d0b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
73 行增加
和
45 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/Common/util/LogUtil.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/ACSingleStore/App.config
查看文件 @
615ba25
...
...
@@ -31,7 +31,7 @@
<
add
key
=
"HumitureControllerType"
value
=
"0"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<!--流水线地址和端口配置-->
<
add
key
=
"LineServerIp"
value
=
"192.168.
2
04.88"
/>
<
add
key
=
"LineServerIp"
value
=
"192.168.
1
04.88"
/>
<
add
key
=
"LineServerPort"
value
=
"5246"
/>
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
615ba25
...
...
@@ -701,7 +701,7 @@
this
.
richTextBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
7.5
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
92
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
545
,
425
);
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
615ba25
...
...
@@ -184,25 +184,6 @@ namespace OnlineStore.ACSingleStore
//忙碌状态不读取状态
if
(!
store
.
storeRunStatus
.
Equals
(
StoreRunStatus
.
Busy
))
{
//if (chbAutoRead.Checked)
//{
// string portName = GetPortName();
// int SlvAddr = GetSlaveAddr();
// //判断私服是否打开、
// if (ACServerManager.ServerOnStatus(portName, SlvAddr))
// {
// lblServerOn.Text = "伺服ON";
// int lOutPulse = ACServerManager.GetTargetPosition(portName, SlvAddr);
// lblActual.Text = string.Format("{0:d}", lOutPulse);
// int lCountPulse = ACServerManager.GetActualtPosition(portName, SlvAddr);
// lblTargetP.Text = string.Format("{0:d}", lCountPulse);
// }
// else
// {
// lblServerOn.Text = "伺服OFF";
// }
//}
}
//ReadPosistion();
...
...
@@ -256,10 +237,10 @@ namespace OnlineStore.ACSingleStore
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 叉子料盘检测有料,请检查"
;
}
if
(
IOManager
.
IOValue
(
IO_Type
.
DoorLimit
).
Equals
(
IO_VALUE
.
LOW
))
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 无门禁信号,请检查"
;
}
//
if (IOManager.IOValue(IO_Type.DoorLimit).Equals(IO_VALUE.LOW))
//
{
//
lblWarnMsg.Text = lblWarnMsg.Text + " 无门禁信号,请检查";
//
}
if
(
store
.
TempOrHumidityIsAlarm
)
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 温湿度报警["
+
store
.
TempAlarmTime
.
ToLongTimeString
()
+
"]"
;
...
...
source/Common/util/LogUtil.cs
查看文件 @
615ba25
...
...
@@ -20,7 +20,7 @@ namespace OnlineStore.Common
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
int
showCount
=
2
0
;
public
static
int
showCount
=
3
0
;
public
static
bool
debug_opened
=
false
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
615ba25
...
...
@@ -400,6 +400,14 @@ namespace OnlineStore.DeviceLibrary
}
}
private
bool
DoorIsOpen
()
{
if
(
IOManager
.
IOValue
(
IO_Type
.
Door_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
IO_Type
.
Door_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
}
return
false
;
}
public
void
OpenDoor
(
bool
IsWait
=
true
)
{
if
(
Config
.
HasDoor
.
Equals
(
1
))
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
615ba25
...
...
@@ -104,7 +104,7 @@ namespace OnlineStore.DeviceLibrary
}
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
}
private
DateTime
preRWTime
=
DateTime
.
Now
;
private
void
CheckWait
()
{
List
<
WaitResultInfo
>
list
=
StoreMove
.
WaitList
;
...
...
@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
{
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
Config
.
IOSingle_TimerOut
;
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_14_WaitTake
))
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
SO_14_WaitTake
))
{
timeOutMs
=
650000
;
}
...
...
@@ -169,6 +169,29 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要重发入库结束命令
SendOutStoreEnd
(
StoreMove
);
}
TimeSpan
rwSpan
=
DateTime
.
Now
-
preRWTime
;
if
(!
wait
.
IsEnd
&&
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
)
{
preRWTime
=
DateTime
.
Now
;
string
msg
=
StoreName
+
" "
+
NotOkMsg
+
"已等待 "
+
Math
.
Abs
(
span
.
TotalSeconds
)
+
"秒,重写DO:"
;
bool
isLog
=
false
;
foreach
(
WaitResultInfo
ww
in
list
)
{
if
(
ww
!=
null
&&
ww
.
WaitType
.
Equals
(
2
)
&&
Config
.
StoreDOList
.
ContainsKey
(
ww
.
IoType
))
{
isLog
=
true
;
IOManager
.
IOMove
(
ww
.
IoType
,
ww
.
IoValue
);
msg
+=
ww
.
ToStr
()
+
","
;
}
}
if
(
isLog
)
{
LogUtil
.
error
(
msg
);
}
isOk
=
false
;
break
;
}
}
else
if
(
wait
.
WaitType
==
3
)
{
...
...
@@ -181,13 +204,7 @@ namespace OnlineStore.DeviceLibrary
//{
// LogUtil.debug("等待height=" + wait.HeightValue + "完成");
//}
}
//else if (wait.WaitType == 5)
//{
// string msg = "";
// wait.IsEnd = ShuoKeIsEnd(wait, out msg);
// NotOkMsg = NotOkMsg +" "+ msg;
//}
}
if
(
wait
.
IsEnd
)
{
if
(
StoreMove
.
OneWaitCanEndStep
)
...
...
@@ -291,10 +308,20 @@ namespace OnlineStore.DeviceLibrary
}
private
void
SI_05_DeviceToDoor
()
{
InStoreLog
(
"入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_05_DeviceToDoor
);
ACAxisMove
(
Config
.
InOut_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
//NeedCheckSafetyLight = 1;
if
(
DoorIsOpen
())
{
//判断仓门是否打开
InStoreLog
(
"入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_05_DeviceToDoor
);
ACAxisMove
(
Config
.
InOut_Axis
,
StoreMove
.
MoveParam
.
MoveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
//NeedCheckSafetyLight = 1;
}
else
{
InStoreLog
(
"入库:SI_04 叉子即将取料,发现门未上升到位,重新打开门 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_04_CompressWare
);
OpenDoor
();
}
}
protected
override
void
InStoreProcess
()
{
...
...
@@ -338,7 +365,8 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog
(
"入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SI_04_CompressWare
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
ComMoveToPosition
(
moveP
.
ComPress_P3
,
Config
.
CompAxis_P3_Speed
);
OpenDoor
();
}
else
{
...
...
@@ -708,11 +736,22 @@ namespace OnlineStore.DeviceLibrary
private
void
SO_10_DeviceToDoorPro
()
{
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
OutStoreLog
(
"出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
//NeedCheckSafetyLight = 1;
if
(
DoorIsOpen
())
{
//判断仓门是否打开
LineMoveP
moveP
=
StoreMove
.
MoveParam
.
MoveP
;
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_10_DeviceToDoor
);
OutStoreLog
(
"出库:SO_10 叉子进出料口,进出轴至P2(进料口取料点) "
);
ACAxisMove
(
Config
.
InOut_Axis
,
moveP
.
InOut_P2
,
Config
.
InOutAxis_P2_Speed
);
//NeedCheckSafetyLight = 1;
}
else
{
InStoreLog
(
"出库:SO_09 叉子即将取料,发现门未上升到位,重新打开门 "
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
SO_091_WaitNoTray
);
OpenDoor
();
}
}
public
bool
InOutAxisCanMove
()
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论