Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ac07ba06
由
LN
编写于
2023-07-05 13:19:52 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
过板模式问题修改
1 个父辈
4195e73d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
46 行增加
和
8 行删除
DeviceLibrary/manager/TSAVBean.cs
DeviceLibrary/manager/WorkModeUtil.cs
PUSICANLibrary/PUSICANControl.cs
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
ac07ba0
...
@@ -309,6 +309,19 @@ namespace TSA_V.DeviceLibrary
...
@@ -309,6 +309,19 @@ namespace TSA_V.DeviceLibrary
}
}
}
}
public
static
void
RemoveNode
()
{
foreach
(
Dictionary
<
int
,
NodeInfo
>
map
in
RotateMap
.
Values
)
{
foreach
(
NodeInfo
nodeid
in
map
.
Values
)
{
PUSICANControl
.
RemoveNode
(
nodeid
.
NodeId
);
}
}
}
private
static
void
XYHomeMove_3
()
private
static
void
XYHomeMove_3
()
{
{
...
@@ -415,6 +428,12 @@ namespace TSA_V.DeviceLibrary
...
@@ -415,6 +428,12 @@ namespace TSA_V.DeviceLibrary
if
(
WorkModeUtil
.
OnlyGuoBan
)
if
(
WorkModeUtil
.
OnlyGuoBan
)
{
{
if
(!
IOBase
.
NoLine
)
{
PUSICANControl
.
InitRNodeConfig
(
LWidthManager
.
Line_NodeAddr
,
true
);
Thread
.
Sleep
(
10
);
}
if
(
lineOk
)
if
(
lineOk
)
{
{
ToRunning
(
"当前为过板模式,转盘不需要复位,复位完成,进入运行状态"
);
ToRunning
(
"当前为过板模式,转盘不需要复位,复位完成,进入运行状态"
);
...
@@ -795,21 +814,28 @@ namespace TSA_V.DeviceLibrary
...
@@ -795,21 +814,28 @@ namespace TSA_V.DeviceLibrary
LogUtil
.
info
(
"StopMove,停止所有运动"
);
LogUtil
.
info
(
"StopMove,停止所有运动"
);
BottomCylinderDown
(
false
);
BottomCylinderDown
(
false
);
CylinderMove
(
IOManager
.
StopCylinder_Down
,
IOManager
.
StopCylinder_Up
,
false
);
CylinderMove
(
IOManager
.
StopCylinder_Down
,
IOManager
.
StopCylinder_Up
,
false
);
SideCyliderBack
(
false
);
SideCyliderBack
(
false
);
Work
.
StopWork
();
Work
.
StopWork
();
LineStep
.
EndMove
();
LineStep
.
EndMove
();
IOManager
.
IOMove
(
IOManager
.
Line_FStart
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IOManager
.
Line_FStart
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
"StopMove,开始停止所有旋转轴"
);
LogUtil
.
info
(
"StopMove,开始停止所有旋转轴"
);
foreach
(
Dictionary
<
int
,
NodeInfo
>
map
in
RotateMap
.
Values
)
if
(
WorkModeUtil
.
OnlyGuoBan
)
{
{
foreach
(
NodeInfo
nodeid
in
map
.
Values
)
LogUtil
.
info
(
"StopMove,仅过板模式,不需要停止旋转轴"
);
}
else
{
foreach
(
Dictionary
<
int
,
NodeInfo
>
map
in
RotateMap
.
Values
)
{
{
if
(
PUSICANControl
.
IsBusy
(
nodeid
.
NodeId
)
)
foreach
(
NodeInfo
nodeid
in
map
.
Values
)
{
{
PUSICANControl
.
StopMove
(
nodeid
.
NodeId
);
if
(
PUSICANControl
.
IsBusy
(
nodeid
.
NodeId
))
Thread
.
Sleep
(
PUSICANControl
.
SleepMS
);
{
PUSICANControl
.
StopMove
(
nodeid
.
NodeId
);
Thread
.
Sleep
(
PUSICANControl
.
SleepMS
);
}
}
}
}
}
}
}
...
...
DeviceLibrary/manager/WorkModeUtil.cs
查看文件 @
ac07ba0
using
System
;
using
PUSICANLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -64,7 +65,9 @@ namespace TSA_V.DeviceLibrary
...
@@ -64,7 +65,9 @@ namespace TSA_V.DeviceLibrary
if
(
result
.
Equals
(
DialogResult
.
OK
))
if
(
result
.
Equals
(
DialogResult
.
OK
))
{
{
OnlyGuoBan
=
true
;
OnlyGuoBan
=
true
;
LogUtil
.
info
(
Name
+
" 选择过板模式,不需要复位料塔"
);
LogUtil
.
info
(
Name
+
" 选择过板模式,不需要复位料塔 "
);
TSAVBean
.
RemoveNode
();
}
}
else
else
{
{
...
...
PUSICANLibrary/PUSICANControl.cs
查看文件 @
ac07ba0
...
@@ -170,6 +170,7 @@ namespace PUSICANLibrary
...
@@ -170,6 +170,7 @@ namespace PUSICANLibrary
int
port
=
4001
;
int
port
=
4001
;
Ip
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
PUSICAN_Ip
);
Ip
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
PUSICAN_Ip
);
port
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
PUSICAN_Port
);
port
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
PUSICAN_Port
);
LogUtil
.
info
(
"PUSICANControl Open"
);
return
Open
(
adapterIndex
,
baudIndex
,
Ip
,
port
);
return
Open
(
adapterIndex
,
baudIndex
,
Ip
,
port
);
}
}
...
@@ -179,6 +180,7 @@ namespace PUSICANLibrary
...
@@ -179,6 +180,7 @@ namespace PUSICANLibrary
{
{
if
(
ISOpen
)
if
(
ISOpen
)
{
{
LogUtil
.
info
(
"PUSICANControl Close"
);
PUSICO_Close
();
PUSICO_Close
();
ISOpen
=
false
;
ISOpen
=
false
;
}
}
...
@@ -269,6 +271,13 @@ namespace PUSICANLibrary
...
@@ -269,6 +271,13 @@ namespace PUSICANLibrary
result
=
PUSICANControl
.
PUSICO_SetNodeState
(
nodeid
,
SLAVE_MANAGEMENT
.
SLAVE_START
);
result
=
PUSICANControl
.
PUSICO_SetNodeState
(
nodeid
,
SLAVE_MANAGEMENT
.
SLAVE_START
);
return
SetOutStopType
(
nodeid
);
return
SetOutStopType
(
nodeid
);
}
}
public
static
bool
RemoveNode
(
uint
nodeid
)
{
LogUtil
.
info
(
"RemoveNode "
+
nodeid
);
//删除节点
PUSIResult
result
=
PUSICANControl
.
PUSICO_RemoveNode
(
Convert
.
ToUInt32
(
nodeid
));
return
true
;
}
public
static
bool
InitRNodeConfig
(
uint
nodeId
,
bool
isLineSlv
=
false
)
public
static
bool
InitRNodeConfig
(
uint
nodeId
,
bool
isLineSlv
=
false
)
{
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论