Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO664-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 438143b1
由
LN
编写于
2020-12-03 16:47:55 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
横移和移栽增加暂停运动处理
1 个父辈
1f52fefb
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
54 行增加
和
51 行删除
source/AssemblyLineClient/AssemblyLineClient.csproj
source/AssemblyLineClient/FrmHYEquip.Designer.cs
source/AssemblyLineClient/FrmHYEquip.cs
source/AssemblyLineClient/FrmMoveEquip.Designer.cs
source/AssemblyLineClient/FrmMoveEquip.cs
source/AssemblyLineClient/useControl/AxisMoveControl.Designer.cs
source/AssemblyLineClient/useControl/AxisMoveControl.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
source/DeviceLibrary/assemblyLine/HY/HY_Coveryor.cs
source/DeviceLibrary/assemblyLine/HY/HY_OutLine.cs
source/DeviceLibrary/deviceLibrary/AXIS/AxisManager.cs
source/DeviceLibrary/deviceLibrary/AXIS/HC/HCAxisManager.cs
source/DeviceLibrary/deviceLibrary/AXIS/PanasonicServo/ACServerManager_Partial.cs
source/HuichuanLibrary/HCBoardManager.cs
source/AssemblyLineClient/AssemblyLineClient.csproj
查看文件 @
438143b
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>
AnyCPU
</PlatformTarget>
<PlatformTarget>
x64
</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Optimize>false</Optimize>
...
...
source/AssemblyLineClient/FrmHYEquip.Designer.cs
查看文件 @
438143b
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
// chbDebug
// chbDebug
//
//
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
662
,
13
);
this
.
chbDebug
.
Location
=
new
System
.
Drawing
.
Point
(
662
,
13
);
this
.
chbDebug
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbDebug_CheckedChanged
);
this
.
chbDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
chbDebug_CheckedChanged
);
this
.
chbDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
chbDebug_CheckedChanged
);
//
//
// lblStoreStatus
// lblStoreStatus
...
@@ -135,7 +136,7 @@
...
@@ -135,7 +136,7 @@
//
//
// chbMoveStop
// chbMoveStop
//
//
this
.
chbMoveStop
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged
_1
);
this
.
chbMoveStop
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbMoveStop_CheckedChanged
);
//
//
// timer1
// timer1
//
//
...
...
source/AssemblyLineClient/FrmHYEquip.cs
查看文件 @
438143b
...
@@ -612,17 +612,6 @@ namespace OnlineStore.AssemblyLine
...
@@ -612,17 +612,6 @@ namespace OnlineStore.AssemblyLine
equipBean
.
MoveStop
=
chbMoveStop
.
Checked
;
equipBean
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换是否暂停: "
+
equipBean
.
MoveStop
);
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换是否暂停: "
+
equipBean
.
MoveStop
);
}
}
private
void
chbMoveStop_CheckedChanged_1
(
object
sender
,
EventArgs
e
)
{
if
(!
IsLoad
)
{
return
;
}
equipBean
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换是否暂停: "
+
equipBean
.
MoveStop
);
}
}
}
}
}
...
...
source/AssemblyLineClient/FrmMoveEquip.Designer.cs
查看文件 @
438143b
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
//
//
// chbDebug
// chbDebug
//
//
this
.
chbDebug
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbDebug_CheckedChanged
);
this
.
chbDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
chbDebug_CheckedChanged
);
this
.
chbDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
chbDebug_CheckedChanged
);
//
//
// btnOutStore
// btnOutStore
...
@@ -577,7 +578,6 @@
...
@@ -577,7 +578,6 @@
this
.
lblInstoreList
.
Name
=
"lblInstoreList"
;
this
.
lblInstoreList
.
Name
=
"lblInstoreList"
;
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
507
,
119
);
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
507
,
119
);
this
.
lblInstoreList
.
TabIndex
=
277
;
this
.
lblInstoreList
.
TabIndex
=
277
;
this
.
lblInstoreList
.
Click
+=
new
System
.
EventHandler
(
this
.
lblInstoreList_Click
);
//
//
// tabPage2
// tabPage2
//
//
...
...
source/AssemblyLineClient/FrmMoveEquip.cs
查看文件 @
438143b
...
@@ -644,10 +644,6 @@ namespace OnlineStore.AssemblyLine
...
@@ -644,10 +644,6 @@ namespace OnlineStore.AssemblyLine
equipBase
.
CylinderMove
(
null
,
IO_Type
.
ClampCylinder_Relax
,
IO_Type
.
ClampCylinder_Work
);
equipBase
.
CylinderMove
(
null
,
IO_Type
.
ClampCylinder_Relax
,
IO_Type
.
ClampCylinder_Work
);
}
}
private
void
lblInstoreList_Click
(
object
sender
,
EventArgs
e
)
{
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
{
...
...
source/AssemblyLineClient/useControl/AxisMoveControl.Designer.cs
查看文件 @
438143b
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
this
.
label47
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label47
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnAxisRMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAxisRMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lblCountPulse
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtAxisPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnAxisAMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAxisAMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label49
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label49
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtAPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtAPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
@@ -588,7 +588,7 @@
...
@@ -588,7 +588,7 @@
this
.
panel1
.
Controls
.
Add
(
this
.
label47
);
this
.
panel1
.
Controls
.
Add
(
this
.
label47
);
this
.
panel1
.
Controls
.
Add
(
this
.
label8
);
this
.
panel1
.
Controls
.
Add
(
this
.
label8
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnAxisRMove
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnAxisRMove
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblCountPulse
);
this
.
panel1
.
Controls
.
Add
(
this
.
txtAxisPosition
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnAxisAMove
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnAxisAMove
);
this
.
panel1
.
Controls
.
Add
(
this
.
label49
);
this
.
panel1
.
Controls
.
Add
(
this
.
label49
);
this
.
panel1
.
Controls
.
Add
(
this
.
txtAPosition
);
this
.
panel1
.
Controls
.
Add
(
this
.
txtAPosition
);
...
@@ -791,14 +791,14 @@
...
@@ -791,14 +791,14 @@
this
.
btnAxisRMove
.
UseVisualStyleBackColor
=
true
;
this
.
btnAxisRMove
.
UseVisualStyleBackColor
=
true
;
this
.
btnAxisRMove
.
Click
+=
new
System
.
EventHandler
(
this
.
btnAxisRMove_Click
);
this
.
btnAxisRMove
.
Click
+=
new
System
.
EventHandler
(
this
.
btnAxisRMove_Click
);
//
//
//
lblCountPulse
//
txtAxisPosition
//
//
this
.
lblCountPulse
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtAxisPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblCountPulse
.
Location
=
new
System
.
Drawing
.
Point
(
82
,
140
);
this
.
txtAxisPosition
.
Location
=
new
System
.
Drawing
.
Point
(
82
,
140
);
this
.
lblCountPulse
.
Name
=
"lblCountPulse
"
;
this
.
txtAxisPosition
.
Name
=
"txtAxisPosition
"
;
this
.
lblCountPulse
.
ReadOnly
=
true
;
this
.
txtAxisPosition
.
ReadOnly
=
true
;
this
.
lblCountPulse
.
Size
=
new
System
.
Drawing
.
Size
(
103
,
26
);
this
.
txtAxisPosition
.
Size
=
new
System
.
Drawing
.
Size
(
103
,
26
);
this
.
lblCountPulse
.
TabIndex
=
38
;
this
.
txtAxisPosition
.
TabIndex
=
38
;
//
//
// btnAxisAMove
// btnAxisAMove
//
//
...
@@ -988,7 +988,7 @@
...
@@ -988,7 +988,7 @@
private
System
.
Windows
.
Forms
.
Label
label8
;
private
System
.
Windows
.
Forms
.
Label
label8
;
internal
System
.
Windows
.
Forms
.
Button
btnOpenAxis
;
internal
System
.
Windows
.
Forms
.
Button
btnOpenAxis
;
internal
System
.
Windows
.
Forms
.
Button
btnCloseAxis
;
internal
System
.
Windows
.
Forms
.
Button
btnCloseAxis
;
private
System
.
Windows
.
Forms
.
TextBox
lblCountPulse
;
private
System
.
Windows
.
Forms
.
TextBox
txtAxisPosition
;
internal
System
.
Windows
.
Forms
.
TextBox
txtASpeed
;
internal
System
.
Windows
.
Forms
.
TextBox
txtASpeed
;
internal
System
.
Windows
.
Forms
.
Label
label47
;
internal
System
.
Windows
.
Forms
.
Label
label47
;
internal
System
.
Windows
.
Forms
.
Button
btnAxisVMove
;
internal
System
.
Windows
.
Forms
.
Button
btnAxisVMove
;
...
...
source/AssemblyLineClient/useControl/AxisMoveControl.cs
查看文件 @
438143b
...
@@ -126,7 +126,8 @@ namespace OnlineStore.AssemblyLine
...
@@ -126,7 +126,8 @@ namespace OnlineStore.AssemblyLine
{
{
if
(
currSelAxis
!=
null
)
if
(
currSelAxis
!=
null
)
{
{
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
//int speed = FormUtil.GetIntValue(txtASpeed);
int
speed
=
currSelAxis
.
HomeHighSpeed
;
LogUtil
.
info
(
equipBase
.
Name
+
"界面点击【原点返回】,【"
+
PortName
+
"_"
+
SlvAddr
+
"】 速度【"
+
speed
+
"】"
);
LogUtil
.
info
(
equipBase
.
Name
+
"界面点击【原点返回】,【"
+
PortName
+
"_"
+
SlvAddr
+
"】 速度【"
+
speed
+
"】"
);
AxisManager
.
instance
.
HomeMove
(
PortName
,
SlvAddr
,
speed
,
currSelAxis
.
HomeLowSpeed
,
currSelAxis
.
HomeAddSpeed
);
AxisManager
.
instance
.
HomeMove
(
PortName
,
SlvAddr
,
speed
,
currSelAxis
.
HomeLowSpeed
,
currSelAxis
.
HomeAddSpeed
);
}
}
...
@@ -146,7 +147,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -146,7 +147,7 @@ namespace OnlineStore.AssemblyLine
private
void
btnReadPosition_Click
(
object
sender
,
EventArgs
e
)
private
void
btnReadPosition_Click
(
object
sender
,
EventArgs
e
)
{
{
lblCountPulse
.
Text
=
AxisManager
.
instance
.
GetActualtPosition
(
PortName
,
SlvAddr
).
ToString
();
txtAxisPosition
.
Text
=
AxisManager
.
instance
.
GetActualtPosition
(
PortName
,
SlvAddr
).
ToString
();
}
}
private
ConfigMoveAxis
currSelAxis
=
null
;
private
ConfigMoveAxis
currSelAxis
=
null
;
...
@@ -278,6 +279,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -278,6 +279,7 @@ namespace OnlineStore.AssemblyLine
{
{
return
;
return
;
}
}
txtAxisPosition
.
Text
=
HCBoardManager
.
GetAxisCurrPos
(
axisNo
).
ToString
();
short
modeValue
=
HCBoardManager
.
GetAxisPrfMode
(
axisNo
);
short
modeValue
=
HCBoardManager
.
GetAxisPrfMode
(
axisNo
);
if
(
modeValue
<
0
)
if
(
modeValue
<
0
)
...
@@ -324,7 +326,8 @@ namespace OnlineStore.AssemblyLine
...
@@ -324,7 +326,8 @@ namespace OnlineStore.AssemblyLine
short
value
=
HCBoardManager
.
GetHomeStatus
(
axisNo
);
short
value
=
HCBoardManager
.
GetHomeStatus
(
axisNo
);
string
homesstr
=
HCBoardManager
.
AxisHomeSts
(
value
);
string
homesstr
=
HCBoardManager
.
AxisHomeSts
(
value
);
lblhomeSts
.
Text
=
homesstr
;
lblhomeSts
.
Text
=
homesstr
;
lblCountPulse
.
Text
=
AxisManager
.
instance
.
GetActualtPosition
(
PortName
,
SlvAddr
).
ToString
();
//lblCountPulse.Text = AxisManager.instance.GetActualtPosition(PortName, SlvAddr).ToString();
}
}
private
void
ShowlbSts
(
Label
lbl
,
int
value
,
bool
isAlarm
=
false
)
private
void
ShowlbSts
(
Label
lbl
,
int
value
,
bool
isAlarm
=
false
)
{
{
...
@@ -332,7 +335,6 @@ namespace OnlineStore.AssemblyLine
...
@@ -332,7 +335,6 @@ namespace OnlineStore.AssemblyLine
{
{
if
(
isAlarm
)
if
(
isAlarm
)
{
{
lbl
.
BackColor
=
Color
.
Red
;
lbl
.
BackColor
=
Color
.
Red
;
lblAlarmcode
.
Visible
=
true
;
lblAlarmcode
.
Visible
=
true
;
lblAlarmcode
.
ForeColor
=
Color
.
Red
;
lblAlarmcode
.
ForeColor
=
Color
.
Red
;
...
@@ -362,7 +364,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -362,7 +364,7 @@ namespace OnlineStore.AssemblyLine
}
}
private
void
linkLabel1_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
private
void
linkLabel1_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
{
Clipboard
.
SetText
(
lblCountPulse
.
Text
);
Clipboard
.
SetText
(
txtAxisPosition
.
Text
);
}
}
}
}
}
}
source/DeviceLibrary/assemblyLine/HY/HY_C1Line.cs
查看文件 @
438143b
...
@@ -146,6 +146,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -146,6 +146,8 @@ namespace OnlineStore.DeviceLibrary
}
}
IOTimeOutProcess
();
IOTimeOutProcess
();
//判断流水线打开了才可以运行
//判断流水线打开了才可以运行
if
(!
MoveStop
)
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
if
(
LineManager
.
Line
.
CanProcessLine
())
if
(
LineManager
.
Line
.
CanProcessLine
())
...
@@ -166,6 +168,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -166,6 +168,7 @@ namespace OnlineStore.DeviceLibrary
FixtureProcess
();
FixtureProcess
();
}
}
}
}
}
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
//检测到托盘的时间
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
//检测到托盘的时间
...
...
source/DeviceLibrary/assemblyLine/HY/HY_C1_SLStation.cs
查看文件 @
438143b
...
@@ -143,6 +143,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -143,6 +143,9 @@ namespace OnlineStore.DeviceLibrary
return
;
return
;
}
}
IOTimeOutProcess
();
IOTimeOutProcess
();
if
((!
MoveStop
))
{
//判断流水线打开了才可以运行
//判断流水线打开了才可以运行
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
...
@@ -164,6 +167,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -164,6 +167,7 @@ namespace OnlineStore.DeviceLibrary
FixtureProcess
();
FixtureProcess
();
}
}
}
}
}
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
...
...
source/DeviceLibrary/assemblyLine/HY/HY_Coveryor.cs
查看文件 @
438143b
...
@@ -141,11 +141,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -141,11 +141,15 @@ namespace OnlineStore.DeviceLibrary
private
int
GetRobotIndex
()
private
int
GetRobotIndex
()
{
{
//机器人索引号
//机器人索引号
int
robotIndex
=
1
;
int
robotIndex
=
0
;
if
(
DeviceID
.
Equals
(
212
))
if
(
DeviceID
.
Equals
(
212
))
{
{
robotIndex
=
2
;
robotIndex
=
2
;
}
}
else
if
(
DeviceID
.
Equals
(
210
))
{
robotIndex
=
1
;
}
return
robotIndex
;
return
robotIndex
;
}
}
protected
override
void
BaseTimerProcess
()
protected
override
void
BaseTimerProcess
()
...
@@ -156,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -156,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
}
}
IOTimeOutProcess
();
IOTimeOutProcess
();
BusyMoveProcess
();
BusyMoveProcess
();
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
(!
MoveStop
)
)
{
{
if
(
LineManager
.
Line
.
CanProcessLine
())
if
(
LineManager
.
Line
.
CanProcessLine
())
{
{
...
...
source/DeviceLibrary/assemblyLine/HY/HY_OutLine.cs
查看文件 @
438143b
...
@@ -110,6 +110,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -110,6 +110,8 @@ namespace OnlineStore.DeviceLibrary
}
}
IOTimeOutProcess
();
IOTimeOutProcess
();
//判断流水线打开了才可以运行
//判断流水线打开了才可以运行
if
((!
MoveStop
))
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
{
if
(
LineManager
.
Line
.
CanProcessLine
())
if
(
LineManager
.
Line
.
CanProcessLine
())
...
@@ -130,6 +132,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -130,6 +132,7 @@ namespace OnlineStore.DeviceLibrary
FixtureProcess
();
FixtureProcess
();
}
}
}
}
}
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
//检测到托盘的时间
private
Stopwatch
trayCheckWait
=
new
Stopwatch
();
//检测到托盘的时间
...
...
source/DeviceLibrary/deviceLibrary/AXIS/AxisManager.cs
查看文件 @
438143b
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
public
abstract
void
AbsMove
(
string
portName
,
short
slvAddr
,
int
targetPosition
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
);
public
abstract
void
AbsMove
(
string
portName
,
short
slvAddr
,
int
targetPosition
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
);
public
abstract
void
AlarmClear
(
string
portName
,
short
slvAddr
);
public
abstract
void
AlarmClear
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetTargetPosition
(
string
portName
,
short
slvAddr
);
//
public abstract int GetTargetPosition(string portName, short slvAddr);
public
abstract
int
GetActualtPosition
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetActualtPosition
(
string
portName
,
short
slvAddr
);
...
...
source/DeviceLibrary/deviceLibrary/AXIS/HC/HCAxisManager.cs
查看文件 @
438143b
...
@@ -89,10 +89,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -89,10 +89,10 @@ namespace OnlineStore.DeviceLibrary
return
axisS
.
PEL
;
return
axisS
.
PEL
;
}
}
public
override
int
GetTargetPosition
(
string
portName
,
short
slvAddr
)
//
public override int GetTargetPosition(string portName, short slvAddr)
{
//
{
return
(
int
)
HCBoardManager
.
GetAxisPrfPos
(
slvAddr
);
//
return (int)HCBoardManager.GetAxisPrfPos(slvAddr);
}
//
}
public
override
void
HomeMove
(
string
portName
,
short
slvAddr
,
int
highVel
,
int
lowVel
,
int
acc
)
public
override
void
HomeMove
(
string
portName
,
short
slvAddr
,
int
highVel
,
int
lowVel
,
int
acc
)
{
{
...
...
source/DeviceLibrary/deviceLibrary/AXIS/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
438143b
...
@@ -346,15 +346,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -346,15 +346,15 @@ namespace OnlineStore.DeviceLibrary
}
}
return
-
1
;
return
-
1
;
}
}
public
override
int
GetTargetPosition
(
string
portName
,
short
slvAddr
)
//
public override int GetTargetPosition(string portName, short slvAddr)
{
//
{
PreReadAddr
=
ACCMDManager
.
TargetPostion
;
//
PreReadAddr = ACCMDManager.TargetPostion;
byte
[]
dataArray
=
ACCMDManager
.
GetWriteData
(
slvAddr
,
ACCMDManager
.
CMD_ReadRegisters
,
ACCMDManager
.
TargetPostion
,
"0000"
,
2
);
//
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadRegisters, ACCMDManager.TargetPostion, "0000", 2);
// SendData(portName,dataArray);
//
// SendData(portName,dataArray);
byte
[]
reviceData
=
SendCommand
(
portName
,
dataArray
,
ReviceOutTimeMS
,
9
);
//
byte[] reviceData = SendCommand(portName, dataArray, ReviceOutTimeMS, 9);
return
GetRegisterData
(
portName
,
reviceData
,
ACCMDManager
.
TargetPostion
);
//
return GetRegisterData(portName, reviceData, ACCMDManager.TargetPostion);
}
//
}
public
override
int
GetActualtPosition
(
string
portName
,
short
slvAddr
)
public
override
int
GetActualtPosition
(
string
portName
,
short
slvAddr
)
{
{
...
...
source/HuichuanLibrary/HCBoardManager.cs
查看文件 @
438143b
...
@@ -67,7 +67,7 @@ namespace HuichuanLibrary
...
@@ -67,7 +67,7 @@ namespace HuichuanLibrary
{
{
return
true
;
return
true
;
}
}
DateTime
startTime
=
DateTime
.
Now
;
if
(!
File
.
Exists
(
DeviceConfigPath
))
if
(!
File
.
Exists
(
DeviceConfigPath
))
{
{
HCLogUtil
.
error
(
"InitCard FAIL, 【"
+
DeviceConfigPath
+
"】not exists"
);
HCLogUtil
.
error
(
"InitCard FAIL, 【"
+
DeviceConfigPath
+
"】not exists"
);
...
@@ -183,7 +183,8 @@ namespace HuichuanLibrary
...
@@ -183,7 +183,8 @@ namespace HuichuanLibrary
}
}
}
}
CardIsOk
=
true
;
CardIsOk
=
true
;
TimeSpan
span
=
DateTime
.
Now
-
startTime
;
ShowLog
(
"OpenCard end ,"
+
Convert
.
ToDateTime
(
span
.
ToString
()).
ToString
(
"HH:mm:ss"
));
return
true
;
return
true
;
//IO
//IO
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论