Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO827-AutoScanAndLabel
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a20964d8
由
张东亮
编写于
2022-09-09 16:47:09 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'SO00075(SO1164)扫码贴标机' of
http://106.15.194.121:8083/liutao/SO827-A…
…utoScanAndLabel into SO00075(SO1164)扫码贴标机
2 个父辈
10a4dfe6
e0d733ae
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
32 行增加
和
29 行删除
AutoScanAndLabel/Form1.cs
AutoScanAndLabel/UC/AgvControl.cs
Common/util/TcpServer.cs
Common/util/UdpServer.cs
DL.StandardRobots/TCP/TcpServer.cs
DL.StandardRobots/UdpServer.cs
AutoScanAndLabel/Form1.cs
查看文件 @
a20964d
...
@@ -167,7 +167,7 @@ namespace AutoScanAndLabel
...
@@ -167,7 +167,7 @@ namespace AutoScanAndLabel
void
addTablePage
()
{
void
addTablePage
()
{
AddForm
(
crc
.
GetString
(
"Res0008"
,
"IO调试"
),
ioc
);
AddForm
(
crc
.
GetString
(
"Res0008"
,
"IO调试"
),
ioc
);
AddForm
(
crc
.
GetString
(
"Res0009"
,
"伺服调试"
),
ac
);
AddForm
(
crc
.
GetString
(
"Res0009"
,
"伺服调试"
),
ac
);
AddForm
(
"Agv调试"
,
agv
);
AddForm
(
crc
.
GetString
(
"Res0070"
,
"Agv调试"
)
,
agv
);
AddForm
(
crc
.
GetString
(
"Res0010"
,
"相关设置"
),
sc
);
AddForm
(
crc
.
GetString
(
"Res0010"
,
"相关设置"
),
sc
);
crc
.
LanguageProcess
(
this
);
crc
.
LanguageProcess
(
this
);
}
}
...
...
AutoScanAndLabel/UC/AgvControl.cs
查看文件 @
a20964d
using
DeviceLibrary
;
using
OnlineStore
;
using
DeviceLibrary
;
using
DL.StandardRobot
;
using
DL.StandardRobot
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
@@ -24,7 +25,7 @@ namespace AutoScanAndLabel.UC
...
@@ -24,7 +25,7 @@ namespace AutoScanAndLabel.UC
serverIp
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
STD_IP
,
"127.0.0.1"
);
serverIp
=
ConfigHelper
.
Config
.
Get
(
Setting_Init
.
STD_IP
,
"127.0.0.1"
);
AGVManager
.
Connect
(
serverIp
);
AGVManager
.
Connect
(
serverIp
);
load
();
load
();
groupBox2
.
Text
=
"AGV状态"
+
"["
+
serverIp
+
"]"
;
groupBox2
.
Text
=
crc
.
GetString
(
"Res0029"
,
"AGV状态"
)
+
"["
+
serverIp
+
"]"
;
AGVManager
.
Register
(
MissionStateChanged
);
AGVManager
.
Register
(
MissionStateChanged
);
endit
(
false
);
endit
(
false
);
}
}
...
@@ -50,10 +51,10 @@ namespace AutoScanAndLabel.UC
...
@@ -50,10 +51,10 @@ namespace AutoScanAndLabel.UC
{
{
try
try
{
{
lblCurMissionId
.
Text
=
"当前任务编号:"
+
state
.
MissionId
;
lblCurMissionId
.
Text
=
crc
.
GetString
(
"Res0030"
,
"当前任务编号:"
)
+
state
.
MissionId
;
lblCurRunMissionId
.
Text
=
"运行任务编号:"
+
state
.
RunMissionId
;
lblCurRunMissionId
.
Text
=
crc
.
GetString
(
"Res0031"
,
"运行任务编号:"
)
+
state
.
RunMissionId
;
lblMissionRunstate
.
Text
=
"任务运行状态:"
+
state
.
MissionRunState
;
lblMissionRunstate
.
Text
=
crc
.
GetString
(
"Res0032"
,
"任务运行状态:"
)
+
state
.
MissionRunState
;
lblMissionResult
.
Text
=
"任务运行结果:"
+
state
.
MissionResult
;
lblMissionResult
.
Text
=
crc
.
GetString
(
"Res0033"
,
"任务运行结果:"
)
+
state
.
MissionResult
;
}
}
catch
catch
{
{
...
@@ -66,12 +67,12 @@ namespace AutoScanAndLabel.UC
...
@@ -66,12 +67,12 @@ namespace AutoScanAndLabel.UC
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
{
{
MessageBox
.
Show
(
"机器尚未启动不能呼叫Agv"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0034"
,
"机器尚未启动不能呼叫Agv"
)
);
return
;
return
;
}
}
if
(
InCalling
)
if
(
InCalling
)
{
{
MessageBox
.
Show
(
"已呼叫Agv,不能重复呼叫"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0035"
,
"已呼叫Agv,不能重复呼叫"
)
);
return
;
return
;
}
}
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
RightEnd_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
RightEnd_Check
).
Equals
(
IO_VALUE
.
LOW
))
...
@@ -104,19 +105,19 @@ namespace AutoScanAndLabel.UC
...
@@ -104,19 +105,19 @@ namespace AutoScanAndLabel.UC
});
});
}
}
else
else
MessageBox
.
Show
(
"当前有料串不能请求进入料串"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0036"
,
"当前有料串不能请求进入料串"
)
);
}
}
private
void
button_rightleavefull_Click
(
object
sender
,
EventArgs
e
)
private
void
button_rightleavefull_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
{
{
MessageBox
.
Show
(
"机器尚未启动不能呼叫Agv"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0034"
,
"机器尚未启动不能呼叫Agv"
)
);
return
;
return
;
}
}
if
(
InCalling
)
if
(
InCalling
)
{
{
MessageBox
.
Show
(
"已呼叫Agv,不能重复呼叫"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0035"
,
"已呼叫Agv,不能重复呼叫"
)
);
return
;
return
;
}
}
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
RightEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
RightEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
))
...
@@ -151,7 +152,7 @@ namespace AutoScanAndLabel.UC
...
@@ -151,7 +152,7 @@ namespace AutoScanAndLabel.UC
});
});
}
}
else
else
MessageBox
.
Show
(
"当前没有料串不能请求取料串"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0037"
,
"当前没有料串不能请求取料串"
)
);
}
}
private
void
RequestLeft
()
private
void
RequestLeft
()
{
{
...
@@ -190,12 +191,12 @@ namespace AutoScanAndLabel.UC
...
@@ -190,12 +191,12 @@ namespace AutoScanAndLabel.UC
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
{
{
MessageBox
.
Show
(
"机器尚未启动不能呼叫Agv"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0034"
,
"机器尚未启动不能呼叫Agv"
)
);
return
;
return
;
}
}
if
(
InCalling
)
if
(
InCalling
)
{
{
MessageBox
.
Show
(
"已呼叫Agv,不能重复呼叫"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0035"
,
"已呼叫Agv,不能重复呼叫"
)
);
return
;
return
;
}
}
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
LeftEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
LeftEnd_Check
).
Equals
(
IO_VALUE
.
HIGH
))
...
@@ -230,19 +231,19 @@ namespace AutoScanAndLabel.UC
...
@@ -230,19 +231,19 @@ namespace AutoScanAndLabel.UC
});
});
}
}
else
else
MessageBox
.
Show
(
"当前没有料串不能请求取料串"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0037"
,
"当前没有料串不能请求取料串"
)
);
}
}
private
void
button_leftneedempty_Click
(
object
sender
,
EventArgs
e
)
private
void
button_leftneedempty_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
{
{
MessageBox
.
Show
(
"机器尚未启动不能呼叫Agv"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0034"
,
"机器尚未启动不能呼叫Agv"
)
);
return
;
return
;
}
}
if
(
InCalling
)
if
(
InCalling
)
{
{
MessageBox
.
Show
(
"已呼叫Agv,不能重复呼叫"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0035"
,
"已呼叫Agv,不能重复呼叫"
)
);
return
;
return
;
}
}
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
LeftEnd_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
LeftEnd_Check
).
Equals
(
IO_VALUE
.
LOW
))
...
@@ -276,7 +277,7 @@ namespace AutoScanAndLabel.UC
...
@@ -276,7 +277,7 @@ namespace AutoScanAndLabel.UC
});
});
}
}
else
else
MessageBox
.
Show
(
"当前有料串不能请求进入料串"
);
MessageBox
.
Show
(
crc
.
GetString
(
"Res0036"
,
"当前有料串不能请求进入料串"
)
);
}
}
private
void
checkBox1_CheckedChanged
(
object
sender
,
EventArgs
e
)
private
void
checkBox1_CheckedChanged
(
object
sender
,
EventArgs
e
)
...
@@ -298,4 +299,4 @@ namespace AutoScanAndLabel.UC
...
@@ -298,4 +299,4 @@ namespace AutoScanAndLabel.UC
InCalling
=
false
;
InCalling
=
false
;
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
Common/util/TcpServer.cs
查看文件 @
a20964d
...
@@ -34,7 +34,7 @@ namespace OnlineStore.Common
...
@@ -34,7 +34,7 @@ namespace OnlineStore.Common
private
void
logLocalIp
()
private
void
logLocalIp
()
{
{
string
[]
addresses
=
GetLocalAddresses
();
string
[]
addresses
=
GetLocalAddresses
();
string
iplist
=
$
"本机IP:"
;
string
iplist
=
$
"本机IP
"
+
"
:"
;
if
(
addresses
.
Length
>
0
)
if
(
addresses
.
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
...
...
Common/util/UdpServer.cs
查看文件 @
a20964d
...
@@ -27,7 +27,7 @@ namespace OnlineStore.Common
...
@@ -27,7 +27,7 @@ namespace OnlineStore.Common
private
void
logLocalIp
()
private
void
logLocalIp
()
{
{
string
[]
addresses
=
GetLocalAddresses
();
string
[]
addresses
=
GetLocalAddresses
();
string
iplist
=
$
"本机IP:["
;
string
iplist
=
$
"本机IP
"
+
"
:["
;
if
(
addresses
.
Length
>
0
)
if
(
addresses
.
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
...
...
DL.StandardRobots/TCP/TcpServer.cs
查看文件 @
a20964d
using
DL.Utils
;
using
OnlineStore
;
using
DL.Utils
;
using
log4net
;
using
log4net
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -37,7 +38,7 @@ namespace DL.Com.TCP
...
@@ -37,7 +38,7 @@ namespace DL.Com.TCP
private
void
logLocalIp
()
private
void
logLocalIp
()
{
{
string
[]
addresses
=
GetLocalAddresses
();
string
[]
addresses
=
GetLocalAddresses
();
string
iplist
=
"本机IP
:["
;
string
iplist
=
crc
.
GetString
(
"Res0041"
,
"本机IP"
)+
"
:["
;
if
(
addresses
.
Length
>
0
)
if
(
addresses
.
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
...
@@ -279,7 +280,7 @@ namespace DL.Com.TCP
...
@@ -279,7 +280,7 @@ namespace DL.Com.TCP
expr_36
[
arg_53_1
]
=
((
expr_47
!=
null
)
?
expr_47
.
ToString
()
:
null
);
expr_36
[
arg_53_1
]
=
((
expr_47
!=
null
)
?
expr_47
.
ToString
()
:
null
);
expr_36
[
2
]
=
"】port【"
;
expr_36
[
2
]
=
"】port【"
;
expr_36
[
3
]
=
iPEndPoint
.
Port
.
ToString
();
expr_36
[
3
]
=
iPEndPoint
.
Port
.
ToString
();
expr_36
[
4
]
=
"】
已使用"
;
expr_36
[
4
]
=
"】
"
+
crc
.
GetString
(
"Res0044"
,
"已使用"
)
;
LogUtil
.
Error
(
string
.
Concat
(
expr_36
));
LogUtil
.
Error
(
string
.
Concat
(
expr_36
));
result
=
true
;
result
=
true
;
break
;
break
;
...
@@ -324,4 +325,4 @@ namespace DL.Com.TCP
...
@@ -324,4 +325,4 @@ namespace DL.Com.TCP
set
{
this
.
m_clientSocket
=
value
;
}
set
{
this
.
m_clientSocket
=
value
;
}
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
DL.StandardRobots/UdpServer.cs
查看文件 @
a20964d
using
OnlineStore
;
using
DL.Utils
;
using
DL.Utils
;
using
log4net
;
using
log4net
;
using
System
;
using
System
;
...
@@ -30,7 +31,7 @@ namespace DL.Com
...
@@ -30,7 +31,7 @@ namespace DL.Com
private
void
logLocalIp
()
private
void
logLocalIp
()
{
{
string
[]
addresses
=
GetLocalAddresses
();
string
[]
addresses
=
GetLocalAddresses
();
string
iplist
=
"本机IP:["
;
string
iplist
=
crc
.
GetString
(
"Res0038"
,
"本机IP:["
)
;
if
(
addresses
.
Length
>
0
)
if
(
addresses
.
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
...
@@ -180,4 +181,4 @@ namespace DL.Com
...
@@ -180,4 +181,4 @@ namespace DL.Com
return
$
"{string.Join("
,
",GetLocalAddresses())}:{serverPort}"
;
return
$
"{string.Join("
,
",GetLocalAddresses())}:{serverPort}"
;
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论