Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9a6597be
由
几米阳光
编写于
2018-09-13 20:32:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出库时等待时间验证修改
1 个父辈
93713b36
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
43 行增加
和
22 行删除
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/FrmStoreBox.Designer.cs
查看文件 @
9a6597b
...
@@ -163,6 +163,7 @@
...
@@ -163,6 +163,7 @@
this
.
轴运动配置
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
轴运动配置
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
开启
DEBUGToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
开启
DEBUGToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator12
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
清理日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
清理日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
@@ -174,7 +175,6 @@
...
@@ -174,7 +175,6 @@
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
toolStripSeparator12
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
...
@@ -1836,14 +1836,19 @@
...
@@ -1836,14 +1836,19 @@
// 开启DEBUGToolStripMenuItem
// 开启DEBUGToolStripMenuItem
//
//
this
.
开启
DEBUGToolStripMenuItem
.
Name
=
"开启DEBUGToolStripMenuItem"
;
this
.
开启
DEBUGToolStripMenuItem
.
Name
=
"开启DEBUGToolStripMenuItem"
;
this
.
开启
DEBUGToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
开启
DEBUGToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
67
,
26
);
this
.
开启
DEBUGToolStripMenuItem
.
Text
=
"开启DEBUG"
;
this
.
开启
DEBUGToolStripMenuItem
.
Text
=
"开启DEBUG"
;
this
.
开启
DEBUGToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开启
DEBUGToolStripMenuItem_Click
);
this
.
开启
DEBUGToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
开启
DEBUGToolStripMenuItem_Click
);
//
//
// toolStripSeparator12
//
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
6
);
//
// 清理日志ToolStripMenuItem
// 清理日志ToolStripMenuItem
//
//
this
.
清理日志
ToolStripMenuItem
.
Name
=
"清理日志ToolStripMenuItem"
;
this
.
清理日志
ToolStripMenuItem
.
Name
=
"清理日志ToolStripMenuItem"
;
this
.
清理日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
清理日志
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
67
,
26
);
this
.
清理日志
ToolStripMenuItem
.
Text
=
"清理日志"
;
this
.
清理日志
ToolStripMenuItem
.
Text
=
"清理日志"
;
this
.
清理日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清理日志
ToolStripMenuItem_Click
);
this
.
清理日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清理日志
ToolStripMenuItem_Click
);
//
//
...
@@ -1947,11 +1952,6 @@
...
@@ -1947,11 +1952,6 @@
this
.
notifyIcon1
.
Text
=
"料仓客户端"
;
this
.
notifyIcon1
.
Text
=
"料仓客户端"
;
this
.
notifyIcon1
.
Visible
=
true
;
this
.
notifyIcon1
.
Visible
=
true
;
//
//
// toolStripSeparator12
//
this
.
toolStripSeparator12
.
Name
=
"toolStripSeparator12"
;
this
.
toolStripSeparator12
.
Size
=
new
System
.
Drawing
.
Size
(
177
,
6
);
//
// FrmStoreBox
// FrmStoreBox
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
9a6597b
...
@@ -498,7 +498,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -498,7 +498,7 @@ namespace OnlineStore.ACSingleStore
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// MessageBox.Show("位置超出" + axisC.Explain + "上下限(" + axisC.PositionMin + "-" + axisC.PositionMax + ")");
// return;
// return;
//}
//}
if
(
portName
.
Equals
(
store
.
Config
.
InOut_Axis
.
DeviceName
)
&&
(
ACStoreManager
.
store
.
LoacationIsDown
().
Equals
(
false
)))
if
(
portName
.
Equals
(
store
.
Config
.
InOut_Axis
.
DeviceName
)
&&
(
store
.
LoacationIsDown
().
Equals
(
false
)))
{
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
return
;
...
@@ -512,7 +512,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -512,7 +512,7 @@ namespace OnlineStore.ACSingleStore
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
short
SlvAddr
=
FormUtil
.
GetShortValue
(
txtAxisValue
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
if
(
portName
.
Equals
(
store
.
Config
.
InOut_Axis
.
DeviceName
)
&&
(
ACStoreManager
.
store
.
LoacationIsDown
().
Equals
(
false
)))
if
(
portName
.
Equals
(
store
.
Config
.
InOut_Axis
.
DeviceName
)
&&
(
store
.
LoacationIsDown
().
Equals
(
false
)))
{
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
return
;
...
@@ -536,7 +536,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -536,7 +536,7 @@ namespace OnlineStore.ACSingleStore
// return;
// return;
//}
//}
if
(
portName
.
Equals
(
store
.
Config
.
InOut_Axis
.
DeviceName
)
&&
(
ACStoreManager
.
store
.
LoacationIsDown
().
Equals
(
false
)))
if
(
portName
.
Equals
(
store
.
Config
.
InOut_Axis
.
DeviceName
)
&&
(
store
.
LoacationIsDown
().
Equals
(
false
)))
{
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
return
;
...
@@ -752,18 +752,33 @@ namespace OnlineStore.ACSingleStore
...
@@ -752,18 +752,33 @@ namespace OnlineStore.ACSingleStore
private
void
btnInOutP1_Click
(
object
sender
,
EventArgs
e
)
private
void
btnInOutP1_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
store
.
LoacationIsDown
().
Equals
(
false
))
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
}
int
value
=
FormUtil
.
GetIntValue
(
txtInOutP1
);
int
value
=
FormUtil
.
GetIntValue
(
txtInOutP1
);
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
value
,
store
.
Config
.
InOutAxis_P1_Speed
);
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
value
,
store
.
Config
.
InOutAxis_P1_Speed
);
}
}
private
void
btnInOutP3_Click
(
object
sender
,
EventArgs
e
)
private
void
btnInOutP3_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
store
.
LoacationIsDown
().
Equals
(
false
))
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
}
int
value
=
FormUtil
.
GetIntValue
(
txtInOutP3
);
int
value
=
FormUtil
.
GetIntValue
(
txtInOutP3
);
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
value
,
store
.
Config
.
InOutAxis_P3_Speed
);
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
value
,
store
.
Config
.
InOutAxis_P3_Speed
);
}
}
private
void
btnInOutP2_Click
(
object
sender
,
EventArgs
e
)
private
void
btnInOutP2_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
store
.
LoacationIsDown
().
Equals
(
false
))
{
MessageBox
.
Show
(
"定位气缸不在下降端,不能移动进出轴"
,
"警告"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
return
;
}
int
value
=
FormUtil
.
GetIntValue
(
txtInOutP2
);
int
value
=
FormUtil
.
GetIntValue
(
txtInOutP2
);
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
value
,
store
.
Config
.
InOutAxis_P2_Speed
);
AxisABSMove
(
store
.
Config
.
InOut_Axis
,
value
,
store
.
Config
.
InOutAxis_P2_Speed
);
}
}
...
@@ -1168,7 +1183,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -1168,7 +1183,7 @@ namespace OnlineStore.ACSingleStore
}
}
private
void
toolStripMenuItem1_Click
(
object
sender
,
EventArgs
e
)
private
void
toolStripMenuItem1_Click
(
object
sender
,
EventArgs
e
)
{
{
DialogResult
result
=
MessageBox
.
Show
(
"是否确定退出?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
DialogResult
result
=
MessageBox
.
Show
(
"是否确定退出?"
,
"提示"
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
{
ExitApp
();
ExitApp
();
...
@@ -1190,7 +1205,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -1190,7 +1205,7 @@ namespace OnlineStore.ACSingleStore
private
void
退出
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
退出
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
DialogResult
result
=
MessageBox
.
Show
(
"是否确定退出?"
,
"提示"
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Asterisk
);
DialogResult
result
=
MessageBox
.
Show
(
"是否确定退出?"
,
"提示"
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
{
ExitApp
();
ExitApp
();
...
...
source/Common/util/LogUtil.cs
查看文件 @
9a6597b
...
@@ -19,7 +19,7 @@ namespace OnlineStore.Common
...
@@ -19,7 +19,7 @@ namespace OnlineStore.Common
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
int
showCount
=
1
0
;
public
static
int
showCount
=
2
0
;
public
static
bool
debug_opened
=
false
;
public
static
bool
debug_opened
=
false
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
9a6597b
...
@@ -581,7 +581,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -581,7 +581,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
Config
.
UpDownAxis_DoorOPosition_P1
,
Config
.
UpDownAxis_P1_Speed
);
break
;
break
;
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
case
StoreMoveStep
.
BOX_H_MiddleAxisToP1
:
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"回原点
完成
"
);
storeRunStatus
=
StoreRunStatus
.
Runing
;
storeRunStatus
=
StoreRunStatus
.
Runing
;
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
storeStatus
=
StoreStatus
.
StoreOnline
;
storeStatus
=
StoreStatus
.
StoreOnline
;
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
9a6597b
...
@@ -181,8 +181,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -181,8 +181,11 @@ namespace OnlineStore.DeviceLibrary
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
Alarm
(
StoreAlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
StoreMove
.
MoveType
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
}
}
isOk
=
false
;
if
(
StoreMove
.
OneWaitCanEndStep
.
Equals
(
false
))
break
;
{
isOk
=
false
;
break
;
}
}
}
else
if
(
StoreMove
.
OneWaitCanEndStep
)
else
if
(
StoreMove
.
OneWaitCanEndStep
)
{
{
...
@@ -194,8 +197,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -194,8 +197,11 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
span
.
TotalMilliseconds
<
wait
.
TimeMSeconds
)
if
(
span
.
TotalMilliseconds
<
wait
.
TimeMSeconds
)
{
{
isOk
=
false
;
if
(
StoreMove
.
OneWaitCanEndStep
.
Equals
(
false
))
break
;
{
isOk
=
false
;
break
;
}
}
}
else
if
(
StoreMove
.
OneWaitCanEndStep
)
else
if
(
StoreMove
.
OneWaitCanEndStep
)
{
{
...
@@ -721,9 +727,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -721,9 +727,9 @@ namespace OnlineStore.DeviceLibrary
public
bool
LoacationIsDown
()
public
bool
LoacationIsDown
()
{
{
if
(
KNDIOValue
(
IO_Type
.
LocationCylinder_Down
).
Equals
(
IO_VALUE
.
HIGH
)
if
(
KNDIOValue
(
IO_Type
.
LocationCylinder_Down
).
Equals
(
IO_VALUE
.
HIGH
)
||
KNDIOValue
(
IO_Type
.
LocationCylinder_Up
).
Equals
(
IO_VALUE
.
LOW
)
&&
KNDIOValue
(
IO_Type
.
LocationCylinder_Up
).
Equals
(
IO_VALUE
.
LOW
)
||
KNDIOValue
(
IO_Type
.
LocationCylinder2_Down
).
Equals
(
IO_VALUE
.
HIGH
)
&&
KNDIOValue
(
IO_Type
.
LocationCylinder2_Down
).
Equals
(
IO_VALUE
.
HIGH
)
||
KNDIOValue
(
IO_Type
.
LocationCylinder2_Up
).
Equals
(
IO_VALUE
.
LOW
))
&&
KNDIOValue
(
IO_Type
.
LocationCylinder2_Up
).
Equals
(
IO_VALUE
.
LOW
))
{
{
return
true
;
return
true
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论