Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
DoubleLineClient_3D
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4fa08e17
由
张东亮
编写于
2021-09-28 16:05:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
佳世达3楼双层线
1 个父辈
a63f1d7e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
123 行增加
和
5 行删除
source/Common/util/MyWebClient.cs
source/DeviceLibrary/LineConfig/DoubleLineConfig.csv
source/DeviceLibrary/doubleLine/DoubleLineBean.cs
source/DeviceLibrary/doubleLine/DoubleLineBean_S1Shelf.cs
source/DeviceLibrary/manager/HttpServer.cs
source/DoubleLineClient_3D/FrmDoubleClient.cs
source/LoadCVSLibrary/Config/bean/IO_Type.cs
source/Common/util/MyWebClient.cs
查看文件 @
4fa08e1
...
@@ -142,13 +142,13 @@ namespace OnlineStore.Common
...
@@ -142,13 +142,13 @@ namespace OnlineStore.Common
{
{
try
try
{
{
LogUtil
.
info
(
"HTTP GET FROM: "
+
url
);
LogUtil
.
debug
(
"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
.
debug
(
"receive << "
+
result
);
return
result
;
return
result
;
}
}
}
}
...
...
source/DeviceLibrary/LineConfig/DoubleLineConfig.csv
查看文件 @
4fa08e1
...
@@ -86,6 +86,8 @@ DI,右上层线体阻挡2检测,RHigh_StopCheck2,1,PRO_AOI_IP_3,0,右上层线体阻挡2检测,X42
...
@@ -86,6 +86,8 @@ DI,右上层线体阻挡2检测,RHigh_StopCheck2,1,PRO_AOI_IP_3,0,右上层线体阻挡2检测,X42
DI,左下层线体满料检测,LLow_FullCheck,2,PRO_AOI_IP_3,0,左下层线体满料检测,X43,X43,0
DI,左下层线体满料检测,LLow_FullCheck,2,PRO_AOI_IP_3,0,左下层线体满料检测,X43,X43,0
DI,左上层线体满料检测,LHigh_FullCheck,3,PRO_AOI_IP_3,0,左上层线体满料检测,X44,X44,0
DI,左上层线体满料检测,LHigh_FullCheck,3,PRO_AOI_IP_3,0,左上层线体满料检测,X44,X44,0
DI,右上层线体满料检测,RHigh_FullCheck,4,PRO_AOI_IP_3,0,右上层线体满料检测,X45,X45,0
DI,右上层线体满料检测,RHigh_FullCheck,4,PRO_AOI_IP_3,0,右上层线体满料检测,X45,X45,0
DI,中间提升机左侧保护信号,Protect_Left_Sig,6,PRO_AOI_IP_3,0,中间提升机左侧保护信号,X47,X47,0
DI,中间提升机右侧保护信号,Protect_Right_Sig,7,PRO_AOI_IP_3,0,中间提升机右侧保护信号,X47,X48,0
,,,,,,,,,
,,,,,,,,,
DO,上料工位顶升上升,S1_TopCylinderUp,0,PRO_AOI_IP_3,0,上料工位顶升上升,Y41,Y41,0
DO,上料工位顶升上升,S1_TopCylinderUp,0,PRO_AOI_IP_3,0,上料工位顶升上升,Y41,Y41,0
DO,上料工位顶升下降,S1_TopCylinderDown,1,PRO_AOI_IP_3,0,上料工位顶升下降,Y42,Y42,0
DO,上料工位顶升下降,S1_TopCylinderDown,1,PRO_AOI_IP_3,0,上料工位顶升下降,Y42,Y42,0
...
...
source/DeviceLibrary/doubleLine/DoubleLineBean.cs
查看文件 @
4fa08e1
...
@@ -570,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -570,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
string
leftShelf
=
LeftUpdownRFID
.
Equals
(
""
)
?
""
:
" 左侧料架="
+
LeftUpdownRFID
+
" "
;
string
leftShelf
=
LeftUpdownRFID
.
Equals
(
""
)
?
""
:
" 左侧料架="
+
LeftUpdownRFID
+
" "
;
string
msg
=
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
MoveStep
+
" "
+
leftShelf
+
"\r\n"
+
string
msg
=
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
MoveStep
+
" "
+
leftShelf
+
"\r\n"
+
""
+
SOneMoveInfo
.
MoveType
+
" "
+
SOneMoveInfo
.
MoveStep
+
" \t"
+
AllTaskInfo
.
ToStr
()
+
"\r\n"
+
""
+
SOneMoveInfo
.
MoveType
+
" "
+
SOneMoveInfo
.
MoveStep
+
" \t"
+
AllTaskInfo
.
ToStr
()
+
"\r\n"
+
"S1工位("
+
(
S1IsReady
()
?
"可放料"
:
"不可放料"
)
+
"): "
+
LeftSName
+
" "
+
S1SName
+
" "
+
RightSName
+
""
+
" "
+
s1Info
+
"\r\n"
+
"S1工位("
+
(
S1IsReady
()
?
"可放料"
:
"不可放料"
)
+
"): "
+
LeftSName
+
" "
+
S1SName
+
" "
+
RightSName
+
""
+
" "
+
s1Info
+
"
"
+
CurSName
+
"
\r\n"
+
// "" + LeftRobot.Name + ":" + LeftRobot.MoveInfo.MoveType + " " + LeftRobot.MoveInfo.MoveStep + " [" + LeftRobot.CurrPoint + "]["+LeftRobot.NeedShelf+"] " + LeftRobot.CurrTray.ToStr() + "" + "\r\n" +
// "" + LeftRobot.Name + ":" + LeftRobot.MoveInfo.MoveType + " " + LeftRobot.MoveInfo.MoveStep + " [" + LeftRobot.CurrPoint + "]["+LeftRobot.NeedShelf+"] " + LeftRobot.CurrTray.ToStr() + "" + "\r\n" +
//"" + RightRobot.Name + ":" + RightRobot.MoveInfo.MoveType + " " + RightRobot.MoveInfo.MoveStep + " [" + RightRobot.CurrPoint + "][" + RightRobot.NeedShelf + "] " + RightRobot.CurrTray.ToStr() + ""
//"" + RightRobot.Name + ":" + RightRobot.MoveInfo.MoveType + " " + RightRobot.MoveInfo.MoveStep + " [" + RightRobot.CurrPoint + "][" + RightRobot.NeedShelf + "] " + RightRobot.CurrTray.ToStr() + ""
...
...
source/DeviceLibrary/doubleLine/DoubleLineBean_S1Shelf.cs
查看文件 @
4fa08e1
...
@@ -43,6 +43,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -43,6 +43,10 @@ namespace OnlineStore.DeviceLibrary
{
{
get
{
return
"【R_"
+
S1_RightShelfId
+
"_"
+
GetXNrfid
(
S1_RightShelfId
)
+
"】"
;
}
get
{
return
"【R_"
+
S1_RightShelfId
+
"_"
+
GetXNrfid
(
S1_RightShelfId
)
+
"】"
;
}
}
}
private
string
CurSName
{
get
{
return
wOData
.
ToTxt
();
}
}
/// <summary>
/// <summary>
/// 所有任务信息
/// 所有任务信息
/// </summary>
/// </summary>
...
@@ -51,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -51,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
/// 上料工位任务信息
/// 上料工位任务信息
/// </summary>
/// </summary>
internal
ShelfTaskInfo
S1_ShelfTask
=
new
ShelfTaskInfo
();
internal
ShelfTaskInfo
S1_ShelfTask
=
new
ShelfTaskInfo
();
internal
WOData
wOData
=
new
WOData
();
/// <summary>
/// <summary>
/// 上料工位检查,S1工位如果启动时有料架,左侧位置默认为00D,
/// 上料工位检查,S1工位如果启动时有料架,左侧位置默认为00D,
/// </summary>
/// </summary>
...
@@ -878,6 +882,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -878,6 +882,20 @@ namespace OnlineStore.DeviceLibrary
S1_ShelfTask
=
HttpServer
.
ShelfFinish
(
S1_CurrShelfId
);
S1_ShelfTask
=
HttpServer
.
ShelfFinish
(
S1_CurrShelfId
);
bool
isNeedLeave
=
false
;
bool
isNeedLeave
=
false
;
string
log
=
""
;
string
log
=
""
;
//当前工单跟料架工单是否匹配
if
(
HttpServer
.
FindCurSO
(
out
wOData
))
{
if
(
wOData
.
hSerial
.
Equals
(
""
))
{
isNeedLeave
=
true
;
log
=
" 当前无工单 "
+
wOData
.
hSerial
+
$
" ,料架{S1SName}需离开S1,"
;
}
else
if
(!
GetXNrfid
(
S1_CurrShelfId
).
Equals
(
""
)
&&
!
GetXNrfid
(
S1_CurrShelfId
).
StartsWith
(
wOData
.
hSerial
))
{
isNeedLeave
=
true
;
log
=
" 当前工单 "
+
wOData
.
hSerial
+
$
" 与料架工单{S1SName}不一样需离开S1,"
;
}
}
//判断的当前料架是否无任务
//判断的当前料架是否无任务
if
(
S1_ShelfTask
.
IsValid
()
&&
AllTaskInfo
.
IsValid
())
if
(
S1_ShelfTask
.
IsValid
()
&&
AllTaskInfo
.
IsValid
())
{
{
...
...
source/DeviceLibrary/manager/HttpServer.cs
查看文件 @
4fa08e1
...
@@ -18,6 +18,55 @@ namespace OnlineStore.DeviceLibrary
...
@@ -18,6 +18,55 @@ namespace OnlineStore.DeviceLibrary
public
HttpServer
()
public
HttpServer
()
{
{
}
}
private
static
string
Addr_CurSO
=
"/currentOutLine"
;
/// <summary>
/// 查询当前出料工单信息
/// </summary>
/// <returns></returns>
public
static
bool
FindCurSO
(
out
WOData
woData
)
{
woData
=
new
WOData
();
try
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
//paramMap.Add("deviceAlarmList", msgListStr);
string
server
=
GetAddr
(
Addr_CurSO
,
paramMap
);
DateTime
startTime
=
DateTime
.
Now
;
string
resultStr
=
HttpHelper
.
Get
(
server
);
LogUtil
.
debug
(
"当前正在出工单料信息【"
+
server
+
"】【"
+
resultStr
+
"】"
);
WorkOrder
workOrder
=
JsonHelper
.
DeserializeJsonToObject
<
WorkOrder
>(
resultStr
);
if
(
workOrder
==
null
)
{
return
false
;
}
else
{
if
(
workOrder
.
data
==
null
)
{
return
false
;
}
else
{
if
(
workOrder
.
data
!=
null
)
{
woData
=
workOrder
.
data
;
return
true
;
}
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"FindCurSO"
,
ex
);
return
false
;
}
return
false
;
}
private
static
string
Addr_updateDeviceAlarmMsg
=
"/updateDeviceAlarmMsg"
;
private
static
string
Addr_updateDeviceAlarmMsg
=
"/updateDeviceAlarmMsg"
;
/// <summary>
/// <summary>
/// 异常看板
/// 异常看板
...
@@ -362,6 +411,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -362,6 +411,29 @@ namespace OnlineStore.DeviceLibrary
}
}
/// <summary>
/// 当前正在出的工单信息
/// </summary>
public
class
WorkOrder
{
//{"code":0,"msg":"ok","data":{"hSerial":"32622","line":null,"so":"2506287"}}
//{"code":0,"msg":"ok","data":{"hSerial":"32651","line":"D2","so":"2508551"}}
public
int
code
{
get
;
set
;
}
public
string
msg
{
get
;
set
;
}
public
WOData
data
{
get
;
set
;
}
}
public
class
WOData
{
public
string
hSerial
{
get
;
set
;
}
=
""
;
public
string
line
{
get
;
set
;
}
=
""
;
public
string
so
{
get
;
set
;
}
=
""
;
public
string
ToTxt
()
{
return
string
.
Format
(
"[hSerial={0},line={1},so={2}]"
,
hSerial
,
line
,
so
);
}
}
public
class
TrayInfo
public
class
TrayInfo
{
{
public
int
robotNum
=
0
;
public
int
robotNum
=
0
;
...
...
source/DoubleLineClient_3D/FrmDoubleClient.cs
查看文件 @
4fa08e1
...
@@ -169,6 +169,8 @@ namespace OnlineStore.DoubleLineClient
...
@@ -169,6 +169,8 @@ namespace OnlineStore.DoubleLineClient
private
void
btnVmiStart_Click
(
object
sender
,
EventArgs
e
)
private
void
btnVmiStart_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(!
CheckProtectSig
())
return
;
if
(
DoubleLine
.
runStatus
>=
RunStatus
.
HomeMoving
)
if
(
DoubleLine
.
runStatus
>=
RunStatus
.
HomeMoving
)
{
{
btnVmiStart
.
Text
=
"复位"
;
btnVmiStart
.
Text
=
"复位"
;
...
@@ -183,7 +185,22 @@ namespace OnlineStore.DoubleLineClient
...
@@ -183,7 +185,22 @@ namespace OnlineStore.DoubleLineClient
btnVmiStart
.
Text
=
"启动"
;
btnVmiStart
.
Text
=
"启动"
;
}
}
}
}
private
bool
CheckProtectSig
()
{
if
(
IOManager
.
IOValue
(
IO_Type
.
Protect_Left_Sig
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
"提升机左侧上层料架脱离安全位置,不允许启动/复位"
);
MessageBox
.
Show
(
this
,
"提升机左侧上层料架脱离安全位置,不允许启动/复位!"
,
"警告"
);
return
false
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
Protect_Right_Sig
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
error
(
"提升机右侧上层料架脱离安全位置,不允许启动/复位"
);
MessageBox
.
Show
(
this
,
"提升机右侧上层料架脱离安全位置,不允许启动/复位!"
,
"警告"
);
return
false
;
}
return
true
;
}
private
void
btnVmiStop_Click
(
object
sender
,
EventArgs
e
)
private
void
btnVmiStop_Click
(
object
sender
,
EventArgs
e
)
{
{
try
try
...
...
source/LoadCVSLibrary/Config/bean/IO_Type.cs
查看文件 @
4fa08e1
...
@@ -310,6 +310,15 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -310,6 +310,15 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
/// </summary>
public
static
string
RHigh_FullCheck
=
"RHigh_FullCheck"
;
public
static
string
RHigh_FullCheck
=
"RHigh_FullCheck"
;
/// <summary>
///DI,中间提升机左侧保护信号,Protect_Left_Sig,6,PRO_AOI_IP_3,0,中间提升机左侧保护信号,X47,X47,0
/// </summary>
public
static
string
Protect_Left_Sig
=
"Protect_Left_Sig"
;
/// <summary>
///DI,中间提升机右侧保护信号,Protect_Right_Sig,7,PRO_AOI_IP_3,0,中间提升机右侧保护信号,X47,X48,0
/// </summary>
public
static
string
Protect_Right_Sig
=
"Protect_Right_Sig"
;
/// <summary>
/// <summary>
/// DO,上料工位顶升上升,S1_TopCylinderUp,0,PRO_AOI_IP_3,0,上料工位顶升上升,Y41,Y41,0
/// DO,上料工位顶升上升,S1_TopCylinderUp,0,PRO_AOI_IP_3,0,上料工位顶升上升,Y41,Y41,0
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论