Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 36721a18
由
LN
编写于
2026-02-04 15:24:01 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
转盘待机点可单独配置。
1 个父辈
89093a94
全部展开
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
231 行增加
和
40 行删除
Common/Setting_NInit.cs
DeviceLibrary/manager/work/StockInfo.cs
DeviceLibrary/manager/work/TSAVBean.cs
DeviceLibrary/manager/work/WorkInfo.cs
PUSICANLibrary/PUSICANControl.cs
TSA-V/FrmBase.cs
TSA-V/FrmDeviceConfig.Designer.cs
TSA-V/FrmDeviceConfig.cs
TSA-V/FrmMaintenance.cs
TSA-V/deviceDebug/FrmPusicanTest.Designer.cs
TSA-V/deviceDebug/FrmPusicanTest.cs
TSA-V/languageResources/resourcesAll.csv
TSA-V/languageResources/resourcesAll.lngres
TSA-V/workForm/FrmTSAV.cs
Common/Setting_NInit.cs
查看文件 @
36721a1
...
...
@@ -135,6 +135,8 @@ namespace TSA_V.Common
public
static
MyConfig
<
bool
>
Work_GroupByPN
=
false
;
[
MyConfigComment
(
"旋转电机待机点设置,每行=号分割,左边是电机地址,右侧为位置,格式:1=1500"
)]
public
static
MyConfig
<
string
[
]>
RotateMotor_P1Positon
=
new
string
[]
{
};
[
MyConfigComment
(
"软件配置是否需要迁移"
)]
public
static
MyConfig
<
bool
>
Soft_NeedChangeConfig
=
true
;
...
...
@@ -322,5 +324,74 @@ namespace TSA_V.Common
}
private
static
int
Rotate_DefaultPosition
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
RotateNode_DefaultPosition
);
private
static
Dictionary
<
int
,
int
>
rotateMotorP1Map
=
null
;
public
static
int
getRotateMotorP1
(
int
nodeAddr
)
{
if
(
rotateMotorP1Map
==
null
)
{
LoadRotateMotorPMap
();
}
if
(
rotateMotorP1Map
.
ContainsKey
(
nodeAddr
))
{
return
rotateMotorP1Map
[
nodeAddr
];
}
return
Rotate_DefaultPosition
;
}
public
static
void
UpdateRotateMotorP1
(
int
nodeAddr
,
int
p1
)
{
if
(
rotateMotorP1Map
==
null
)
{
LoadRotateMotorPMap
();
}
rotateMotorP1Map
[(
int
)
nodeAddr
]
=
p1
;
//转为list
List
<
string
>
configs
=
new
List
<
string
>();
List
<
int
>
keys
=
new
List
<
int
>(
rotateMotorP1Map
.
Keys
);
keys
.
Sort
();
foreach
(
int
key
in
keys
)
{
configs
.
Add
(
key
.
ToString
()
+
SpiltChar
+
rotateMotorP1Map
[
key
].
ToString
());
}
Setting_NInit
.
RotateMotor_P1Positon
=
configs
.
ToArray
();
LogUtil
.
info
(
"更改 RotateMotor_P1Positon="
+
JsonHelper
.
SerializeObject
(
Setting_NInit
.
RotateMotor_P1Positon
.
Val
));
}
private
static
char
SpiltChar
=
'='
;
private
static
void
LoadRotateMotorPMap
()
{
rotateMotorP1Map
=
new
Dictionary
<
int
,
int
>();
string
[]
configs
=
Setting_NInit
.
RotateMotor_P1Positon
.
Val
;
foreach
(
string
str
in
configs
)
{
try
{
string
[]
arrs
=
str
.
Trim
().
Split
(
SpiltChar
);
if
(
arrs
.
Length
==
2
)
{
int
addr
=
Convert
.
ToInt32
(
arrs
[
0
].
Trim
());
int
pos
=
Convert
.
ToInt32
(
arrs
[
1
].
Trim
());
rotateMotorP1Map
[
addr
]
=
pos
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"LoadRotateMotorPMap: "
+
ex
.
ToString
());
}
}
LogUtil
.
info
(
"RotateNode_DefaultPosition="
+
Rotate_DefaultPosition
);
LogUtil
.
info
(
"LoadRotateMotorPMap 完成: "
+
JsonHelper
.
SerializeObject
(
rotateMotorP1Map
));
}
}
}
DeviceLibrary/manager/work/StockInfo.cs
查看文件 @
36721a1
...
...
@@ -39,7 +39,7 @@ namespace TSA_V.DeviceLibrary
if
(
PreNodeId
>
0
)
{
//上一个节点返回原点
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
if
(
PreLabel
!=
null
)
{
...
...
@@ -87,7 +87,7 @@ namespace TSA_V.DeviceLibrary
if
(
PreNodeId
>
0
&&
!(
moveNode
.
NodeId
.
Equals
(
PreNodeId
)))
{
//上一个节点返回原点
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
Thread
.
Sleep
(
50
);
}
...
...
@@ -105,7 +105,7 @@ namespace TSA_V.DeviceLibrary
{
if
(
PreNodeId
>
0
)
{
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
PreNodeId
=
0
;
LabelInfo
label
=
LedLabelController
.
GetLabel
(
position
,
componet
,
true
);
...
...
@@ -116,7 +116,7 @@ namespace TSA_V.DeviceLibrary
{
if
(
PreNodeId
>
0
)
{
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
PreNodeId
=
0
;
RgbLedController
.
OpenPosLed
(
position
);
...
...
DeviceLibrary/manager/work/TSAVBean.cs
查看文件 @
36721a1
...
...
@@ -17,7 +17,7 @@ namespace TSA_V.DeviceLibrary
//public static bool IsDebug = ConfigAppSettings.GetBoolValue(Setting_Init.IsDebug);
//public static bool SideCylinderMoveFirst = ConfigAppSettings.GetBoolValue(Setting_Init.SideCylinderMoveFirst);
public
static
string
Name
=
"MASCOT"
;
public
static
int
RotateNode_DefaultPosition
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
RotateNode_DefaultPosition
);
//
public static int RotateNode_DefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.RotateNode_DefaultPosition);
public
static
Dictionary
<
int
,
Dictionary
<
int
,
NodeInfo
>>
RotateMap
=
new
Dictionary
<
int
,
Dictionary
<
int
,
NodeInfo
>>();
//public static int DefaultPType = ConfigAppSettings.GetIntValue(Setting_Init.DefaultPointType);
...
...
@@ -568,12 +568,13 @@ namespace TSA_V.DeviceLibrary
{
foreach
(
NodeInfo
node
in
map
.
Values
)
{
PUSICANControl
.
DefatutPosMove
(
node
.
NodeId
,
TSAVBean
.
RotateNode_DefaultPosition
,
0
);
int
posP1
=
Setting_NInit
.
getRotateMotorP1
((
int
)
node
.
NodeId
);
PUSICANControl
.
DefatutPosMove
(
node
.
NodeId
,
posP1
,
0
);
}
}
resetStep
=
ResetStep
.
RNodeOnline_4
;
LogUtil
.
info
(
Name
+
"重置中 "
+
resetStep
+
":所有旋转轴原点返回完成,开始到待机点
:"
+
TSAVBean
.
RotateNode_DefaultPosition
);
LogUtil
.
info
(
Name
+
"重置中 "
+
resetStep
+
":所有旋转轴原点返回完成,开始到待机点
"
);
LastResetChangeTime
=
DateTime
.
Now
;
}
}
...
...
@@ -585,9 +586,10 @@ namespace TSA_V.DeviceLibrary
foreach
(
NodeInfo
node
in
map
.
Values
)
{
int
position
=
PUSICANControl
.
GetPosition
(
node
.
NodeId
);
if
(!(
position
.
Equals
(
RotateNode_DefaultPosition
)))
int
posP1
=
Setting_NInit
.
getRotateMotorP1
((
int
)
node
.
NodeId
);
if
(!(
position
.
Equals
(
posP1
)))
{
timeOutMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
RNodeToPosition
,
" 旋转轴[{0}]走到待机点[{1}]"
,
node
.
NodeId
,
RotateNode_DefaultPosition
);
timeOutMsg
=
ResourceControl
.
GetString
(
ResourceControl
.
RNodeToPosition
,
" 旋转轴[{0}]走到待机点[{1}]"
,
node
.
NodeId
,
posP1
);
isAllOk
=
false
;
break
;
}
...
...
DeviceLibrary/manager/work/WorkInfo.cs
查看文件 @
36721a1
...
...
@@ -139,7 +139,7 @@ namespace TSA_V.DeviceLibrary
PUSICANControl
.
StopMove
(
PreNodeId
);
Thread
.
Sleep
(
10
);
//上一个节点返回原点
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
Thread
.
Sleep
(
10
);
}
//Thread.Sleep(100);
...
...
@@ -322,7 +322,7 @@ namespace TSA_V.DeviceLibrary
if
(
PreNodeId
>
0
)
{
//上一个节点返回原点
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
if
(
PreLabel
!=
null
)
{
...
...
@@ -356,7 +356,7 @@ namespace TSA_V.DeviceLibrary
if
(
PreNodeId
>
0
&&
!(
moveNode
.
NodeId
.
Equals
(
PreNodeId
)))
{
//上一个节点返回原点
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
Thread
.
Sleep
(
50
);
}
PUSICANControl
.
AbsMove
(
moveNode
.
NodeId
,
position
.
RotatePosition
);
...
...
@@ -373,7 +373,7 @@ namespace TSA_V.DeviceLibrary
{
if
(
PreNodeId
>
0
)
{
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
var
smtPoint
=
TSAVBean
.
Work
.
currPoint
;
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
BoardManager
.
CurrBoard
.
bomName
,
smtPoint
);
...
...
@@ -387,7 +387,7 @@ namespace TSA_V.DeviceLibrary
{
if
(
PreNodeId
>
0
)
{
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
RgbLedController
.
OpenPosLed
(
position
);
PreRgbLed
=
position
.
getLedList
();
...
...
@@ -396,7 +396,7 @@ namespace TSA_V.DeviceLibrary
{
if
(
PreNodeId
>
0
)
{
PUSICANControl
.
Abs
Move
(
PreNodeId
,
TSAVBean
.
RotateNode_DefaultPosition
);
PUSICANControl
.
Abs
ToP1
(
PreNodeId
);
}
PreNodeId
=
0
;
LEDModule
module
=
LedManager
.
GetLEDModule
(
position
.
DeviceIP
);
...
...
PUSICANLibrary/PUSICANControl.cs
查看文件 @
36721a1
...
...
@@ -637,6 +637,13 @@ namespace PUSICANLibrary
PUSIResult
result
=
PUSICANControl
.
WriteSDO
(
nodeid
,
CAN_Address
.
DelPhaseCurrent
,
value
);
return
CheckWriteResult
(
result
,
" node ["
+
nodeid
+
"] CAN_Address.DelPhaseCurrent"
);
}
public
static
bool
AbsToP1
(
uint
nodeid
)
{
int
position
=
Setting_NInit
.
getRotateMotorP1
((
int
)
nodeid
);
LogUtil
.
info
(
" node ["
+
nodeid
+
"] AbsToP1 ="
+
position
);
return
AbsMove
(
nodeid
,
position
);
}
public
static
bool
AbsMove
(
uint
nodeid
,
int
position
)
{
if
(
PUSICANControl
.
IsStop2High
(
nodeid
))
...
...
@@ -941,14 +948,15 @@ namespace PUSICANLibrary
}
return
false
;
}
public
static
void
DefatutPosMove
(
uint
node
,
int
targetDefaultPosition
,
int
movetype
=
0
,
bool
isLineSlv
=
false
)
public
static
void
DefatutPosMove
(
uint
node
,
int
targetDefaultPosition
,
int
movetype
=
0
,
bool
isLineSlv
=
false
)
{
LogUtil
.
info
(
" DefatutPosMove ["
+
node
+
"] Position ="
+
targetDefaultPosition
+
", moveType="
+
movetype
+
", isLineSlv="
+
isLineSlv
);
PUSICANControl
.
RHomeMoveEnd
(
node
);
Thread
.
Sleep
(
10
);
//设置为位置模式
PUSICANControl
.
WriteSDO
(
node
,
CAN_Address
.
MoveType
,
movetype
);
Thread
.
Sleep
(
SleepMS
);
PUSICANControl
.
SetSpeed
(
node
,
isLineSlv
);
PUSICANControl
.
SetSpeed
(
node
,
isLineSlv
);
Thread
.
Sleep
(
10
);
//所有轴走到待机点
PUSICANControl
.
AbsMove
(
node
,
targetDefaultPosition
);
...
...
TSA-V/FrmBase.cs
查看文件 @
36721a1
...
...
@@ -257,7 +257,7 @@ namespace TSA_V
string
newStr
=
ResourceCulture
.
GetString
(
ResourceCulture
.
GetTextIdStr
(
class
Name
,
con
.
Name
),
con
.
Text
);
con
.
Text
=
newStr
;
con
.
Tag
=
newStr
;
if
(
con
is
Button
&&
(!(
this
is
FrmMenu
))
&&
(!(
this
is
FrmMaintenance
))
&&
(!(
this
is
FrmWorkMenu
)))
if
(
con
is
Button
&&
(!(
this
is
FrmMenu
))
&&
(!(
this
is
FrmMaintenance
))
&&
(!(
this
is
FrmWorkMenu
))
&&(!(
this
is
FrmPusicanTest
))
)
//if (con is Button && (this is FrmWork))
{
if
(
ResourceCulture
.
CurrLanguage
.
Equals
(
ResourceCulture
.
English
))
...
...
@@ -298,7 +298,7 @@ namespace TSA_V
{
string
newStr
=
ResourceCulture
.
GetString
(
ResourceCulture
.
GetTextIdStr
(
class
Name
,
con
.
Name
),
con
.
Text
);
con
.
Text
=
newStr
;
if
(
con
is
Button
&&
(!(
this
is
FrmMenu
))
&&
(!(
this
is
FrmMaintenance
))
&&
(!(
this
is
FrmWorkMenu
))
&&
(!(
this
is
FrmIoManager
)))
if
(
con
is
Button
&&
(!(
this
is
FrmMenu
))
&&
(!(
this
is
FrmMaintenance
))
&&
(!(
this
is
FrmWorkMenu
))
&&
(!(
this
is
FrmIoManager
))
&&
(!(
this
is
FrmPusicanTest
))
)
{
if
(
ResourceCulture
.
CurrLanguage
.
Equals
(
ResourceCulture
.
English
))
{
...
...
TSA-V/FrmDeviceConfig.Designer.cs
查看文件 @
36721a1
...
...
@@ -29,6 +29,7 @@
private
void
InitializeComponent
()
{
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
chbPnMode
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cheDisCount
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbMouse
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbWorkT
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
...
@@ -64,7 +65,6 @@
this
.
cmbTestProName
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
txtCode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblCode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
chbPnMode
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox4
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numSizeY
)).
BeginInit
();
...
...
@@ -93,6 +93,16 @@
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"其他参数"
;
//
// chbPnMode
//
this
.
chbPnMode
.
AutoSize
=
true
;
this
.
chbPnMode
.
Location
=
new
System
.
Drawing
.
Point
(
51
,
211
);
this
.
chbPnMode
.
Name
=
"chbPnMode"
;
this
.
chbPnMode
.
Size
=
new
System
.
Drawing
.
Size
(
159
,
21
);
this
.
chbPnMode
.
TabIndex
=
295
;
this
.
chbPnMode
.
Text
=
"同类型元器件一次性投影"
;
this
.
chbPnMode
.
UseVisualStyleBackColor
=
true
;
//
// cheDisCount
//
this
.
cheDisCount
.
AutoSize
=
true
;
...
...
@@ -137,9 +147,9 @@
//
this
.
lblconfigdetial
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
lblconfigdetial
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblconfigdetial
.
Location
=
new
System
.
Drawing
.
Point
(
4
43
,
217
);
this
.
lblconfigdetial
.
Location
=
new
System
.
Drawing
.
Point
(
4
22
,
199
);
this
.
lblconfigdetial
.
Name
=
"lblconfigdetial"
;
this
.
lblconfigdetial
.
Size
=
new
System
.
Drawing
.
Size
(
91
,
23
);
this
.
lblconfigdetial
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
41
);
this
.
lblconfigdetial
.
TabIndex
=
290
;
this
.
lblconfigdetial
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblconfigdetial
.
Click
+=
new
System
.
EventHandler
(
this
.
label2_Click
);
...
...
@@ -514,16 +524,6 @@
this
.
lblCode
.
Text
=
"条码:"
;
this
.
lblCode
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// chbPnMode
//
this
.
chbPnMode
.
AutoSize
=
true
;
this
.
chbPnMode
.
Location
=
new
System
.
Drawing
.
Point
(
51
,
211
);
this
.
chbPnMode
.
Name
=
"chbPnMode"
;
this
.
chbPnMode
.
Size
=
new
System
.
Drawing
.
Size
(
159
,
21
);
this
.
chbPnMode
.
TabIndex
=
295
;
this
.
chbPnMode
.
Text
=
"同类型元器件一次性投影"
;
this
.
chbPnMode
.
UseVisualStyleBackColor
=
true
;
//
// FrmDeviceConfig
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
TSA-V/FrmDeviceConfig.cs
查看文件 @
36721a1
...
...
@@ -69,6 +69,7 @@ namespace TSA_V
chbWorkT
.
Checked
=
Setting_NInit
.
Set_TipSound
;
cheDisCount
.
Checked
=
Setting_NInit
.
Device_UsePNCount
;
chbPnMode
.
Checked
=
Setting_NInit
.
Work_GroupByPN
;
lblconfigdetial
.
Text
=
"......"
;
}
public
void
LoadCom
()
{
...
...
TSA-V/FrmMaintenance.cs
查看文件 @
36721a1
TSA-V/deviceDebug/FrmPusicanTest.Designer.cs
查看文件 @
36721a1
...
...
@@ -53,6 +53,7 @@
this
.
nudDelSpeed
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
this
.
btnReadAll
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
linkP1
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
llblClearp
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
btnSetPosition
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
txtGetPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -79,6 +80,9 @@
this
.
cmbMoveType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label19
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbTargetType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
txtCurrP1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lblP1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
linkSetP1
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
groupBox2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
nudMaxSpeed
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
nudStartSpeed
)).
BeginInit
();
...
...
@@ -141,7 +145,7 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
nudDelSpeed
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnReadAll
);
this
.
groupBox2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
15
5
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
15
7
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
716
,
171
);
this
.
groupBox2
.
TabIndex
=
35
;
...
...
@@ -373,6 +377,10 @@
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
linkSetP1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtCurrP1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
lblP1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
linkP1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
llblClearp
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnSetPosition
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtGetPosition
);
...
...
@@ -384,13 +392,25 @@
this
.
groupBox1
.
Controls
.
Add
(
this
.
cmbNode
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtNode
);
this
.
groupBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
12
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
3
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
716
,
1
36
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
716
,
1
49
);
this
.
groupBox1
.
TabIndex
=
34
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"选择运动节点"
;
//
// linkP1
//
this
.
linkP1
.
AutoSize
=
true
;
this
.
linkP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
linkP1
.
Location
=
new
System
.
Drawing
.
Point
(
370
,
62
);
this
.
linkP1
.
Name
=
"linkP1"
;
this
.
linkP1
.
Size
=
new
System
.
Drawing
.
Size
(
106
,
21
);
this
.
linkP1
.
TabIndex
=
58
;
this
.
linkP1
.
TabStop
=
true
;
this
.
linkP1
.
Text
=
"设置为待机点"
;
this
.
linkP1
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkP1_LinkClicked
);
//
// llblClearp
//
this
.
llblClearp
.
AutoSize
=
true
;
...
...
@@ -438,9 +458,9 @@
//
this
.
lblCanMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCanMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblCanMsg
.
Location
=
new
System
.
Drawing
.
Point
(
3
68
,
62
);
this
.
lblCanMsg
.
Location
=
new
System
.
Drawing
.
Point
(
3
76
,
100
);
this
.
lblCanMsg
.
Name
=
"lblCanMsg"
;
this
.
lblCanMsg
.
Size
=
new
System
.
Drawing
.
Size
(
318
,
62
);
this
.
lblCanMsg
.
Size
=
new
System
.
Drawing
.
Size
(
318
,
43
);
this
.
lblCanMsg
.
TabIndex
=
34
;
this
.
lblCanMsg
.
Text
=
"设备未连接"
;
this
.
lblCanMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
@@ -451,7 +471,7 @@
this
.
checkBox1
.
Checked
=
true
;
this
.
checkBox1
.
CheckState
=
System
.
Windows
.
Forms
.
CheckState
.
Checked
;
this
.
checkBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
checkBox1
.
Location
=
new
System
.
Drawing
.
Point
(
123
,
100
);
this
.
checkBox1
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
61
);
this
.
checkBox1
.
Name
=
"checkBox1"
;
this
.
checkBox1
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
checkBox1
.
TabIndex
=
55
;
...
...
@@ -693,6 +713,37 @@
this
.
cmbTargetType
.
TabIndex
=
25
;
this
.
cmbTargetType
.
Visible
=
false
;
//
// txtCurrP1
//
this
.
txtCurrP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtCurrP1
.
Location
=
new
System
.
Drawing
.
Point
(
123
,
100
);
this
.
txtCurrP1
.
Name
=
"txtCurrP1"
;
this
.
txtCurrP1
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
26
);
this
.
txtCurrP1
.
TabIndex
=
60
;
this
.
txtCurrP1
.
Text
=
"0"
;
//
// lblP1
//
this
.
lblP1
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
103
);
this
.
lblP1
.
Name
=
"lblP1"
;
this
.
lblP1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
20
);
this
.
lblP1
.
TabIndex
=
59
;
this
.
lblP1
.
Text
=
"待机点:"
;
this
.
lblP1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// linkSetP1
//
this
.
linkSetP1
.
AutoSize
=
true
;
this
.
linkSetP1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
linkSetP1
.
Location
=
new
System
.
Drawing
.
Point
(
252
,
102
);
this
.
linkSetP1
.
Name
=
"linkSetP1"
;
this
.
linkSetP1
.
Size
=
new
System
.
Drawing
.
Size
(
42
,
21
);
this
.
linkSetP1
.
TabIndex
=
61
;
this
.
linkSetP1
.
TabStop
=
true
;
this
.
linkSetP1
.
Text
=
"设置"
;
this
.
linkSetP1
.
Visible
=
false
;
this
.
linkSetP1
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkSetP1_LinkClicked
);
//
// FrmPusicanTest
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
...
@@ -780,5 +831,9 @@
private
System
.
Windows
.
Forms
.
ComboBox
cmbTargetType
;
private
System
.
Windows
.
Forms
.
Label
label12
;
private
System
.
Windows
.
Forms
.
LinkLabel
llblClearp
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkP1
;
private
System
.
Windows
.
Forms
.
TextBox
txtCurrP1
;
private
System
.
Windows
.
Forms
.
Label
lblP1
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkSetP1
;
}
}
\ No newline at end of file
TSA-V/deviceDebug/FrmPusicanTest.cs
查看文件 @
36721a1
...
...
@@ -77,6 +77,11 @@ namespace TSA_V
btnSetPosition
.
Enabled
=
open
;
btnHomeMove
.
Enabled
=
open
;
llblClearp
.
Enabled
=
open
;
linkP1
.
Enabled
=
open
;
linkSetP1
.
Enabled
=
true
;
lblP1
.
Enabled
=
true
;
txtCurrP1
.
Enabled
=
true
;
}
...
...
@@ -209,10 +214,13 @@ namespace TSA_V
if
(
nodeid
.
Equals
(
LWidthManager
.
Line_NodeAddr
))
{
txtHomeMoveSpeed
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
Line_HomeSpeed
);
ShowP1
(
false
);
}
else
{
txtHomeMoveSpeed
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
RotateNode_HomeSpeed
);
ShowP1
(
true
);
txtCurrP1
.
Text
=
Setting_NInit
.
getRotateMotorP1
((
int
)
nodeid
).
ToString
();
}
if
(
btnReadAll
.
Enabled
)
{
...
...
@@ -221,6 +229,15 @@ namespace TSA_V
}
}
private
void
ShowP1
(
bool
v
)
{
linkP1
.
Visible
=
v
;
linkSetP1
.
Visible
=
v
;
lblP1
.
Visible
=
v
;
txtCurrP1
.
Visible
=
v
;
}
private
void
checkBox1_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
timer1
.
Enabled
=
checkBox1
.
Checked
;
...
...
@@ -265,6 +282,35 @@ namespace TSA_V
{
}
private
void
linkP1_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
uint
nodeid
=
GetSelectNode
();
int
pos
=
Convert
.
ToInt32
(
txtGetPosition
.
Text
);
string
msg
=
ResourceCulture
.
GetString
(
"SureSaveToP1"
,
"是否要将位置{0}设为轴{1}的P1点?"
,
pos
,
nodeid
);
DialogResult
result
=
MessageBox
.
Show
(
msg
,
ResourceCulture
.
GetString
(
"提示"
,
"提示"
),
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
Setting_NInit
.
UpdateRotateMotorP1
((
int
)
nodeid
,
pos
);
LogUtil
.
info
(
$
"点击:{linkP1.Text} 设置 轴{nodeid} 的待机点={pos}"
);
txtCurrP1
.
Text
=
Setting_NInit
.
getRotateMotorP1
((
int
)
nodeid
).
ToString
();
}
}
private
void
linkSetP1_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
uint
nodeid
=
GetSelectNode
();
int
pos
=
Convert
.
ToInt32
(
txtCurrP1
.
Text
);
string
msg
=
ResourceCulture
.
GetString
(
"SureSaveToP1"
,
"是否要将位置{0}设为轴{1}的P1点?"
,
pos
,
nodeid
);
DialogResult
result
=
MessageBox
.
Show
(
msg
,
ResourceCulture
.
GetString
(
"提示"
,
"提示"
),
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
Setting_NInit
.
UpdateRotateMotorP1
((
int
)
nodeid
,
pos
);
LogUtil
.
info
(
$
"点击:{linkP1.Text} 设置 轴{nodeid} 的待机点={pos}"
);
txtCurrP1
.
Text
=
Setting_NInit
.
getRotateMotorP1
((
int
)
nodeid
).
ToString
();
}
}
}
}
TSA-V/languageResources/resourcesAll.csv
0 → 100644
查看文件 @
36721a1
此文件的差异被折叠,
点击展开。
TSA-V/languageResources/resourcesAll.lngres
查看文件 @
36721a1
...
...
@@ -1034,3 +1034,7 @@ PcbRowColInvalid 行列数必须都大于等于1 Both the number of rows and col
NoPoints 当前程序没有组装点,无法测试 The current program has no assembly points, so testing cannot be performed. 当前程序没有组装点,无法测试
FrmPCbOffsetConfig_label1_Text 角度偏移: angular offset : 角度偏移:
FrmDeviceConfig_chbPnMode_Text 同类型元器件一次性投影 Batch Projection of Homogeneous Components 同类型元器件一次性投影
SureSaveToP1 是否要将位置{0}设为轴{1}的P1点? Do you want to set position {0} as the P1 point of axis {1}? 是否要将位置{0}设为轴{1}的P1点?
FrmPusicanTest_linkSetP1_Text 设置 Set 设置
FrmPusicanTest_lblP1_Text 待机点: Standby Point: 待机点:
FrmPusicanTest_linkP1_Text 设置为待机点 Set as Standby Point 设置为待机点
TSA-V/workForm/FrmTSAV.cs
查看文件 @
36721a1
...
...
@@ -10,7 +10,6 @@ using TSA_V.LoadCSVLibrary;
using
AOI
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
static
System
.
Windows
.
Forms
.
VisualStyles
.
VisualStyleElement
.
Button
;
namespace
TSA_V
{
...
...
@@ -1207,10 +1206,15 @@ namespace TSA_V
private
static
bool
IsSet
=
false
;
private
void
TSAVBean_InputCodeEvent
(
int
count
)
{
if
(
this
.
InvokeRequired
)
{
this
.
Invoke
(
new
Action
<
int
>(
TSAVBean_InputCodeEvent
),
count
);
return
;
}
MesUtil
.
ClearCode
();
FrmCodeInPut
frmCode
=
new
FrmCodeInPut
();
frmCode
.
SetCount
(
count
);
frmCode
.
ShowDialog
();
frmCode
.
ShowDialog
(
this
);
}
private
void
btnCodeTest_Click
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论