Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7ba7c534
由
刘韬
编写于
2022-08-03 09:02:16 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
1e33d0b3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
60 行增加
和
55 行删除
Common/CodeResourceControl.cs
Common/util/HumitureController.cs
Common/util/TcpServer.cs
Common/util/UdpServer.cs
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/LabelParam.cs
DeviceLibrary/theMachine/MainMachine _IN.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
DeviceLibrary/theMachine/MainMachine_String.cs
Common/CodeResourceControl.cs
查看文件 @
7ba7c53
...
@@ -40,7 +40,7 @@ namespace OnlineStore
...
@@ -40,7 +40,7 @@ namespace OnlineStore
var
lngjson
=
JsonHelper
.
SerializeObject
(
LangMap
);
var
lngjson
=
JsonHelper
.
SerializeObject
(
LangMap
);
Task
.
Run
(()
=>
{
Task
.
Run
(()
=>
{
//
return;
return
;
try
try
{
{
Task
.
Delay
(
10
*
1000
).
Wait
();
Task
.
Delay
(
10
*
1000
).
Wait
();
...
...
Common/util/HumitureController.cs
查看文件 @
7ba7c53
...
@@ -38,7 +38,7 @@ namespace OnlineStore.Common
...
@@ -38,7 +38,7 @@ namespace OnlineStore.Common
{
{
Release
();
Release
();
}
}
LogName
=
"温湿度传感器["
+
port
+
"
]"
;
LogName
=
$
"温湿度传感器[{port}
]"
;
if
(
sb
==
null
)
if
(
sb
==
null
)
{
{
...
...
Common/util/TcpServer.cs
查看文件 @
7ba7c53
...
@@ -33,7 +33,7 @@ namespace OnlineStore.Common
...
@@ -33,7 +33,7 @@ namespace OnlineStore.Common
private
void
logLocalIp
()
private
void
logLocalIp
()
{
{
string
[]
addresses
=
GetLocalAddresses
();
string
[]
addresses
=
GetLocalAddresses
();
string
iplist
=
"本机IP:["
;
string
iplist
=
$
"本机IP:["
;
if
(
addresses
.
Length
>
0
)
if
(
addresses
.
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
...
...
Common/util/UdpServer.cs
查看文件 @
7ba7c53
...
@@ -26,7 +26,7 @@ namespace OnlineStore.Common
...
@@ -26,7 +26,7 @@ namespace OnlineStore.Common
private
void
logLocalIp
()
private
void
logLocalIp
()
{
{
string
[]
addresses
=
GetLocalAddresses
();
string
[]
addresses
=
GetLocalAddresses
();
string
iplist
=
"本机IP:["
;
string
iplist
=
$
"本机IP:["
;
if
(
addresses
.
Length
>
0
)
if
(
addresses
.
Length
>
0
)
{
{
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
for
(
int
i
=
0
;
i
<
addresses
.
Length
;
i
++)
...
...
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
7ba7c53
...
@@ -357,21 +357,17 @@ namespace DeviceLibrary
...
@@ -357,21 +357,17 @@ namespace DeviceLibrary
return
true
;
return
true
;
}
}
private
bool
IsInProcess
=
false
;
private
bool
IsInProcess
=
false
;
private
DateTime
lastOkTime
=
DateTime
.
Now
;
private
void
CheckTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
void
CheckTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
TimeSpan
pan
=
DateTime
.
Now
-
lastOkTime
;
if
(
IsInProcess
)
{
return
;
}
if
(
IsInProcess
&&
pan
.
TotalMilliseconds
<
100
)
{
return
;
}
try
try
{
{
IsInProcess
=
true
;
IsInProcess
=
true
;
lastOkTime
=
DateTime
.
Now
;
if
(
IOManager
.
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
if
(
IOManager
.
IOValue
(
TargetIoType
).
Equals
(
TargetIoValue
))
{
{
SuddenStop
();
StopAxisCheckMove
();
StopAxisCheckMove
();
LogUtil
.
info
(
AxisName
+
"上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止运动"
);
LogUtil
.
info
(
AxisName
+
"上料轴,检测到 "
+
TargetIoType
+
"="
+
TargetIoValue
+
",停止运动"
);
SuddenStop
();
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
7ba7c53
...
@@ -44,7 +44,7 @@ namespace DeviceLibrary
...
@@ -44,7 +44,7 @@ namespace DeviceLibrary
public
void
LiftUp
(
MoveInfo
moveInfo
)
{
public
void
LiftUp
(
MoveInfo
moveInfo
)
{
if
(
moveInfo
==
null
)
if
(
moveInfo
==
null
)
moveInfo
=
new
MoveInfo
(
"界面"
,
false
);
moveInfo
=
new
MoveInfo
(
$
"界面"
,
false
);
if
(
IOManager
.
IOValue
(
up
.
ToString
()).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
IOManager
.
IOValue
(
up
.
ToString
()).
Equals
(
IO_VALUE
.
HIGH
))
{
moveInfo
.
log
(
$
"{axisBean.AxisName},已在位置,无需上升"
);
moveInfo
.
log
(
$
"{axisBean.AxisName},已在位置,无需上升"
);
return
;
return
;
...
@@ -83,7 +83,7 @@ namespace DeviceLibrary
...
@@ -83,7 +83,7 @@ namespace DeviceLibrary
public
void
LiftDown
(
MoveInfo
moveInfo
)
public
void
LiftDown
(
MoveInfo
moveInfo
)
{
{
if
(
moveInfo
==
null
)
if
(
moveInfo
==
null
)
moveInfo
=
new
MoveInfo
(
"界面"
,
false
);
moveInfo
=
new
MoveInfo
(
$
"界面"
,
false
);
if
(
IOManager
.
IOValue
(
down
.
ToString
()).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
down
.
ToString
()).
Equals
(
IO_VALUE
.
HIGH
))
{
{
moveInfo
.
log
(
$
"{axisBean.AxisName},已在位置,无需下降"
);
moveInfo
.
log
(
$
"{axisBean.AxisName},已在位置,无需下降"
);
...
...
DeviceLibrary/theMachine/LabelParam.cs
查看文件 @
7ba7c53
...
@@ -156,8 +156,8 @@ namespace DeviceLibrary
...
@@ -156,8 +156,8 @@ namespace DeviceLibrary
Reel
=
reel
.
clone
();
Reel
=
reel
.
clone
();
LogUtil
.
info
(
$
"BSP:{posid},Comp_PH:{Comp_PH}={Config.Comp_P2}-({aCStorePosition.BagHigh}-{8}+{Config.Comp_PH_MM})*{Config.Clamp_PoToMM},Comp_PL:{Comp_PL}={reel.PlateH},Comp_PL_MM:{Config.Comp_PL_MM},{JsonHelper.SerializeObject(this)}"
);
LogUtil
.
info
(
$
"BSP:{posid},Comp_PH:{Comp_PH}={Config.Comp_P2}-({aCStorePosition.BagHigh}-{8}+{Config.Comp_PH_MM})*{Config.Clamp_PoToMM},Comp_PL:{Comp_PL}={reel.PlateH},Comp_PL_MM:{Config.Comp_PL_MM},{JsonHelper.SerializeObject(this)}"
);
}
}
public
const
string
ngdoor
=
"单料口"
;
public
const
string
ngdoor
=
$
"单料口"
;
public
const
string
strings
=
"料串口"
;
public
const
string
strings
=
$
"料串口"
;
public
BoxStorePosition
(
Robot_Config
Config
,
StoreSide
storeSide
,
ReelParam
reel
)
public
BoxStorePosition
(
Robot_Config
Config
,
StoreSide
storeSide
,
ReelParam
reel
)
{
{
...
...
DeviceLibrary/theMachine/MainMachine _IN.cs
deleted
100644 → 0
查看文件 @
1e33d0b
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
7ba7c53
...
@@ -76,14 +76,14 @@ namespace DeviceLibrary
...
@@ -76,14 +76,14 @@ namespace DeviceLibrary
public
MainMachine
(
Robot_Config
_config
)
{
public
MainMachine
(
Robot_Config
_config
)
{
Config
=
_config
;
Config
=
_config
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
StringMoveInfo
=
new
MoveInfo
(
"料串进出机构"
);
StringMoveInfo
=
new
MoveInfo
(
$
"料串进出机构"
);
StringMoveInfo
.
SetStateDelegate
(
StringProcessState
);
StringMoveInfo
.
SetStateDelegate
(
StringProcessState
);
ClampMoveInfo
=
new
MoveInfo
(
"取放料机构"
);
ClampMoveInfo
=
new
MoveInfo
(
$
"取放料机构"
);
ClampMoveInfo
.
SetStateDelegate
(
ClampState
);
ClampMoveInfo
.
SetStateDelegate
(
ClampState
);
StoreMoveInfo
=
new
MoveInfo
(
"进出库调度"
);
StoreMoveInfo
=
new
MoveInfo
(
$
"进出库调度"
);
StoreMoveInfo
.
SetStateDelegate
(
StoreState
);
StoreMoveInfo
.
SetStateDelegate
(
StoreState
);
ResetMoveInfo
=
new
MoveInfo
(
"重置"
);
ResetMoveInfo
=
new
MoveInfo
(
$
"重置"
);
AIOTMoveInfo
=
new
MoveInfo
(
"出入库测试"
);
AIOTMoveInfo
=
new
MoveInfo
(
$
"出入库测试"
);
#
region
初始化
led
灯
#
region
初始化
led
灯
AlarmLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
());
AlarmLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
());
...
@@ -103,9 +103,9 @@ namespace DeviceLibrary
...
@@ -103,9 +103,9 @@ namespace DeviceLibrary
Clamp_Axis
.
interference
+=
Clamp_Axis_interference
;
Clamp_Axis
.
interference
+=
Clamp_Axis_interference
;
Crc_LanguageChangeEvent
(
null
,
EventArgs
.
Empty
);
Crc_LanguageChangeEvent
(
null
,
EventArgs
.
Empty
);
#
endregion
#
endregion
Line
=
new
LineRunMonitor
(
"料串进出机构"
,
Config
.
DOList
[
IO_Type
.
LineRun
].
GetIOAddr
(),
Config
.
DOList
[
IO_Type
.
LineRev
].
GetIOAddr
());
Line
=
new
LineRunMonitor
(
$
"料串进出机构"
,
Config
.
DOList
[
IO_Type
.
LineRun
].
GetIOAddr
(),
Config
.
DOList
[
IO_Type
.
LineRev
].
GetIOAddr
());
SingleDoor
=
new
CylinderManger
(
"单料们"
,
IO_Type
.
NGDoor_Open
,
IO_Type
.
NGDoor_Close
);
SingleDoor
=
new
CylinderManger
(
$
"单料们"
,
IO_Type
.
NGDoor_Open
,
IO_Type
.
NGDoor_Close
);
FlipDoor
=
new
CylinderManger
(
"翻板托盘"
,
IO_Type
.
ReelFlipDoor_Work
,
IO_Type
.
ReelFlipDoor_Home
);
FlipDoor
=
new
CylinderManger
(
$
"翻板托盘"
,
IO_Type
.
ReelFlipDoor_Work
,
IO_Type
.
ReelFlipDoor_Home
);
boxTransport
=
new
ReelTransport
(
Config
,
this
);
boxTransport
=
new
ReelTransport
(
Config
,
this
);
boxTransport
.
InOutEndProcessEvent
+=
delegate
(
string
posid
,
StoreMoveType
storeMoveType
,
bool
arg4
)
boxTransport
.
InOutEndProcessEvent
+=
delegate
(
string
posid
,
StoreMoveType
storeMoveType
,
bool
arg4
)
...
@@ -314,6 +314,7 @@ namespace DeviceLibrary
...
@@ -314,6 +314,7 @@ namespace DeviceLibrary
Batch_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
Batch_Axis
.
HomeMove
(
ResetMoveInfo
,
forceHome
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
LOW
);
//CylinderMove(ResetMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW);
//CylinderMove(ResetMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW);
Msg
.
add
(
""
,
MsgLevel
.
info
,
ErrInfo
.
X09_Clear
);
SingleDoor
.
ToLow
(
ResetMoveInfo
);
SingleDoor
.
ToLow
(
ResetMoveInfo
);
break
;
break
;
case
MoveStep
.
H02_HomeReset
:
case
MoveStep
.
H02_HomeReset
:
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
7ba7c53
...
@@ -265,6 +265,8 @@ namespace DeviceLibrary
...
@@ -265,6 +265,8 @@ namespace DeviceLibrary
//ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
}
else
{
else
{
if
(!
ConfigHelper
.
Config
.
Get
(
"CamTestReel_Ability"
,
false
))
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
NGOUT_04
);
RobotManage
.
UserPause
(
"等待取走单口料盘"
);
RobotManage
.
UserPause
(
"等待取走单口料盘"
);
}
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine_String.cs
查看文件 @
7ba7c53
...
@@ -83,7 +83,7 @@ namespace DeviceLibrary
...
@@ -83,7 +83,7 @@ namespace DeviceLibrary
{
{
if
(
CheckWait
(
StringMoveInfo
))
if
(
CheckWait
(
StringMoveInfo
))
return
;
return
;
switch
(
StringMoveInfo
.
MoveStep
)
switch
(
StringMoveInfo
.
MoveStep
)
{
{
case
MoveStep
.
Wait
:
case
MoveStep
.
Wait
:
...
@@ -94,7 +94,8 @@ namespace DeviceLibrary
...
@@ -94,7 +94,8 @@ namespace DeviceLibrary
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringFix_Bottom
,
IO_Type
.
StringFix_Top
,
IO_VALUE
.
LOW
);
StringState
=
StringStateE
.
OutStore
;
StringState
=
StringStateE
.
OutStore
;
}
}
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
)){
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
Msg
.
add
(
crc
.
GetString
(
L
.
no_string
,
"当前没有料串"
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
no_string
,
"当前没有料串"
),
MsgLevel
.
info
);
StringMoveInfo
.
log
(
$
"当前没有料串"
);
StringMoveInfo
.
log
(
$
"当前没有料串"
);
StringState
=
StringStateE
.
None
;
StringState
=
StringStateE
.
None
;
...
@@ -111,7 +112,7 @@ namespace DeviceLibrary
...
@@ -111,7 +112,7 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_01a
);
StringMoveInfo
.
log
(
$
"批量轴到待机点"
);
StringMoveInfo
.
log
(
$
"批量轴到待机点"
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
Config
.
Batch_P1
,
Config
.
Batch_P1_speed
);
Line
.
LineRun
(
"n"
,
false
,
2
);
Line
.
LineRun
(
"n"
,
false
,
2
);
break
;
break
;
case
MoveStep
.
StringLoad_01a
:
case
MoveStep
.
StringLoad_01a
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_02
);
...
@@ -139,18 +140,18 @@ namespace DeviceLibrary
...
@@ -139,18 +140,18 @@ namespace DeviceLibrary
downCheck2
=
false
;
downCheck2
=
false
;
downCheck3
=
false
;
downCheck3
=
false
;
break
;
break
;
case
MoveStep
.
StringLoad_03
:
case
MoveStep
.
StringLoad_03
:
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
)
||
IOValue
(
IO_Type
.
StringDoor_Close
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
StringMoveInfo
.
log
(
$
"批量轴到顶部检测点"
);
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
BatchAxisToP2
(
StringMoveInfo
);
BatchAxisToP2
(
StringMoveInfo
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
"料串正在上升"
,
MsgLevel
.
warning
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitMsg
(
"料串正在上升"
,
MsgLevel
.
warning
));
}
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
else
if
(
StringMoveInfo
.
IsTimeOut
(
10
))
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
),
MsgLevel
.
warning
);
StringMoveInfo
.
log
(
$
"等待关门"
);
StringMoveInfo
.
log
(
$
"等待关门"
);
}
}
break
;
break
;
...
@@ -161,12 +162,14 @@ namespace DeviceLibrary
...
@@ -161,12 +162,14 @@ namespace DeviceLibrary
StringMoveInfo
.
log
(
$
"恢复上次料串信息为出库料串"
);
StringMoveInfo
.
log
(
$
"恢复上次料串信息为出库料串"
);
StringState
=
StringStateE
.
OutStore
;
StringState
=
StringStateE
.
OutStore
;
}
}
if
(
Batch_Axis
.
IsInPosition
(
Config
.
Batch_P2
)
&&
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(
Batch_Axis
.
IsInPosition
(
Config
.
Batch_P2
)
&&
IOValue
(
IO_Type
.
TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
{
StringMoveInfo
.
log
(
$
"料串检测为空"
);
StringMoveInfo
.
log
(
$
"料串检测为空"
);
StringState
=
StringStateE
.
OutStore
;
StringState
=
StringStateE
.
OutStore
;
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
)
{
if
(
ConfigHelper
.
Config
.
Get
(
"Device_String_StandbyAtBottom"
,
true
)
&&
OutStoreJobList
.
Count
==
0
)
{
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
StringMoveInfo
.
log
(
$
"当钱空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
log
(
$
"当钱空料串, 并且没有出库任务, 料串下降待机"
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
}
}
...
@@ -182,28 +185,27 @@ namespace DeviceLibrary
...
@@ -182,28 +185,27 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04b
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_04b
);
StringMoveInfo
.
log
(
$
"料串下降到x13信号灭"
);
StringMoveInfo
.
log
(
$
"料串下降到x13信号灭"
);
BatchAxisToTagLow
(
StringMoveInfo
);
BatchAxisToTagLow
(
StringMoveInfo
);
if
(!
newreel
)
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
newreel
=
false
;
break
;
break
;
case
MoveStep
.
StringLoad_04b
:
case
MoveStep
.
StringLoad_04b
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_05
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_05
);
//if (StringState == StringStateE.HasReel)
if
(!
newreel
)
SetReelHeight
(
GetHeight
(
StringMoveInfo
));
newreel
=
false
;
StringMoveInfo
.
log
(
$
"料串有盘下降5mm"
);
var
tpos2
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_DetectDownMM
;
if
(
tpos2
<
0
)
{
{
StringMoveInfo
.
log
(
$
"料串有盘下降5mm"
);
tpos2
=
0
;
var
tpos2
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_DetectDownMM
;
if
(
tpos2
<
0
)
{
tpos2
=
0
;
}
if
(
StringState
==
StringStateE
.
OutStore
&&
tpos2
-
Config
.
Batch_PoToMM
*
30
<
0
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringState
=
StringStateE
.
Full
;
StringMoveInfo
.
log
(
$
"料串已满可以送出"
);
}
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1_speed
);
}
}
if
(
StringState
==
StringStateE
.
OutStore
&&
tpos2
-
Config
.
Batch_PoToMM
*
30
<
0
)
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringState
=
StringStateE
.
Full
;
StringMoveInfo
.
log
(
$
"料串已满可以送出"
);
}
Batch_Axis
.
AbsMove
(
StringMoveInfo
,
tpos2
,
Config
.
Batch_P1_speed
);
break
;
break
;
case
MoveStep
.
StringLoad_05
:
case
MoveStep
.
StringLoad_05
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_06
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringLoad_06
);
...
@@ -224,7 +226,7 @@ namespace DeviceLibrary
...
@@ -224,7 +226,7 @@ namespace DeviceLibrary
else
if
(
StringState
==
StringStateE
.
OutStore
)
else
if
(
StringState
==
StringStateE
.
OutStore
)
{
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReadyPut
);
var
tpos2
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutStoreDownMM
;
tpos2
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
Config
.
Batch_OutStoreDownMM
;
if
(
tpos2
<
0
)
if
(
tpos2
<
0
)
{
{
tpos2
=
0
;
tpos2
=
0
;
...
@@ -260,9 +262,9 @@ namespace DeviceLibrary
...
@@ -260,9 +262,9 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_01
);
}
}
break
;
break
;
case
MoveStep
.
StringReelPut
:
case
MoveStep
.
StringReelPut
:
LastStringState
=
StringStateE
.
OutStore
;
LastStringState
=
StringStateE
.
OutStore
;
var
tpos
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
(
StringMoveInfo
.
MoveParam
.
PlateH
+
Config
.
Batch_OutPlateDownMM
);
var
tpos
=
Batch_Axis
.
GetAclPosition
()
-
Config
.
Batch_PoToMM
*
(
StringMoveInfo
.
MoveParam
.
PlateH
+
Config
.
Batch_OutPlateDownMM
);
if
(
tpos
<
0
)
if
(
tpos
<
0
)
tpos
=
0
;
tpos
=
0
;
if
(
tpos
<
Config
.
Batch_P2
*
0.3
&&
!
downCheck1
)
if
(
tpos
<
Config
.
Batch_P2
*
0.3
&&
!
downCheck1
)
...
@@ -298,7 +300,7 @@ namespace DeviceLibrary
...
@@ -298,7 +300,7 @@ namespace DeviceLibrary
break
;
break
;
case
MoveStep
.
StringReelPut_01
:
case
MoveStep
.
StringReelPut_01
:
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_02
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringReelPut_02
);
StringMoveInfo
.
log
(
$
"检测阻挡工作"
);
StringMoveInfo
.
log
(
$
"检测阻挡工作"
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
CylinderMove
(
StringMoveInfo
,
IO_Type
.
StringPosChecker_Home
,
IO_Type
.
StringPosChecker_Work
,
IO_VALUE
.
HIGH
);
break
;
break
;
...
@@ -344,7 +346,8 @@ namespace DeviceLibrary
...
@@ -344,7 +346,8 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StringMoveInfo
.
log
(
$
"折叠门已关闭"
);
StringMoveInfo
.
log
(
$
"折叠门已关闭"
);
}
}
else
{
else
{
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_stringdoor_close
,
"等待关门折叠门"
),
MsgLevel
.
info
);
}
}
break
;
break
;
...
@@ -354,11 +357,14 @@ namespace DeviceLibrary
...
@@ -354,11 +357,14 @@ namespace DeviceLibrary
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
StringMoveInfo
.
log
(
$
"料串未拿走,直接关门"
);
StringMoveInfo
.
log
(
$
"料串未拿走,直接关门"
);
}
}
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
else
if
(
IOValue
(
IO_Type
.
StringBack_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
StringFront_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_05
);
StringMoveInfo
.
NextMoveStep
(
MoveStep
.
StringOut_05
);
StringMoveInfo
.
log
(
$
"料串已离开"
);
StringMoveInfo
.
log
(
$
"料串已离开"
);
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
StringMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
2000
));
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
30
))
{
}
else
if
(
StringMoveInfo
.
IsTimeOut
(
30
))
{
StringMoveInfo
.
log
(
$
"等待料串被取走超时"
);
StringMoveInfo
.
log
(
$
"等待料串被取走超时"
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_string_take
,
"等待料串被取走"
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
wait_string_take
,
"等待料串被取走"
),
MsgLevel
.
warning
);
}
}
...
@@ -501,7 +507,7 @@ namespace DeviceLibrary
...
@@ -501,7 +507,7 @@ namespace DeviceLibrary
}
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
if
(
LastHeight
<=
8
)
{
LastHeight
=
8
;
}
//string code = CodeManager.ProcessCode(LastCodeList);
//string code = CodeManager.ProcessCode(LastCodeList);
string
msg
=
Name
+
" 计算盘高:上升前 ["
+
StartMovePosition
+
"]实时[ "
+
EndMovePosition
+
"]差值["
+
(
EndMovePosition
-
StartMovePosition
)
+
"]系数["
+
AxisChangeValue
+
"] 计算后"
+
buchongStr
+
"["
+
height
+
"]"
+
",归类为【"
+
LastHeight
+
"mm】条码【"
+
LastCode
+
"】"
;
string
msg
=
Name
+
$
" 计算盘高:上升前 ["
+
StartMovePosition
+
$
"]实时[ "
+
EndMovePosition
+
$
"]差值["
+
(
EndMovePosition
-
StartMovePosition
)
+
$
"]系数["
+
AxisChangeValue
+
$
"] 计算后"
+
buchongStr
+
"["
+
height
+
"]"
+
$
",归类为【"
+
LastHeight
+
$
"mm】条码【"
+
LastCode
+
"】"
;
LogUtil
.
info
(
msg
);
LogUtil
.
info
(
msg
);
return
LastHeight
;
return
LastHeight
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论