Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ab2d5cda
由
LN
编写于
2020-03-12 08:49:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
arriveRobotLocation增加barcode参数
1 个父辈
6c4d7bb7
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
35 行增加
和
3 行删除
source/AssemblyLineClient/记录.txt
source/Common/util/MyWebClient.cs
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/AssemblyLineClient/记录.txt
查看文件 @
ab2d5cd
...
...
@@ -284,6 +284,9 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800
IO_Value增加None的定义,防止误操作
20200311
扫码获取图片方式修改。
料盘到达接驳台后,给服务器发送条码信息,arriveRobotLocation增加barcode参数
...
...
source/Common/util/MyWebClient.cs
查看文件 @
ab2d5cd
...
...
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using
System.IO
;
using
System.Linq
;
using
System.Net
;
using
System.Net.NetworkInformation
;
using
System.Net.Security
;
using
System.Reflection
;
using
System.Text
;
...
...
@@ -48,6 +49,29 @@ namespace OnlineStore.Common
}
public
class
HttpHelper
{
public
static
bool
PingURLIP
(
string
url
,
int
ms
=
100
)
{
string
[]
urlArray
=
url
.
Split
(
'/'
);
if
(
urlArray
.
Length
>
3
)
{
string
ip
=
urlArray
[
2
];
Ping
pingSender
=
new
Ping
();
PingReply
reply
=
pingSender
.
Send
(
ip
,
ms
);
//第一个参数为ip地址,第二个参数为ping的时间
if
(
reply
.
Status
==
IPStatus
.
Success
)
{
//通
return
true
;
}
else
{
LogUtil
.
error
(
"Ping IP "
+
ip
+
" : false"
);
//不通
return
false
;
}
}
return
true
;
}
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
string
Post
(
string
url
,
string
paramData
)
{
...
...
@@ -56,6 +80,10 @@ namespace OnlineStore.Common
private
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
{
if
(
PingURLIP
(
url
,
100
).
Equals
(
false
))
{
return
""
;
}
if
(
isLog
==
1
)
{
LOGGER
.
Info
(
"给服务器发送数据【"
+
paramData
+
"】 "
);
...
...
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
查看文件 @
ab2d5cd
...
...
@@ -189,7 +189,7 @@ namespace OnlineStore.DeviceLibrary
}
LogUtil
.
info
(
hengyiName
+
"出口有料,转动接驳台皮带线2000 , 收到SeparateDevice_Check信号,调用arriveRobotLocation="
+
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
}
else
{
...
...
@@ -341,7 +341,7 @@ namespace OnlineStore.DeviceLibrary
}
LogUtil
.
info
(
hengyiName
+
MoveInfo
.
SLog
+
"送料,接驳台有料盘,等待2000,调用arriveRobotLocation="
+
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
,
StationInfo_Move
.
CodeStr
);
}
else
{
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
ab2d5cd
...
...
@@ -334,7 +334,7 @@ namespace OnlineStore.DeviceLibrary
//> 返回:
//>>``
private
static
string
Addr_arriveRobotLocation
=
"/rest/api/qisda/device/arriveRobotLocation"
;
public
static
string
arriveRobotLocation
(
string
deviceName
,
int
robotIndex
)
public
static
string
arriveRobotLocation
(
string
deviceName
,
int
robotIndex
,
string
barcode
)
{
string
msg
=
""
;
try
...
...
@@ -346,6 +346,7 @@ namespace OnlineStore.DeviceLibrary
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"robotIndex"
,
robotIndex
.
ToString
());
//rfid
paramMap
.
Add
(
"barcode"
,
barcode
);
string
server
=
GetAddr
(
Addr_arriveRobotLocation
,
paramMap
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
deviceName
+
"arriveRobotLocation 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论