Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f575439c
由
LN
编写于
2019-10-18 17:10:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
5d86a6d0
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
122 行增加
和
79 行删除
source/AssemblyLineClient/FrmIOStatus.Designer.cs
source/AssemblyLineClient/FrmIOStatus.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/assemblyLine/AssemblyLineManager.cs → source/DeviceLibrary/assemblyLine/ALineManager.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblyLine/MoveEquip.cs
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/model/TrayInfo.cs
source/AssemblyLineClient/FrmIOStatus.Designer.cs
查看文件 @
f575439
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmIOStatus.cs
查看文件 @
f575439
...
@@ -110,22 +110,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -110,22 +110,7 @@ namespace OnlineStore.AssemblyLine
LogUtil
.
error
(
LOGGER
,
ex
.
StackTrace
);
LogUtil
.
error
(
LOGGER
,
ex
.
StackTrace
);
}
}
}
}
private
void
btnWriteSingleDO_Click
(
object
sender
,
EventArgs
e
)
{
string
deviceName
=
txtDoName
.
Text
;
int
index
=
FormUtil
.
GetIntValue
(
txtDOIndex
);
IO_VALUE
value
=
checkBox1
.
Checked
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
if
(
time
>
0
)
{
IOManager
.
instance
.
WriteSingleDO
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
index
,
(
IO_VALUE
)
value
,
time
);
}
else
{
IOManager
.
instance
.
WriteSingleDO
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
index
,
(
IO_VALUE
)
value
);
}
}
private
ConfigIO
GetSelectDO
()
private
ConfigIO
GetSelectDO
()
{
{
...
@@ -138,6 +123,22 @@ namespace OnlineStore.AssemblyLine
...
@@ -138,6 +123,22 @@ namespace OnlineStore.AssemblyLine
return
null
;
return
null
;
}
}
IOTextControl
selectControl
=
null
;
IOTextControl
selectControl
=
null
;
private
void
WriteDO
(
IO_VALUE
value
)
{
string
deviceName
=
txtDoName
.
Text
;
int
index
=
FormUtil
.
GetIntValue
(
txtDOIndex
);
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
if
(
time
>
0
)
{
IOManager
.
instance
.
WriteSingleDO
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
index
,
value
,
time
);
}
else
{
IOManager
.
instance
.
WriteSingleDO
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
index
,
value
);
}
}
private
void
cmbWriteIO_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
private
void
cmbWriteIO_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
{
if
(
cmbWriteIO
.
SelectedIndex
>=
0
)
if
(
cmbWriteIO
.
SelectedIndex
>=
0
)
...
@@ -157,12 +158,19 @@ namespace OnlineStore.AssemblyLine
...
@@ -157,12 +158,19 @@ namespace OnlineStore.AssemblyLine
}
}
}
}
}
}
private
void
btnWriteSingleDO_Click
(
object
sender
,
EventArgs
e
)
{
WriteDO
(
IO_VALUE
.
HIGH
);
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
WriteDO
(
IO_VALUE
.
LOW
);
}
private
void
FrmStoreIOStatus_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmStoreIOStatus_Load
(
object
sender
,
EventArgs
e
)
{
{
// KNDAIManager.NeedShow = true;
// KNDAIManager.NeedShow = true;
}
}
private
void
cmbWriteIO_DrawItem
(
object
sender
,
DrawItemEventArgs
e
)
private
void
cmbWriteIO_DrawItem
(
object
sender
,
DrawItemEventArgs
e
)
{
{
if
(
e
.
Index
<
0
)
if
(
e
.
Index
<
0
)
...
@@ -206,25 +214,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -206,25 +214,7 @@ namespace OnlineStore.AssemblyLine
}
}
}
}
}
}
private
void
btnReadAllDi_Click
(
object
sender
,
EventArgs
e
)
{
string
deviceName
=
txtDoName
.
Text
;
IO_VALUE
value
=
checkBox1
.
Checked
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
IOManager
.
instance
.
ReadAllDI
(
deviceName
,
(
byte
)
slaveId
);
}
private
void
btnReadAllDo_Click
(
object
sender
,
EventArgs
e
)
{
string
deviceName
=
txtDoName
.
Text
;
IO_VALUE
value
=
checkBox1
.
Checked
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
FormUtil
.
GetIntValue
(
txtSlaveId
);
IOManager
.
instance
.
ReadAllDO
(
deviceName
,
(
byte
)
slaveId
);
}
private
void
FrmIOStatus_Shown
(
object
sender
,
EventArgs
e
)
private
void
FrmIOStatus_Shown
(
object
sender
,
EventArgs
e
)
{
{
timer1
.
Start
();
timer1
.
Start
();
...
@@ -350,5 +340,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -350,5 +340,7 @@ namespace OnlineStore.AssemblyLine
{
{
BtnMove
(
btnSw4Top
,
"环形线横移4顶升上升"
,
"环形线横移4顶升下降"
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
BtnMove
(
btnSw4Top
,
"环形线横移4顶升上升"
,
"环形线横移4顶升下降"
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
}
}
}
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
f575439
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="assemblyLine\A
ssembly
LineManager.cs" />
<Compile Include="assemblyLine\ALineManager.cs" />
<Compile Include="assemblyLine\DischargeLine.cs" />
<Compile Include="assemblyLine\DischargeLine.cs" />
<Compile Include="assemblyLine\DischargeLine_Partial.cs" />
<Compile Include="assemblyLine\DischargeLine_Partial.cs" />
<Compile Include="assemblyLine\ProvidingEquip_Partial.cs" />
<Compile Include="assemblyLine\ProvidingEquip_Partial.cs" />
...
...
source/DeviceLibrary/assemblyLine/A
ssembly
LineManager.cs
→
source/DeviceLibrary/assemblyLine/ALineManager.cs
查看文件 @
f575439
文件被删除
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
f575439
...
@@ -116,9 +116,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -116,9 +116,20 @@ namespace OnlineStore.DeviceLibrary
//{
//{
// StartCheckFixture();
// StartCheckFixture();
//}
//}
//皮带1皮带2先转动,到达位置后,皮带3再转动
}
}
IOTimeOutProcess
();
IOTimeOutProcess
();
//判断红灯状态
if
(
alarmType
.
Equals
(
LineAlarmType
.
None
))
{
IOMove
(
IO_Type
.
DLine_RunAlarm
,
IO_VALUE
.
LOW
);
}
else
if
(
IOValue
(
IO_Type
.
DLine_RunAlarm
).
Equals
(
IO_VALUE
.
LOW
))
{
IOMove
(
IO_Type
.
DLine_RunAlarm
,
IO_VALUE
.
HIGH
);
}
}
}
...
...
source/DeviceLibrary/assemblyLine/DischargeLine_Partial.cs
查看文件 @
f575439
...
@@ -97,20 +97,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -97,20 +97,6 @@ namespace OnlineStore.DeviceLibrary
}
}
#
endregion
#
endregion
private
void
CheckLog
(
string
msg
)
{
LogUtil
.
debug
(
Name
+
msg
);
}
private
void
InStoreLog
(
string
msg
)
{
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosId
:
""
;
LogUtil
.
info
(
Name
+
"【"
+
posId
+
"】"
+
msg
);
}
private
void
OutStoreLog
(
string
msg
)
{
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosId
:
""
;
LogUtil
.
info
(
Name
+
"【"
+
posId
+
"】"
+
msg
);
}
}
}
}
}
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
f575439
...
@@ -887,7 +887,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -887,7 +887,7 @@ namespace OnlineStore.DeviceLibrary
string
wareNum
=
serverResult
.
barcode
;
string
wareNum
=
serverResult
.
barcode
;
int
trayCode
=
TrayManager
.
GetNum
(
0
);
int
trayCode
=
TrayManager
.
GetNum
(
0
);
LogUtil
.
info
(
"更新盘空满信息,托盘号【"
+
trayCode
+
"】,是否有料盘【"
+
true
+
"】,出库入库【"
+
1
+
"】"
);
LogUtil
.
info
(
"更新盘空满信息,托盘号【"
+
trayCode
+
"】,是否有料盘【"
+
true
+
"】,出库入库【"
+
1
+
"】"
);
TrayManager
.
UpdateFixtureValue
(
trayCode
,
true
,
1
,
wareNum
,
posId
,
plateH
,
plateW
);
TrayManager
.
UpdateFixtureValue
(
trayCode
,
true
,
ReelType
.
InStore
,
wareNum
,
posId
,
plateH
,
plateW
);
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if
(
LineServer
.
BoxCanInStore
(
moveEquip
.
DeviceID
))
if
(
LineServer
.
BoxCanInStore
(
moveEquip
.
DeviceID
))
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
f575439
...
@@ -51,6 +51,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -51,6 +51,9 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
private
bool
isInprocess
=
false
;
private
bool
isInprocess
=
false
;
private
DateTime
lastProTime
=
DateTime
.
Now
;
private
DateTime
lastProTime
=
DateTime
.
Now
;
private
void
InOutTimerProcess
()
private
void
InOutTimerProcess
()
...
@@ -528,12 +531,38 @@ namespace OnlineStore.DeviceLibrary
...
@@ -528,12 +531,38 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
#
endregion
#
endregion
#
region
横移处理
#
region
横移处理
/// <summary>
/// 横移无处理
/// </summary>
/// <param name="sidesWayNum"></param>
/// <returns></returns>
internal
bool
SwNoProcess
(
int
sidesWayNum
)
{
if
(
sidesWayNum
.
Equals
(
1
)
||
sidesWayNum
.
Equals
(
4
))
{
if
(
SW41_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
return
true
;
}
}
else
if
(
sidesWayNum
.
Equals
(
2
)
||
sidesWayNum
.
Equals
(
3
))
{
if
(
SW23_MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
return
true
;
}
}
else
{
return
true
;
}
return
false
;
}
private
static
LineMoveInfo
SW41_MoveInfo
=
null
;
private
static
LineMoveInfo
SW41_MoveInfo
=
null
;
private
static
LineMoveInfo
SW23_MoveInfo
=
null
;
private
static
LineMoveInfo
SW23_MoveInfo
=
null
;
...
...
source/DeviceLibrary/assemblyLine/MoveEquip.cs
查看文件 @
f575439
...
@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
alarmType
=
LineAlarmType
.
None
;
alarmType
=
LineAlarmType
.
None
;
runStatus
=
LineRunStatus
.
HomeMoving
;
runStatus
=
LineRunStatus
.
HomeMoving
;
LogInfo
(
"开始原点返回: (上下气缸回原点,阻挡
气缸输入=0
)开始"
);
LogInfo
(
"开始原点返回: (上下气缸回原点,阻挡
1气缸上升
)开始"
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
return
true
;
return
true
;
...
@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
//重置时清理盘号,从头开始判断
//重置时清理盘号,从头开始判断
preTrayNum
=
0
;
preTrayNum
=
0
;
currMoveTrayNum
=
0
;
currMoveTrayNum
=
0
;
LogInfo
(
"开始重置:清空托盘号,(上下气缸回原点,阻挡
气缸输入=0
)开始;"
);
LogInfo
(
"开始重置:清空托盘号,(上下气缸回原点,阻挡
1气缸上升
)开始;"
);
runStatus
=
LineRunStatus
.
Reset
;
runStatus
=
LineRunStatus
.
Reset
;
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
MoveInfo
.
NewMove
(
LineMoveType
.
Reset
);
MoveInfo
.
NewMove
(
LineMoveType
.
Reset
);
...
...
source/DeviceLibrary/assemblyLine/MoveEquip_Partial.cs
查看文件 @
f575439
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/assemblyLine/ProvidingEquip.cs
查看文件 @
f575439
...
@@ -94,7 +94,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -94,7 +94,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
Stop
();
mainTimer
.
Stop
();
alarmType
=
LineAlarmType
.
None
;
alarmType
=
LineAlarmType
.
None
;
runStatus
=
LineRunStatus
.
HomeMoving
;
runStatus
=
LineRunStatus
.
HomeMoving
;
LogInfo
(
"开始原点返回:
(上下气缸回原点,阻挡气缸输入=0 )
开始"
);
LogInfo
(
"开始原点返回:
(上下气上升,阻挡气缸上升 )
开始"
);
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
MoveInfo
.
NewMove
(
LineMoveType
.
ReturnHome
);
...
@@ -108,7 +108,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -108,7 +108,7 @@ namespace OnlineStore.DeviceLibrary
alarmType
=
LineAlarmType
.
None
;
alarmType
=
LineAlarmType
.
None
;
preTrayNum
=
0
;
preTrayNum
=
0
;
currMoveTrayNum
=
0
;
currMoveTrayNum
=
0
;
LogInfo
(
"开始重置:清理盘号,(上下气
缸回原点,阻挡气缸输入=0 )开始;
"
);
LogInfo
(
"开始重置:清理盘号,(上下气
上升,阻挡气缸上升 )开始
"
);
runStatus
=
LineRunStatus
.
Reset
;
runStatus
=
LineRunStatus
.
Reset
;
MoveInfo
.
EndMove
();
MoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
...
@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
}
}
isInPro
=
false
;
isInPro
=
false
;
...
@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary
case
LineMoveStep
.
MH_UpDownCylinder_Up
:
case
LineMoveStep
.
MH_UpDownCylinder_Up
:
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MH_OtherCylinder_Back
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
MH_OtherCylinder_Back
);
LogInfo
(
MoveInfo
.
MoveType
+
" : (上升到位,顶升气缸下降,前后气缸
回退
)开始"
);
LogInfo
(
MoveInfo
.
MoveType
+
" : (上升到位,顶升气缸下降,前后气缸
后退,夹紧气缸放松
)开始"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
TopCylinder_UP
,
IO_Type
.
TopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
);
CylinderMove
(
MoveInfo
,
IO_Type
.
BeforeAfterCylinder_Before
,
IO_Type
.
BeforeAfterCylinder_After
);
CylinderMove
(
MoveInfo
,
IO_Type
.
ClampCylinder_Slack
,
IO_Type
.
ClampCylinder_Tighten
);
CylinderMove
(
MoveInfo
,
IO_Type
.
ClampCylinder_Slack
,
IO_Type
.
ClampCylinder_Tighten
);
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
f575439
...
@@ -30,11 +30,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -30,11 +30,11 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
StopCylinder_Check2
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
StopCylinder_Check2
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
//托盘在两个阻挡内
//托盘在两个阻挡内
if
(
num
>
0
)
if
(
num
>
0
&&
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
)
)
{
{
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
CheckLog
(
"托盘检测(流水线阻挡)Second
Store
Move:(MIO_03_StopCylinder2Down 阻挡气缸1-1上升)"
);
CheckLog
(
"托盘检测(流水线阻挡)SecondMove:(MIO_03_StopCylinder2Down 阻挡气缸1-1上升)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopCylinder2Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopCylinder2Down
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
...
@@ -44,13 +44,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -44,13 +44,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
"检测到check4亮,但是为获取到托盘号,StartCheckFixture失败~"
);
LogUtil
.
error
(
Name
+
"检测到check4亮,但是为获取到托盘号,StartCheckFixture失败~"
);
}
}
}
}
else
if
(
IOValue
(
IO_Type
.
StopCylinder_Check1
).
Equals
(
IO_VALUE
.
HIGH
))
else
if
(
IOValue
(
IO_Type
.
StopCylinder_Check1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
)
)
{
{
//托盘在第一个阻挡处
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_01_StopCylinder1Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_01_StopCylinder1Down
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
CheckLog
(
" 托盘检测:料盘检测 Second
Store
Move(MIO_01_StopCylinder1Down阻挡气缸1-1下降 ,最多等待1秒)"
);
CheckLog
(
" 托盘检测:料盘检测 SecondMove(MIO_01_StopCylinder1Down阻挡气缸1-1下降 ,最多等待1秒)"
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
);
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_Down1
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1500
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1500
));
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
#
region
托盘检测
#
region
托盘检测
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_01_StopCylinder1Down
))
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_01_StopCylinder1Down
))
{
{
CheckLog
(
"托盘检测(流水线阻挡)Second
Store
Move:(MIO_02_FixtureCheck 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)"
);
CheckLog
(
"托盘检测(流水线阻挡)SecondMove:(MIO_02_FixtureCheck 阻挡气缸1-1上升,等待 阻挡2托盘检测=1)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopCylinder2Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopCylinder2Down
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
...
@@ -87,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -87,7 +87,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_02_FixtureCheck
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_02_FixtureCheck
))
{
{
CheckLog
(
"托盘检测(流水线阻挡)Second
Store
Move:(MIO_03_StopCylinder2Down 阻挡气缸1-1上升)"
);
CheckLog
(
"托盘检测(流水线阻挡)SecondMove:(MIO_03_StopCylinder2Down 阻挡气缸1-1上升)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopCylinder2Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_03_StopCylinder2Down
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
LOW
));
...
@@ -95,7 +95,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -95,7 +95,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_03_StopCylinder2Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_03_StopCylinder2Down
))
{
{
CheckLog
(
"托盘检测(流水线阻挡)Second
Store
Move:(MIO_04_Wait ,等待编码信号稳定)"
);
CheckLog
(
"托盘检测(流水线阻挡)SecondMove:(MIO_04_Wait ,等待编码信号稳定)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_04_Wait
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_04_Wait
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
}
}
...
@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
{
{
TrayManager
.
UpdateTrayNumError
(-
1
,
""
);
TrayManager
.
UpdateTrayNumError
(-
1
,
""
);
}
}
CheckLog
(
"托盘放行 Second
Store
Move:(MO_07_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_07_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_13_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_13_WaitCanGo
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -146,7 +146,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_05_WaitTime
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_05_WaitTime
))
{
{
CheckLog
(
"托盘检测(流水线阻挡)Second
Store
Move:(MIO_06_TopCylinderUp 顶升气缸上 升 )"
);
CheckLog
(
"托盘检测(流水线阻挡)SecondMove:(MIO_06_TopCylinderUp 顶升气缸上 升 )"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_06_TopCylinderUp
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_06_TopCylinderUp
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_UP
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
TopCylinder_Down
,
IO_Type
.
TopCylinder_UP
);
...
@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_06_TopCylinderUp
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_06_TopCylinderUp
))
{
{
CheckLog
(
"托盘检测(流水线阻挡)Second
Store
Move:(MIO_07_TopCylinderUpWait ,顶升气缸上升时等待1秒钟,再下降)"
);
CheckLog
(
"托盘检测(流水线阻挡)SecondMove:(MIO_07_TopCylinderUpWait ,顶升气缸上升时等待1秒钟,再下降)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_07_TopCylinderUpWait
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_07_TopCylinderUpWait
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
}
}
...
@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_08_WaitInStore
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MIO_08_WaitInStore
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
CheckLog
(
"托盘放行 Second
Store
Move:(MIO_09_WaitLetFixtureGo ,等待移栽完成后放开阻挡)"
);
CheckLog
(
"托盘放行 SecondMove:(MIO_09_WaitLetFixtureGo ,等待移栽完成后放开阻挡)"
);
StartOutStoreMove
(
SecondMoveInfo
.
MoveParam
);
StartOutStoreMove
(
SecondMoveInfo
.
MoveParam
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_09_WaitLetFixtureGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_09_WaitLetFixtureGo
);
}
}
...
@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
#
region
不需要出出料,直接放行
#
region
不需要出出料,直接放行
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_12_TopCylinder_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_12_TopCylinder_Down
))
{
{
CheckLog
(
"托盘放行 Second
Store
Move:(MO_13_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_13_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_13_WaitCanGo
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_13_WaitCanGo
);
//更新横移托盘已处理完成
//更新横移托盘已处理完成
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
...
@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_13_WaitCanGo
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_13_WaitCanGo
))
{
{
CheckLog
(
"托盘放行 Second
Store
Move:(MO_14_StopCylinder2_Down ,阻挡气缸1-2下降)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_14_StopCylinder2_Down ,阻挡气缸1-2下降)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_StopCylinder2_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_14_StopCylinder2_Down
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
HIGH
));
...
@@ -194,14 +194,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -194,14 +194,14 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_StopCylinder2_Down
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_14_StopCylinder2_Down
))
{
{
CheckLog
(
"托盘放行 Second
Store
Move:(MO_15_Tray_Check , 阻挡2托盘检测=0), 延时2秒)"
);
CheckLog
(
"托盘放行 SecondMove:(MO_15_Tray_Check , 阻挡2托盘检测=0), 延时2秒)"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_Tray_Check
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_15_Tray_Check
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
LOW
));
}
}
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_Tray_Check
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_15_Tray_Check
))
{
{
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_16_StopCylinder_Back
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_16_StopCylinder_Back
);
CheckLog
(
"托盘放行 Second
Store
Move:(MO_16_StopCylinder_Back , 阻挡气缸1-2上升 )"
);
CheckLog
(
"托盘放行 SecondMove:(MO_16_StopCylinder_Back , 阻挡气缸1-2上升 )"
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down2
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
...
@@ -209,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -209,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_16_StopCylinder_Back
))
else
if
(
SecondMoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
MO_16_StopCylinder_Back
))
{
{
preTrayNum
=
currMoveTrayNum
;
preTrayNum
=
currMoveTrayNum
;
CheckLog
(
"托盘放行 Second
Store
Move:(托盘放行结束) "
);
CheckLog
(
"托盘放行 SecondMove:(托盘放行结束) "
);
// IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
// IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
SecondMoveInfo
.
EndMove
();
SecondMoveInfo
.
EndMove
();
}
}
...
@@ -290,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -290,7 +290,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager
.
UpdateFixtureValue
(
num
);
TrayManager
.
UpdateFixtureValue
(
num
);
//阻挡气缸移动
//阻挡气缸移动
InStoreLog
(
"放托盘(放开阻挡):Second
Store
Move=MO_12_TopCylinder_Down 物品已移走,顶升气缸1下降)"
);
InStoreLog
(
"放托盘(放开阻挡):SecondMove=MO_12_TopCylinder_Down 物品已移走,顶升气缸1下降)"
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_12_TopCylinder_Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MO_12_TopCylinder_Down
);
if
(
Config
.
SidesWayNum
<=
0
)
if
(
Config
.
SidesWayNum
<=
0
)
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
f575439
...
@@ -58,4 +58,29 @@ namespace OnlineStore.DeviceLibrary
...
@@ -58,4 +58,29 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
int
PlateW
{
get
;
set
;
}
public
int
PlateW
{
get
;
set
;
}
}
}
/// <summary>
/// 托盘上的物料的类型
/// </summary>
internal
class
ReelType
{
/// <summary>
/// 等待入库料盘
/// </summary>
internal
static
int
InStore
=
1
;
/// <summary>
/// 料仓出库料盘
/// </summary>
internal
static
int
OutStore
=
2
;
/// <summary>
/// 紧急出库料盘
/// </summary>
internal
static
int
OutStore_Equip
=
3
;
/// <summary>
/// 入库失败需要NG气缸退出的料盘
/// </summary>
internal
static
int
InStoreNG
=
4
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论