Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 86f05a77
由
LN
编写于
2024-01-29 16:41:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改
1 个父辈
a4f817cd
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
42 行增加
和
7 行删除
DeviceLibrary/manager/LineWidthManager.cs
DeviceLibrary/manager/TSAVBean.cs
TSA-V/FrmBoardPutCom.Designer.cs
TSA-V/FrmChangeWidth.cs
TSA-V/deviceDebug/FrmIoManager.cs
DeviceLibrary/manager/LineWidthManager.cs
查看文件 @
86f05a7
...
...
@@ -14,7 +14,7 @@ namespace TSA_V.DeviceLibrary
/// 流水线宽度
/// </summary>
public
class
LWidthManager
{
{
public
static
int
Line_ChangeValue
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Line_ChangeValue
);
public
static
int
Line_HomeWidth
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Line_HomeWidth
);
public
static
uint
Line_NodeAddr
=(
uint
)
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
Line_NodeAddr
);
...
...
@@ -63,16 +63,23 @@ namespace TSA_V.DeviceLibrary
}
public
static
bool
IsStop
=
true
;
public
static
void
StopChangeWidth
()
{
if
(!
IsStop
)
{
{
IsStop
=
true
;
PUSICANControl
.
StopMove
(
LWidthManager
.
Line_NodeAddr
);
LogUtil
.
info
(
"StopChangeWidth ,停止调宽电机运动"
);
Thread
.
Sleep
(
100
);
}
else
if
(
PUSICANControl
.
IsBusy
(
Line_NodeAddr
))
{
LogUtil
.
info
(
" Node["
+
Line_NodeAddr
+
"]停止调宽电机动作"
);
PUSICANControl
.
StopMove
(
Line_NodeAddr
);
}
}
public
static
string
StartChangeWidth
(
int
targetWidth
,
int
targetPosition
,
int
timeOutSeconds
=
600
)
{
...
...
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
86f05a7
...
...
@@ -622,7 +622,8 @@ namespace TSA_V.DeviceLibrary
if
(!
IsInSuddenDown
)
{
WarnMsg
=
GetTime
()
+
ResourceControl
.
GetString
(
ResourceControl
.
SuddenDownMsg
,
"收到急停信号,停止所有运动,设备断开连接"
);
LogUtil
.
error
(
"收到急停信号,停止所有运动,断开can协议连接"
);
LogUtil
.
error
(
"收到急停信号,停止所有运动,断开can协议连接, 设置调宽LineInitOk = false"
);
LWidthManager
.
LineInitOk
=
false
;
IsInSuddenDown
=
true
;
StopWork
();
//StopMove();
...
...
@@ -930,7 +931,10 @@ namespace TSA_V.DeviceLibrary
}
}
LedLabelController
.
CloseAll
();
LedLabelController
.
CloseAll
();
//停止调宽
LWidthManager
.
StopChangeWidth
();
}
private
static
void
CheckWorkWait
()
{
...
...
TSA-V/FrmBoardPutCom.Designer.cs
查看文件 @
86f05a7
...
...
@@ -306,7 +306,7 @@
this
.
Controls
.
Add
(
this
.
btnCancel
);
this
.
Controls
.
Add
(
this
.
btnNext
);
this
.
Controls
.
Add
(
this
.
btnPre
);
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
);
this
.
Name
=
"FrmBoardPutCom"
;
this
.
Text
=
"备料"
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
FrmPutCom_FormClosing
);
...
...
TSA-V/FrmChangeWidth.cs
查看文件 @
86f05a7
...
...
@@ -62,6 +62,12 @@ namespace TSA_V
numTarget_ValueChanged
(
null
,
null
);
int
w
=
(
int
)
numTarget
.
Value
;
int
p
=
FormUtil
.
GetIntValue
(
txtTargetPosition
);
if
(!
IOManager
.
ShuddenOK
())
{
LogUtil
.
info
(
"点击 轨道调宽:【"
+
w
+
"】【"
+
p
+
"】 急停未开"
);
MessageBox
.
Show
(
ResourceControl
.
GetString
(
"FrmBoardInfo_lblMsg_Text"
,
"急停未开"
));
return
;
}
LogUtil
.
info
(
"点击 轨道调宽:【"
+
w
+
"】【"
+
p
+
"】"
);
if
(!
LWidthManager
.
CanStartChWidth
(
out
string
msg
))
{
...
...
@@ -162,7 +168,20 @@ namespace TSA_V
private
void
btnHomeM_Click
(
object
sender
,
EventArgs
e
)
{
LogUtil
.
info
(
Name
+
"点击 原点返回"
);
if
(!
LWidthManager
.
LineInitOk
)
{
string
msg
=
ResourceControl
.
GetString
(
"LineNotInitOk"
,
"设备未初始化完成"
);
LogUtil
.
info
(
Name
+
"点击 原点返回 "
+
msg
);
MessageBox
.
Show
(
msg
);
return
;
}
if
(!
IOManager
.
ShuddenOK
())
{
LogUtil
.
info
(
Name
+
"点击 原点返回 急停未开"
);
MessageBox
.
Show
(
ResourceControl
.
GetString
(
"FrmBoardInfo_lblMsg_Text"
,
"急停未开"
));
return
;
}
LogUtil
.
info
(
Name
+
"点击 原点返回"
);
PUSICANControl
.
HomeMove
(
LWidthManager
.
Line_NodeAddr
,
true
);
}
...
...
TSA-V/deviceDebug/FrmIoManager.cs
查看文件 @
86f05a7
...
...
@@ -55,6 +55,11 @@ namespace TSA_V
btnBottomDown
.
Visible
=
false
;
btnBottomUp
.
Visible
=
false
;
}
if
(
TSAVBean
.
DisableSideCylinder
)
{
btnSideForward
.
Visible
=
false
;
btnSideBack
.
Visible
=
false
;
}
}
private
void
FrmMain_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论