Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 09f50bed
由
LN
编写于
2020-03-03 21:22:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加 Addr_arriveRobotLocation = "/rest/api/qisda/device/arriveRobotLocation"; 接口。。托盘号增加日志
1 个父辈
8642956f
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
155 行增加
和
59 行删除
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_05.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_14.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_18.csv
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/deviceLibrary/IO/IOManager.cs
source/DeviceLibrary/model/KTK_Store.cs
source/AssemblyLineClient/记录.txt
查看文件 @
09f50be
...
...
@@ -222,11 +222,12 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800
托盘检测入口加锁处理。
皮带线转动间隔时间减半。
待解决:
托盘放两个问题
修改:料架进入入料装置时中途链条停止转动的现象。
GetDIValue 方法循环查找三次防止报错引起急停。
增加 Addr_arriveRobotLocation = "/rest/api/qisda/device/arriveRobotLocation"; 接口,待料盘到达接驳台后通知服务器。
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_05.csv
查看文件 @
09f50be
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,13,COM6,0,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_14.csv
查看文件 @
09f50be
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,
1
,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,
0
,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,1,COM6,1,,,
...
...
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_18.csv
查看文件 @
09f50be
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,
1
,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,
0
,,,,,
,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,1,COM6,1,,,
...
...
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
查看文件 @
09f50be
...
...
@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DO_05_LineRun
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DO_06_SeparateCheck
);
// Line3LastTrayP++;
// Line3LastTrayP++;
LogInfo
(
hengyiName
+
"出口有料,等待料盘到达分盘装置位置,最多等待60000"
);
MoveInfo
.
OneWaitCanEndStep
=
true
;
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
60000
));
...
...
@@ -192,14 +192,28 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DO_06_SeparateCheck
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
DO_07_CRun
);
LogInfo
(
hengyiName
+
"出口有料,最多等待2000"
);
if
(
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
int
robotIndex
=
1
;
if
(
DeviceID
.
Equals
(
301
))
{
robotIndex
=
2
;
}
LogInfo
(
hengyiName
+
"出口有料,转动接驳台皮带线2000 , 收到SeparateDevice_Check信号,调用arriveRobotLocation="
+
robotIndex
);
SServerManager
.
arriveRobotLocation
(
Name
,
robotIndex
);
}
else
{
LogInfo
(
hengyiName
+
"出口有料,转动接驳台皮带线2000 ,未收到SeparateDevice_Check信号"
);
}
IOMove
(
IO_Type
.
SeparateDevice_Run
,
IO_VALUE
.
HIGH
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DO_07_CRun
))
{
MoveEndS
();
// IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW);
// IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW);
LogInfo
(
hengyiName
+
"出口有料,送料结束 "
);
}
}
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
09f50be
...
...
@@ -317,7 +317,7 @@ namespace OnlineStore.DeviceLibrary
if
(
preTrayNum
.
Equals
(
currTrayNum
)&&
currTrayNum
>
0
)
{
TrayManager
.
TrayErrorMsg
=
DateTime
.
Now
.
ToLongTimeString
()+
" "
+
Name
+
"托盘号出现错乱:上一个托盘["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"],连续两个托盘号一样"
;
LogUtil
.
error
(
Name
+
"托盘号
出现
错乱:上一个托盘["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"],连续两个托盘号一样"
);
LogUtil
.
error
(
Name
+
"托盘号错乱:上一个托盘["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"],连续两个托盘号一样"
);
}
return
true
;
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
09f50be
...
...
@@ -63,6 +63,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
}
if
(!
LineManager
.
Line
.
CanProcessLine
())
...
...
@@ -85,7 +86,8 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_06_TopUp
);
CheckLog
(
"检测到SW_TrayCheck:"
+
SecondMoveInfo
.
SLog
+
"横移顶升气缸上升 )"
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
Name
+
" ["
+
trayCount
+
"] 检测到SW_TrayCheck:"
+
SecondMoveInfo
.
SLog
+
"横移顶升气缸上升 )"
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
}
else
...
...
@@ -102,6 +104,7 @@ namespace OnlineStore.DeviceLibrary
swWaitWatch
.
Stop
();
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
,
CheckParam
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
LogUtil
.
info
(
Name
+
" ["
+
trayCount
+
"] 检测到SW_StopCheck:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸下降 ,等待 SW_StopCheck=0"
);
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
HIGH
);
...
...
@@ -203,36 +206,36 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_01_FixtureCheck
))
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_02_WaitFixture
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"再次等待SW_TrayCheck=1 :"
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"再次等待SW_TrayCheck=1 :"
);
//CheckLog("托盘检测:" + SecondMoveInfo.SLog + "再次等待SW_TrayCheck=1并需要持续:" + TrayManager.SwTrayWaitTime);
CheckAndMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_02_WaitFixture
))
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,等待SW_TrayCheck=1)"
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
CheckLog
(
"托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸上升,等待SW_TrayCheck=1)"
);
IOMove
(
IO_Type
.
SW_StopDown
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW_TrayCheck
,
IO_VALUE
.
HIGH
));
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_03_Stop2Down
))
{
// SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
// if (Config.SidesWayNum > 0)
// {
// CheckLog("托盘检测:" + SecondMoveInfo.SLog + " ,等待编码信号稳定 SW_TrayCheck=1");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
// }
// else
// {
// CheckLog("托盘检测:" + SecondMoveInfo.SLog + " ,等待编码信号稳定 FL_TrayCheck=1");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_TrayCheck, IO_VALUE.HIGH));
// }
//}
//else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait))
//{
// SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
// if (Config.SidesWayNum > 0)
// {
// CheckLog("托盘检测:" + SecondMoveInfo.SLog + " ,等待编码信号稳定 SW_TrayCheck=1");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
// }
// else
// {
// CheckLog("托盘检测:" + SecondMoveInfo.SLog + " ,等待编码信号稳定 FL_TrayCheck=1");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_TrayCheck, IO_VALUE.HIGH));
// }
//}
//else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait))
//{
UpdateTrayNum
();
//出料中,需要拦盘
if
(
CurrTrayIsNeed
(
currTrayNum
,
true
))
...
...
@@ -259,7 +262,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo
(
SecondMoveInfo
.
MoveNum
+
"***************上个托盘号【"
+
preTrayNum
+
"】,当前 【"
+
tray
.
ToStr
()
+
"】没有出入料任务,放盘通过~"
);
//CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,移栽2,需要判断是否可以放盘通过,最多等待10000)");
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待 NextStopCheck=0"
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
}
else
{
...
...
@@ -335,7 +338,7 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_TopDown
))
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_WaitCanGo
);
if
(
Config
.
SidesWayNum
>
0
)
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待托盘离开"
);
...
...
@@ -344,7 +347,7 @@ namespace OnlineStore.DeviceLibrary
else
{
CheckLog
(
"托盘放行 "
+
SecondMoveInfo
.
SLog
+
" ,等待 NextStopCheck=0"
);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_WaitCanGo
))
...
...
@@ -399,7 +402,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
SecondMoveInfo
.
Name
+
"["
+
SecondMoveInfo
.
MoveType
+
"]["
+
SecondMoveInfo
.
MoveStep
+
"] 等待开始紧急出料移栽超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
11
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
}
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
09f50be
...
...
@@ -4,6 +4,7 @@ using System;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Timers
;
...
...
@@ -462,26 +463,51 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
托盘检测
private
object
lockObj
=
""
;
private
void
StartCheckFixture
()
{
if
(
IOValue
(
IO_Type
.
StopCylinder_Check2
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
Monitor
.
TryEnter
(
lockObj
,
100
))
{
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
CheckLog
(
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" 阻挡气缸1-1上升)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
try
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
}
if
(
IOValue
(
IO_Type
.
StopCylinder_Check2
).
Equals
(
IO_VALUE
.
HIGH
))
{
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
CheckLog
(
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" 阻挡气缸1-1上升)"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
}
else
if
(
IOValue
(
IO_Type
.
StopCylinder_Check1
).
Equals
(
IO_VALUE
.
HIGH
))
{
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
CheckLog
(
" 托盘检测:料盘检测StopCylinder_Check1 "
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check1
,
IO_VALUE
.
LOW
));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 出错:"
+
ex
.
ToString
());
}
finally
{
Monitor
.
Exit
(
lockObj
);
}
}
else
if
(
IOValue
(
IO_Type
.
StopCylinder_Check1
).
Equals
(
IO_VALUE
.
HIGH
))
else
{
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
CheckLog
(
" 托盘检测:料盘检测StopCylinder_Check1 "
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check1
,
IO_VALUE
.
LOW
));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
"失败,未得到锁"
);
}
}
protected
override
void
CheckFixtureProcess
()
...
...
@@ -519,6 +545,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_04_Wait
);
CheckLog
(
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
" ,等待编码信号稳定StopCylinder_Check2=1"
);
CheckAndMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
HIGH
));
}
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
09f50be
...
...
@@ -43,6 +43,7 @@ namespace OnlineStore.DeviceLibrary
{
if
(
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
" StartCheckFixture "
+
" 不在空闲中,直接返回 "
);
return
;
}
bool
canProcess
=
(
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
));
...
...
@@ -53,8 +54,8 @@ namespace OnlineStore.DeviceLibrary
{
trayCheckWait
.
Stop
();
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
CheckLog
(
"托盘阻挡"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1上升)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_Stop2Down
);
LogUtil
.
info
(
Name
+
" ["
+
trayCount
+
"] 托盘阻挡"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1上升)"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
}
...
...
@@ -69,6 +70,7 @@ namespace OnlineStore.DeviceLibrary
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
LogUtil
.
info
(
Name
+
" ["
+
trayCount
+
"] 托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0"
);
//CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" );
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
09f50be
...
...
@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
}
//##
private
static
string
spiltStr
=
"##"
;
public
static
string
CodeReceived
(
string
deviceName
,
int
trayNum
,
List
<
string
>
codeList
,
int
height
,
int
width
,
string
rfid
,
int
feedEquipId
)
public
static
string
CodeReceived
(
string
deviceName
,
int
trayNum
,
List
<
string
>
codeList
,
int
height
,
int
width
,
string
rfid
,
int
feedEquipId
)
{
string
msg
=
""
;
try
...
...
@@ -80,7 +80,7 @@ namespace OnlineStore.DeviceLibrary
string
server
=
GetAddr
(
Addr_PosForPutin
,
paramMap
);
//string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
LogUtil
.
info
(
deviceName
+
"托盘【"
+
trayNum
+
"】 条码【 "
+
codeStr
+
"】料串【"
+
rfid
+
"】,获取入库库位:"
);
LogUtil
.
info
(
deviceName
+
"托盘【"
+
trayNum
+
"】 条码【 "
+
codeStr
+
"】料串【"
+
rfid
+
"】,获取入库库位:"
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
"CodeReceived 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
...
...
@@ -307,6 +307,42 @@ namespace OnlineStore.DeviceLibrary
}
return
msg
;
}
//皮带线获取尺寸后,料盘到达机器人取料位置进调用,如果未扫到码,或者没等到取料位置信号亮,可以不用调用
//> 地址:
//>>/rest/api/qisda/device/arriveRobotLocation
//>
//> 参数:
//>> - robotIndex=机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
//>
//> 返回:
//>>``
private
static
string
Addr_arriveRobotLocation
=
"/rest/api/qisda/device/arriveRobotLocation"
;
public
static
string
arriveRobotLocation
(
string
deviceName
,
int
robotIndex
)
{
string
msg
=
""
;
try
{
if
(
robotIndex
<=
0
)
{
return
msg
;
}
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"robotIndex"
,
robotIndex
.
ToString
());
//rfid
string
server
=
GetAddr
(
Addr_arriveRobotLocation
,
paramMap
);
string
resultStr
=
HttpHelper
.
Post
(
server
,
""
);
LogUtil
.
info
(
deviceName
+
"arriveRobotLocation 【"
+
server
+
"】【"
+
resultStr
+
"】"
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
deviceName
+
" "
+
ex
.
ToString
());
}
return
msg
;
}
}
public
class
LocStatus
{
...
...
source/DeviceLibrary/deviceLibrary/IO/IOManager.cs
查看文件 @
09f50be
...
...
@@ -16,18 +16,30 @@ namespace OnlineStore.DeviceLibrary
#
region
KNDIO
public
static
void
IOMove
(
string
ioType
,
IO_VALUE
ioValue
,
int
subType
=
0
)
public
static
void
IOMove
(
string
ioType
,
IO_VALUE
ioValue
,
int
subType
=
0
)
{
ConfigIO
configIo
=
GetDO
(
ioType
,
subType
);
if
(
configIo
!=
null
)
{
instance
.
WriteSingleDO
(
configIo
.
IO_IP
,
configIo
.
SlaveID
,
configIo
.
GetIOAddr
(),
ioValue
);
if
(
configIo
!=
null
)
{
instance
.
WriteSingleDO
(
configIo
.
IO_IP
,
configIo
.
SlaveID
,
configIo
.
GetIOAddr
(),
ioValue
);
//如果是出料四阻挡下降,添加日志
if
(
ioValue
.
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
configIo
.
IO_IP
.
Equals
(
"192.168.101.49"
)
&&
configIo
.
GetIOAddr
().
Equals
(
4
))
{
LogUtil
.
info
(
"IOMove: ioValue= "
+
ioValue
+
", [ "
+
subType
+
"] ["
+
ioType
+
"] [192.168.101.49][4]"
);
}
else
if
(
configIo
.
IO_IP
.
Equals
(
"192.168.101.41"
)
&&
configIo
.
GetIOAddr
().
Equals
(
4
))
{
LogUtil
.
info
(
"IOMove: ioValue= "
+
ioValue
+
", [ "
+
subType
+
"] ["
+
ioType
+
"] [192.168.101.41][4]"
);
}
}
Thread
.
Sleep
(
10
);
}
else
{
LogUtil
.
error
(
"未找到DO,["
+
ioType
+
"]["
+
subType
+
"]"
);
LogUtil
.
error
(
"未找到DO,["
+
ioType
+
"]["
+
subType
+
"]"
);
}
}
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
09f50be
...
...
@@ -436,9 +436,9 @@ namespace OnlineStore.DeviceLibrary
{
Task
.
Factory
.
StartNew
(
delegate
{
LogUtil
.
info
(
"定时会写IO: ["
+
IoType
+
"]=["
+
value
+
"],msTime="
+
msTime
);
IOManager
.
IOMove
(
IoType
,
value
,
baseConfig
.
Id
);
Thread
.
Sleep
(
msTime
);
LogUtil
.
info
(
"定时回写IO: ["
+
IoType
+
"]=["
+
value
+
"],["
+
baseConfig
.
Id
+
"],msTime="
+
msTime
);
IO_VALUE
tValue
=
value
.
Equals
(
IO_VALUE
.
HIGH
)
?
IO_VALUE
.
LOW
:
IO_VALUE
.
HIGH
;
IOManager
.
IOMove
(
IoType
,
tValue
,
baseConfig
.
Id
);
});
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论