Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 39d691c8
由
刘韬
编写于
2024-05-31 10:28:02 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
选项StringDoor_InOut_Roller_Mode
料串进出滚筒模式选择, 适配西门子后的新设备
1 个父辈
0bb8f3ac
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
88 行增加
和
26 行删除
Common/Setting_Init.cs
DeviceLibrary/DeviceLibrary/LineRunMonitor.cs
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_Clamp.cs
TheMachine/Form1.cs
TheMachine/UC/uc_boxdebug.Designer.cs
TheMachine/UC/uc_boxdebug.cs
Common/Setting_Init.cs
查看文件 @
39d691c
using
ConfigHelper
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
OnlineStore.Common
...
...
@@ -197,6 +193,8 @@ namespace OnlineStore.Common
public
static
MyConfig
<
int
>
StringDoor_UpOverTimeMS
=
0
;
[
MyConfigComment
(
"料串门光栅触发处理方式:0-设备急停;1-仅料串门停止"
)]
public
static
MyConfig
<
int
>
StringDoor_SafetyLightCurtainsProcStrategy
=
1
;
[
MyConfigComment
(
"料串进出滚筒控制模式,SingleIoIn_SingleIoOut=242405之前的设备单IO进出,SingleIoIn_DoubltIoOut之后的设备双IO反转"
)]
public
static
MyConfig
<
InOut_Roller_Mode
>
StringDoor_InOut_Roller_Mode
=
InOut_Roller_Mode
.
SingleIoIn_SingleIoOut
;
[
MyConfigComment
(
"库位高低点最大相差的值"
)]
...
...
@@ -228,4 +226,9 @@ namespace OnlineStore.Common
[
MyConfigComment
(
"监控上传功能_图像质量"
)]
public
static
MyConfig
<
int
>
UploadVideo_ImgQuality
=
100
;
}
public
enum
InOut_Roller_Mode
{
SingleIoIn_SingleIoOut
=
0
,
SingleIoIn_DoubltIoOut
=
1
}
}
DeviceLibrary/DeviceLibrary/LineRunMonitor.cs
查看文件 @
39d691c
...
...
@@ -16,11 +16,13 @@ namespace DeviceLibrary
string
Name
;
ushort
LineIO
;
ushort
LineRevIO
;
int
Rev_type
=
0
;
bool
isIOon
=
false
;
public
LineRunMonitor
(
string
name
,
ushort
io
,
ushort
rev_io
=
0
)
{
public
LineRunMonitor
(
string
name
,
ushort
io
,
ushort
rev_io
=
0
,
int
rev_type
=
0
)
{
Name
=
name
;
LineIO
=
io
;
LineRevIO
=
rev_io
;
Rev_type
=
rev_type
;
LineInit
();
SafetyDevice
.
AddDevice
(
this
);
}
...
...
@@ -96,7 +98,10 @@ namespace DeviceLibrary
if
(
Reversal
)
{
DOMove
(
LineIO
,
IO_VALUE
.
LOW
);
if
(
Rev_type
==
0
)
DOMove
(
LineIO
,
IO_VALUE
.
LOW
);
else
DOMove
(
LineIO
,
IO_VALUE
.
HIGH
);
DOMove
(
LineRevIO
,
IO_VALUE
.
HIGH
);
}
else
...
...
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
查看文件 @
39d691c
...
...
@@ -13,7 +13,8 @@ namespace DeviceLibrary
{
partial
class
MainMachine
{
public
bool
StartAutoInOutTest
(
string
posname
,
out
string
errmsg
)
int
CurrentReelHeight
=
0
;
public
bool
StartAutoInOutTest
(
string
posname
,
int
reelh
,
out
string
errmsg
)
{
errmsg
=
""
;
if
(!
boxTransport
.
IsComplateOrFree
)
...
...
@@ -27,7 +28,7 @@ namespace DeviceLibrary
// return false;
//}
CurrentReelHeight
=
reelh
;
poslist
=
RobotManage
.
PositionNumList
.
Select
(
a
=>
{
return
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
[
a
];
}).
ToList
();
//CSVPositionReader<ACStorePosition>.getPositionList();
poslist
.
RemoveAll
(
x
=>
{
return
x
.
PositionNum
.
StartsWith
(
"fix#"
);
});
CurrentPosIndex
=
poslist
.
FindIndex
(
x
=>
x
.
PositionNum
==
posname
);
...
...
@@ -70,8 +71,9 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
AIOTest_02_Pause1
:
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
AIOTest_03_FirstReady
);
CloseSingleDoor
(
AIOTMoveInfo
);
var
ac
=
poslist
[
CurrentPosIndex
];
var
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
ac
.
BagHigh
);
var
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
CurrentReelHeight
);
if
(!
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
reel
),
new
BoxStorePosition
(
Config
,
ac
,
reel
),
StoreMoveType
.
InStore
))
{
AIOTMoveInfo
.
log
(
$
"料仓周转启动失败"
);
...
...
@@ -107,6 +109,7 @@ namespace DeviceLibrary
return
;
}
CloseFlipDoor
(
AIOTMoveInfo
);
OpenSingleDoor
(
AIOTMoveInfo
);
}
break
;
case
MoveStep
.
AIOTest_05_Pause2
:
...
...
@@ -116,9 +119,10 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
AIOTest_06_SecondReady
:
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreIn05
);
CloseSingleDoor
(
AIOTMoveInfo
);
AIOTMoveInfo
.
log
(
$
"开始转运料盘第二盘"
);
ac
=
poslist
[
CurrentPosIndex
-
1
];
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
ac
.
BagHigh
);
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
CurrentReelHeight
);
if
(!
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
reel
),
new
BoxStorePosition
(
Config
,
ac
,
reel
),
StoreMoveType
.
InStore
))
{
AIOTMoveInfo
.
log
(
$
"料仓周转启动失败"
);
...
...
@@ -243,7 +247,14 @@ namespace DeviceLibrary
return
;
}
var
ac2
=
poslist
[
CurrentPosIndex
-
2
];
reel
=
new
ReelParam
(
"auto"
,
ac2
.
BagWidth
,
ac2
.
BagHigh
);
reel
=
new
ReelParam
(
"auto"
,
ac2
.
BagWidth
,
CurrentReelHeight
);
if
(
ac2
.
BagHigh
<
CurrentReelHeight
)
{
StopAutoInOut
=
true
;
AIOTMoveInfo
.
log
(
$
"下一个库位的尺寸小于盘高,停止自动测试"
);
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut10
);
}
if
(!
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
ac1
,
reel
),
new
BoxStorePosition
(
Config
,
ac2
,
reel
),
StoreMoveType
.
InStore
))
{
AIOTMoveInfo
.
log
(
$
"料仓周转启动失败"
);
...
...
@@ -273,7 +284,7 @@ namespace DeviceLibrary
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut11
);
CurrentPosIndex
--;
ac
=
poslist
[
CurrentPosIndex
];
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
ac
.
BagHigh
);
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
CurrentReelHeight
);
if
(!
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
ac
,
reel
),
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
reel
),
StoreMoveType
.
OutStore
))
{
AIOTMoveInfo
.
log
(
$
"料仓周转启动失败"
);
...
...
@@ -308,7 +319,7 @@ namespace DeviceLibrary
case
MoveStep
.
StoreOut13
:
AIOTMoveInfo
.
NextMoveStep
(
MoveStep
.
StoreOut14
);
ac
=
poslist
[
CurrentPosIndex
-
1
];
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
ac
.
BagHigh
);
reel
=
new
ReelParam
(
"auto"
,
ac
.
BagWidth
,
CurrentReelHeight
);
if
(!
boxTransport
.
Start
(
new
BoxStorePosition
(
Config
,
ac
,
reel
),
new
BoxStorePosition
(
Config
,
StoreSide
.
NGDoor
,
reel
),
StoreMoveType
.
OutStore
))
{
AIOTMoveInfo
.
log
(
$
"料仓周转启动失败"
);
...
...
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
查看文件 @
39d691c
...
...
@@ -22,7 +22,7 @@ namespace DeviceLibrary
void
Reset_BTN
()
{
LogUtil
.
info
(
"按下复位按钮"
);
if
(
!
lastSuddenStop
&&
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press
,
"按下复位按钮."
),
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
}
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
39d691c
...
...
@@ -113,7 +113,7 @@ namespace DeviceLibrary
Clamp_Axis
.
interference
+=
Clamp_Axis_interference
;
Crc_LanguageChangeEvent
(
null
,
EventArgs
.
Empty
);
#
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
()
,(
int
)(
Setting_Init
.
StringDoor_InOut_Roller_Mode
.
Val
)
);
SingleDoor
=
new
CylinderManger
(
$
"单料门"
,
IO_Type
.
NGDoor_Open
,
IO_Type
.
NGDoor_Close
);
//检测翻板门是否为鸣志点击伺服控制
if
(
Config
.
FlipDoor_L_Axis
==
null
&&
Config
.
FlipDoor_R_Axis
==
null
)
...
...
@@ -282,7 +282,7 @@ namespace DeviceLibrary
ioMonitor
();
AGVProcess
();
StringProcess
();
ClampProcess
();
ClampProcess
();
boxTransport
.
Process
();
if
(
AutoInOutTest
)
AutoInOutTestProcess
();
...
...
@@ -353,6 +353,7 @@ namespace DeviceLibrary
Alarm
(
AlarmType
.
None
);
StopMove
(
true
);
IOMove
(
IO_Type
.
LineRun
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
LineRev
,
IO_VALUE
.
LOW
);
LedProcess
(
null
);
SoundsController
.
StopPlay
();
LogUtil
.
info
(
"开始停止系统3."
);
...
...
DeviceLibrary/theMachine/MainMachine_Clamp.cs
查看文件 @
39d691c
...
...
@@ -30,7 +30,7 @@ namespace DeviceLibrary
}
void
ReelTaked
()
{
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelTaked
);
ClampMoveInfo
.
NextMoveStep
(
MoveStep
.
ReelTaked
);
}
public
void
NGPuted
(
string
msg
)
{
...
...
@@ -81,6 +81,8 @@ namespace DeviceLibrary
switch
(
ClampMoveInfo
.
MoveStep
)
{
case
MoveStep
.
Wait
:
if
(
AutoInOutTest
)
return
;
if
(
IsGetReelReady
&&
StoreMoveInfo
.
MoveStep
<
MoveStep
.
StoreOut10
&&
OutSingleJobList
.
Count
==
0
)
{
ClampMoveInfo
.
NewMove
(
MoveStep
.
ReelClamp_01
);
...
...
TheMachine/Form1.cs
查看文件 @
39d691c
...
...
@@ -178,13 +178,13 @@ namespace TheMachine
const
int
tabpagecount
=
4
;
void
addTablePage
()
{
this
.
SuspendLayout
();
//
this.SuspendLayout();
AddForm
(
"tab_io"
,
crc
.
GetString
(
L
.
tab_io
,
"IO调试"
),
ioc
);
AddForm
(
"tab_axis"
,
crc
.
GetString
(
L
.
tab_axis
,
"伺服调试"
),
ac
);
AddForm
(
"tab_store"
,
crc
.
GetString
(
L
.
tab_store
,
"库位调试"
),
bd
);
AddForm
(
"tab_setting"
,
crc
.
GetString
(
L
.
tab_setting
,
"相关设置"
),
sc
);
this
.
ResumeLayout
(
true
);
this
.
PerformLayout
();
//
this.ResumeLayout(true);
//
this.PerformLayout();
crc
.
LanguageProcess
(
this
);
}
...
...
@@ -276,7 +276,7 @@ namespace TheMachine
(
sender
as
ToolStripMenuItem
).
Text
=
!
RobotManage
.
IsConfigMode
?
crc
.
GetString
(
L
.
enable_config_mode
,
"启用配置模式"
)
:
crc
.
GetString
(
L
.
disable_config_mode
,
"停用配置模式"
);
showDebugTabPages
(
RobotManage
.
IsConfigMode
);
this
.
WindowState
=
FormWindowState
.
Maximized
;
//if (RobotManage.IsConfigMode)
//{
// //RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config);
...
...
@@ -420,7 +420,7 @@ namespace TheMachine
Task
.
Run
(()
=>
{
Task
.
Delay
(
1000
).
Wait
();
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
||
RobotManage
.
IsUserPause
)
btn_run_Click
(
this
,
EventArgs
.
Empty
);
});
...
...
TheMachine/UC/uc_boxdebug.Designer.cs
查看文件 @
39d691c
...
...
@@ -31,7 +31,9 @@ namespace TheMachine
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
groupInout
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cb_inoutdebugmode
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_plateheight
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btn_autoinout
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInStore
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOutStore
=
new
System
.
Windows
.
Forms
.
Button
();
...
...
@@ -48,7 +50,9 @@ namespace TheMachine
//
// groupInout
//
this
.
groupInout
.
Controls
.
Add
(
this
.
label1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cb_inoutdebugmode
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cb_plateheight
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btn_autoinout
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInStore
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnOutStore
);
...
...
@@ -59,6 +63,15 @@ namespace TheMachine
this
.
groupInout
.
TabStop
=
false
;
this
.
groupInout
.
Text
=
"料仓操作"
;
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
139
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
47
,
12
);
this
.
label1
.
TabIndex
=
228
;
this
.
label1
.
Text
=
"Reel H:"
;
//
// cb_inoutdebugmode
//
this
.
cb_inoutdebugmode
.
AutoSize
=
true
;
...
...
@@ -70,6 +83,27 @@ namespace TheMachine
this
.
cb_inoutdebugmode
.
UseVisualStyleBackColor
=
true
;
this
.
cb_inoutdebugmode
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
cb_inoutdebugmode_CheckedChanged
);
//
// cb_plateheight
//
this
.
cb_plateheight
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cb_plateheight
.
Enabled
=
false
;
this
.
cb_plateheight
.
FormattingEnabled
=
true
;
this
.
cb_plateheight
.
Items
.
AddRange
(
new
object
[]
{
"8"
,
"16"
,
"20"
,
"24"
,
"32"
,
"40"
,
"44"
,
"48"
,
"56"
,
"72"
});
this
.
cb_plateheight
.
Location
=
new
System
.
Drawing
.
Point
(
72
,
136
);
this
.
cb_plateheight
.
Name
=
"cb_plateheight"
;
this
.
cb_plateheight
.
Size
=
new
System
.
Drawing
.
Size
(
54
,
20
);
this
.
cb_plateheight
.
TabIndex
=
227
;
//
// btn_autoinout
//
this
.
btn_autoinout
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
...
...
@@ -90,7 +124,7 @@ namespace TheMachine
this
.
btnInStore
.
Enabled
=
false
;
this
.
btnInStore
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnInStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
70
);
this
.
btnInStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
42
);
this
.
btnInStore
.
Name
=
"btnInStore"
;
this
.
btnInStore
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
32
);
this
.
btnInStore
.
TabIndex
=
102
;
...
...
@@ -104,7 +138,7 @@ namespace TheMachine
this
.
btnOutStore
.
Enabled
=
false
;
this
.
btnOutStore
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOutStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOutStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
108
);
this
.
btnOutStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
80
);
this
.
btnOutStore
.
Name
=
"btnOutStore"
;
this
.
btnOutStore
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
32
);
this
.
btnOutStore
.
TabIndex
=
101
;
...
...
@@ -227,5 +261,7 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
Button
btn_autoinout
;
private
System
.
Windows
.
Forms
.
Label
label_verify
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_fixpos
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_plateheight
;
}
}
TheMachine/UC/uc_boxdebug.cs
查看文件 @
39d691c
...
...
@@ -320,7 +320,7 @@ namespace TheMachine
ACStorePosition
ktkPosition
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posid
);
cmbPosition
.
Text
=
posid
;
label_size
.
Text
=
$
"[{ktkPosition.BagWidth}x{ktkPosition.BagHigh}]"
;
cb_plateheight
.
Text
=
ktkPosition
.
BagHigh
.
ToString
();
storePosControl1
.
LoadPos
(
ktkPosition
);
}
...
...
@@ -425,6 +425,7 @@ namespace TheMachine
btnInStore
.
Enabled
=
cb_inoutdebugmode
.
Checked
;
btnOutStore
.
Enabled
=
cb_inoutdebugmode
.
Checked
;
btn_autoinout
.
Enabled
=
cb_inoutdebugmode
.
Checked
;
cb_plateheight
.
Enabled
=
cb_inoutdebugmode
.
Checked
;
}
private
void
btn_autoinout_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -441,7 +442,10 @@ namespace TheMachine
DialogResult
res
=
MessageBox
.
Show
(
crc
.
GetString
(
L
.
autotest_msg_02
,
"确定开始自动库位测试?\n请确保料仓库位全部为空."
),
crc
.
GetString
(
L
.
tips
,
"提示"
),
MessageBoxButtons
.
YesNo
);
if
(
res
==
DialogResult
.
No
)
return
;
if
(!
RobotManage
.
mainMachine
.
StartAutoInOutTest
(
cmbPosition
.
Text
,
out
string
errmsg
))
var
a
=
cb_plateheight
.
SelectedItem
.
ToString
();
int
.
TryParse
(
a
,
out
int
h
);
if
(!
RobotManage
.
mainMachine
.
StartAutoInOutTest
(
cmbPosition
.
Text
,
h
,
out
string
errmsg
))
{
MessageBox
.
Show
(
errmsg
);
return
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论