Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b5cb8691
由
LN
编写于
2019-11-15 15:53:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
温湿度修改,压紧轴P2位置配置
1 个父辈
5b3be174
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
489 行增加
和
133 行删除
source/ACPackingStore/FrmBox.Designer.cs
source/ACPackingStore/FrmBox.cs
source/ACPackingStore/FrmStore.cs
source/ACPackingStore/useControl/AxisMoveControl.Designer.cs
source/Common/util/HumitureController.cs
source/Common/util/HumitureServer.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/DeviceLibrary/ACPackingStore/HumitureBean.cs
source/DeviceLibrary/ACPackingStore/StoreManager.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
source/DeviceLibrary/device/PanasonicServo/ACServerManager.cs
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
source/LoadCVSLibrary/storeConfig/config/AC_Box_Config.cs
source/ACPackingStore/FrmBox.Designer.cs
查看文件 @
b5cb869
此文件的差异被折叠,
点击展开。
source/ACPackingStore/FrmBox.cs
查看文件 @
b5cb869
...
...
@@ -36,6 +36,13 @@ namespace OnlineStore.ACPackingStore
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
btnCMove
.
Tag
=
0
;
cmbPlateH
.
Items
.
Clear
();
for
(
int
i
=
8
;
i
<=
48
;
i
=
i
+
4
)
{
cmbPlateH
.
Items
.
Add
(
i
.
ToString
());
}
cmbPlateH
.
SelectedIndex
=
0
;
LoadStore
();
}
public
void
LoadStore
()
...
...
@@ -88,7 +95,7 @@ namespace OnlineStore.ACPackingStore
txtUpDownP4
.
Text
=
ktkPosition
.
UpdownAxis_IL_P4
.
ToString
();
txtUpDownP5
.
Text
=
ktkPosition
.
UpdownAxis_OH_P5
.
ToString
();
txtUpDownP6
.
Text
=
ktkPosition
.
UpdownAxis_OL_P6
.
ToString
();
txtComP2
.
Text
=
ktkPosition
.
ComAxis_P2
.
ToString
();
txtComP2
.
Text
=
BoxBean
.
Config
.
GetComP2
(
ktkPosition
.
BagHigh
).
TargetComP2
()
.
ToString
();
txtComP3
.
Text
=
ktkPosition
.
ComAxis_P3
.
ToString
();
txtInOutP3
.
Text
=
ktkPosition
.
InoutAxis_P3
.
ToString
();
...
...
@@ -103,15 +110,7 @@ namespace OnlineStore.ACPackingStore
chbDebug
.
Checked
=
BoxBean
.
IsDebug
;
this
.
ShowInTaskbar
=
true
;
txtTempPort
.
Text
=
BoxBean
.
Config
.
Humiture_Port
;
if
(
HumitureController
.
HumitureControllerType
.
Equals
(
1
))
{
groupHistory
.
Visible
=
true
;
}
else
{
groupHistory
.
Visible
=
false
;
}
txtTempPort
.
Text
=
BoxBean
.
Config
.
Humiture_Port
;
LoadOk
=
true
;
}
#
endregion
...
...
@@ -149,7 +148,7 @@ namespace OnlineStore.ACPackingStore
chbDebug
.
Checked
=
BoxBean
.
IsDebug
;
LoadOk
=
true
;
}
lblTemp
.
Text
=
BoxBean
.
currTempStr
;
lblTemp
.
Text
=
BoxBean
.
humBean
.
currTempStr
;
// lblMoveEquipInfo.Text = "移栽状态:"+(LineConnect.CanStartOut() ? "可出库":"不可出库" )+" "+LineConnect.LastUpdateTime.ToLongTimeString() ;
//忙碌状态不读取状态
//if (!BoxBean.storeRunStatus.Equals(StoreRunStatus.Busy))
...
...
@@ -227,9 +226,9 @@ namespace OnlineStore.ACPackingStore
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 无门禁信号,请检查"
;
}
if
(
BoxBean
.
TempOrHumidityIsAlarm
)
if
(
BoxBean
.
humBean
.
TempOrHumidityIsAlarm
)
{
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 温湿度报警["
+
BoxBean
.
TempAlarmTime
.
ToLongTimeString
()
+
"]"
;
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" 温湿度报警["
+
BoxBean
.
humBean
.
TempAlarmTime
.
ToLongTimeString
()
+
"]"
;
}
if
(
lblWarnMsg
.
Text
.
Equals
(
""
))
{
...
...
@@ -351,7 +350,7 @@ namespace OnlineStore.ACPackingStore
txtUpDownP4
.
Text
=
ktkPosition
.
UpdownAxis_IL_P4
.
ToString
();
txtUpDownP5
.
Text
=
ktkPosition
.
UpdownAxis_OH_P5
.
ToString
();
txtUpDownP6
.
Text
=
ktkPosition
.
UpdownAxis_OL_P6
.
ToString
();
txtComP2
.
Text
=
ktkPosition
.
ComAxis_P2
.
ToString
();
txtComP2
.
Text
=
BoxBean
.
Config
.
GetComP2
(
ktkPosition
.
BagHigh
).
TargetComP2
()
.
ToString
();
txtComP3
.
Text
=
ktkPosition
.
ComAxis_P3
.
ToString
();
txtInOutP3
.
Text
=
ktkPosition
.
InoutAxis_P3
.
ToString
();
txtInOutP2
.
Text
=
ktkPosition
.
InOutAxis_P2
.
ToString
();
...
...
@@ -720,46 +719,26 @@ namespace OnlineStore.ACPackingStore
private
void
btnTempInit_Click
(
object
sender
,
EventArgs
e
)
{
string
port
=
txtTempPort
.
Text
.
ToString
();
if
(
HumitureController
.
IsRun
)
{
HumitureController
.
Release
();
}
string
port
=
txtTempPort
.
Text
.
ToString
();
HumitureController
.
Init
(
port
);
}
private
void
btnTempClose_Click
(
object
sender
,
EventArgs
e
)
{
HumitureController
.
Release
();
HumitureController
.
CloseAllPort
();
}
private
void
btnSelTemp_Click
(
object
sender
,
EventArgs
e
)
{
ASTemperateParam
param
=
HumitureController
.
QueryData
();
HumitureParam
param
=
BoxBean
.
humBean
.
QueryData
();
txtTemp
.
Text
=
param
.
Temperate
.
ToString
();
txtHum
.
Text
=
param
.
Humidity
.
ToString
();
}
private
void
btnSelHistory_Click
(
object
sender
,
EventArgs
e
)
{
int
count
=
HumitureController
.
QueryHistoryCount
();
txtHistoryCount
.
Text
=
count
.
ToString
();
int
cuCount
=
HumitureController
.
QueryCurrCount
();
txtCurrCount
.
Text
=
cuCount
.
ToString
();
List
<
object
>
data
=
HumitureController
.
QueryHistory
();
if
(
data
.
Count
>=
3
)
{
txtHistoryTemp
.
Text
=
data
[
0
].
ToString
();
txtHistoryHum
.
Text
=
data
[
1
].
ToString
();
txtHistoryTime
.
Text
=
data
[
2
].
ToString
();
}
}
internal
void
DebugStatus
(
bool
isDebug
)
{
axisMoveControl1
.
Enabled
=
isDebug
;
groupBox1
.
Enabled
=
isDebug
;
axisMoveControl1
.
Enabled
=
isDebug
;
groupInout
.
Enabled
=
isDebug
;
groupShelf
.
Enabled
=
isDebug
;
}
...
...
@@ -871,6 +850,57 @@ namespace OnlineStore.ACPackingStore
frm
.
ShowDialog
();
}
private
void
btnSaveCom_Click
(
object
sender
,
EventArgs
e
)
{
if
(
cmbPlateH
.
SelectedIndex
>=
0
)
{
int
height
=
Convert
.
ToInt32
(
cmbPlateH
.
Text
);
int
minValue
=
FormUtil
.
GetIntValue
(
txtComMin
);
int
maxValue
=
FormUtil
.
GetIntValue
(
txtComMax
);
ComP2Info
p2Info
=
new
ComP2Info
(
height
,
minValue
,
maxValue
);
BoxBean
.
Config
.
UpdateComP2
(
height
,
p2Info
);
if
(
StoreManager
.
UpdateBoxConfig
(
BoxBean
.
Config
))
{
LogUtil
.
info
(
BoxBean
.
Name
+
"更新ComP2 "
+
BoxBean
.
Config
.
CompAxis_P2_List
);
}
else
{
MessageBox
.
Show
(
"保存失败"
);
}
}
}
private
void
cmbPlateH_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
if
(
cmbPlateH
.
SelectedIndex
>=
0
)
{
int
height
=
Convert
.
ToInt32
(
cmbPlateH
.
Text
);
ComP2Info
p2Info
=
BoxBean
.
Config
.
GetComP2
(
height
);
if
(
p2Info
==(
null
))
{
txtComMin
.
Text
=
0.
ToString
();
txtComMax
.
Text
=
0.
ToString
();
btnCMove
.
Text
=
height
+
"mm盘压紧点P2:"
+
0
;
btnCMove
.
Tag
=
0
;
}
else
{
txtComMin
.
Text
=
p2Info
.
MinComP
.
ToString
();
txtComMax
.
Text
=
p2Info
.
MaxComP
.
ToString
();
btnCMove
.
Text
=
height
+
"mm盘压紧点P2:"
+
p2Info
.
TargetComP2
();
btnCMove
.
Tag
=
p2Info
.
TargetComP2
();
}
}
}
private
void
btnCMove_Click
(
object
sender
,
EventArgs
e
)
{
int
value
=
Convert
.
ToInt32
(
btnCMove
.
Tag
);
if
(
value
>
0
)
{
AxisABSMove
(
BoxBean
.
Config
.
Comp_Axis
,
value
,
BoxBean
.
Config
.
CompAxis_P2_Speed
);
}
}
}
}
source/ACPackingStore/FrmStore.cs
查看文件 @
b5cb869
...
...
@@ -127,6 +127,7 @@ namespace OnlineStore.ACPackingStore
IOManager
.
instance
.
CloseAllDO
();
IOManager
.
instance
.
CloseAllConnection
();
HumitureController
.
CloseAllPort
();
//AIManager.CloseConnect();
ACServerManager
.
CloseAllPort
();
//this.Close();
...
...
source/ACPackingStore/useControl/AxisMoveControl.Designer.cs
查看文件 @
b5cb869
...
...
@@ -135,9 +135,9 @@
this
.
groupAxis
.
Controls
.
Add
(
this
.
comboBox1
);
this
.
groupAxis
.
Controls
.
Add
(
this
.
label49
);
this
.
groupAxis
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupAxis
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
6
);
this
.
groupAxis
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
this
.
groupAxis
.
Name
=
"groupAxis"
;
this
.
groupAxis
.
Size
=
new
System
.
Drawing
.
Size
(
53
5
,
320
);
this
.
groupAxis
.
Size
=
new
System
.
Drawing
.
Size
(
53
9
,
320
);
this
.
groupAxis
.
TabIndex
=
217
;
this
.
groupAxis
.
TabStop
=
false
;
this
.
groupAxis
.
Text
=
"伺服运动"
;
...
...
@@ -590,9 +590,9 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
label43
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label42
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
332
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
331
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
53
5
,
182
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
53
9
,
182
);
this
.
groupBox1
.
TabIndex
=
218
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"伺服状态"
;
...
...
@@ -819,7 +819,7 @@
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
groupAxis
);
this
.
Name
=
"AxisMoveControl"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
5
64
,
529
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
5
52
,
525
);
this
.
groupAxis
.
ResumeLayout
(
false
);
this
.
groupAxis
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
...
...
source/Common/util/HumitureController.cs
查看文件 @
b5cb869
...
...
@@ -15,93 +15,110 @@ namespace OnlineStore.Common
public
class
HumitureController
{
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
bool
IsRun
=
false
;
public
static
string
serialPort
=
""
;
private
static
int
bautRate
=
4800
;
//波特率
private
static
Parity
parity
=
Parity
.
None
;
//校验位
private
static
int
dataBits
=
8
;
//数据位
private
static
StopBits
stopBits
=
StopBits
.
One
;
//停止位
private
static
AcSerialBean
sb
=
null
;
private
static
string
LogName
=
""
;
public
static
int
HumitureControllerType
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
HumitureControllerType
);
private
static
Dictionary
<
string
,
AcSerialBean
>
serialBeanMap
=
new
Dictionary
<
string
,
AcSerialBean
>();
public
static
int
HumitureControllerType
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
HumitureControllerType
);
public
static
bool
Init
(
string
port
)
{
if
(
IsRun
&&
port
.
Equals
(
serialP
ort
))
if
(
serialBeanMap
.
ContainsKey
(
p
ort
))
{
return
true
;
}
else
if
(
IsRun
)
{
Release
();
}
LogName
=
"温湿度传感器["
+
port
+
"]"
;
if
(
sb
==
null
)
LogName
=
"温湿度传感器["
+
port
+
"]"
;
AcSerialBean
sb
=
null
;
if
(
HumitureControllerType
.
Equals
(
1
))
{
serialPort
=
port
;
if
(
HumitureControllerType
.
Equals
(
1
))
{
bautRate
=
9600
;
//波特率
}
sb
=
new
AcSerialBean
(
serialPort
,
bautRate
,
parity
,
dataBits
,
stopBits
);
bautRate
=
9600
;
//波特率
}
sb
=
new
AcSerialBean
(
port
,
bautRate
,
parity
,
dataBits
,
stopBits
);
try
{
if
(
sb
.
openPort
())
{
IsRun
=
true
;
return
true
;
}
else
{
LogUtil
.
error
(
LOGGER
,
LogName
+
"串口打开失败!"
);
IsRun
=
false
;
LogUtil
.
error
(
LOGGER
,
LogName
+
"串口"
+
port
+
"打开失败!"
);
return
false
;
}
}
catch
(
Exception
ex
)
{
IsRun
=
false
;
LogUtil
.
error
(
"串口"
+
port
+
"打开失败:"
+
ex
.
ToString
());
}
return
true
;
}
/// <summary>
/// 释放资源
/// </summary>
public
static
void
Release
()
public
static
void
CloseAllPort
()
{
if
(
sb
!=
null
)
List
<
string
>
kes
=
new
List
<
string
>(
serialBeanMap
.
Keys
);
foreach
(
string
key
in
kes
)
{
sb
.
closePort
(
);
ClosePort
(
key
);
}
IsRun
=
false
;
}
public
static
ASTemperateParam
LastData
=
new
ASTemperateParam
(
0
,
0
);
public
static
ASTemperateParam
QueryData
()
private
static
void
ClosePort
(
string
portName
)
{
ASTemperateParam
param
=
new
ASTemperateParam
(
0
,
0
);
List
<
double
>
data
=
queryData
();
if
(
data
.
Count
.
Equals
(
2
))
AcSerialBean
bean
=
GetSerialBean
(
portName
);
if
(
bean
==
null
)
{
LogUtil
.
info
(
"串口【"
+
portName
+
"】未打开,不需要关闭"
);
return
;
}
//清理缓存
bean
.
clearInBuffer
();
bean
.
clearOutBuffer
();
bean
.
closePort
();
if
(
serialBeanMap
.
ContainsKey
(
portName
))
{
param
=
new
ASTemperateParam
(
data
[
1
],
data
[
0
]
);
serialBeanMap
.
Remove
(
portName
);
}
LastData
=
param
;
LogUtil
.
info
(
"温湿度控制器 关闭串口【"
+
portName
+
"】 "
);
}
private
static
AcSerialBean
GetSerialBean
(
string
portName
)
{
if
(
serialBeanMap
.
ContainsKey
(
portName
))
{
return
serialBeanMap
[
portName
];
}
return
null
;
}
// public static ASTemperateParam LastData = new ASTemperateParam(0, 0);
public
static
HumitureParam
QueryData
(
string
port
)
{
HumitureParam
param
=
new
HumitureParam
(
0
,
0
);
List
<
double
>
data
=
queryData
(
port
);
if
(
data
.
Count
.
Equals
(
2
))
{
param
=
new
HumitureParam
(
data
[
1
],
data
[
0
]);
}
return
param
;
}
/// <summary>
/// 返回温度和湿度
/// </summary>
/// <returns></returns>
private
static
List
<
double
>
queryData
()
private
static
List
<
double
>
queryData
(
string
port
)
{
// 温度计算:
//当温度低于 0 ℃ 时温度数据以补码的形式上传。
//温度:FF9B H(十六进制)= -101 => 温度 = -10.1℃
//湿度计算:
//湿度:292 H(十六进制) = 658 => 湿度 = 65.8 % RH
if
(
IsRun
.
Equals
(
false
))
AcSerialBean
sb
=
GetSerialBean
(
port
);
if
(
sb
==
null
)
{
return
new
List
<
double
>();
}
...
...
@@ -131,12 +148,13 @@ namespace OnlineStore.Common
}
public
static
int
QueryHistoryCount
()
public
static
int
QueryHistoryCount
(
string
port
)
{
if
(
IsRun
.
Equals
(
false
)
||
HumitureControllerType
.
Equals
(
2
).
Equals
(
false
))
AcSerialBean
sb
=
GetSerialBean
(
port
);
if
(
sb
==
null
||
HumitureControllerType
.
Equals
(
2
).
Equals
(
false
))
{
return
-
1
;
}
}
byte
[]
sendData
=
new
byte
[
8
];
sendData
[
0
]
=
0x01
;
sendData
[
1
]
=
0x04
;
...
...
@@ -165,9 +183,10 @@ namespace OnlineStore.Common
sb
.
SendCommand
(
sendData
,
ref
reviceData
,
100
,
out
isOk
);
return
getReviceIntData
(
reviceData
);
}
public
static
int
QueryCurrCount
()
public
static
int
QueryCurrCount
(
string
port
)
{
if
(
IsRun
.
Equals
(
false
)
||
HumitureControllerType
.
Equals
(
2
).
Equals
(
false
))
AcSerialBean
sb
=
GetSerialBean
(
port
);
if
(
sb
==
null
||
HumitureControllerType
.
Equals
(
2
).
Equals
(
false
))
{
return
-
1
;
}
...
...
@@ -188,10 +207,11 @@ namespace OnlineStore.Common
sb
.
SendCommand
(
sendData
,
ref
reviceData
,
100
,
out
isOk
);
return
getReviceIntData
(
reviceData
);
}
public
static
List
<
object
>
QueryHistory
()
public
static
List
<
object
>
QueryHistory
(
string
port
)
{
List
<
object
>
list
=
new
List
<
object
>();
if
(
IsRun
.
Equals
(
false
)||
HumitureControllerType
.
Equals
(
2
).
Equals
(
false
))
AcSerialBean
sb
=
GetSerialBean
(
port
);
if
(
sb
==
null
||
HumitureControllerType
.
Equals
(
2
).
Equals
(
false
))
{
return
list
;
}
...
...
source/Common/util/HumitureServer.cs
查看文件 @
b5cb869
...
...
@@ -20,28 +20,28 @@ namespace OnlineStore.Common
/// <summary>
/// 最后一次接受到的温度信息,key=温湿度传感器IP地址
/// </summary>
public
static
Dictionary
<
string
,
ASTemperateParam
>
TemperateParamMap
=
new
Dictionary
<
string
,
ASTemperat
eParam
>();
public
static
Dictionary
<
string
,
HumitureParam
>
TemperateParamMap
=
new
Dictionary
<
string
,
Humitur
eParam
>();
/// <summary>
/// 根据IP 地址获得最后一次取到的温湿度
/// </summary>
public
static
ASTemperat
eParam
GetTemperateParam
(
string
ipAddr
)
public
static
Humitur
eParam
GetTemperateParam
(
string
ipAddr
)
{
ASTemperat
eParam
temperate
=
null
;
Humitur
eParam
temperate
=
null
;
TemperateParamMap
.
TryGetValue
(
ipAddr
,
out
temperate
);
return
temperate
;
}
/// <summary>
/// 显示用的温湿度信息(改为计算平均温湿度)
/// </summary>
public
static
ASTemperat
eParam
GetTemperateParam
(
List
<
string
>
ipAddrList
)
public
static
Humitur
eParam
GetTemperateParam
(
List
<
string
>
ipAddrList
)
{
ASTemperat
eParam
temperate
=
null
;
Humitur
eParam
temperate
=
null
;
int
allCount
=
0
;
double
wenDu
=
0
;
double
shiDu
=
0
;
foreach
(
string
addr
in
ipAddrList
)
{
ASTemperat
eParam
param
=
GetTemperateParam
(
addr
);
Humitur
eParam
param
=
GetTemperateParam
(
addr
);
if
(
param
!=
null
&&
param
.
IsValid
())
{
allCount
++;
...
...
@@ -53,7 +53,7 @@ namespace OnlineStore.Common
{
double
avgWendu
=
Math
.
Round
(
wenDu
/
allCount
,
1
);
double
avgShidu
=
Math
.
Round
(
shiDu
/
allCount
,
1
);
temperate
=
new
ASTemperat
eParam
(
avgWendu
,
avgShidu
);
temperate
=
new
Humitur
eParam
(
avgWendu
,
avgShidu
);
}
return
temperate
;
}
...
...
@@ -62,7 +62,7 @@ namespace OnlineStore.Common
double
maxValue
=
0
;
foreach
(
string
addr
in
ipAddrList
)
{
ASTemperat
eParam
param
=
GetTemperateParam
(
addr
);
Humitur
eParam
param
=
GetTemperateParam
(
addr
);
if
(
param
!=
null
&&
param
.
IsValid
())
{
if
(
param
.
Humidity
>
maxValue
)
...
...
@@ -141,7 +141,7 @@ namespace OnlineStore.Common
else
{
double
newShiDu
=
GetRandomSD
();
ASTemperateParam
ast
=
new
ASTemperat
eParam
(
add
,
deviceId
,
pwd
,
wendu
,
newShiDu
,
DateTime
.
Now
);
HumitureParam
ast
=
new
Humitur
eParam
(
add
,
deviceId
,
pwd
,
wendu
,
newShiDu
,
DateTime
.
Now
);
if
(
TemperateParamMap
.
ContainsKey
(
add
))
{
TemperateParamMap
.
Remove
(
add
);
...
...
@@ -165,7 +165,7 @@ namespace OnlineStore.Common
{
double
newShiDu
=
GetRandomSD
();
double
newWenDu
=
GetRandomWD
();
ASTemperateParam
ast
=
new
ASTemperat
eParam
(
IP
,
""
,
""
,
newWenDu
,
newShiDu
,
DateTime
.
Now
);
HumitureParam
ast
=
new
Humitur
eParam
(
IP
,
""
,
""
,
newWenDu
,
newShiDu
,
DateTime
.
Now
);
if
(
TemperateParamMap
.
ContainsKey
(
IP
))
{
TemperateParamMap
.
Remove
(
IP
);
...
...
@@ -213,9 +213,9 @@ namespace OnlineStore.Common
/// <summary>
/// 奥松温湿度上传参数
/// </summary>
public
class
ASTemperat
eParam
public
class
Humitur
eParam
{
public
ASTemperat
eParam
(
string
clientipe
,
string
add
,
string
pwd
,
double
wendu
,
double
shidu
,
DateTime
updateTime
)
public
Humitur
eParam
(
string
clientipe
,
string
add
,
string
pwd
,
double
wendu
,
double
shidu
,
DateTime
updateTime
)
{
this
.
IpAddress
=
clientipe
;
this
.
DeviceAddress
=
add
;
...
...
@@ -225,7 +225,7 @@ namespace OnlineStore.Common
this
.
UpdateTime
=
updateTime
;
}
//获取平均值时使用此 参数,只做显示用
public
ASTemperat
eParam
(
double
wendu
,
double
shidu
)
public
Humitur
eParam
(
double
wendu
,
double
shidu
)
{
this
.
IpAddress
=
""
;
this
.
DeviceAddress
=
""
;
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean.cs
查看文件 @
b5cb869
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
b5cb869
...
...
@@ -164,10 +164,11 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BI_15_StartCompress
))
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BI_16_ComAxisDownMove
);
InOutStoreLog
(
"料架取料:检测到料叉压紧确认信号,再次向下压紧指定的值"
);
int
currPosition
=
ACServerManager
.
GetActualtPosition
(
Config
.
Comp_Axis
);
ComTargetPosition
=
currPosition
;
int
targetP
=
currPosition
+
Config
.
CompAxis_Down_Position
;
LastHeight
=
Config
.
GetComP2PlateH
(
targetP
);
InOutStoreLog
(
"料架取料:检测到料叉压紧确认信号,向下押金【"
+
ComTargetPosition
+
"】目标【"
+
targetP
+
"】,记录料盘高度【"
+
LastHeight
+
"】"
);
ACAxisMove
(
Config
.
Comp_Axis
,
targetP
,
Config
.
CompAxis_P1_Speed
);
}
...
...
@@ -498,7 +499,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
resultOperation
.
op
.
Equals
(
5
))
{
ProcessHumidityCMD
(
resultOperation
);
humBean
.
ProcessHumidityCMD
(
resultOperation
);
}
else
{
...
...
source/DeviceLibrary/ACPackingStore/HumitureBean.cs
0 → 100644
查看文件 @
b5cb869
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
HumitureBean
{
private
string
PortName
=
""
;
private
string
Name
=
""
;
public
HumitureParam
LastData
=
new
HumitureParam
(
0
,
0
);
internal
HumitureBean
(
string
port
,
string
deviceName
)
{
this
.
Name
=
deviceName
;
this
.
PortName
=
port
;
}
public
bool
Init
()
{
return
HumitureController
.
Init
(
PortName
);
}
public
HumitureParam
QueryData
()
{
HumitureParam
param
=
HumitureController
.
QueryData
(
PortName
);
return
param
;
}
internal
void
ProcessHumidityCMD
(
Operation
resultOperation
)
{
Dictionary
<
string
,
string
>
data
=
resultOperation
.
data
;
if
(
data
!=
null
&&
data
.
ContainsKey
(
ParamDefine
.
maxHumidity
)
&&
data
.
ContainsKey
(
ParamDefine
.
maxTemperature
))
{
string
maxHumidity
=
data
[
ParamDefine
.
maxHumidity
];
string
maxTemp
=
data
[
ParamDefine
.
maxTemperature
];
LogUtil
.
info
(
Name
+
"收到服务器温湿度预警值:maxHumidity="
+
maxHumidity
+
",maxTemperature="
+
maxTemp
);
try
{
this
.
Max_Humidity
=
(
float
)
Convert
.
ToDouble
(
maxHumidity
);
this
.
Max_Temperature
=
(
float
)
Convert
.
ToDouble
(
maxTemp
);
LogUtil
.
info
(
Name
+
"保存温湿度预警值:Max_Humidity="
+
Max_Humidity
+
",Max_Temperature="
+
Max_Temperature
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"转换温湿度失败:"
+
ex
.
ToString
());
}
}
}
#
region
温湿度处理
/// <summary>
/// 湿度标准,超过后需要报警
/// </summary>
private
float
Max_Humidity
=
0
;
/// <summary>
/// 温度标准,超过后需要报警
/// </summary>
private
float
Max_Temperature
=
0
;
private
bool
IsInBlowing
=
false
;
private
DateTime
LastBeginBlowTime
=
DateTime
.
Now
;
private
DateTime
LastEndBlowTime
=
new
DateTime
(
1997
,
1
,
1
);
private
DateTime
preLogTime
=
DateTime
.
Now
;
public
bool
TempOrHumidityIsAlarm
=
false
;
public
DateTime
TempAlarmTime
=
DateTime
.
Now
;
private
float
StartBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StartBlowValue
);
private
float
StopBlowValue
=
(
float
)
ConfigAppSettings
.
GetNumValue
(
Setting_Init
.
StopBlowValue
);
public
string
currTempStr
=
""
;
internal
void
HumidityProcess
(
AC_BOX_Bean
box
)
{
try
{
if
((
DateTime
.
Now
-
preLogTime
).
TotalSeconds
>
10
)
{
preLogTime
=
DateTime
.
Now
;
//用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4
//温湿度
//ASTemperateParam param = HumitureServer.GetTemperateParam(Config.GetTempAddrList());
HumitureParam
param
=
QueryData
();
double
humidity
=
0
;
double
temp
=
0
;
if
(
param
!=
null
)
{
humidity
=
param
.
Humidity
;
temp
=
param
.
Temperate
;
currTempStr
=
Name
+
(
"当前湿度:"
+
humidity
.
ToString
()
+
",当前温度:"
+
temp
);
}
//double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
double
currMaxHumidity
=
param
.
Humidity
;
float
startBlowHumidity
=
Max_Humidity
-
StartBlowValue
;
float
stopBlowHumidity
=
Max_Humidity
-
StopBlowValue
;
//判断是否需要吹气
if
(
startBlowHumidity
>
0
&&
startBlowHumidity
<
currMaxHumidity
&&
IsInBlowing
.
Equals
(
false
))
{
//判断是否距离上次结束指定的时间
TimeSpan
span
=
DateTime
.
Now
-
LastEndBlowTime
;
if
(
span
.
TotalMinutes
>
box
.
Config
.
BlowAir_Interval
)
{
LogUtil
.
info
(
Name
+
"当前最大湿度:"
+
currMaxHumidity
.
ToString
()
+
",开始吹气湿度:"
+
startBlowHumidity
+
",当前不在吹气中,且间隔超过"
+
box
.
Config
.
BlowAir_Interval
+
"分钟,开始吹气!"
);
IsInBlowing
=
true
;
//Thread.Sleep(100);
box
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
HIGH
);
LastBeginBlowTime
=
DateTime
.
Now
;
LastEndBlowTime
=
DateTime
.
Now
;
}
}
if
(
IsInBlowing
&&
stopBlowHumidity
>
currMaxHumidity
)
{
LogUtil
.
info
(
Name
+
"当前最大湿度:"
+
currMaxHumidity
.
ToString
()
+
",停止吹气湿度:"
+
stopBlowHumidity
+
",停止吹气!"
);
IsInBlowing
=
false
;
box
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
LastEndBlowTime
=
DateTime
.
Now
;
}
if
(
IsInBlowing
)
{
//判断是否需要结束吹气
TimeSpan
span
=
DateTime
.
Now
-
LastBeginBlowTime
;
if
(
span
.
TotalMinutes
>
box
.
Config
.
BlowAir_Time
)
{
LogUtil
.
info
(
Name
+
"已经吹气"
+
span
.
TotalMinutes
+
"分钟,超过配置的吹气时间"
+
box
.
Config
.
BlowAir_Time
+
"分钟,停止吹气!"
);
IsInBlowing
=
false
;
//Thread.Sleep(100);
box
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
LastEndBlowTime
=
DateTime
.
Now
;
}
}
bool
needAlarm
=
false
;
//如果开始吹气并且当前达到报警值
if
(
IsInBlowing
&&
humidity
>
Max_Humidity
)
{
needAlarm
=
true
;
}
else
if
(
temp
>
Max_Temperature
&&
Max_Temperature
>
0
)
{
LogUtil
.
info
(
Name
+
"当前温度【"
+
param
.
Temperate
+
"】超过最高温度【"
+
Max_Temperature
+
"】,开始报警!"
);
needAlarm
=
true
;
//Thread.Sleep(100);
box
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
else
if
(
temp
<
Max_Temperature
)
{
if
(
IsInBlowing
.
Equals
(
false
)
&&
TempOrHumidityIsAlarm
)
{
LogUtil
.
info
(
Name
+
"不在吹气中,且当前温度【"
+
param
.
Temperate
+
"】低于【"
+
Max_Temperature
+
"】,关闭报警!"
);
TempOrHumidityIsAlarm
=
false
;
//Thread.Sleep(100);
box
.
IOMove
(
IO_Type
.
StartOrStopBlow
,
IO_VALUE
.
LOW
);
}
}
else
{
TempOrHumidityIsAlarm
=
false
;
}
if
(
needAlarm
)
{
HTAlarm
();
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"HumidityProcess出错:"
+
ex
.
ToString
());
}
}
private
void
HTAlarm
()
{
if
(
TempOrHumidityIsAlarm
)
{
return
;
}
TempAlarmTime
=
DateTime
.
Now
;
TempOrHumidityIsAlarm
=
true
;
}
internal
bool
NeedGetTem
()
{
if
(
Max_Humidity
<=
0
||
(
Max_Temperature
<=
0
))
{
return
true
;
}
return
false
;
}
#
endregion
}
}
source/DeviceLibrary/ACPackingStore/StoreManager.cs
查看文件 @
b5cb869
...
...
@@ -131,13 +131,18 @@ namespace OnlineStore.DeviceLibrary
/// 修改了料仓配置,更新缓存,更新配置文件(只能更新PRO的配置)
/// </summary>
/// <param name="kTK_LA_Store_Config"></param>
public
static
void
UpdateBoxConfig
(
AC_BOX_Config
storeConfig
)
public
static
bool
UpdateBoxConfig
(
AC_BOX_Config
storeConfig
)
{
try
{
//位置配置到文件中
string
appPath
=
Application
.
StartupPath
;
string
configFile
=
appPath
+
ConfigAppSettings
.
GetValue
(
Setting_Init
.
BOX_ConfigPath
);
if
(!
Directory
.
Exists
(
configFile
))
{
configFile
=
configFile
.
Replace
(
".csv"
,
"_"
+
storeConfig
.
DeviceID
+
".csv"
);
}
bool
result
=
CSVConfigReader
.
SaveBoxPosition
(
configFile
,
storeConfig
);
if
(!
result
)
...
...
@@ -148,11 +153,12 @@ namespace OnlineStore.DeviceLibrary
Store
.
BoxConfigMap
[
storeConfig
.
DeviceID
]
=
storeConfig
;
Store
.
BoxMap
[
storeConfig
.
DeviceID
].
Config
=
storeConfig
;
Store
.
BoxMap
[
storeConfig
.
DeviceID
].
MoveAxisConfig
();
return
true
;
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"出错:"
,
ex
);
}
}
return
false
;
}
public
static
bool
LoadInoutParam
(
InOutParam
param
,
AC_BOX_Bean
box
)
{
...
...
@@ -192,7 +198,7 @@ namespace OnlineStore.DeviceLibrary
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_P2
;
// p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
p
.
ComPress_P2
=
position
.
ComAxis_P2
;
p
.
ComPress_P2
=
box
.
Config
.
GetComP2
(
position
.
BagHigh
).
TargetComP2
()
;
p
.
ComPress_P3
=
position
.
ComAxis_P3
;
p
.
InOut_P3
=
position
.
InoutAxis_P3
;
p
.
Middle_P2
=
position
.
MiddleAxis_P2
;
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
b5cb869
...
...
@@ -65,6 +65,7 @@
<Compile Include="ACPackingStore\AC_BOX_Bean.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Partial.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Shelf.cs" />
<Compile Include="ACPackingStore\HumitureBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean_Partial.cs" />
<Compile Include="ACPackingStore\StoreManager.cs" />
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_1.csv
查看文件 @
b5cb869
...
...
@@ -44,14 +44,15 @@ AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
PRO,升降轴 NG料口放料点 P1,UpDownAxis_P1,403000,,,,,,,
PRO,升降轴 NG料口放料缓冲点 P2,UpDownAxis_P2,415000,,,,,,,
,
升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000
,,,,,,,
,
升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000
,,,,,,,
,
,,
,,,,,,,
,
,,
,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点/NG料口位置,MiddleAxis_P1,268093,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,10000,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,,
PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
PRO,压紧轴(轴4)P2压紧点范围对应值(8=1000;2000#),CompAxis_P2_List,8=1000;2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000# ,,,,,,,
,,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
...
...
source/DeviceLibrary/StoreConfig/BoxConfig_2.csv
查看文件 @
b5cb869
...
...
@@ -52,6 +52,7 @@ PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,10000,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,,
PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
PRO,压紧轴(轴4)P2压紧点范围对应值(8=1000;2000#),CompAxis_P2_List,8=1000;2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000# ,,,,,,,
,,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,
...
...
source/DeviceLibrary/device/PanasonicServo/ACServerManager.cs
查看文件 @
b5cb869
...
...
@@ -109,7 +109,7 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
public
static
void
C
ol
sePort
(
string
portName
)
public
static
void
C
lo
sePort
(
string
portName
)
{
AcSerialBean
bean
=
GetSerialBean
(
portName
);
if
(
bean
==
null
)
...
...
@@ -134,7 +134,7 @@ namespace OnlineStore.DeviceLibrary
List
<
string
>
kes
=
new
List
<
string
>(
serialBeanMap
.
Keys
);
foreach
(
string
key
in
kes
)
{
C
ol
sePort
(
key
);
C
lo
sePort
(
key
);
}
}
...
...
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
查看文件 @
b5cb869
...
...
@@ -226,6 +226,10 @@ namespace OnlineStore.LoadCSVLibrary
{
newLine
=
newLine
+
s
+
","
;
}
if
(
newLine
.
EndsWith
(
","
))
{
newLine
=
newLine
.
Substring
(
0
,
newLine
.
Length
-
1
);
}
newLines
[
index
]
=
newLine
;
}
}
...
...
source/LoadCVSLibrary/storeConfig/config/AC_Box_Config.cs
查看文件 @
b5cb869
...
...
@@ -497,6 +497,100 @@ namespace OnlineStore.LoadCSVLibrary
public
int
IsInDebug
{
get
;
set
;
}
private
List
<
string
>
CameraList
=
null
;
/// <summary>
/// PRO 压紧轴(轴4)P2压紧点范围对应值 CompAxis_P2_List 8 = 1000; 2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000#
/// </summary>
[
ConfigProAttribute
(
"CompAxis_P2_List"
)]
public
string
CompAxis_P2_List
{
get
;
set
;
}
private
List
<
ComP2Info
>
ComP2List
=
null
;
public
ComP2Info
GetComP2
(
int
plateh
)
{
analysisComP2
();
List
<
ComP2Info
>
list
=
(
from
m
in
ComP2List
where
m
.
PlateH
.
Equals
(
plateh
)
select
m
).
ToList
<
ComP2Info
>();
if
(
list
.
Count
>
0
)
{
return
list
[
0
];
}
return
ComP2List
.
Count
>
0
?
ComP2List
[
0
]
:
null
;
}
public
int
GetComP2PlateH
(
int
currP
)
{
analysisComP2
();
List
<
ComP2Info
>
list
=
(
from
com
in
ComP2List
where
com
.
MinComP
<=
currP
&&
com
.
MaxComP
>=
currP
select
com
).
ToList
<
ComP2Info
>();
if
(
list
.
Count
>
0
)
{
return
list
[
0
].
PlateH
;
}
LOGGER
.
Error
(
"GetComP2PlateH ["
+
currP
+
"] 未找到对应的盘高"
);
return
8
;
}
public
void
UpdateComP2
(
int
height
,
ComP2Info
p2Info
)
{
analysisComP2
();
bool
isUpdate
=
false
;
foreach
(
ComP2Info
p
in
ComP2List
)
{
if
(
p
.
PlateH
.
Equals
(
height
))
{
p
.
MinComP
=
p2Info
.
MinComP
;
p
.
MaxComP
=
p2Info
.
MaxComP
;
isUpdate
=
true
;
}
}
if
(!
isUpdate
)
{
ComP2List
.
Add
(
p2Info
);
}
string
tt
=
""
;
foreach
(
ComP2Info
p
in
ComP2List
)
{
tt
+=
ComP2InfoToStr
(
p
);
}
CompAxis_P2_List
=
tt
;
}
private
string
ComP2InfoToStr
(
ComP2Info
p2
)
{
return
p2
.
PlateH
+
"="
+
p2
.
MinComP
+
";"
+
p2
.
MaxComP
+
"#"
;
}
private
void
analysisComP2
()
{
if
(
ComP2List
==
null
)
{
try
{
// 8 = 1000; 2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000#
ComP2List
=
new
List
<
ComP2Info
>();
string
[]
arrayList
=
CompAxis_P2_List
.
Split
(
'#'
);
foreach
(
string
str
in
arrayList
)
{
if
(
str
.
Equals
(
""
))
{
continue
;
}
string
[]
com2A
=
str
.
Split
(
'='
);
if
(
com2A
.
Length
.
Equals
(
2
))
{
int
plateH
=
Convert
.
ToInt32
(
com2A
[
0
]);
string
[]
pArray
=
com2A
[
1
].
Split
(
';'
);
if
(
pArray
.
Length
.
Equals
(
2
))
{
int
minP
=
Convert
.
ToInt32
(
pArray
[
0
]);
int
maxP
=
Convert
.
ToInt32
(
pArray
[
1
]);
ComP2List
.
Add
(
new
ComP2Info
(
plateH
,
minP
,
maxP
));
}
}
}
}
catch
(
Exception
ex
)
{
LOGGER
.
Error
(
"解析CompAxis_P2_List【"
+
CompAxis_P2_List
+
"】出错:"
+
ex
.
ToString
());
}
}
}
public
List
<
string
>
GetCameraList
()
{
if
(
CameraList
==
null
)
...
...
@@ -515,28 +609,7 @@ namespace OnlineStore.LoadCSVLibrary
return
CameraList
;
}
protected
override
void
initMustHavePro
()
{
//MustHaveDIList = new List<string>();
//MustHaveDOList = new List<string>();
//MustHaveDIList.Add(IO_Type.SuddenStop_BTN);
//MustHaveDIList.Add(IO_Type.Reset_BTN);
//MustHaveDIList.Add(IO_Type.DoorLimit);
//MustHaveDIList.Add(IO_Type.Airpressure_Check);
//MustHaveDIList.Add(IO_Type.TrayCheck_Door);
//MustHaveDIList.Add(IO_Type.TrayCheck_Fixture);
//MustHaveDIList.Add(IO_Type.Door_Up);
//MustHaveDIList.Add(IO_Type.Door_Down);
//MustHaveDOList.Add(IO_Type.AutoRun_HddLed);
//MustHaveDOList.Add(IO_Type.Alarm_HddLed);
//MustHaveDOList.Add(IO_Type.RunSign_HddLed);
//MustHaveDOList.Add(IO_Type.StartOrStopBlow);
//MustHaveDOList.Add(IO_Type.Run_Signal);
//MustHaveDOList.Add(IO_Type.Door_Up);
//MustHaveDOList.Add(IO_Type.Door_Down);
//MustHaveDOList.Add(IO_Type.Axis_Brake);
{
}
public
static
void
ConfigAxis
(
AC_BOX_Config
Config
)
{
...
...
@@ -595,6 +668,31 @@ namespace OnlineStore.LoadCSVLibrary
Config
.
Comp_Axis
.
CanErrorCountMin
=
10
;
Config
.
Comp_Axis
.
PositionMin
=
0
;
Config
.
Comp_Axis
.
PositionMax
=
0
;
}
}
}
public
class
ComP2Info
{
public
ComP2Info
()
{
}
public
ComP2Info
(
int
plateh
,
int
minp
,
int
maxp
)
{
this
.
PlateH
=
plateh
;
this
.
MinComP
=
minp
;
this
.
MaxComP
=
maxp
;
}
public
int
PlateH
=
0
;
public
int
MinComP
=
0
;
public
int
MaxComP
=
0
;
public
int
TargetComP2
()
{
return
(
MinComP
+
MaxComP
)
/
2
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论