Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d963e77d
由
刘韬
编写于
2023-03-09 13:56:55 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
0ca76a74
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
32 行增加
和
11 行删除
DeviceLibrary/DeviceLibrary/AxisBean.cs
DeviceLibrary/DeviceLibrary/Camera.cs
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
DeviceLibrary/theMachine/JobList.cs
DeviceLibrary/theMachine/MainMachine _Common.cs
DeviceLibrary/theMachine/MainMachine.cs
TheMachine/Form1.cs
TheMachine/SettingControl.Designer.cs
DeviceLibrary/DeviceLibrary/AxisBean.cs
查看文件 @
d963e77
...
@@ -344,6 +344,7 @@ namespace DeviceLibrary
...
@@ -344,6 +344,7 @@ namespace DeviceLibrary
}
}
public
void
MonitorAxisLoadRate
()
{
public
void
MonitorAxisLoadRate
()
{
Task
.
Run
(()
=>
{
Task
.
Run
(()
=>
{
Task
.
Delay
(
200
).
Wait
();
LogUtil
.
info
(
$
"{AxisName}-开始负载监控,最大负载阈值:{Setting_Init.Device_InOutMaxLoadRate}"
);
LogUtil
.
info
(
$
"{AxisName}-开始负载监控,最大负载阈值:{Setting_Init.Device_InOutMaxLoadRate}"
);
List
<
float
>
loadrate
=
new
List
<
float
>();
List
<
float
>
loadrate
=
new
List
<
float
>();
while
(
IsBusy
)
while
(
IsBusy
)
...
...
DeviceLibrary/DeviceLibrary/Camera.cs
查看文件 @
d963e77
...
@@ -13,6 +13,7 @@ using System.Text;
...
@@ -13,6 +13,7 @@ using System.Text;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
System.Threading
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
public
class
HIKCamera
public
class
HIKCamera
{
{
...
@@ -62,6 +63,8 @@ public class HIKCamera
...
@@ -62,6 +63,8 @@ public class HIKCamera
LogUtil
.
error
(
Name
+
"加载监控相机配置文件失败:"
+
e
.
ToString
());
LogUtil
.
error
(
Name
+
"加载监控相机配置文件失败:"
+
e
.
ToString
());
return
false
;
return
false
;
}
}
PictureBox
p1
=
new
PictureBox
();
camera
.
PreviewImage
(
DeviceName
,
p1
.
Handle
);
camera
.
Open
(
DeviceName
);
camera
.
Open
(
DeviceName
);
Bitmap
bmp
=
camera
.
GetImage
(
DeviceName
);
Bitmap
bmp
=
camera
.
GetImage
(
DeviceName
);
if
(
bmp
==
null
)
if
(
bmp
==
null
)
...
...
DeviceLibrary/DeviceLibrary/LiftMonitor.cs
查看文件 @
d963e77
...
@@ -245,12 +245,16 @@ namespace DeviceLibrary
...
@@ -245,12 +245,16 @@ namespace DeviceLibrary
public
void
Resume
()
public
void
Resume
()
{
{
LastResumeTime
=
DateTime
.
Now
;
LastResumeTime
=
DateTime
.
Now
;
try
if
(
moveInfo1
.
WaitList
.
Count
>
0
)
{
{
if
(
moveInfo1
.
WaitList
[
0
].
WaitType
==
WaitEnum
.
W013_Action
)
{
if
(
moveInfo1
.
WaitList
.
Count
>
0
)
{
if
(
moveInfo1
.
WaitList
[
0
].
WaitType
==
WaitEnum
.
W013_Action
)
{
var
wt
=
moveInfo1
.
WaitList
[
0
];
for
(
int
i
=
0
;
i
<
10
;
i
++)
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
{
var
w
=
moveInfo1
.
WaitList
[
0
]
.
Action
?.
Invoke
(
moveInfo1
.
WaitList
[
0
]);
var
w
=
wt
.
Action
?.
Invoke
(
moveInfo1
.
WaitList
[
0
]);
if
(
w
==
null
)
if
(
w
==
null
)
return
;
return
;
if
(
w
.
Value
)
if
(
w
.
Value
)
...
@@ -260,5 +264,7 @@ namespace DeviceLibrary
...
@@ -260,5 +264,7 @@ namespace DeviceLibrary
}
}
}
}
}
}
catch
{
}
}
}
}
}
}
DeviceLibrary/theMachine/JobList.cs
查看文件 @
d963e77
...
@@ -47,7 +47,7 @@ namespace DeviceLibrary
...
@@ -47,7 +47,7 @@ namespace DeviceLibrary
get
=>
jobInfos
.
Count
;
get
=>
jobInfos
.
Count
;
}
}
public
void
ClearLastPosid
(
string
posid
)
{
public
void
ClearLastPosid
(
string
posid
)
{
if
(
lastoutpos
==
posid
)
//
if (lastoutpos == posid)
lastoutpos
=
""
;
lastoutpos
=
""
;
}
}
}
}
...
...
DeviceLibrary/theMachine/MainMachine _Common.cs
查看文件 @
d963e77
...
@@ -51,7 +51,7 @@ namespace DeviceLibrary
...
@@ -51,7 +51,7 @@ namespace DeviceLibrary
Msg
.
add
(
w
.
ActionMsg
,
w
.
Data
);
Msg
.
add
(
w
.
ActionMsg
,
w
.
Data
);
}
}
});
});
foreach
(
WaitResultInfo
wait
in
MoveInfo
.
WaitList
)
foreach
(
WaitResultInfo
wait
in
MoveInfo
.
WaitList
.
ToList
()
)
{
{
if
(
wait
.
IsEnd
)
if
(
wait
.
IsEnd
)
{
{
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
d963e77
...
@@ -141,6 +141,7 @@ namespace DeviceLibrary
...
@@ -141,6 +141,7 @@ namespace DeviceLibrary
StringDoor
=
new
LiftMonitor
(
IO_Type
.
StringDoor_Open
,
IO_Type
.
StringDoor_Close
,
sf
,
IO_Type
.
StringDoor_Axis_Break
,
new
AxisBean
(
Config
.
StringDoor_Axis
,
Name
),
Config
.
StringDoorLength
,
Config
.
StringDoorLength_speed
);
StringDoor
=
new
LiftMonitor
(
IO_Type
.
StringDoor_Open
,
IO_Type
.
StringDoor_Close
,
sf
,
IO_Type
.
StringDoor_Axis_Break
,
new
AxisBean
(
Config
.
StringDoor_Axis
,
Name
),
Config
.
StringDoorLength
,
Config
.
StringDoorLength_speed
);
StringDoor
.
DownOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_DownOverTimeMS"
,
0
);
StringDoor
.
DownOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_DownOverTimeMS"
,
0
);
StringDoor
.
UpOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_UpOverTimeMS"
,
0
);
StringDoor
.
UpOverTimeMS
=
ConfigHelper
.
Config
.
Get
(
"Device_StringDoor_UpOverTimeMS"
,
0
);
StringDoor
.
ResumeWaitTimeSec
=
5
;
LogUtil
.
info
(
"加载料串门类型为:步进"
);
LogUtil
.
info
(
"加载料串门类型为:步进"
);
}
}
else
else
...
@@ -525,6 +526,8 @@ namespace DeviceLibrary
...
@@ -525,6 +526,8 @@ namespace DeviceLibrary
boxTransport
.
Reset
();
boxTransport
.
Reset
();
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
log
(
"回原完成"
);
ResetMoveInfo
.
EndMove
();
ResetMoveInfo
.
EndMove
();
OutSingleJobList
.
ClearLastPosid
(
""
);
OutStoreJobList
.
ClearLastPosid
(
""
);
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
)
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
)
&&
boxTransport
.
IsComplateOrFree
&&
ClampMoveInfo
.
MoveStep
==
MoveStep
.
Wait
)
{
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut_NGPre
);
StoreMoveInfo
.
NewMove
(
MoveStep
.
StoreOut_NGPre
);
...
...
TheMachine/Form1.cs
查看文件 @
d963e77
...
@@ -6,14 +6,10 @@ using OnlineStore.Common;
...
@@ -6,14 +6,10 @@ using OnlineStore.Common;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Drawing
;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.Runtime.ExceptionServices
;
using
System.Runtime.Serialization.Formatters.Binary
;
using
System.Runtime.Serialization.Formatters.Binary
;
using
System.Text
;
using
System.Threading
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
d963e77
...
@@ -39,6 +39,7 @@ namespace TheMachine
...
@@ -39,6 +39,7 @@ namespace TheMachine
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
cb_usefixpos
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_usefixpos
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
tp
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
...
@@ -148,7 +149,7 @@ namespace TheMachine
...
@@ -148,7 +149,7 @@ namespace TheMachine
//
//
// button1
// button1
//
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
356
,
65
);
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
903
,
101
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
48
);
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
102
,
48
);
this
.
button1
.
TabIndex
=
7
;
this
.
button1
.
TabIndex
=
7
;
...
@@ -157,9 +158,19 @@ namespace TheMachine
...
@@ -157,9 +158,19 @@ namespace TheMachine
this
.
button1
.
Visible
=
false
;
this
.
button1
.
Visible
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click_1
);
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click_1
);
//
//
// uC_SetUserPassword1
//
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
303
,
3
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
405
,
272
);
this
.
uC_SetUserPassword1
.
TabIndex
=
8
;
//
// SettingControl
// SettingControl
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
tp
);
this
.
Controls
.
Add
(
this
.
tp
);
this
.
Name
=
"SettingControl"
;
this
.
Name
=
"SettingControl"
;
...
@@ -182,5 +193,6 @@ namespace TheMachine
...
@@ -182,5 +193,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tp
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_usefixpos
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_usefixpos
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
UC_SetUserPassword
uC_SetUserPassword1
;
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论