Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 66b5b84b
由
LN
编写于
2023-07-05 16:08:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调宽失败时提示原因
1 个父辈
ac07ba06
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
46 行增加
和
9 行删除
DeviceLibrary/manager/LineWidthManager.cs
DeviceLibrary/manager/TSAVBean.cs
TSA-V/FrmChangeWidth.cs
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/workForm/FrmBoardSelect.cs
dll/AOI.dll
dll/AOI.pdb
dll/AccAOI.dll
dll/AccAOI.pdb
DeviceLibrary/manager/LineWidthManager.cs
查看文件 @
66b5b84
...
@@ -21,6 +21,8 @@ namespace TSA_V.DeviceLibrary
...
@@ -21,6 +21,8 @@ namespace TSA_V.DeviceLibrary
public
static
int
Line_LastWidth
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Line_LastWidth
);
public
static
int
Line_LastWidth
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Line_LastWidth
);
private
static
string
Line_WidthPosition
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Line_WidthPosition
);
private
static
string
Line_WidthPosition
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Line_WidthPosition
);
public
static
int
DefaultPosition
=
0
;
public
static
int
DefaultPosition
=
0
;
public
static
bool
LineInitOk
=
false
;
public
static
void
Init
()
public
static
void
Init
()
{
{
LaodMap
();
LaodMap
();
...
@@ -29,21 +31,33 @@ namespace TSA_V.DeviceLibrary
...
@@ -29,21 +31,33 @@ namespace TSA_V.DeviceLibrary
public
static
bool
CanStartChWidth
()
public
static
bool
CanStartChWidth
(
out
string
msg
)
{
{
msg
=
""
;
if
(!
LineInitOk
)
{
msg
=
ResourceControl
.
GetString
(
"LineNotInitOk"
,
"设备未初始化完成"
);
return
false
;
}
//是否可以开始调宽
//是否可以开始调宽
if
(
IOManager
.
IOValue
(
IOManager
.
LineInCheck
).
Equals
(
IO_VALUE
.
HIGH
)
||
if
(
IOManager
.
IOValue
(
IOManager
.
LineInCheck
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
IOManager
.
LineOutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
IOManager
.
LineOutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
IOManager
.
LineWorkCheck
).
Equals
(
IO_VALUE
.
HIGH
))
IOManager
.
IOValue
(
IOManager
.
LineWorkCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
msg
=
msg
=
ResourceControl
.
GetString
(
"LineCheckHigh"
,
"线体检测信号亮"
);
return
false
;
return
false
;
}
}
//如果已经在调宽中
//如果已经在调宽中
if
(!
IsStop
)
if
(!
IsStop
)
{
{
msg
=
msg
=
ResourceControl
.
GetString
(
"PreNotEnd"
,
"上次调宽还未结束"
);
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
...
@@ -62,9 +76,9 @@ namespace TSA_V.DeviceLibrary
...
@@ -62,9 +76,9 @@ namespace TSA_V.DeviceLibrary
{
{
return
result
=
ResourceControl
.
GetString
(
ResourceControl
.
WidthInvalid
,
"宽度无效"
);
return
result
=
ResourceControl
.
GetString
(
ResourceControl
.
WidthInvalid
,
"宽度无效"
);
}
}
if
(!
CanStartChWidth
())
if
(!
CanStartChWidth
(
out
string
msg
))
{
{
return
result
=
ResourceControl
.
GetString
(
ResourceControl
.
ChangeWFail
,
"启动调宽失败"
);
return
result
=
ResourceControl
.
GetString
(
ResourceControl
.
ChangeWFail
,
"启动调宽失败"
)
+
" : "
+
msg
;
}
}
if
(!
IsStop
)
if
(!
IsStop
)
{
{
...
...
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
66b5b84
...
@@ -338,6 +338,9 @@ namespace TSA_V.DeviceLibrary
...
@@ -338,6 +338,9 @@ namespace TSA_V.DeviceLibrary
{
{
PUSICANControl
.
InitRNodeConfig
(
LWidthManager
.
Line_NodeAddr
,
true
);
PUSICANControl
.
InitRNodeConfig
(
LWidthManager
.
Line_NodeAddr
,
true
);
Thread
.
Sleep
(
10
);
Thread
.
Sleep
(
10
);
LWidthManager
.
LineInitOk
=
true
;
LogUtil
.
info
(
Name
+
" LWidthManager.LineInitOk =true"
);
}
}
//所有轴原点返回
//所有轴原点返回
foreach
(
Dictionary
<
int
,
NodeInfo
>
map
in
RotateMap
.
Values
)
foreach
(
Dictionary
<
int
,
NodeInfo
>
map
in
RotateMap
.
Values
)
...
@@ -432,8 +435,9 @@ namespace TSA_V.DeviceLibrary
...
@@ -432,8 +435,9 @@ namespace TSA_V.DeviceLibrary
{
{
PUSICANControl
.
InitRNodeConfig
(
LWidthManager
.
Line_NodeAddr
,
true
);
PUSICANControl
.
InitRNodeConfig
(
LWidthManager
.
Line_NodeAddr
,
true
);
Thread
.
Sleep
(
10
);
Thread
.
Sleep
(
10
);
LWidthManager
.
LineInitOk
=
true
;
LogUtil
.
info
(
Name
+
" LWidthManager.LineInitOk =true"
);
}
}
if
(
lineOk
)
if
(
lineOk
)
{
{
ToRunning
(
"当前为过板模式,转盘不需要复位,复位完成,进入运行状态"
);
ToRunning
(
"当前为过板模式,转盘不需要复位,复位完成,进入运行状态"
);
...
@@ -571,7 +575,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -571,7 +575,7 @@ namespace TSA_V.DeviceLibrary
IsInSuddenDown
=
true
;
IsInSuddenDown
=
true
;
StopWork
();
StopWork
();
//StopMove();
//StopMove();
PUSICANControl
.
Close
();
//
PUSICANControl.Close();
IOManager
.
IOMove
(
IOManager
.
SMEMA_Up
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
SMEMA_Up
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
SMEMA_Down
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
SMEMA_Down
,
IO_VALUE
.
LOW
);
}
}
...
...
TSA-V/FrmChangeWidth.cs
查看文件 @
66b5b84
...
@@ -63,9 +63,9 @@ namespace TSA_V
...
@@ -63,9 +63,9 @@ namespace TSA_V
int
w
=
(
int
)
numTarget
.
Value
;
int
w
=
(
int
)
numTarget
.
Value
;
int
p
=
FormUtil
.
GetIntValue
(
txtTargetPosition
);
int
p
=
FormUtil
.
GetIntValue
(
txtTargetPosition
);
LogUtil
.
info
(
"点击 轨道调宽:【"
+
w
+
"】【"
+
p
+
"】"
);
LogUtil
.
info
(
"点击 轨道调宽:【"
+
w
+
"】【"
+
p
+
"】"
);
if
(!
LWidthManager
.
CanStartChWidth
())
if
(!
LWidthManager
.
CanStartChWidth
(
out
string
msg
))
{
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ChangeWFail
,
"启动调宽失败"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ChangeWFail
,
"启动调宽失败"
)
+
" : "
+
msg
);
return
;
return
;
}
}
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
...
...
TSA-V/Properties/Resource.en-US.resx
查看文件 @
66b5b84
...
@@ -2569,4 +2569,14 @@
...
@@ -2569,4 +2569,14 @@
<data name="GuobanMode" xml:space="preserve">
<data name="GuobanMode" xml:space="preserve">
<value>Operation failed, currently in InLine mode</value>
<value>Operation failed, currently in InLine mode</value>
</data>
</data>
<data name="LineCheckHigh" xml:space="preserve">
<value>Line detection signal on</value>
</data>
<data name="LineNotInitOk" xml:space="preserve">
<value>Device not initialized</value>
</data>
<data name="PreNotEnd" xml:space="preserve">
<value>The last adjustment of width has not yet ended</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
66b5b84
...
@@ -2568,4 +2568,13 @@
...
@@ -2568,4 +2568,13 @@
<data name="GuobanMode" xml:space="preserve">
<data name="GuobanMode" xml:space="preserve">
<value>操作失败,当前为过板模式</value>
<value>操作失败,当前为过板模式</value>
</data>
</data>
<data name="LineCheckHigh" xml:space="preserve">
<value>线体检测信号亮</value>
</data>
<data name="LineNotInitOk" xml:space="preserve">
<value>设备未初始化完成</value>
</data>
<data name="PreNotEnd" xml:space="preserve">
<value>上次调宽还未结束</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/workForm/FrmBoardSelect.cs
查看文件 @
66b5b84
...
@@ -259,9 +259,9 @@ namespace TSA_V
...
@@ -259,9 +259,9 @@ namespace TSA_V
return
;
return
;
}
}
if
(!
LWidthManager
.
CanStartChWidth
())
if
(!
LWidthManager
.
CanStartChWidth
(
out
string
errMsg
))
{
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ChangeWFail
,
"启动调宽失败"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ChangeWFail
,
"启动调宽失败"
)
+
":"
+
errMsg
);
return
;
return
;
}
}
...
...
dll/AOI.dll
查看文件 @
66b5b84
此文件类型无法预览
dll/AOI.pdb
查看文件 @
66b5b84
此文件类型无法预览
dll/AccAOI.dll
查看文件 @
66b5b84
此文件类型无法预览
dll/AccAOI.pdb
查看文件 @
66b5b84
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论