Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 91ee981a
由
LN
编写于
2023-11-10 14:17:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
aoi打开时投影显示全黑
1 个父辈
05e479bd
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
53 行增加
和
20 行删除
DeviceLibrary/DeviceLibrary.csproj
DeviceLibrary/manager/AlarmProcess.cs → DeviceLibrary/manager/ProjectorProcess.cs
DeviceLibrary/manager/TSAVBean.cs
TSA-V/projector/FrmProjectorScreen.Designer.cs
TSA-V/projector/FrmProjectorScreen.cs
TSA-V/workForm/FrmTSAV.cs
TSA-V/记录.txt
DeviceLibrary/DeviceLibrary.csproj
查看文件 @
91ee981
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<Compile Include="deviceLibrary\IO\IOBase.cs" />
<Compile Include="deviceLibrary\IO\IOBase.cs" />
<Compile Include="deviceLibrary\IO\NanjingSDotIO.cs" />
<Compile Include="deviceLibrary\IO\NanjingSDotIO.cs" />
<Compile Include="deviceLibrary\IO\NiRenIO.cs" />
<Compile Include="deviceLibrary\IO\NiRenIO.cs" />
<Compile Include="manager\
Alarm
Process.cs" />
<Compile Include="manager\
Projector
Process.cs" />
<Compile Include="manager\LedManager.cs" />
<Compile Include="manager\LedManager.cs" />
<Compile Include="manager\LineWidthManager.cs" />
<Compile Include="manager\LineWidthManager.cs" />
<Compile Include="manager\ResourceControl.cs" />
<Compile Include="manager\ResourceControl.cs" />
...
...
DeviceLibrary/manager/
Alarm
Process.cs
→
DeviceLibrary/manager/
Projector
Process.cs
查看文件 @
91ee981
...
@@ -12,8 +12,11 @@ using static TSA_V.Common.LogUtil;
...
@@ -12,8 +12,11 @@ using static TSA_V.Common.LogUtil;
namespace
TSA_V
namespace
TSA_V
{
{
public
class
Alarm
Process
public
class
Projector
Process
{
{
public
static
bool
AOIopen
=
false
;
private
static
System
.
Timers
.
Timer
proTimer
=
null
;
private
static
System
.
Timers
.
Timer
proTimer
=
null
;
private
static
bool
InPlay
=
false
;
private
static
bool
InPlay
=
false
;
...
@@ -54,7 +57,7 @@ namespace TSA_V
...
@@ -54,7 +57,7 @@ namespace TSA_V
private
static
void
ProTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
private
static
void
ProTimer_Elapsed
(
object
sender
,
System
.
Timers
.
ElapsedEventArgs
e
)
{
{
if
(
Alarm
Process
.
IsAlarm
(
out
string
msg
))
if
(
Projector
Process
.
IsAlarm
(
out
string
msg
))
{
{
if
(
InPlay
)
if
(
InPlay
)
{
{
...
...
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
91ee981
...
@@ -134,7 +134,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -134,7 +134,7 @@ namespace TSA_V.DeviceLibrary
//return ResourceControl.GetString(ResourceControl.InitXFail, "振镜初始化失败");
//return ResourceControl.GetString(ResourceControl.InitXFail, "振镜初始化失败");
}
}
});
});
Alarm
Process
.
Init
();
Projector
Process
.
Init
();
serverCommunication
=
new
ServerCommunication
();
serverCommunication
=
new
ServerCommunication
();
serverCommunication
.
StartConnectServer
();
serverCommunication
.
StartConnectServer
();
return
""
;
return
""
;
...
...
TSA-V/projector/FrmProjectorScreen.Designer.cs
查看文件 @
91ee981
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panAoi
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
lblAlarm
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblAlarm
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
colorDialog1
=
new
System
.
Windows
.
Forms
.
ColorDialog
();
this
.
colorDialog1
=
new
System
.
Windows
.
Forms
.
ColorDialog
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
...
@@ -40,6 +41,7 @@
...
@@ -40,6 +41,7 @@
//
//
this
.
panel1
.
BackColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
panel1
.
BackColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
panel1
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Zoom
;
this
.
panel1
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Zoom
;
this
.
panel1
.
Controls
.
Add
(
this
.
panAoi
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblAlarm
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblAlarm
);
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
...
@@ -47,6 +49,16 @@
...
@@ -47,6 +49,16 @@
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
633
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
633
);
this
.
panel1
.
TabIndex
=
0
;
this
.
panel1
.
TabIndex
=
0
;
//
//
// panAoi
//
this
.
panAoi
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
panAoi
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panAoi
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panAoi
.
Name
=
"panAoi"
;
this
.
panAoi
.
Size
=
new
System
.
Drawing
.
Size
(
800
,
633
);
this
.
panAoi
.
TabIndex
=
1
;
this
.
panAoi
.
Visible
=
false
;
//
// lblAlarm
// lblAlarm
//
//
this
.
lblAlarm
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
lblAlarm
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
@@ -90,5 +102,6 @@
...
@@ -90,5 +102,6 @@
private
System
.
Windows
.
Forms
.
ColorDialog
colorDialog1
;
private
System
.
Windows
.
Forms
.
ColorDialog
colorDialog1
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
private
System
.
Windows
.
Forms
.
Label
lblAlarm
;
private
System
.
Windows
.
Forms
.
Label
lblAlarm
;
private
System
.
Windows
.
Forms
.
Panel
panAoi
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
TSA-V/projector/FrmProjectorScreen.cs
查看文件 @
91ee981
...
@@ -44,7 +44,7 @@ namespace TSA_V
...
@@ -44,7 +44,7 @@ namespace TSA_V
lblAlarm
.
Visible
=
false
;
lblAlarm
.
Visible
=
false
;
}
}
}
}
public
bool
CloseShowName
=
false
;
public
bool
CloseShowName
=
false
;
public
bool
ShowForm
()
public
bool
ShowForm
()
{
{
Screen
[]
sc
=
Screen
.
AllScreens
;
Screen
[]
sc
=
Screen
.
AllScreens
;
...
@@ -93,8 +93,10 @@ namespace TSA_V
...
@@ -93,8 +93,10 @@ namespace TSA_V
private
void
FrmScreenTest_Shown
(
object
sender
,
EventArgs
e
)
private
void
FrmScreenTest_Shown
(
object
sender
,
EventArgs
e
)
{
{
ShowPoint
(
new
ProjectorPInfo
(
ScreenWidth
/
2
,
ScreenHeight
/
2
));
ShowPoint
(
new
ProjectorPInfo
(
ScreenWidth
/
2
,
ScreenHeight
/
2
));
DrawArea
();
DrawArea
();
panAoi
.
BackColor
=
Color
.
Black
;
panAoi
.
Visible
=
false
;
}
}
public
void
DrawArea
()
public
void
DrawArea
()
{
{
...
@@ -106,8 +108,8 @@ namespace TSA_V
...
@@ -106,8 +108,8 @@ namespace TSA_V
int
startY
=
0
;
int
startY
=
0
;
int
Point_X_Length
=
3
;
int
Point_X_Length
=
3
;
int
Point_Y_Length
=
3
;
int
Point_Y_Length
=
3
;
int
lineWidth
=
(
ScreenWidth
)
/
(
Point_X_Length
-
1
);
int
lineWidth
=
(
ScreenWidth
)
/
(
Point_X_Length
-
1
);
int
lineHeight
=
(
ScreenHeight
)
/
(
Point_Y_Length
-
1
);
int
lineHeight
=
(
ScreenHeight
)
/
(
Point_Y_Length
-
1
);
Graphics
grfx
=
panel1
.
CreateGraphics
();
Graphics
grfx
=
panel1
.
CreateGraphics
();
Color
color
=
Color
.
White
;
Color
color
=
Color
.
White
;
grfx
.
SmoothingMode
=
SmoothingMode
.
HighQuality
;
grfx
.
SmoothingMode
=
SmoothingMode
.
HighQuality
;
...
@@ -147,8 +149,8 @@ namespace TSA_V
...
@@ -147,8 +149,8 @@ namespace TSA_V
int
Point_X_Length
=
21
;
int
Point_X_Length
=
21
;
int
Point_Y_Length
=
21
;
int
Point_Y_Length
=
21
;
int
lineWidth
=
(
ScreenWidth
-
startX
*
2
)
/
(
Point_X_Length
-
1
);
int
lineWidth
=
(
ScreenWidth
-
startX
*
2
)
/
(
Point_X_Length
-
1
);
int
lineHeight
=
(
ScreenHeight
-
startY
*
2
)
/
(
Point_Y_Length
-
1
);
int
lineHeight
=
(
ScreenHeight
-
startY
*
2
)
/
(
Point_Y_Length
-
1
);
...
@@ -304,17 +306,17 @@ namespace TSA_V
...
@@ -304,17 +306,17 @@ namespace TSA_V
}
}
}
}
}
}
public
void
ShowPoint
(
DeviceLibrary
.
ProjectorPInfo
p
)
public
void
ShowPoint
(
DeviceLibrary
.
ProjectorPInfo
p
)
{
{
if
(!
ISShow
)
if
(!
ISShow
)
{
{
return
;
return
;
}
}
Graphics
g
=
panel1
.
CreateGraphics
();
Graphics
g
=
panel1
.
CreateGraphics
();
DrawPoint
(
g
,
p
.
PX
,
p
.
PY
,
p
.
PType
,
p
.
SizeX
,
p
.
SizeY
,
p
.
PenWidth
,
p
.
ShowText
);
DrawPoint
(
g
,
p
.
PX
,
p
.
PY
,
p
.
PType
,
p
.
SizeX
,
p
.
SizeY
,
p
.
PenWidth
,
p
.
ShowText
);
g
.
Dispose
();
g
.
Dispose
();
}
}
public
void
ShowPoint
(
bool
showName
,
params
SMTPointInfo
[]
points
)
public
void
ShowPoint
(
bool
showName
,
params
SMTPointInfo
[]
points
)
{
{
if
(!
ISShow
)
if
(!
ISShow
)
{
{
...
@@ -329,7 +331,7 @@ namespace TSA_V
...
@@ -329,7 +331,7 @@ namespace TSA_V
int
y
=
(
int
)
point
.
NodePositionY
;
int
y
=
(
int
)
point
.
NodePositionY
;
int
sizex
=
point
.
PointSizeX
;
int
sizex
=
point
.
PointSizeX
;
int
sizey
=
point
.
PointSizeY
;
int
sizey
=
point
.
PointSizeY
;
DrawPoint
(
g
,
x
,
y
,
type
,
sizex
,
sizey
,
point
.
PenWidth
,
""
);
DrawPoint
(
g
,
x
,
y
,
type
,
sizex
,
sizey
,
point
.
PenWidth
,
""
);
if
(
showName
)
if
(
showName
)
{
{
...
@@ -352,9 +354,16 @@ namespace TSA_V
...
@@ -352,9 +354,16 @@ namespace TSA_V
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
{
if
(
AlarmProcess
.
IsAlarm
(
out
string
msg
))
if
(
ProjectorProcess
.
AOIopen
)
{
{
if
(
panel1
.
BackgroundImage
!=
null
)
panAoi
.
BackColor
=
Color
.
Black
;
panAoi
.
Visible
=
true
;
}
else
if
(
ProjectorProcess
.
IsAlarm
(
out
string
msg
))
{
panAoi
.
Visible
=
false
;
if
(
panel1
.
BackgroundImage
!=
null
)
{
{
panel1
.
BackgroundImage
=
null
;
panel1
.
BackgroundImage
=
null
;
}
}
...
@@ -369,11 +378,12 @@ namespace TSA_V
...
@@ -369,11 +378,12 @@ namespace TSA_V
}
}
else
else
{
{
panAoi
.
Visible
=
false
;
if
(
panel1
.
BackgroundImage
!=
null
)
if
(
panel1
.
BackgroundImage
!=
null
)
{
{
panel1
.
BackgroundImage
=
null
;
panel1
.
BackgroundImage
=
null
;
}
}
if
(
lblAlarm
.
Visible
)
if
(
lblAlarm
.
Visible
)
{
{
lblAlarm
.
Visible
=
false
;
lblAlarm
.
Visible
=
false
;
}
}
...
...
TSA-V/workForm/FrmTSAV.cs
查看文件 @
91ee981
...
@@ -336,12 +336,16 @@ namespace TSA_V
...
@@ -336,12 +336,16 @@ namespace TSA_V
if
(
TSAVBean
.
IsNeedAOI
&&
TSAVBean
.
Work
.
IsShowAOI
.
Equals
(
false
))
if
(
TSAVBean
.
IsNeedAOI
&&
TSAVBean
.
Work
.
IsShowAOI
.
Equals
(
false
))
{
{
TSAVBean
.
Work
.
IsShowAOI
=
true
;
TSAVBean
.
Work
.
IsShowAOI
=
true
;
LogUtil
.
info
(
"
焊接完成,清理投影内容,弹出 提示框提示进入AOI检测
"
);
LogUtil
.
info
(
"
工作完成, 清理投影内容,弹出 提示框提示进入AOI检测 ,设置 AOIopen = true;
"
);
ProjectorProcess
.
AOIopen
=
true
;
FrmProjectorScreen
.
instance
.
ClearPoint
();
FrmProjectorScreen
.
instance
.
ClearPoint
();
//IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.HIGH);
//IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.HIGH);
FrmAOICheck
frm
=
new
FrmAOICheck
(
CurrProject
);
FrmAOICheck
frm
=
new
FrmAOICheck
(
CurrProject
);
frm
.
ShowDialog
();
frm
.
ShowDialog
();
ProjectorProcess
.
AOIopen
=
false
;
LogUtil
.
info
(
"AOI检测已关闭 ,设置 AOIopen = false;"
);
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.LOW);
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.LOW);
}
}
...
@@ -895,11 +899,14 @@ namespace TSA_V
...
@@ -895,11 +899,14 @@ namespace TSA_V
{
{
if
(
TSAVBean
.
IsNeedAOI
)
if
(
TSAVBean
.
IsNeedAOI
)
{
{
LogUtil
.
info
(
"点击【"
+
btnCamera
.
Text
+
"】,清理投影内容,进入AOI检测"
);
LogUtil
.
info
(
"点击【"
+
btnCamera
.
Text
+
"】,清理投影内容,进入AOI检测 , 设置AOIopen = true"
);
ProjectorProcess
.
AOIopen
=
true
;
FrmProjectorScreen
.
instance
.
ClearPoint
();
FrmProjectorScreen
.
instance
.
ClearPoint
();
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.HIGH);
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.HIGH);
FrmAOICheck
frm
=
new
FrmAOICheck
(
CurrProject
);
FrmAOICheck
frm
=
new
FrmAOICheck
(
CurrProject
);
frm
.
ShowDialog
();
frm
.
ShowDialog
();
ProjectorProcess
.
AOIopen
=
false
;
LogUtil
.
info
(
"点击【"
+
btnCamera
.
Text
+
"】,AOI检测已关闭 , 设置AOIopen = false"
);
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.LOW);
// IOManager.IOMove(IOManager.Camera_Led, IO_VALUE.LOW);
}
}
}
}
...
...
TSA-V/记录.txt
查看文件 @
91ee981
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
1.AOI检测过程中,投影全黑。(到aoi步骤或者点击AOI检测按钮)
1.AOI检测过程中,投影全黑。(到aoi步骤或者点击AOI检测按钮)
2.
判断库位中没有转盘位置时不需要加载
轴。
2.
标签库位单独配置到config\LabelPositions.csv , 判断库位中没有转盘位置时不需要初始化
轴。
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论