Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5f947b49
由
LN
编写于
2020-11-30 10:27:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
界面调整
1 个父辈
2974d919
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
110 行增加
和
210 行删除
source/AssemblyLineClient/App.config
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/Common/Setting_Init.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/HY/HYEquipBase.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/HuichuanLibrary/HCBoardManager.cs
source/HuichuanLibrary/HCBoardManager_Axis.cs
source/HuichuanLibrary/HuichuanLibrary.csproj
source/LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
source/AssemblyLineClient/App.config
查看文件 @
5f947b4
...
...
@@ -23,12 +23,12 @@
<
add
key
=
"ConfigPath_DischargeLine"
value
=
"\LineConfig\Config_DischargeLine.csv"
/>
<
add
key
=
"ConfigPath_TrayList"
value
=
"\LineConfig\TrayList.data"
/>
<
add
key
=
"Line_Type"
value
=
"Line"
/>
<
add
key
=
"Line_CID"
value
=
"
rc1250
"
/>
<
add
key
=
"Line_CID"
value
=
"
so664
"
/>
<!--
end
one
store
config
-->
<!--摄像机名称列表配置,用
#分割-->
<
add
key
=
"CameraName"
value
=
"GigE:MV-CE100-30GC (00C69898519)#GigE:MV-CE100-30GC (00C95305929)"
/>
<!--二维码类型列表配置,用
#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200#QR Code
#PDF417
"
/>
<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200#QR Code"
/>
<!--<
add
key
=
"CodeType"
value
=
"Data Matrix ECC 200"
/>-->
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
...
...
@@ -49,9 +49,7 @@
<
add
key
=
"ABBServerPort"
value
=
"21"
/>
<!--是否打开托盘编码界面-->
<
add
key
=
"OpenRFIDWrite"
value
=
"1"
/>
<
add
key
=
"DefaultPWD"
value
=
"123456"
/>
<!--当前调试的设备
ID
,分号分割-->
<
add
key
=
"DebugDeviceId"
value
=
"0"
/>
<
add
key
=
"DefaultPWD"
value
=
"123456"
/>
<
add
key
=
"Server_Log_Open"
value
=
"0"
/>
<
add
key
=
"CodeCount"
value
=
"4"
/>
<
add
key
=
"DefaultTrayNum"
value
=
"0"
/>
...
...
@@ -61,14 +59,13 @@
<
add
key
=
"Feed_LastShelfID_101"
value
=
"B19"
/>
<
add
key
=
"Feed_LastShelfID_102"
value
=
"B23"
/>
<
add
key
=
"Feed_LastShelfID_103"
value
=
"B25"
/>
<
add
key
=
"Feed_LastShelfID_104"
value
=
"B7"
/>
<
add
key
=
"Brush_Delay_Seconds"
value
=
"5"
/>
<
add
key
=
"Feed_LastShelfID_104"
value
=
"B7"
/>
<
add
key
=
"SaveErrorImageToFile"
value
=
"1"
/>
<
add
key
=
"UseHCBoard"
value
=
"1"
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/Line-
RC1250
.log"
/>
<
file
value
=
"logs/Line-
SO664
.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
...
...
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
5f947b4
...
...
@@ -32,6 +32,8 @@
System
.
ComponentModel
.
ComponentResourceManager
resources
=
new
System
.
ComponentModel
.
ComponentResourceManager
(
typeof
(
FrmLineStore
));
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
chbRightDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbLeftDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblPosId
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnUpdateStatus
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -107,9 +109,11 @@
this
.
toolStripSeparator15
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
启用蜂鸣器
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator16
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator25
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
aGVCancelStateToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator17
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
自动保存托盘信息
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator24
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
contextMenuStrip_control
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
toolStripSeparator21
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolName
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -122,12 +126,6 @@
this
.
toolStripSeparator20
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
control_Debug
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator22
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator24
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator25
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
启用右侧
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
启用左侧出料线
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
chbLeftDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbRightDis
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
...
...
@@ -178,6 +176,28 @@
this
.
tabPage1
.
Text
=
" 运行日志 "
;
this
.
tabPage1
.
UseVisualStyleBackColor
=
true
;
//
// chbRightDis
//
this
.
chbRightDis
.
AutoSize
=
true
;
this
.
chbRightDis
.
Location
=
new
System
.
Drawing
.
Point
(
176
,
14
);
this
.
chbRightDis
.
Name
=
"chbRightDis"
;
this
.
chbRightDis
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
24
);
this
.
chbRightDis
.
TabIndex
=
197
;
this
.
chbRightDis
.
Text
=
"禁用右侧出料线"
;
this
.
chbRightDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbRightDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbRightDis_CheckedChanged
);
//
// chbLeftDis
//
this
.
chbLeftDis
.
AutoSize
=
true
;
this
.
chbLeftDis
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
14
);
this
.
chbLeftDis
.
Name
=
"chbLeftDis"
;
this
.
chbLeftDis
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
24
);
this
.
chbLeftDis
.
TabIndex
=
196
;
this
.
chbLeftDis
.
Text
=
"禁用左侧出料线"
;
this
.
chbLeftDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbLeftDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbLeftDis_CheckedChanged
);
//
// groupBox1
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
...
@@ -850,9 +870,7 @@
this
.
aGVCancelStateToolStripMenuItem
,
this
.
toolStripSeparator17
,
this
.
自动保存托盘信息
ToolStripMenuItem
,
this
.
toolStripSeparator24
,
this
.
启用左侧出料线
ToolStripMenuItem
,
this
.
启用右侧
ToolStripMenuItem
});
this
.
toolStripSeparator24
});
this
.
运行参数
ToolStripMenuItem
.
Name
=
"运行参数ToolStripMenuItem"
;
this
.
运行参数
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
86
,
25
);
this
.
运行参数
ToolStripMenuItem
.
Text
=
"运行参数"
;
...
...
@@ -881,6 +899,11 @@
this
.
toolStripSeparator16
.
Name
=
"toolStripSeparator16"
;
this
.
toolStripSeparator16
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
//
// toolStripSeparator25
//
this
.
toolStripSeparator25
.
Name
=
"toolStripSeparator25"
;
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
//
// aGVCancelStateToolStripMenuItem
//
this
.
aGVCancelStateToolStripMenuItem
.
Name
=
"aGVCancelStateToolStripMenuItem"
;
...
...
@@ -900,6 +923,11 @@
this
.
自动保存托盘信息
ToolStripMenuItem
.
Text
=
"保存托盘信息"
;
this
.
自动保存托盘信息
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
自动保存托盘信息
ToolStripMenuItem_Click
);
//
// toolStripSeparator24
//
this
.
toolStripSeparator24
.
Name
=
"toolStripSeparator24"
;
this
.
toolStripSeparator24
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
//
// contextMenuStrip_control
//
this
.
contextMenuStrip_control
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
...
@@ -984,50 +1012,6 @@
this
.
toolStripSeparator22
.
Name
=
"toolStripSeparator22"
;
this
.
toolStripSeparator22
.
Size
=
new
System
.
Drawing
.
Size
(
159
,
6
);
//
// toolStripSeparator24
//
this
.
toolStripSeparator24
.
Name
=
"toolStripSeparator24"
;
this
.
toolStripSeparator24
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
//
// toolStripSeparator25
//
this
.
toolStripSeparator25
.
Name
=
"toolStripSeparator25"
;
this
.
toolStripSeparator25
.
Size
=
new
System
.
Drawing
.
Size
(
203
,
6
);
//
// 启用右侧ToolStripMenuItem
//
this
.
启用右侧
ToolStripMenuItem
.
Name
=
"启用右侧ToolStripMenuItem"
;
this
.
启用右侧
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
206
,
26
);
this
.
启用右侧
ToolStripMenuItem
.
Text
=
"启用右侧"
;
//
// 启用左侧出料线ToolStripMenuItem
//
this
.
启用左侧出料线
ToolStripMenuItem
.
Name
=
"启用左侧出料线ToolStripMenuItem"
;
this
.
启用左侧出料线
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
206
,
26
);
this
.
启用左侧出料线
ToolStripMenuItem
.
Text
=
"启用左侧出料线"
;
//
// chbLeftDis
//
this
.
chbLeftDis
.
AutoSize
=
true
;
this
.
chbLeftDis
.
Location
=
new
System
.
Drawing
.
Point
(
26
,
14
);
this
.
chbLeftDis
.
Name
=
"chbLeftDis"
;
this
.
chbLeftDis
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
24
);
this
.
chbLeftDis
.
TabIndex
=
196
;
this
.
chbLeftDis
.
Text
=
"禁用左侧出料线"
;
this
.
chbLeftDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbLeftDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbLeftDis_CheckedChanged
);
//
// chbRightDis
//
this
.
chbRightDis
.
AutoSize
=
true
;
this
.
chbRightDis
.
Location
=
new
System
.
Drawing
.
Point
(
176
,
14
);
this
.
chbRightDis
.
Name
=
"chbRightDis"
;
this
.
chbRightDis
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
24
);
this
.
chbRightDis
.
TabIndex
=
197
;
this
.
chbRightDis
.
Text
=
"禁用右侧出料线"
;
this
.
chbRightDis
.
UseVisualStyleBackColor
=
true
;
this
.
chbRightDis
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbRightDis_CheckedChanged
);
//
// FrmLineStore
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
...
@@ -1171,8 +1155,6 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
自动保存托盘信息
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator24
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator25
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
启用左侧出料线
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
启用右侧
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
CheckBox
chbLeftDis
;
private
System
.
Windows
.
Forms
.
CheckBox
chbRightDis
;
}
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
5f947b4
...
...
@@ -36,7 +36,6 @@ namespace OnlineStore.AssemblyLine
private
void
LoadStoreData
()
{
this
.
Opacity
=
0
;
formLineStatus
(
false
);
string
title
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
this
.
Text
=
title
;
...
...
@@ -50,8 +49,8 @@ namespace OnlineStore.AssemblyLine
return
;
}
FrmIOTest
ioStatus
=
new
FrmIOTest
();
AddForm
(
" IO列表查看 "
,
ioStatus
);
//
FrmIOTest ioStatus = new FrmIOTest();
//
AddForm(" IO列表查看 ", ioStatus);
FrmLineIO
frmIOStatus
=
new
FrmLineIO
();
AddForm
(
" 流水线IO "
,
frmIOStatus
);
...
...
@@ -110,6 +109,8 @@ namespace OnlineStore.AssemblyLine
}
private
void
FrmMain_Load
(
object
sender
,
EventArgs
e
)
{
this
.
Opacity
=
0
;
this
.
Cursor
=
Cursors
.
WaitCursor
;
FrmBase
.
GetVersion
(
true
);
if
(!
LineManager
.
Init
())
{
...
...
@@ -118,14 +119,15 @@ namespace OnlineStore.AssemblyLine
return
;
}
TrayManager
.
InitFileData
();
LoadStoreData
();
LoadStoreData
();
picLine
.
Image
=
ManagerUtil
.
M_Line
;
this
.
Opacity
=
100
;
this
.
Visible
=
true
;
this
.
WindowState
=
FormWindowState
.
Maximized
;
this
.
notifyIcon1
.
Visible
=
false
;
this
.
ShowInTaskbar
=
true
;
this
.
ShowInTaskbar
=
true
;
this
.
Cursor
=
Cursors
.
Default
;
//tabControl1.TabPages.Remove(tabPage5);
picLine
.
Image
=
ManagerUtil
.
M_Line
;
timer1
.
Start
();
}
...
...
@@ -134,6 +136,20 @@ namespace OnlineStore.AssemblyLine
this
.
Opacity
=
0
;
this
.
ShowInTaskbar
=
false
;
this
.
notifyIcon1
.
Visible
=
true
;
foreach
(
FrmEquipBase
frm
in
FormMap
.
Values
)
{
try
{
if
(
frm
!=
null
)
{
frm
.
Hide
();
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"隐藏界面"
+
frm
.
Text
+
"出错:"
+
ex
.
ToString
());
}
}
this
.
Hide
();
GC
.
Collect
();
}
...
...
@@ -214,6 +230,21 @@ namespace OnlineStore.AssemblyLine
this
.
WindowState
=
FormWindowState
.
Maximized
;
this
.
notifyIcon1
.
Visible
=
false
;
this
.
ShowInTaskbar
=
true
;
foreach
(
FrmEquipBase
frm
in
FormMap
.
Values
)
{
try
{
if
(
frm
!=
null
)
{
frm
.
Show
();
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"显示界面"
+
frm
.
Text
+
"出错:"
+
ex
.
ToString
());
}
}
}
catch
(
Exception
ex
)
{
...
...
@@ -896,7 +927,7 @@ namespace OnlineStore.AssemblyLine
{
return
;
}
//frm.StartPosition = FormStartPosition.Manual;
frm
.
FormClosed
+=
Frm_FormClosed
;
FormMap
.
Add
(
deviceId
,
frm
);
frm
.
Show
();
...
...
source/Common/Setting_Init.cs
查看文件 @
5f947b4
...
...
@@ -78,8 +78,7 @@ namespace OnlineStore.Common
public
static
string
OpenRFIDWrite
=
"OpenRFIDWrite"
;
public
static
string
DefaultPWD
=
"DefaultPWD"
;
public
static
string
AgvServerIp
=
"AgvServerIp"
;
public
static
string
DebugDeviceId
=
"DebugDeviceId"
;
public
static
string
NeedScanCode
=
"NeedScanCode"
;
public
static
string
CodeCount
=
"CodeCount"
;
...
...
@@ -87,14 +86,12 @@ namespace OnlineStore.Common
public
static
string
MaxTrayNum
=
"MaxTrayNum"
;
public
static
string
UseBuzzer
=
"UseBuzzer"
;
public
static
string
NeedCheckTray
=
"NeedCheckTray"
;
public
static
string
UseBuzzer
=
"UseBuzzer"
;
public
static
string
RfidServer_Port
=
"RfidServer_Port"
;
public
static
string
Feed_LastShelfID_
=
"Feed_LastShelfID_"
;
public
static
string
Brush_Delay_Seconds
=
"Brush_Delay_Seconds"
;
public
static
string
SaveErrorImageToFile
=
"SaveErrorImageToFile"
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
5f947b4
...
...
@@ -437,44 +437,7 @@ namespace OnlineStore.DeviceLibrary
}
private
Stopwatch
needEnterWatch
=
new
Stopwatch
();
private
Stopwatch
needLeaveWatch
=
new
Stopwatch
();
/// <summary>
/// 下降所有阻挡气缸
/// </summary>
internal
override
void
OpenStopBlock
()
{
//if (Config.SidesWayNum <= 0)
//{
// LogInfo("下降放料阻挡12 ,下降FL顶升气缸,上升横移机构 ");
// CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH);
// CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH);
// //顶升气缸下降
// CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
//}
//else
//{
// LogInfo(" 上升横移机构 ");
//}
//CylinderMove(null, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
internal
override
void
CloseStopBlock
()
{
//if (Config.SidesWayNum <= 0)
//{
// LogInfo("上升放料阻挡12,关闭顶升气缸,关闭横移上下气缸");
// CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
// CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
// //顶升气缸下降
// CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW);
// CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW);
//}
//else
//{
// LogInfo(" 关闭横移上下气缸");
//}
//CheckAndMove(IO_Type.SL_MoveCylinder_Down, IO_VALUE.LOW);
//CheckAndMove(IO_Type.SL_MoveCylinder_Up, IO_VALUE.LOW);
}
#
region
气缸判断及动作
...
...
@@ -672,35 +635,7 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
AGV
//internal bool AgvCanEnter(string nodeId, RFIDData data)
//{
// string logN = Name + "收到 AgvCanEnter 事件 [" + nodeId + "] [" + data.NumStr() + "] ";
// bool usable = false;
// if (nodeId.Equals(Config.AgvInName))
// {
// if (isInSuddenDown || isNoAirCheck)
// {
// usable = false;
// }
// else
// {
// //入料口无料架即可进入
// usable = (runStatus >= LineRunStatus.Runing
// && ProcessShelfEnter.Equals(false)
// && IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.LOW));
// }
// }
// else if (nodeId.Equals(Config.AgvOutName))
// {
// //出口有料架才可以进入
// usable = (runStatus >= LineRunStatus.Runing
// && ProcessShelfOut.Equals(false)
// && IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH));
// }
// LogUtil.info(logN + ":" + usable);
// return usable;
//}
internal
void
AgvArrive
(
string
nodeId
,
string
rfid
)
{
string
logN
=
Name
+
"收到 AgvArrive 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
...
...
@@ -941,11 +876,7 @@ namespace OnlineStore.DeviceLibrary
msg
+=
"runS: "
+
runStatus
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
"\n"
;
msg
+=
"MoveT:"
+
MoveInfo
.
MoveType
+
"\n"
;
msg
+=
"MoveS :"
+
MoveInfo
.
SLog
+
"\n"
;
//msg += "SMoveT:" + SecondMoveInfo.MoveType + "\n";
//msg += "SMoveS:" + SecondMoveInfo.MoveStep + "\n";
// msg += "" + LastWidth + "X" + LastHeight + "="+ lastcode + "";
msg
+=
"MoveS :"
+
MoveInfo
.
SLog
+
"\n"
;
return
msg
;
}
public
string
GetLastTrayInfo
()
...
...
source/DeviceLibrary/assemblyLine/HY/HYEquipBase.cs
查看文件 @
5f947b4
...
...
@@ -186,6 +186,7 @@ namespace OnlineStore.DeviceLibrary
internal
virtual
void
TrayCanLeave
()
{
}
#
region
定位气缸升降
,链条转动
public
void
LocationCylinderUp
(
LineMoveInfo
moveinfo
=
null
)
{
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
5f947b4
...
...
@@ -759,7 +759,7 @@ namespace OnlineStore.DeviceLibrary
{
//判断是否禁用
if
(
LineManager
.
DisLeftOutLine
&&(
DeviceID
.
Equals
(
204
)
||
DeviceID
.
Equals
(
20
9
)))
if
(
LineManager
.
DisLeftOutLine
&&(
DeviceID
.
Equals
(
204
)
||
DeviceID
.
Equals
(
20
6
)))
{
return
false
;
}
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
5f947b4
...
...
@@ -19,10 +19,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
partial
class
LineBean
:
KTK_Store
{
public
bool
IsDebug
=
false
;
/// <summary>
/// 灯闪烁定时器
/// </summary>
public
bool
IsDebug
=
false
;
private
System
.
Timers
.
Timer
ledProcessTimer
=
null
;
/// <summary>
/// 分出一个线程,专门处理急停,报警,气压检测,工单信号检测等处理
...
...
@@ -30,19 +27,13 @@ namespace OnlineStore.DeviceLibrary
private
System
.
Timers
.
Timer
IoCheckTimer
=
null
;
private
System
.
Timers
.
Timer
serverConTimer
=
null
;
/// <summary>
/// 流水线下所有的移载装置
/// </summary>
public
Dictionary
<
int
,
MoveEquip
>
MoveEquipMap
{
get
;
set
;
}
public
Dictionary
<
int
,
FeedingEquip
>
FeedingEquipMap
{
get
;
set
;
}
public
Dictionary
<
int
,
HYEquipBase
>
HYEquipMap
{
get
;
set
;
}
public
Dictionary
<
int
,
EquipBase
>
AllEquipMap
{
get
;
set
;
}
/// <summary>
/// 流水线配置
/// </summary>
public
Line_Config
Config
{
get
;
set
;
}
#
region
初始化
...
...
@@ -61,15 +52,10 @@ namespace OnlineStore.DeviceLibrary
baseConfig
=
lineConfig
;
this
.
Config
=
lineConfig
;
this
.
DeviceID
=
lineConfig
.
Id
;
T3C1_MoveInfo
=
new
LineMoveInfo
(
DeviceID
,
" T3-C1 "
);
//SW41_MoveInfo = new LineMoveInfo(DeviceID, "横移轨道-41");
//SW23_MoveInfo = new LineMoveInfo(DeviceID, "横移轨道-23");
//Shunt_MoveInfo = new LineMoveInfo(DeviceID, "分流横移1");
//Shunt2_MoveInfo = new LineMoveInfo(DeviceID, "分流横移2");
T3C1_MoveInfo
=
new
LineMoveInfo
(
DeviceID
,
" T3-C1 "
);
MoveInfo
=
new
LineMoveInfo
(
DeviceID
,
"[流水线-Move] "
);
Name
=
(
" 流水线_"
+
Config
.
CID
+
" "
).
ToUpper
();
//IsDebug = Config.IsDebug.Equals(1);
AllEquipMap
=
new
Dictionary
<
int
,
EquipBase
>();
MoveEquipMap
=
new
Dictionary
<
int
,
MoveEquip
>();
...
...
@@ -88,8 +74,7 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName
(
ioList
,
config
.
IOIPList
);
FeedingEquipMap
.
Add
(
config
.
Id
,
equip
);
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
//equip.TrayPEndEvent += Equip_TrayPEndEvent;
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
}
foreach
(
MoveEquip_Config
config
in
configList
.
Values
)
{
...
...
@@ -105,8 +90,7 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName
(
ioList
,
config
.
IOIPList
);
HYEquipMap
.
Add
(
config
.
Id
,
equip
);
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
//equip.TrayPEndEvent += Equip_TrayPEndEvent;
AllEquipMap
.
Add
(
config
.
Id
,
equip
);
}
//先初始化设备
...
...
@@ -116,8 +100,7 @@ namespace OnlineStore.DeviceLibrary
//初始化摄像机配置
CodeManager
.
LoadConfig
();
cioList
=
new
List
<
string
>(
ioList
);
string
ids
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
DebugDeviceId
);
cioList
=
new
List
<
string
>(
ioList
);
Task
.
Factory
.
StartNew
(
delegate
{
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
5f947b4
...
...
@@ -122,35 +122,8 @@ namespace OnlineStore.DeviceLibrary
}
return
false
;
}
public
static
bool
NeedCheckTray
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
NeedCheckTray
).
Equals
(
1
);
//internal static bool CheckIsRightNum(int trayNum, int preTrayNum, bool isCanUpdateMax = true)
//{
// if (!NeedCheckTray)
// {
// return true;
// }
// int defNext = preTrayNum + 1;
// if (preTrayNum.Equals(0) || MaxTrayNum.Equals(0) || trayNum.Equals(defNext))
// {
// if (isCanUpdateMax && trayNum > MaxTrayNum)
// {
// MaxTrayNum = trayNum;
// LogUtil.info("更新MaxTrayNum=" + preTrayNum);
// }
// return true;
// }
// else if (trayNum.Equals(1) && preTrayNum >= MaxTrayNum)
// {
// return true;
// }
// return false;
//}
//internal static bool RightTrayCode(int trayNum, int preTrayNum, bool isCanUpdateMax = true)
//{
// return true;
// //return CheckIsRightNum(trayNum, preTrayNum, isCanUpdateMax);
//}
internal
static
void
UpdateTrayNumError
(
int
errorStoreID
,
string
errorMsg
)
{
...
...
source/HuichuanLibrary/HCBoardManager.cs
查看文件 @
5f947b4
...
...
@@ -426,6 +426,11 @@ namespace HuichuanLibrary
Console
.
WriteLine
(
BoardName
()
+
msg
);
HCLogUtil
.
info
(
BoardName
()
+
msg
);
}
private
static
void
DebugLog
(
string
msg
)
{
Console
.
WriteLine
(
BoardName
()
+
msg
);
HCLogUtil
.
debug
(
BoardName
()
+
msg
);
}
}
public
class
AxisSts
{
...
...
source/HuichuanLibrary/HCBoardManager_Axis.cs
查看文件 @
5f947b4
...
...
@@ -152,7 +152,7 @@ namespace HuichuanLibrary
}
else
{
Show
Log
(
" Axis["
+
axisNo
+
"] FinishHoming OK!"
);
Debug
Log
(
" Axis["
+
axisNo
+
"] FinishHoming OK!"
);
return
true
;
}
}
...
...
@@ -255,7 +255,7 @@ namespace HuichuanLibrary
}
else
{
Show
Log
(
" Axis["
+
axisNo
+
"] StartPtpMove "
+
ptpType
+
" OK"
);
Debug
Log
(
" Axis["
+
axisNo
+
"] StartPtpMove "
+
ptpType
+
" OK"
);
return
true
;
}
}
...
...
@@ -269,12 +269,12 @@ namespace HuichuanLibrary
UInt32
ret
=
ImcApi
.
IMC_SetSingleAxMvPara
(
nCardHandle
,
axisNo
,
ptpVel
,
ptpAcc
,
ptpDec
);
if
(
ret
!=
0
)
{
ShowErrorLog
(
" Axis["
+
axisNo
+
"] SetSingleAxMvPara FAIL, ErrorCode=0x"
+
ret
.
ToString
(
"x8"
));
ShowErrorLog
(
" Axis["
+
axisNo
+
"] SetSingleAxMvPara
ptpVel ["
+
ptpVel
+
"] ptpAcc ["
+
ptpAcc
+
"] ptpDec ["
+
ptpDec
+
"]
FAIL, ErrorCode=0x"
+
ret
.
ToString
(
"x8"
));
return
false
;
}
else
{
ShowLog
(
" Axis["
+
axisNo
+
"] SetSingleAxMvPara
OK"
);
DebugLog
(
" Axis["
+
axisNo
+
"] SetSingleAxMvPara ptpVel ["
+
ptpVel
+
"] ptpAcc ["
+
ptpAcc
+
"] ptpDec ["
+
ptpDec
+
"]
OK"
);
return
true
;
}
}
...
...
@@ -296,7 +296,7 @@ namespace HuichuanLibrary
}
else
{
Show
Log
(
" Axis["
+
axisNo
+
"] MoveStop OK"
);
Debug
Log
(
" Axis["
+
axisNo
+
"] MoveStop OK"
);
return
true
;
}
}
...
...
source/HuichuanLibrary/HuichuanLibrary.csproj
查看文件 @
5f947b4
...
...
@@ -32,7 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\dll\log4net.dll</HintPath>
<HintPath>..\
..\
dll\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
...
...
source/LoadCVSLibrary/storeConfig/config/DeviceConfig.cs
查看文件 @
5f947b4
...
...
@@ -83,7 +83,7 @@ namespace OnlineStore.LoadCSVLibrary
public
virtual
void
LoadConfig
(
List
<
ConfigBase
>
configList
)
{
List
<
string
>
ioTypeList
=
IO_Type
.
GetTypeList
();
ioTypeList
=
new
List
<
string
>();
//
ioTypeList = new List<string>();
StringBuilder
builder
=
new
StringBuilder
(
"\r\n"
);
StringBuilder
proBuilder
=
new
StringBuilder
(
"\r\n"
);
DIList
=
new
Dictionary
<
string
,
ConfigIO
>();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论