Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-OutletEquip
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5e69d37f
由
LN
编写于
2021-03-27 09:45:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
连不上环形线问题修改
1 个父辈
b63bd98f
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
46 行增加
和
27 行删除
source/DeviceLibrary/agvClient/AgvClient.cs
source/DeviceLibrary/bean/EquipBean.cs
source/DeviceLibrary/lineConnect/LineConnect.cs
source/HCSingleStore/App.config
source/HCSingleStore/FrmEquip.Designer.cs
source/HCSingleStore/FrmEquip.cs
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
5e69d37
...
...
@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
{
isInit
=
true
;
agvClient
=
new
AsaPL
.
AgvClient
(
ServerIp
);
agvClient
.
CancelState
=
false
;
agvClient
.
CancelState
=
true
;
agvClient
.
ReadyEnter
+=
AgvClient_ReadyEnter
;
agvClient
.
ReadyLeave
+=
AgvClient_ReadyLeave
;
...
...
source/DeviceLibrary/bean/EquipBean.cs
查看文件 @
5e69d37
...
...
@@ -58,7 +58,8 @@ namespace OnlineStore.DeviceLibrary
public
EquipBean
(
EquipConfig
config
)
{
Init
();
InitTimer
();
this
.
DeviceID
=
config
.
DeviceID
;
this
.
baseConfig
=
config
;
...
...
source/DeviceLibrary/lineConnect/LineConnect.cs
查看文件 @
5e69d37
...
...
@@ -24,12 +24,12 @@ namespace OnlineStore.DeviceLibrary
private
int
ClientKeepSecond
=
10
;
private
TcpClient
client
=
null
;
private
int
StoreId
=
0
;
private
int
StoreId
=
7
;
private
string
CID
=
""
;
public
LineConnect
(
int
sId
,
string
cid
)
{
this
.
StoreId
=
sId
;
//
this.StoreId = sId;
this
.
CID
=
cid
;
}
...
...
@@ -68,7 +68,7 @@ namespace OnlineStore.DeviceLibrary
Interlocked
.
Increment
(
ref
seq
);
return
seq
;
}
public
static
string
HeartMsg
=
""
;
public
void
SendHeart
(
StoreSendBean
store
)
{
if
(
client
==
null
)
...
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
{
store
.
Cmd
=
cmd_heart
;
string
heartMsg
=
ToParamStr
(
store
);
HeartMsg
=
DateTime
.
Now
.
ToLongTimeString
()
+
" "
+
heartMsg
;
client
.
send
(
heartMsg
);
}
catch
(
Exception
ex
)
...
...
@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
{
public
StoreSendBean
(
int
ss
,
int
runs
,
int
doorHasTray
,
int
alarmType
)
{
this
.
StoreId
=
0
;
this
.
StoreId
=
7
;
this
.
Cid
=
""
;
this
.
SStatus
=
ss
;
this
.
SRunStatus
=
runs
;
...
...
@@ -245,7 +245,7 @@ namespace OnlineStore.DeviceLibrary
}
public
string
Cmd
=
LineConnect
.
cmd_heart
;
public
int
StoreId
=
0
;
public
int
StoreId
=
7
;
public
string
Cid
=
""
;
public
int
Seq
=
0
;
public
int
SStatus
=
0
;
...
...
source/HCSingleStore/App.config
查看文件 @
5e69d37
...
...
@@ -31,7 +31,7 @@
<
add
key
=
"UseHCBoard"
value
=
"1"
/>
<!--流水线地址和端口配置-->
<
add
key
=
"LineServerIp"
value
=
"1
0.85.162.12
4"
/>
<
add
key
=
"LineServerIp"
value
=
"1
92.168.100.1
4"
/>
<
add
key
=
"LineServerPort"
value
=
"5246"
/>
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
...
...
source/HCSingleStore/FrmEquip.Designer.cs
查看文件 @
5e69d37
...
...
@@ -28,6 +28,7 @@
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage2
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
lblHeartMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
logBox
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
lblMoveStr
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
...
@@ -164,6 +165,7 @@
//
// tabPage2
//
this
.
tabPage2
.
Controls
.
Add
(
this
.
lblHeartMsg
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
logBox
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
lblMoveStr
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox2
);
...
...
@@ -177,6 +179,19 @@
this
.
tabPage2
.
Text
=
" 设备状态 "
;
this
.
tabPage2
.
UseVisualStyleBackColor
=
true
;
//
// lblHeartMsg
//
this
.
lblHeartMsg
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
lblHeartMsg
.
AutoSize
=
true
;
this
.
lblHeartMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblHeartMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
lblHeartMsg
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
572
);
this
.
lblHeartMsg
.
Name
=
"lblHeartMsg"
;
this
.
lblHeartMsg
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
lblHeartMsg
.
TabIndex
=
279
;
this
.
lblHeartMsg
.
Text
=
"等待启动"
;
this
.
lblHeartMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
//
// logBox
//
this
.
logBox
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
...
...
@@ -185,7 +200,7 @@
this
.
logBox
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
logBox
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
127
);
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
970
,
4
5
8
);
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
970
,
4
3
8
);
this
.
logBox
.
TabIndex
=
278
;
this
.
logBox
.
Text
=
""
;
this
.
logBox
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
logBox_VisibleChanged
);
...
...
@@ -195,7 +210,7 @@
this
.
lblMoveStr
.
AutoSize
=
true
;
this
.
lblMoveStr
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveStr
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
lblMoveStr
.
Location
=
new
System
.
Drawing
.
Point
(
787
,
9
);
this
.
lblMoveStr
.
Location
=
new
System
.
Drawing
.
Point
(
690
,
9
);
this
.
lblMoveStr
.
Name
=
"lblMoveStr"
;
this
.
lblMoveStr
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
lblMoveStr
.
TabIndex
=
277
;
...
...
@@ -264,7 +279,7 @@
//
this
.
chbDebug
.
AutoSize
=
true
;
this
.
chbDebug
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
682
,
8
);
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
584
,
8
);
this
.
chbDebug
.
Name
=
"chbDebug"
;
this
.
chbDebug
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
25
);
this
.
chbDebug
.
TabIndex
=
271
;
...
...
@@ -430,6 +445,7 @@
this
.
btnInoutP4
.
Text
=
"进出轴NG口出料点P4:"
;
this
.
btnInoutP4
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnInoutP4
.
UseVisualStyleBackColor
=
false
;
this
.
btnInoutP4
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInoutP4_Click
);
//
// txtMiddleP3
//
...
...
@@ -462,6 +478,7 @@
this
.
btnMiddleP3
.
Text
=
"旋转轴NG口出料点P3:"
;
this
.
btnMiddleP3
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnMiddleP3
.
UseVisualStyleBackColor
=
false
;
this
.
btnMiddleP3
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMiddleP3_Click
);
//
// lblSize
//
...
...
@@ -1204,19 +1221,19 @@
// toolStripMenuItem2
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"启用调试"
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
//
// toolStripSeparator6
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 板卡调试ToolStripMenuItem
//
this
.
板卡调试
ToolStripMenuItem
.
Name
=
"板卡调试ToolStripMenuItem"
;
this
.
板卡调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
板卡调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
板卡调试
ToolStripMenuItem
.
Text
=
"板卡调试"
;
this
.
板卡调试
ToolStripMenuItem
.
Visible
=
false
;
this
.
板卡调试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
板卡调试
ToolStripMenuItem_Click
);
...
...
@@ -1224,25 +1241,25 @@
// toolStripSeparator7
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
this
.
toolStripSeparator7
.
Visible
=
false
;
//
// 打开设备照明ToolStripMenuItem
//
this
.
打开设备照明
ToolStripMenuItem
.
Name
=
"打开设备照明ToolStripMenuItem"
;
this
.
打开设备照明
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
打开设备照明
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
打开设备照明
ToolStripMenuItem
.
Text
=
"打开设备照明"
;
this
.
打开设备照明
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
打开设备照明
ToolStripMenuItem_Click
);
//
// toolStripSeparator14
//
this
.
toolStripSeparator14
.
Name
=
"toolStripSeparator14"
;
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
7
,
6
);
this
.
toolStripSeparator14
.
Size
=
new
System
.
Drawing
.
Size
(
17
3
,
6
);
//
// 关闭设备照明ToolStripMenuItem
//
this
.
关闭设备照明
ToolStripMenuItem
.
Name
=
"关闭设备照明ToolStripMenuItem"
;
this
.
关闭设备照明
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
关闭设备照明
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
76
,
26
);
this
.
关闭设备照明
ToolStripMenuItem
.
Text
=
"关闭设备照明"
;
this
.
关闭设备照明
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
关闭设备照明
ToolStripMenuItem_Click
);
//
...
...
@@ -1478,6 +1495,7 @@
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator8
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem1
;
private
System
.
Windows
.
Forms
.
Timer
timer2
;
private
System
.
Windows
.
Forms
.
Label
lblHeartMsg
;
}
}
source/HCSingleStore/FrmEquip.cs
查看文件 @
5e69d37
...
...
@@ -43,6 +43,7 @@ namespace OnlineStore.ACSingleStore
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
string
version
=
GetVersion
(
true
);
equip
=
EquipManager
.
InitStore
();
if
(
equip
==
null
)
{
...
...
@@ -167,7 +168,7 @@ namespace OnlineStore.ACSingleStore
chbDebug
.
Checked
=
equip
.
IsDebug
;
LoadOk
=
true
;
}
lblHeartMsg
.
Text
=
LineConnect
.
HeartMsg
;
lblThisSta
.
Text
=
equip
.
GetRunStr
();
lblMoveStr
.
Text
=
equip
.
GetMoveStr
();
//ReadPosistion();
...
...
@@ -318,7 +319,9 @@ namespace OnlineStore.ACSingleStore
equip
.
Config
.
CompressAxis_P1
=
GetV
(
equip
.
Config
.
CompressAxis_P1
,
txtComP1
,
ref
needUpdate
);
equip
.
Config
.
UpDownAxis_DoorH_P2
=
GetV
(
equip
.
Config
.
UpDownAxis_DoorH_P2
,
txtUpDownP2
,
ref
needUpdate
);
equip
.
Config
.
UpDownAxis_DoorH_P5
=
GetV
(
equip
.
Config
.
UpDownAxis_DoorH_P5
,
txtUpDownP5
,
ref
needUpdate
);
equip
.
Config
.
UpDownAxis_DoorH_P6
=
GetV
(
equip
.
Config
.
UpDownAxis_DoorH_P6
,
txtUpDownP6
,
ref
needUpdate
);
equip
.
Config
.
UpDownAxis_DoorH_P6
=
GetV
(
equip
.
Config
.
UpDownAxis_DoorH_P6
,
txtUpDownP6
,
ref
needUpdate
);
equip
.
Config
.
MiddleAxis_P3
=
GetV
(
equip
.
Config
.
MiddleAxis_P3
,
txtMiddleP3
,
ref
needUpdate
);
equip
.
Config
.
InOutAxis_P4
=
GetV
(
equip
.
Config
.
InOutAxis_P4
,
txtInoutP4
,
ref
needUpdate
);
if
(
needUpdate
)
{
...
...
@@ -755,12 +758,9 @@ namespace OnlineStore.ACSingleStore
}
private
void
btnInoutP4_Click
(
object
sender
,
EventArgs
e
)
{
if
(
InoutInP1
())
{
int
value
=
FormUtil
.
GetIntValue
(
txtInoutP4
);
AxisABSMove
(
equip
.
Config
.
InOut_Axis
,
value
,
equip
.
Config
.
InOutAxis_P4_Speed
);
}
{
int
value
=
FormUtil
.
GetIntValue
(
txtInoutP4
);
AxisABSMove
(
equip
.
Config
.
InOut_Axis
,
value
,
equip
.
Config
.
InOutAxis_P4_Speed
);
}
private
void
btnNGMove_Click
(
object
sender
,
EventArgs
e
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论