Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 82bb776a
由
LN
编写于
2020-04-13 16:36:55 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
送出料架时没发MayLeave
1 个父辈
134a19b4
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
101 行增加
和
73 行删除
source/ACPackingStore/FrmBox.Designer.cs
source/ACPackingStore/记录.txt
source/Common/util/HttpHelper.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
source/ACPackingStore/FrmBox.Designer.cs
查看文件 @
82bb776
...
...
@@ -1570,11 +1570,11 @@
// lblMoveEquipInfo
//
this
.
lblMoveEquipInfo
.
AutoSize
=
true
;
this
.
lblMoveEquipInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveEquipInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveEquipInfo
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblMoveEquipInfo
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
39
);
this
.
lblMoveEquipInfo
.
Name
=
"lblMoveEquipInfo"
;
this
.
lblMoveEquipInfo
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
19
);
this
.
lblMoveEquipInfo
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
lblMoveEquipInfo
.
TabIndex
=
272
;
this
.
lblMoveEquipInfo
.
Text
=
"移栽状态"
;
//
...
...
source/ACPackingStore/记录.txt
查看文件 @
82bb776
...
...
@@ -121,14 +121,31 @@ agv到达时,根据rfid判断是否有料架
出库时未读到料架号,直接送出料架
紧急料分盘料料架送出逻辑修改。
分盘料/紧急料放上料串或料架时调用
/rest/api/qisda/device/afterPutCut 参数: cid: 料仓cid,流水线可传入空 barcode : 条码 rfid : RFID rfidLoc: 料架位置,流水线可传-1 > 返回: >>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} ` >> >> - code: 0为正常,其他为异常, >> - msg:消息, >> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识,value为空闲仓位) >> - cutPackageTask: 表示当前包装仓的分盘任务数 >> - urgentPackageTask: 表示当前包装仓的紧急料任务数 >> - cutTask: 表示流水线分盘任务数 >> - urgentTask: 表示流水线紧急料任务数
分盘料/紧急料放上料串或料架时调用
/rest/api/qisda/device/afterPutCut
参数:
cid: 料仓cid,流水线可传入空
barcode : 条码
rfid : RFID
rfidLoc: 料架位置,流水线可传-1
> 返回:
>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
>>
>> - code: 0为正常,其他为异常,
>> - msg:消息,
>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识,value为空闲仓位)
>> - cutPackageTask: 表示当前包装仓的分盘任务数
>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
>> - cutTask: 表示流水线分盘任务数
>> - urgentTask: 表示流水线紧急料任务数
...
...
source/Common/util/HttpHelper.cs
查看文件 @
82bb776
...
...
@@ -18,34 +18,34 @@ namespace OnlineStore.Common
{
public
class
HttpHelper
{
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public
static
string
Post
(
string
url
,
string
paramData
)
{
return
Post
(
url
,
paramData
,
Encoding
.
UTF8
);
}
public
static
bool
PingURLIP
(
string
url
,
int
ms
=
100
)
{
string
[]
urlArray
=
url
.
Split
(
'/'
);
if
(
urlArray
.
Length
>
3
)
{
string
ip
=
urlArray
[
2
];
//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
// {
// //不通
// return false;
// }
// }
// return true;
//}
Ping
pingSender
=
new
Ping
();
PingReply
reply
=
pingSender
.
Send
(
ip
,
ms
);
//第一个参数为ip地址,第二个参数为ping的时间
if
(
reply
.
Status
==
IPStatus
.
Success
)
{
//通
return
true
;
}
else
{
//不通
return
false
;
}
}
return
true
;
}
/// <summary>
///
/// </summary>
...
...
@@ -56,14 +56,15 @@ namespace OnlineStore.Common
public
static
Operation
Post
(
string
url
,
Operation
operation
,
bool
simulate
)
{
try
{
//如果Op=0或者Op=5,先拼Ip,不通不发送
if
(
operation
.
op
<
0
||
operation
.
op
.
Equals
(
5
))
{
if
(
PingURLIP
(
url
,
100
).
Equals
(
false
))
{
return
null
;
}
}
{
////如果Op=0或者Op=5,先拼Ip,不通不发送
//if (operation.op < 0 || operation.op.Equals(5))
//{
// if (PingURLIP(url, 100).Equals(false))
// {
// return null;
// }
//}
if
(
simulate
)
{
//模拟服务器返回
...
...
@@ -76,7 +77,7 @@ namespace OnlineStore.Common
{
//入库或出库
string
json
=
JsonHelper
.
SerializeObject
(
operation
);
LogUtil
.
error
(
"模拟HTTP服务器返回出库入库信息:"
+
json
);
LogUtil
.
error
(
"模拟HTTP服务器返回出库入库信息:"
+
json
);
return
operation
;
}
}
...
...
@@ -114,11 +115,11 @@ namespace OnlineStore.Common
private
static
int
isLog
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Server_Log_Open
);
public
static
string
LastServerMsg
=
""
;
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
{
if
(
PingURLIP
(
url
,
100
).
Equals
(
false
))
{
return
null
;
}
{
//
if (PingURLIP(url, 100).Equals(false))
//
{
//
return null;
//
}
if
(
isLog
==
1
)
{
...
...
@@ -158,9 +159,9 @@ namespace OnlineStore.Common
{
LogUtil
.
info
(
"收到服务器数据【"
+
result
+
"】"
);
}
LastServerMsg
=
DateTime
.
Now
.
ToLongTimeString
()+
" URL:"
+
url
+
"\r\n"
+
"发送:"
+
paramData
+
"\r\n"
+
"接收:"
+
result
+
"\r\n"
LastServerMsg
=
DateTime
.
Now
.
ToLongTimeString
()
+
" URL:"
+
url
+
"\r\n"
+
"发送:"
+
paramData
+
"\r\n"
+
"接收:"
+
result
+
"\r\n"
;
return
result
;
...
...
@@ -175,19 +176,19 @@ namespace OnlineStore.Common
{
try
{
LogUtil
.
info
(
"HTTP GET FROM: "
+
url
);
LogUtil
.
info
(
"HTTP GET FROM: "
+
url
);
var
wc
=
new
WebClient
{
Encoding
=
encoding
};
var
readStream
=
wc
.
OpenRead
(
url
);
using
(
var
sr
=
new
StreamReader
(
readStream
,
encoding
))
{
var
result
=
sr
.
ReadToEnd
();
LogUtil
.
info
(
"receive << "
+
result
);
LogUtil
.
info
(
"receive << "
+
result
);
return
result
;
}
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"HTTP GET ERROR:"
+
e
.
Message
,
2
);
LogUtil
.
error
(
"HTTP GET ERROR:"
+
e
.
Message
,
2
);
}
return
""
;
}
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
82bb776
...
...
@@ -941,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_11_ToShelf
)
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_12_PutReel
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":放下物品,压紧轴到P1,升降轴至P101,清空
serverShelf
Data=null "
);
InOutStoreLog
(
"出库 "
+
MoveInfo
.
SLog
+
":放下物品,压紧轴到P1,升降轴至P101,清空
task
Data=null "
);
ACAxisMove
(
Config
.
Comp_Axis
,
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_LP101
,
Config
.
UpDownAxis_P101_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
82bb776
...
...
@@ -393,23 +393,23 @@ namespace OnlineStore.DeviceLibrary
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_WaitEmptyAgv
))
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
StoreMoveStep
.
BS_03_WaitEmptyAgv
))
{
if
(!
rfid
.
Equals
(
""
))
{
if
(!
rfid
.
Equals
(
""
))
{
string
mark
=
GetMarkInfo
();
LogUtil
.
error
(
Name
+
logN
+
" 当前出库中 BS_03_WaitEmptyAgv,RFID["
+
rfid
+
"]不是空车,不处理agv,重发 NeedLeave ["
+
mark
+
"]["
+
CurrShelfID
+
"]"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
,
true
);
return
false
;
}
//等待空车到达
LogUtil
.
info
(
Name
+
logN
+
",当前出库中 BS_03_WaitEmptyAgv,正在等待料架到达"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_DoorOpen
);
InOutStoreLog
(
"送出料架等待空车"
+
MoveInfo
.
SLog
+
":agv到达,打开入料口移门"
);
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
string
mark
=
GetMarkInfo
();
LogUtil
.
error
(
Name
+
logN
+
" 当前 BS_03_WaitEmptyAgv,RFID["
+
rfid
+
"]不是空车,不处理agv,重发 NeedLeave ["
+
mark
+
"]["
+
CurrShelfID
+
"]"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
,
true
);
return
false
;
}
//等待空车到达
LogUtil
.
info
(
Name
+
logN
+
",当前 BS_03_WaitEmptyAgv,正在等待料架到达"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_DoorOpen
);
InOutStoreLog
(
"送出料架等待空车"
+
MoveInfo
.
SLog
+
":agv到达,打开入料口移门"
);
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
}
else
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
...
...
@@ -435,28 +435,38 @@ namespace OnlineStore.DeviceLibrary
private
string
CodeMsg
=
""
;
private
bool
isInProcess
=
false
;
private
DateTime
lastConTime
=
DateTime
.
Now
;
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
if
(
isInProcess
)
{
return
;
TimeSpan
span
=
DateTime
.
Now
-
lastConTime
;
if
(
span
.
TotalSeconds
<
60
)
{
return
;
}
}
isInProcess
=
true
;
//HumitureController.QueryData();
humBean
.
HumidityProcess
(
this
);
if
(
StoreManager
.
IsConnectServer
)
lastConTime
=
DateTime
.
Now
;
try
{
try
//HumitureController.QueryData();
humBean
.
HumidityProcess
(
this
);
if
(
StoreManager
.
IsConnectServer
)
{
SendLineStatus
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"定时SendLineStatus出错:"
+
ex
.
ToString
());
}
}
isInProcess
=
false
;
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"定时SendLineStatus出错:"
+
ex
.
ToString
());
}
finally
{
isInProcess
=
false
;
}
}
/// <summary>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论