Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-ACPackingStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 82bb776a
由
LN
编写于
2020-04-13 16:36:55 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
送出料架时没发MayLeave
1 个父辈
134a19b4
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
79 行增加
和
51 行删除
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 @@
...
@@ -1570,11 +1570,11 @@
// lblMoveEquipInfo
// lblMoveEquipInfo
//
//
this
.
lblMoveEquipInfo
.
AutoSize
=
true
;
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
.
ForeColor
=
System
.
Drawing
.
Color
.
Blue
;
this
.
lblMoveEquipInfo
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
39
);
this
.
lblMoveEquipInfo
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
39
);
this
.
lblMoveEquipInfo
.
Name
=
"lblMoveEquipInfo"
;
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
.
TabIndex
=
272
;
this
.
lblMoveEquipInfo
.
Text
=
"移栽状态"
;
this
.
lblMoveEquipInfo
.
Text
=
"移栽状态"
;
//
//
...
...
source/ACPackingStore/记录.txt
查看文件 @
82bb776
...
@@ -121,9 +121,26 @@ agv到达时,根据rfid判断是否有料架
...
@@ -121,9 +121,26 @@ 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
...
@@ -23,28 +23,28 @@ namespace OnlineStore.Common
...
@@ -23,28 +23,28 @@ namespace OnlineStore.Common
{
{
return
Post
(
url
,
paramData
,
Encoding
.
UTF8
);
return
Post
(
url
,
paramData
,
Encoding
.
UTF8
);
}
}
public
static
bool
PingURLIP
(
string
url
,
int
ms
=
100
)
//
public static bool PingURLIP(string url, int ms=100)
{
//
{
string
[]
urlArray
=
url
.
Split
(
'/'
);
//
string[] urlArray = url.Split('/');
if
(
urlArray
.
Length
>
3
)
//
if (urlArray.Length > 3)
{
//
{
string
ip
=
urlArray
[
2
];
//
string ip = urlArray[2];
Ping
pingSender
=
new
Ping
();
//
Ping pingSender = new Ping();
PingReply
reply
=
pingSender
.
Send
(
ip
,
ms
);
//第一个参数为ip地址,第二个参数为ping的时间
//
PingReply reply = pingSender.Send(ip, ms);//第一个参数为ip地址,第二个参数为ping的时间
if
(
reply
.
Status
==
IPStatus
.
Success
)
//
if (reply.Status == IPStatus.Success)
{
//
{
//通
//
//通
return
true
;
//
return true;
}
//
}
else
//
else
{
//
{
//不通
//
//不通
return
false
;
//
return false;
}
//
}
}
//
}
return
true
;
//
return true;
}
//
}
/// <summary>
/// <summary>
///
///
...
@@ -56,14 +56,15 @@ namespace OnlineStore.Common
...
@@ -56,14 +56,15 @@ namespace OnlineStore.Common
public
static
Operation
Post
(
string
url
,
Operation
operation
,
bool
simulate
)
public
static
Operation
Post
(
string
url
,
Operation
operation
,
bool
simulate
)
{
{
try
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
)
if
(
simulate
)
{
//模拟服务器返回
{
//模拟服务器返回
...
@@ -76,7 +77,7 @@ namespace OnlineStore.Common
...
@@ -76,7 +77,7 @@ namespace OnlineStore.Common
{
//入库或出库
{
//入库或出库
string
json
=
JsonHelper
.
SerializeObject
(
operation
);
string
json
=
JsonHelper
.
SerializeObject
(
operation
);
LogUtil
.
error
(
"模拟HTTP服务器返回出库入库信息:"
+
json
);
LogUtil
.
error
(
"模拟HTTP服务器返回出库入库信息:"
+
json
);
return
operation
;
return
operation
;
}
}
}
}
...
@@ -115,10 +116,10 @@ namespace OnlineStore.Common
...
@@ -115,10 +116,10 @@ namespace OnlineStore.Common
public
static
string
LastServerMsg
=
""
;
public
static
string
LastServerMsg
=
""
;
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
public
static
string
Post
(
string
url
,
string
paramData
,
Encoding
encoding
)
{
{
if
(
PingURLIP
(
url
,
100
).
Equals
(
false
))
//
if (PingURLIP(url, 100).Equals(false))
{
//
{
return
null
;
//
return null;
}
//
}
if
(
isLog
==
1
)
if
(
isLog
==
1
)
{
{
...
@@ -158,9 +159,9 @@ namespace OnlineStore.Common
...
@@ -158,9 +159,9 @@ namespace OnlineStore.Common
{
{
LogUtil
.
info
(
"收到服务器数据【"
+
result
+
"】"
);
LogUtil
.
info
(
"收到服务器数据【"
+
result
+
"】"
);
}
}
LastServerMsg
=
DateTime
.
Now
.
ToLongTimeString
()+
" URL:"
+
url
+
"\r\n"
LastServerMsg
=
DateTime
.
Now
.
ToLongTimeString
()
+
" URL:"
+
url
+
"\r\n"
+
"发送:"
+
paramData
+
"\r\n"
+
"发送:"
+
paramData
+
"\r\n"
+
"接收:"
+
result
+
"\r\n"
+
"接收:"
+
result
+
"\r\n"
;
;
return
result
;
return
result
;
...
@@ -175,19 +176,19 @@ namespace OnlineStore.Common
...
@@ -175,19 +176,19 @@ namespace OnlineStore.Common
{
{
try
try
{
{
LogUtil
.
info
(
"HTTP GET FROM: "
+
url
);
LogUtil
.
info
(
"HTTP GET FROM: "
+
url
);
var
wc
=
new
WebClient
{
Encoding
=
encoding
};
var
wc
=
new
WebClient
{
Encoding
=
encoding
};
var
readStream
=
wc
.
OpenRead
(
url
);
var
readStream
=
wc
.
OpenRead
(
url
);
using
(
var
sr
=
new
StreamReader
(
readStream
,
encoding
))
using
(
var
sr
=
new
StreamReader
(
readStream
,
encoding
))
{
{
var
result
=
sr
.
ReadToEnd
();
var
result
=
sr
.
ReadToEnd
();
LogUtil
.
info
(
"receive << "
+
result
);
LogUtil
.
info
(
"receive << "
+
result
);
return
result
;
return
result
;
}
}
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
{
{
LogUtil
.
error
(
"HTTP GET ERROR:"
+
e
.
Message
,
2
);
LogUtil
.
error
(
"HTTP GET ERROR:"
+
e
.
Message
,
2
);
}
}
return
""
;
return
""
;
}
}
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Partial.cs
查看文件 @
82bb776
...
@@ -941,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -941,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_11_ToShelf
)
else
if
(
MoveInfo
.
MoveStep
==
StoreMoveStep
.
SO_11_ToShelf
)
{
{
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
SO_12_PutReel
);
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
.
Comp_Axis
,
moveP
.
ComPress_P1
,
Config
.
CompAxis_P1_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_LP101
,
Config
.
UpDownAxis_P101_Speed
);
ACAxisMove
(
Config
.
UpDown_Axis
,
moveP
.
UpDown_LP101
,
Config
.
UpDownAxis_P101_Speed
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
...
...
source/DeviceLibrary/ACPackingStore/AC_BOX_Bean_Shelf.cs
查看文件 @
82bb776
...
@@ -393,24 +393,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -393,24 +393,24 @@ namespace OnlineStore.DeviceLibrary
DoorBean
.
StartOpen
(
MoveInfo
);
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
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
();
string
mark
=
GetMarkInfo
();
LogUtil
.
error
(
Name
+
logN
+
" 当前出库中
BS_03_WaitEmptyAgv,RFID["
+
rfid
+
"]不是空车,不处理agv,重发 NeedLeave ["
+
mark
+
"]["
+
CurrShelfID
+
"]"
);
LogUtil
.
error
(
Name
+
logN
+
" 当前
BS_03_WaitEmptyAgv,RFID["
+
rfid
+
"]不是空车,不处理agv,重发 NeedLeave ["
+
mark
+
"]["
+
CurrShelfID
+
"]"
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
,
true
);
AgvClient
.
SetStatus
(
Config
.
AgvNodeName
,
mark
,
CurrShelfID
,
ClientAction
.
NeedLeave
,
ClientLevel
.
High
,
true
);
return
false
;
return
false
;
}
}
//等待空车到达
//等待空车到达
LogUtil
.
info
(
Name
+
logN
+
",当前出库中
BS_03_WaitEmptyAgv,正在等待料架到达"
);
LogUtil
.
info
(
Name
+
logN
+
",当前
BS_03_WaitEmptyAgv,正在等待料架到达"
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_DoorOpen
);
MoveInfo
.
NextMoveStep
(
StoreMoveStep
.
BS_04_DoorOpen
);
InOutStoreLog
(
"送出料架等待空车"
+
MoveInfo
.
SLog
+
":agv到达,打开入料口移门"
);
InOutStoreLog
(
"送出料架等待空车"
+
MoveInfo
.
SLog
+
":agv到达,打开入料口移门"
);
DoorBean
.
StartOpen
(
MoveInfo
);
DoorBean
.
StartOpen
(
MoveInfo
);
return
true
;
return
true
;
}
}
}
else
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
else
if
(
storeRunStatus
.
Equals
(
StoreRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
None
)
&&
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
))
IOValue
(
IO_Type
.
LineTake_Check
).
Equals
(
IO_VALUE
.
LOW
))
...
@@ -435,29 +435,39 @@ namespace OnlineStore.DeviceLibrary
...
@@ -435,29 +435,39 @@ namespace OnlineStore.DeviceLibrary
private
string
CodeMsg
=
""
;
private
string
CodeMsg
=
""
;
private
bool
isInProcess
=
false
;
private
bool
isInProcess
=
false
;
private
DateTime
lastConTime
=
DateTime
.
Now
;
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
public
void
server_connect_timer_Tick
(
object
sender
,
EventArgs
e
)
{
{
if
(
isInProcess
)
if
(
isInProcess
)
{
{
TimeSpan
span
=
DateTime
.
Now
-
lastConTime
;
if
(
span
.
TotalSeconds
<
60
)
{
return
;
return
;
}
}
}
isInProcess
=
true
;
isInProcess
=
true
;
lastConTime
=
DateTime
.
Now
;
try
{
//HumitureController.QueryData();
//HumitureController.QueryData();
humBean
.
HumidityProcess
(
this
);
humBean
.
HumidityProcess
(
this
);
if
(
StoreManager
.
IsConnectServer
)
if
(
StoreManager
.
IsConnectServer
)
{
{
try
{
SendLineStatus
();
SendLineStatus
();
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
Name
+
"定时SendLineStatus出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
Name
+
"定时SendLineStatus出错:"
+
ex
.
ToString
());
}
}
}
finally
{
isInProcess
=
false
;
isInProcess
=
false
;
}
}
}
/// <summary>
/// <summary>
/// 获取整个料仓的状态
/// 获取整个料仓的状态
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论