Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a7977d8c
由
刘韬
编写于
2020-12-07 11:51:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修正更换汇川电气后的所有代码报错
1 个父辈
007d9f74
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
723 行增加
和
174 行删除
RC1252-AutoInOutStore.sln → SO815-AutoInOutStore.sln
SO815MIMO料仓IO.xlsx
source/ACServoDriveTest/FrmACTest.cs
source/ACSingleStore/App.config
source/ACSingleStore/FrmAxisDebug.cs
source/ACSingleStore/FrmIOStatus.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/positionTool/FrmPositionTool.cs
source/Common/Setting_Init.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/DeviceLibrary/AxisManager.cs
source/DeviceLibrary/DeviceLibrary/HC/HCAxisManager.cs
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/DeviceLibrary/IO/HCIOManager.cs
source/DeviceLibrary/DeviceLibrary/IO/IOManager.cs
source/DeviceLibrary/DeviceLibrary/IO/KangNaiDe/KNDManager.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
source/DeviceLibrary/StoreConfig/AC/StoreConfig - 复制.csv
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
source/DeviceLibrary/store/AC_Store.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
RC1252
-AutoInOutStore.sln
→
SO815
-AutoInOutStore.sln
查看文件 @
a7977d8
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio
15
# Visual Studio
Version 16
VisualStudioVersion = 1
5.0.27130.2024
VisualStudioVersion = 1
6.0.30621.155
MinimumVisualStudioVersion = 10.0.40219.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ACServoDriveTest", "source\ACServoDriveTest\ACServoDriveTest.csproj", "{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ACServoDriveTest", "source\ACServoDriveTest\ACServoDriveTest.csproj", "{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}"
EndProject
EndProject
...
@@ -22,7 +22,6 @@ Global
...
@@ -22,7 +22,6 @@ Global
EndGlobalSection
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Release|Any CPU.Build.0 = Release|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Release|Any CPU.Build.0 = Release|Any CPU
{0D2542F5-DD62-4352-82D0-383D9A045E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D2542F5-DD62-4352-82D0-383D9A045E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
...
...
SO815MIMO料仓IO.xlsx
0 → 100644
查看文件 @
a7977d8
此文件类型无法预览
source/ACServoDriveTest/FrmACTest.cs
查看文件 @
a7977d8
...
@@ -17,6 +17,7 @@ namespace ACServoDriveTest
...
@@ -17,6 +17,7 @@ namespace ACServoDriveTest
{
{
public
partial
class
FrmACTest
:
Form
public
partial
class
FrmACTest
:
Form
{
{
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
public
FrmACTest
()
public
FrmACTest
()
{
{
InitializeComponent
();
InitializeComponent
();
...
@@ -162,7 +163,7 @@ namespace ACServoDriveTest
...
@@ -162,7 +163,7 @@ namespace ACServoDriveTest
int
position
=
Convert
.
ToInt32
(
txtPosition
.
Text
);
int
position
=
Convert
.
ToInt32
(
txtPosition
.
Text
);
ACServerManager
.
RelMove
(
GetPortName
(),
GetSlaveAddr
(),
position
);
ACServerManager
.
RelMove
(
GetPortName
(),
GetSlaveAddr
(),
position
);
}
}
private
in
t
GetSlaveAddr
()
private
shor
t
GetSlaveAddr
()
{
{
return
01
;
return
01
;
}
}
...
...
source/ACSingleStore/App.config
查看文件 @
a7977d8
...
@@ -42,7 +42,9 @@
...
@@ -42,7 +42,9 @@
<
add
key
=
"HasDisableDoorControl"
value
=
"1"
/>
<
add
key
=
"HasDisableDoorControl"
value
=
"1"
/>
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"ACBaudRate"
value
=
"115200"
/>
<
add
key
=
"Default_Language"
value
=
"ja-JP"
/>
<
add
key
=
"Default_Language"
value
=
"ja-JP"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<
add
key
=
"UseAIOBOX"
value
=
"0"
/>
<
add
key
=
"UseHCBoard"
value
=
"1"
/>
<
add
key
=
"DIMS"
value
=
"20"
/>
<
add
key
=
"DIMS"
value
=
"20"
/>
<
add
key
=
"DOMS"
value
=
"200"
/>
<
add
key
=
"DOMS"
value
=
"200"
/>
<
add
key
=
"SinglePosId"
value
=
"1#AC2_1_1_6"
/>
<
add
key
=
"SinglePosId"
value
=
"1#AC2_1_1_6"
/>
...
@@ -86,6 +88,16 @@
...
@@ -86,6 +88,16 @@
<
conversionPattern
value
=
"[%date][%t] %m%n"
/>
<
conversionPattern
value
=
"[%date][%t] %m%n"
/>
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"HCBOARD"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/HCBOARD.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t] %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
@@ -93,8 +105,12 @@
...
@@ -93,8 +105,12 @@
<
logger
name
=
"AIOBOX"
>
<
logger
name
=
"AIOBOX"
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
</
logger
>
</
logger
>
<
root
>
<
logger
name
=
"HCBOARD"
>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"HCBOARD"
/>
</
logger
>
<
root
>
<
level
value
=
"INFO"
/>
<
level
value
=
"INFO"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
root
>
</
root
>
...
...
source/ACSingleStore/FrmAxisDebug.cs
查看文件 @
a7977d8
...
@@ -18,6 +18,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -18,6 +18,7 @@ namespace OnlineStore.AutoInOutStore
public
partial
class
FrmAxisDebug
:
FrmBase
public
partial
class
FrmAxisDebug
:
FrmBase
{
{
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
//private KTK_LA_BoxBean store;
//private KTK_LA_BoxBean store;
private
ConfigMoveAxis
middle
=
null
;
private
ConfigMoveAxis
middle
=
null
;
private
ConfigMoveAxis
updown
=
null
;
private
ConfigMoveAxis
updown
=
null
;
...
...
source/ACSingleStore/FrmIOStatus.cs
查看文件 @
a7977d8
...
@@ -211,7 +211,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -211,7 +211,7 @@ namespace OnlineStore.AutoInOutStore
//IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex;
//IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
0
;
int
slaveId
=
0
;
KNDManager
.
ReadMultipleDI
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
KNDManager
.
DIStartAddress
,
16
);
//
KNDManager.ReadMultipleDI(deviceName, (byte)slaveId, (ushort)KNDManager.DIStartAddress, 16);
}
}
private
void
btnReadAllDo_Click
(
object
sender
,
EventArgs
e
)
private
void
btnReadAllDo_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -220,7 +220,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -220,7 +220,7 @@ namespace OnlineStore.AutoInOutStore
//IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex;
//IO_VALUE value = (IO_VALUE)cmbWriteValue.SelectedIndex;
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
int
slaveId
=
0
;
int
slaveId
=
0
;
KNDManager
.
ReadMultipleDO
(
deviceName
,
(
byte
)
slaveId
,
(
ushort
)
KNDManager
.
DoStartAddress
,
16
);
//
KNDManager.ReadMultipleDO(deviceName, (byte)slaveId, (ushort)KNDManager.DoStartAddress, 16);
}
}
private
void
btnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenDoor_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -235,14 +235,14 @@ namespace OnlineStore.AutoInOutStore
...
@@ -235,14 +235,14 @@ namespace OnlineStore.AutoInOutStore
private
void
btnLocationUp_Click
(
object
sender
,
EventArgs
e
)
private
void
btnLocationUp_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
IOManager
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.HIGH);
}
}
private
void
btnLocationDown_Click
(
object
sender
,
EventArgs
e
)
private
void
btnLocationDown_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.HIGH);
IOManager
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
}
}
private
void
FrmIOStatus_Shown
(
object
sender
,
EventArgs
e
)
private
void
FrmIOStatus_Shown
(
object
sender
,
EventArgs
e
)
...
@@ -252,12 +252,12 @@ namespace OnlineStore.AutoInOutStore
...
@@ -252,12 +252,12 @@ namespace OnlineStore.AutoInOutStore
private
void
btnOpenAxisBreak_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenAxisBreak_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
}
}
private
void
btnCloseAxisBreak_Click
(
object
sender
,
EventArgs
e
)
private
void
btnCloseAxisBreak_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
}
}
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
private
void
button1_Click
(
object
sender
,
EventArgs
e
)
...
@@ -317,12 +317,12 @@ namespace OnlineStore.AutoInOutStore
...
@@ -317,12 +317,12 @@ namespace OnlineStore.AutoInOutStore
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.Run_Sign, IO_VALUE.HIGH);
}
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Run_Sign, IO_VALUE.LOW);
}
}
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
a7977d8
...
@@ -25,6 +25,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -25,6 +25,7 @@ namespace OnlineStore.AutoInOutStore
private
AC_SA_BoxBean
store
;
private
AC_SA_BoxBean
store
;
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
public
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
public
FrmStoreBox
()
public
FrmStoreBox
()
{
{
Control
.
CheckForIllegalCrossThreadCalls
=
false
;
Control
.
CheckForIllegalCrossThreadCalls
=
false
;
...
@@ -301,7 +302,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -301,7 +302,7 @@ namespace OnlineStore.AutoInOutStore
if
(
chbAutoRead
.
Checked
)
if
(
chbAutoRead
.
Checked
)
{
{
string
portName
=
GetPortName
();
string
portName
=
GetPortName
();
in
t
SlvAddr
=
GetSlaveAddr
();
shor
t
SlvAddr
=
GetSlaveAddr
();
//判断私服是否打开、
//判断私服是否打开、
if
(
ACServerManager
.
ServerOnStatus
(
portName
,
SlvAddr
))
if
(
ACServerManager
.
ServerOnStatus
(
portName
,
SlvAddr
))
...
@@ -589,6 +590,8 @@ namespace OnlineStore.AutoInOutStore
...
@@ -589,6 +590,8 @@ namespace OnlineStore.AutoInOutStore
}
}
}
}
}
}
int
addSpeed
=
0
;
int
delSpeed
=
0
;
private
void
cmbAxisList_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
private
void
cmbAxisList_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
{
if
(
this
.
cmbAxisList
.
SelectedIndex
>=
0
)
if
(
this
.
cmbAxisList
.
SelectedIndex
>=
0
)
...
@@ -597,6 +600,8 @@ namespace OnlineStore.AutoInOutStore
...
@@ -597,6 +600,8 @@ namespace OnlineStore.AutoInOutStore
txtAxisDeviceName
.
Text
=
SlvAddr
.
DeviceName
;
txtAxisDeviceName
.
Text
=
SlvAddr
.
DeviceName
;
txtAxisValue
.
Text
=
SlvAddr
.
GetAxisValue
().
ToString
();
txtAxisValue
.
Text
=
SlvAddr
.
GetAxisValue
().
ToString
();
txtASpeed
.
Text
=
SlvAddr
.
TargetSpeed
.
ToString
();
txtASpeed
.
Text
=
SlvAddr
.
TargetSpeed
.
ToString
();
addSpeed
=
SlvAddr
.
AddSpeed
;
delSpeed
=
SlvAddr
.
DelSpeed
;
}
}
}
}
...
@@ -615,7 +620,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -615,7 +620,7 @@ namespace OnlineStore.AutoInOutStore
}
}
}
}
LogUtil
.
info
(
"点击【绝对运动】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
LogUtil
.
info
(
"点击【绝对运动】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
ACServerManager
.
AbsMove
(
portName
,
SlvAddr
,
position
,
speed
);
ACServerManager
.
AbsMove
(
portName
,
SlvAddr
,
position
,
speed
,
addSpeed
,
delSpeed
);
}
}
private
void
btnAxisVMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnAxisVMove_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -649,7 +654,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -649,7 +654,7 @@ namespace OnlineStore.AutoInOutStore
}
}
}
}
LogUtil
.
info
(
"点击【相对运动】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
LogUtil
.
info
(
"点击【相对运动】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
ACServerManager
.
RelMove
(
portName
,
SlvAddr
,
position
,
speed
);
ACServerManager
.
RelMove
(
portName
,
SlvAddr
,
position
,
speed
,
addSpeed
,
delSpeed
);
}
}
...
@@ -811,7 +816,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -811,7 +816,7 @@ namespace OnlineStore.AutoInOutStore
private
void
AxisABSMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
private
void
AxisABSMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
{
{
moveAxis
.
TargetPosition
=
targetPosition
;
moveAxis
.
TargetPosition
=
targetPosition
;
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
addSpeed
,
delSpeed
);
}
}
private
void
btnUpDownP1_Click
(
object
sender
,
EventArgs
e
)
private
void
btnUpDownP1_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -1101,7 +1106,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1101,7 +1106,7 @@ namespace OnlineStore.AutoInOutStore
{
{
msg
=
""
;
msg
=
""
;
string
deviceName
=
moveAxis
.
DeviceName
;
string
deviceName
=
moveAxis
.
DeviceName
;
int
axisNo
=
moveAxis
.
GetAxisValue
();
var
axisNo
=
moveAxis
.
GetAxisValue
();
bool
isend
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
bool
isend
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
...
@@ -1128,7 +1133,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1128,7 +1133,7 @@ namespace OnlineStore.AutoInOutStore
return
false
;
return
false
;
}
}
private
in
t
GetSlaveAddr
()
private
shor
t
GetSlaveAddr
()
{
{
return
FormUtil
.
GetShortValue
(
txtAxisValue
);
return
FormUtil
.
GetShortValue
(
txtAxisValue
);
}
}
...
@@ -1152,7 +1157,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1152,7 +1157,7 @@ namespace OnlineStore.AutoInOutStore
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
LogUtil
.
info
(
"点击【原点返回】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】 速度【"
+
speed
+
"】"
);
LogUtil
.
info
(
"点击【原点返回】,端口号【"
+
portName
+
"】地址【"
+
SlvAddr
+
"】 速度【"
+
speed
+
"】"
);
ACServerManager
.
HomeMove
(
portName
,
SlvAddr
,
speed
);
ACServerManager
.
HomeMove
(
portName
,
SlvAddr
,
speed
,
addSpeed
,
delSpeed
);
}
}
private
void
btnGetAlarm_Click
(
object
sender
,
EventArgs
e
)
private
void
btnGetAlarm_Click
(
object
sender
,
EventArgs
e
)
...
@@ -1304,10 +1309,10 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1304,10 +1309,10 @@ namespace OnlineStore.AutoInOutStore
private
void
批量上下轴
ONToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
批量上下轴
ONToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.Run_Sign, IO_VALUE.HIGH);
Thread
.
Sleep
(
1000
);
//
Thread.Sleep(1000);
string
portName
=
store
.
Config
.
Batch_Axis
.
DeviceName
;
string
portName
=
store
.
Config
.
Batch_Axis
.
DeviceName
;
int
slvAddr
=
store
.
Config
.
Batch_Axis
.
GetAxisValue
();
var
slvAddr
=
store
.
Config
.
Batch_Axis
.
GetAxisValue
();
ACServerManager
.
OpenPort
(
portName
);
ACServerManager
.
OpenPort
(
portName
);
Thread
.
Sleep
(
50
);
Thread
.
Sleep
(
50
);
...
@@ -1325,8 +1330,8 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1325,8 +1330,8 @@ namespace OnlineStore.AutoInOutStore
//关闭串口,等下次重新打开
//关闭串口,等下次重新打开
//ACServerManager.ColsePort(store.Config.Batch_Axis.DeviceName);
//ACServerManager.ColsePort(store.Config.Batch_Axis.DeviceName);
Thread
.
Sleep
(
100
);
//
Thread.Sleep(100);
IOManager
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Run_Sign, IO_VALUE.LOW);
}
}
private
void
btnWaitTrgGo_Click
(
object
sender
,
EventArgs
e
)
private
void
btnWaitTrgGo_Click
(
object
sender
,
EventArgs
e
)
...
@@ -1426,7 +1431,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1426,7 +1431,7 @@ namespace OnlineStore.AutoInOutStore
string
portName
=
txtAxisDeviceName
.
Text
;
string
portName
=
txtAxisDeviceName
.
Text
;
int
SlvAddr
=
FormUtil
.
GetIntValue
(
txtAxisValue
);
int
SlvAddr
=
FormUtil
.
GetIntValue
(
txtAxisValue
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
int
speed
=
FormUtil
.
GetIntValue
(
txtASpeed
);
ACServerManager
.
SetSpeed
(
portName
,
SlvAddr
,
speed
);
//
ACServerManager.SetSpeed(portName, SlvAddr, speed);
}
}
private
void
btnInOutP4_Click
(
object
sender
,
EventArgs
e
)
private
void
btnInOutP4_Click
(
object
sender
,
EventArgs
e
)
...
@@ -1592,7 +1597,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -1592,7 +1597,7 @@ namespace OnlineStore.AutoInOutStore
private
void
升降轴位置调试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
升降轴位置调试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
string
PortName
=
store
.
Config
.
UpDown_Axis
.
DeviceName
;
string
PortName
=
store
.
Config
.
UpDown_Axis
.
DeviceName
;
int
slvAddr
=
store
.
Config
.
UpDown_Axis
.
GetAxisValue
();
var
slvAddr
=
store
.
Config
.
UpDown_Axis
.
GetAxisValue
();
string
ioIP
=
"192.168.200.13"
;
string
ioIP
=
"192.168.200.13"
;
int
ioIndex
=
0
;
int
ioIndex
=
0
;
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
...
...
source/ACSingleStore/positionTool/FrmPositionTool.cs
查看文件 @
a7977d8
...
@@ -20,13 +20,16 @@ namespace OnlineStore.AutoInOutStore
...
@@ -20,13 +20,16 @@ namespace OnlineStore.AutoInOutStore
public
partial
class
FrmPositionTool
:
FrmBase
public
partial
class
FrmPositionTool
:
FrmBase
{
{
private
string
LogName
=
ResourceCulture
.
GetString
(
"升降轴位置调试:"
);
private
string
LogName
=
ResourceCulture
.
GetString
(
"升降轴位置调试:"
);
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
private
string
PortName
=
""
;
private
string
PortName
=
""
;
private
int
SlvAddr
=
0
;
private
short
SlvAddr
=
0
;
private
int
addSpeed
=
0
;
private
int
delSpeed
=
0
;
private
string
IoIp
=
""
;
private
string
IoIp
=
""
;
private
int
IoIndex
=
0
;
private
int
IoIndex
=
0
;
public
string
Axis_Brake
=
IO_Type
.
Axis_Brake
;
//
public string Axis_Brake = IO_Type.Axis_Brake;
private
System
.
Timers
.
Timer
toolTimer
=
new
System
.
Timers
.
Timer
();
private
System
.
Timers
.
Timer
toolTimer
=
new
System
.
Timers
.
Timer
();
public
FrmPositionTool
(
string
protName
,
in
t
slvAddr
,
string
ioIp
,
int
ioIndex
)
public
FrmPositionTool
(
string
protName
,
shor
t
slvAddr
,
string
ioIp
,
int
ioIndex
)
{
{
InitializeComponent
();
InitializeComponent
();
this
.
PortName
=
protName
;
this
.
PortName
=
protName
;
...
@@ -129,7 +132,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -129,7 +132,7 @@ namespace OnlineStore.AutoInOutStore
//P6Offset = FormUtil.GetIntValue(txtP6Offset);
//P6Offset = FormUtil.GetIntValue(txtP6Offset);
//StopTimer();
//StopTimer();
this
.
PortName
=
txtPortName
.
Text
;
this
.
PortName
=
txtPortName
.
Text
;
this
.
SlvAddr
=
FormUtil
.
Get
In
tValue
(
txtAddr
);
this
.
SlvAddr
=
FormUtil
.
Get
Shor
tValue
(
txtAddr
);
bool
result
=
ACServerManager
.
OpenPort
(
PortName
);
bool
result
=
ACServerManager
.
OpenPort
(
PortName
);
if
(!
result
)
if
(!
result
)
{
{
...
@@ -138,18 +141,18 @@ namespace OnlineStore.AutoInOutStore
...
@@ -138,18 +141,18 @@ namespace OnlineStore.AutoInOutStore
}
}
formStatus
(
true
);
formStatus
(
true
);
ACServerManager
.
InitSlvAddr
(
PortName
,
SlvAddr
);
//
ACServerManager.InitSlvAddr(PortName, SlvAddr);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
ACServerManager
.
AlarmClear
(
PortName
,
SlvAddr
);
ACServerManager
.
AlarmClear
(
PortName
,
SlvAddr
);
ACServerManager
.
ServoOn
(
PortName
,
SlvAddr
);
ACServerManager
.
ServoOn
(
PortName
,
SlvAddr
);
/*
try
try
{
{
IOManager
.
IOMove
(
Axis_Brake
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(Axis_Brake, IO_VALUE.HIGH);
}catch(Exception ex)
}catch(Exception ex)
{
{
}
}
*/
}
}
...
@@ -159,6 +162,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -159,6 +162,7 @@ namespace OnlineStore.AutoInOutStore
// toolTimer.Stop();
// toolTimer.Stop();
ACServerManager
.
SuddenStop
(
PortName
,
SlvAddr
);
ACServerManager
.
SuddenStop
(
PortName
,
SlvAddr
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
/*
try
try
{
{
IOManager.IOMove(Axis_Brake, IO_VALUE.LOW);
IOManager.IOMove(Axis_Brake, IO_VALUE.LOW);
...
@@ -166,7 +170,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -166,7 +170,7 @@ namespace OnlineStore.AutoInOutStore
catch (Exception ex)
catch (Exception ex)
{
{
}
}
*/
ACServerManager
.
ServoOff
(
PortName
,
SlvAddr
);
ACServerManager
.
ServoOff
(
PortName
,
SlvAddr
);
formStatus
(
false
);
formStatus
(
false
);
}
}
...
@@ -190,12 +194,13 @@ namespace OnlineStore.AutoInOutStore
...
@@ -190,12 +194,13 @@ namespace OnlineStore.AutoInOutStore
private
void
btnRelMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnRelMove_Click
(
object
sender
,
EventArgs
e
)
{
{
int
position
=
Convert
.
ToInt32
(
txtPosition
.
Text
);
int
position
=
Convert
.
ToInt32
(
txtPosition
.
Text
);
ACServerManager
.
RelMove
(
PortName
,
SlvAddr
,
position
);
int
speed
=
Convert
.
ToInt32
(
txtSpeed
.
Text
);
ACServerManager
.
RelMove
(
PortName
,
SlvAddr
,
position
,
speed
,
addSpeed
,
delSpeed
);
}
}
private
void
btnHomeMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnHomeMove_Click
(
object
sender
,
EventArgs
e
)
{
{
int
speed
=
Convert
.
ToInt32
(
txtSpeed
.
Text
);
int
speed
=
Convert
.
ToInt32
(
txtSpeed
.
Text
);
ACServerManager
.
HomeMove
(
PortName
,
SlvAddr
,
speed
);
ACServerManager
.
HomeMove
(
PortName
,
SlvAddr
,
speed
,
addSpeed
,
delSpeed
);
}
}
private
void
btnSpeedMove_Click
(
object
sender
,
EventArgs
e
)
private
void
btnSpeedMove_Click
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -244,7 +249,7 @@ namespace OnlineStore.AutoInOutStore
...
@@ -244,7 +249,7 @@ namespace OnlineStore.AutoInOutStore
PositionList
=
new
List
<
int
>();
PositionList
=
new
List
<
int
>();
LogUtil
.
info
(
LogName
+
"伺服开始运动,速度【"
+
speed
+
"】位置【"
+
position
+
"】启动定时器 "
);
LogUtil
.
info
(
LogName
+
"伺服开始运动,速度【"
+
speed
+
"】位置【"
+
position
+
"】启动定时器 "
);
formMoveStatus
(
false
);
formMoveStatus
(
false
);
ACServerManager
.
AbsMove
(
PortName
,
SlvAddr
,
position
,
speed
);
ACServerManager
.
AbsMove
(
PortName
,
SlvAddr
,
position
,
speed
,
addSpeed
,
delSpeed
);
toolTimer
.
Start
();
toolTimer
.
Start
();
}
}
private
int
P3Offset
=
0
;
private
int
P3Offset
=
0
;
...
...
source/Common/Setting_Init.cs
查看文件 @
a7977d8
...
@@ -89,6 +89,8 @@ namespace OnlineStore.Common
...
@@ -89,6 +89,8 @@ namespace OnlineStore.Common
public
static
string
Default_Language
=
"Default_Language"
;
public
static
string
Default_Language
=
"Default_Language"
;
public
static
string
UseAIOBOX
=
"UseAIOBOX"
;
public
static
string
UseAIOBOX
=
"UseAIOBOX"
;
public
static
string
UseHCBoard
=
"UseHCBoard"
;
/// <summary>
/// <summary>
/// 单盘入库默认PosID
/// 单盘入库默认PosID
/// </summary>
/// </summary>
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
a7977d8
...
@@ -46,6 +46,9 @@
...
@@ -46,6 +46,9 @@
<Reference Include="halcondotnet">
<Reference Include="halcondotnet">
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
</Reference>
</Reference>
<Reference Include="HuichuanLibrary">
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath>
<HintPath>..\..\dll\log4net.dll</HintPath>
...
@@ -65,14 +68,11 @@
...
@@ -65,14 +68,11 @@
<Compile Include="acSingleStore\AutomaticBaiting_Partial.cs" />
<Compile Include="acSingleStore\AutomaticBaiting_Partial.cs" />
<Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="acSingleStore\StoreManager.cs" />
<Compile Include="acSingleStore\AutomaticBaiting.cs" />
<Compile Include="acSingleStore\AutomaticBaiting.cs" />
<Compile Include="DeviceLibrary\AxisManager.cs" />
<Compile Include="DeviceLibrary\halcon\CodeManager.cs" />
<Compile Include="DeviceLibrary\halcon\CodeManager.cs" />
<Compile Include="DeviceLibrary\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="DeviceLibrary\HC\HCAxisManager.cs" />
<Compile Include="DeviceLibrary\IO\HCIOManager.cs" />
<Compile Include="DeviceLibrary\IO\IOManager.cs" />
<Compile Include="DeviceLibrary\IO\IOManager.cs" />
<Compile Include="DeviceLibrary\IO\KangNaiDe\KNDManager.cs" />
<Compile Include="DeviceLibrary\IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\ACCMDManager.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\ACServerManager.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\ACServerManager_Partial.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\BatchAxisController.cs" />
<Compile Include="DeviceLibrary\PanasonicServo\BatchAxisController.cs" />
<Compile Include="ResourceControl.cs" />
<Compile Include="ResourceControl.cs" />
<Compile Include="store\LineMoveP.cs" />
<Compile Include="store\LineMoveP.cs" />
...
@@ -109,11 +109,16 @@
...
@@ -109,11 +109,16 @@
<Name>LoadCSVLibrary</Name>
<Name>LoadCSVLibrary</Name>
</ProjectReference>
</ProjectReference>
</ItemGroup>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="DeviceLibrary\IO\AIOBOX\" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None Include="StoreConfig\AC\linePositions.csv">
<None Include="StoreConfig\AC\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
<None Include="StoreConfig\AC\StoreConfig - 复制.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="StoreConfig\AC\StoreConfig.csv">
<None Include="StoreConfig\AC\StoreConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</None>
...
...
source/DeviceLibrary/DeviceLibrary/AxisManager.cs
0 → 100644
查看文件 @
a7977d8
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
abstract
class
AxisManager
{
public
bool
IsShowMsg
=
false
;
public
static
AxisManager
instance
;
public
static
bool
UseHCBoard
=
true
;
static
AxisManager
()
{
Init
();
}
public
static
void
Init
()
{
UseHCBoard
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseHCBoard
).
Equals
(
1
);
if
(
UseHCBoard
)
{
instance
=
new
HCAxisManager
();
}
else
{
//instance = new ACServerManager();
}
}
#
region
485
通信方法
/// <summary>
/// 废弃方法
/// </summary>
public
abstract
bool
OpenPort
(
string
portName
);
/// <summary>
/// 废弃方法
/// </summary>
public
abstract
void
ColsePort
(
string
portName
);
/// <summary>
/// 废弃方法
/// </summary>
public
abstract
void
CloseAllPort
();
/// <summary>
/// 废弃方法
/// </summary>
public
abstract
void
ClearSpeed
();
/// <summary>
/// 废弃方法
/// </summary>
public
abstract
void
InitSlvAddr
(
string
portName
,
short
slvAddr
,
int
targetSpeed
,
int
addSpeed
,
int
delSpeed
);
public
abstract
bool
IsServeoOn
(
string
portName
,
short
slvAddr
);
#
endregion
public
abstract
bool
OpenCard
();
public
abstract
bool
CloseCard
();
public
abstract
bool
IsHomeMoveEnd
(
string
portName
,
short
slvAddr
);
public
abstract
bool
AbsMoveIsEnd
(
string
portName
,
short
axisNo
,
int
targetPosition
,
int
canErrorCount
,
out
bool
countError
);
public
abstract
void
ServoOn
(
string
portName
,
short
slvAddr
);
public
abstract
void
ServoOff
(
string
portName
,
short
slvAddr
);
public
abstract
void
RelMove
(
string
portName
,
short
slvAddr
,
int
position
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
);
public
abstract
void
HomeMove
(
string
portName
,
short
slvAddr
,
int
highVel
,
int
lowVel
,
int
acc
);
public
abstract
void
SpeedMove
(
string
portName
,
short
slvAddr
,
int
speed
);
public
abstract
void
SuddenStop
(
string
portName
,
short
slvAddr
);
public
abstract
bool
isInPosition
(
string
portName
,
short
slvAddr
,
int
PPosition
,
int
canErrorCount
,
bool
isLog
=
false
);
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
int
GetTargetPosition
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetActualtPosition
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetAlarmStatus
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetBusyStatus
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetHomeEndStatus
(
string
portName
,
short
slvAddr
);
public
abstract
int
GetHomeSingle
(
string
portName
,
short
slvAddr
);
/// <summary>
/// 负极限
/// </summary>
public
abstract
int
GetLimitNegativeSingle
(
string
portName
,
short
slvAddr
);
/// <summary>
/// 正极限
/// </summary>
public
abstract
int
GetLimitPositiveSingle
(
string
portName
,
short
slvAddr
);
public
abstract
short
GetErrorCode
(
string
portName
,
short
slvAddr
);
public
void
SuddenStop
(
ConfigMoveAxis
configMoveAxis
)
{
SuddenStop
(
configMoveAxis
.
DeviceName
,
configMoveAxis
.
GetAxisValue
());
}
public
int
GetActualtPosition
(
ConfigMoveAxis
configMoveAxis
)
{
return
GetActualtPosition
(
configMoveAxis
.
DeviceName
,
configMoveAxis
.
GetAxisValue
());
}
public
bool
ServerOnStatus
(
string
portName
,
short
slvAddr
)
{
return
IsServeoOn
(
portName
,
slvAddr
);
}
public
bool
isInPosition
(
ConfigMoveAxis
configMoveAxis
,
int
PPosition
,
bool
isLog
=
false
)
{
return
isInPosition
(
configMoveAxis
.
DeviceName
,
configMoveAxis
.
GetAxisValue
(),
PPosition
,
configMoveAxis
.
CanErrorCountMax
,
isLog
);
}
}
}
source/DeviceLibrary/DeviceLibrary/HC/HCAxisManager.cs
0 → 100644
查看文件 @
a7977d8
using
HuichuanLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
public
class
HCAxisManager
:
AxisManager
{
public
override
bool
OpenCard
()
{
return
HCBoardManager
.
OpenCard
();
}
public
override
bool
CloseCard
()
{
return
HCBoardManager
.
CloseCard
();
}
public
override
void
AbsMove
(
string
portName
,
short
slvAddr
,
int
targetPosition
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
)
{
HCBoardManager
.
AbsMove
((
short
)
slvAddr
,
targetPosition
,
targetSpeed
,
ptpAcc
,
ptpDec
);
}
public
override
void
AlarmClear
(
string
portName
,
short
slvAddr
)
{
HCBoardManager
.
ClearAxisSts
((
short
)
slvAddr
);
}
public
override
bool
OpenPort
(
string
portName
)
{
return
true
;
}
public
override
void
ClearSpeed
()
{
}
public
override
void
CloseAllPort
()
{
}
public
override
void
ColsePort
(
string
portName
)
{
}
public
override
void
InitSlvAddr
(
string
portName
,
short
slvAddr
,
int
targetSpeed
,
int
addSpeed
,
int
delSpeed
)
{
}
public
override
int
GetActualtPosition
(
string
portName
,
short
slvAddr
)
{
return
(
int
)
HCBoardManager
.
GetAxisCurrPos
(
slvAddr
);
}
public
override
int
GetAlarmStatus
(
string
portName
,
short
slvAddr
)
{
AxisSts
axisS
=
HCBoardManager
.
GetAxisSts
(
slvAddr
);
return
axisS
.
ALM
;
}
public
override
int
GetBusyStatus
(
string
portName
,
short
slvAddr
)
{
AxisSts
axisS
=
HCBoardManager
.
GetAxisSts
(
slvAddr
);
return
axisS
.
BUSY
;
}
public
override
int
GetHomeEndStatus
(
string
portName
,
short
slvAddr
)
{
return
(
int
)
HCBoardManager
.
GetHomeStatus
(
slvAddr
);
}
public
override
int
GetHomeSingle
(
string
portName
,
short
slvAddr
)
{
AxisSts
axisS
=
HCBoardManager
.
GetAxisSts
(
slvAddr
);
return
axisS
.
ALM
;
}
public
override
int
GetLimitNegativeSingle
(
string
portName
,
short
slvAddr
)
{
AxisSts
axisS
=
HCBoardManager
.
GetAxisSts
(
slvAddr
);
return
axisS
.
NEL
;
}
public
override
int
GetLimitPositiveSingle
(
string
portName
,
short
slvAddr
)
{
AxisSts
axisS
=
HCBoardManager
.
GetAxisSts
(
slvAddr
);
return
axisS
.
PEL
;
}
public
override
int
GetTargetPosition
(
string
portName
,
short
slvAddr
)
{
return
(
int
)
HCBoardManager
.
GetAxisPrfPos
(
slvAddr
);
}
public
override
void
HomeMove
(
string
portName
,
short
slvAddr
,
int
highVel
,
int
lowVel
,
int
acc
)
{
HCBoardManager
.
StartHomeMove
(
slvAddr
,(
uint
)
highVel
,
(
uint
)
lowVel
,
(
uint
)
acc
);
}
public
override
bool
IsHomeMoveEnd
(
string
portName
,
short
slvAddr
)
{
return
HCBoardManager
.
HomeingIsEnd
(
slvAddr
);
}
public
override
bool
isInPosition
(
string
portName
,
short
slvAddr
,
int
PPosition
,
int
canErrorCount
,
bool
isLog
=
false
)
{
return
HCBoardManager
.
IsInPosition
(
slvAddr
,
PPosition
,
canErrorCount
);
}
public
override
void
RelMove
(
string
portName
,
short
slvAddr
,
int
position
,
int
targetSpeed
,
int
ptpAcc
,
int
ptpDec
)
{
HCBoardManager
.
RelMove
(
slvAddr
,
position
,
targetSpeed
,
ptpAcc
,
ptpDec
);
}
public
override
bool
IsServeoOn
(
string
portName
,
short
slvAddr
)
{
AxisSts
axisS
=
HCBoardManager
.
GetAxisSts
(
slvAddr
);
return
axisS
.
ServoOn
.
Equals
(
1
);
}
public
override
void
ServoOff
(
string
portName
,
short
slvAddr
)
{
HCBoardManager
.
ServoOff
(
slvAddr
);
}
public
override
void
ServoOn
(
string
portName
,
short
slvAddr
)
{
HCBoardManager
.
ServoOn
(
slvAddr
);
}
public
override
void
SpeedMove
(
string
portName
,
short
slvAddr
,
int
speed
)
{
HCBoardManager
.
SpeedMove
(
slvAddr
,
speed
);
}
public
override
void
SuddenStop
(
string
portName
,
short
slvAddr
)
{
HCBoardManager
.
AxisStop
(
slvAddr
);
}
public
override
bool
AbsMoveIsEnd
(
string
portName
,
short
axisNo
,
int
targetPosition
,
int
canErrorCount
,
out
bool
countError
)
{
countError
=
false
;
bool
isOk
=
HCBoardManager
.
MoveIsEnd
(
axisNo
);
if
(
isOk
)
{
if
(
HCBoardManager
.
IsInPosition
(
axisNo
,
targetPosition
,
canErrorCount
))
{
return
true
;
}
else
{
countError
=
true
;
}
}
return
false
;
}
public
override
short
GetErrorCode
(
string
portName
,
short
slvAddr
)
{
return
HCBoardManager
.
GetAxErrCode
(
slvAddr
);
}
}
}
source/DeviceLibrary/DeviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
a7977d8
...
@@ -26,13 +26,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -26,13 +26,14 @@ namespace OnlineStore.DeviceLibrary
private
object
DOLock
=
""
;
private
object
DOLock
=
""
;
public
override
void
ConnectionIOList
(
List
<
string
>
DIONameList
)
public
override
bool
ConnectionIOList
(
List
<
string
>
DIONameList
)
{
{
foreach
(
string
ip
in
DIONameList
)
foreach
(
string
ip
in
DIONameList
)
{
{
ConnectionIP
(
ip
);
ConnectionIP
(
ip
);
}
}
return
true
;
}
}
private
bool
isProcess
=
false
;
private
bool
isProcess
=
false
;
private
DateTime
lastTime
=
DateTime
.
Now
;
private
DateTime
lastTime
=
DateTime
.
Now
;
...
...
source/DeviceLibrary/DeviceLibrary/IO/HCIOManager.cs
0 → 100644
查看文件 @
a7977d8
using
HuichuanLibrary
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary.IO
{
public
class
HCIOManager
:
IOManager
{
public
override
void
CloseAllConnection
()
{
}
public
override
void
CloseAllDO
()
{
HCBoardManager
.
CloseAllDO
();
}
public
override
bool
ConnectionIOList
(
List
<
string
>
dIODeviceNameList
)
{
if
(
dIODeviceNameList
.
Count
>
0
&&
dIODeviceNameList
.
Contains
(
"HC"
))
{
if
(!
HCBoardManager
.
CardInitOk
())
{
HCBoardManager
.
InitConfig
(
""
,
""
,
"HCBOARD"
);
return
HCBoardManager
.
OpenCard
();
}
return
false
;
}
return
false
;
}
public
override
IO_VALUE
GetDIValue
(
string
deviceName
,
byte
slaveID
,
ushort
index
)
{
short
v
=
HCBoardManager
.
GetBitDI
((
short
)
index
);
return
(
IO_VALUE
)
v
;
}
public
override
IO_VALUE
GetDOValue
(
string
deviceName
,
byte
slaveID
,
ushort
index
)
{
short
v
=
HCBoardManager
.
GetBitDO
((
short
)
index
);
return
(
IO_VALUE
)
v
;
}
public
override
IO_VALUE
GetIOValue
(
ConfigIO
configIO
)
{
short
index
=(
short
)
configIO
.
GetIOAddr
();
short
v
=
HCBoardManager
.
GetBitDO
(
index
);
return
(
IO_VALUE
)
v
;
}
public
override
void
ReadAllDI
(
string
deviceName
,
byte
slaveId
)
{
}
public
override
void
ReadAllDO
(
string
deviceName
,
byte
slaveId
)
{
}
public
override
void
WriteSingleDO
(
string
deviceName
,
byte
slaveId
,
ushort
index
,
IO_VALUE
value
,
int
time
)
{
try
{
short
v
=
(
short
)
value
;
HCBoardManager
.
SetBitDO
((
short
)
index
,
v
);
short
targetV
=
0
;
if
(
v
.
Equals
((
short
)
0
))
{
targetV
=
1
;
}
//写入之后,等待指定间隔后回写
System
.
Timers
.
Timer
mytimer
=
new
System
.
Timers
.
Timer
(
time
);
mytimer
.
Elapsed
+=
(
o1
,
e1
)
=>
{
try
{
HCBoardManager
.
SetBitDO
((
short
)
index
,
targetV
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"**********定时回写入 出错:"
+
ex
.
StackTrace
);
}
};
mytimer
.
AutoReset
=
false
;
mytimer
.
Enabled
=
true
;
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"AIO WriteSingleDO ["
+
index
+
"] 出错:"
+
ex
.
ToString
());
}
}
public
override
void
WriteSingleDO
(
string
deviceName
,
byte
slaveId
,
ushort
index
,
IO_VALUE
value
)
{
short
v
=
(
short
)
value
;
HCBoardManager
.
SetBitDO
((
short
)
index
,
v
);
}
}
}
source/DeviceLibrary/DeviceLibrary/IO/IOManager.cs
查看文件 @
a7977d8
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary.IO
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -72,14 +73,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -72,14 +73,21 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
endregion
public
static
void
Init
()
public
static
void
Init
()
{
{
bool
isAIOBox
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseAIOBOX
).
Equals
(
1
);
bool
UseHCBoard
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseHCBoard
).
Equals
(
1
);
if
(
isAIOBox
)
if
(
UseHCBoard
)
{
{
instance
=
new
AIOBOX
Manager
();
instance
=
new
HCIO
Manager
();
}
}
else
else
{
{
instance
=
new
KNDManager
();
bool
isAIOBox
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseAIOBOX
).
Equals
(
1
);
if
(
isAIOBox
)
{
//instance = new AIOBOXManager();
}
//else
//{
// instance = new KNDManager();
//}
}
}
}
}
protected
static
ushort
GetDILength
(
string
ioIp
)
protected
static
ushort
GetDILength
(
string
ioIp
)
...
@@ -107,7 +115,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -107,7 +115,7 @@ namespace OnlineStore.DeviceLibrary
}
}
return
16
;
return
16
;
}
}
public
abstract
void
ConnectionIOList
(
List
<
string
>
dIODeviceNameList
);
public
abstract
bool
ConnectionIOList
(
List
<
string
>
dIODeviceNameList
);
public
abstract
void
ReadAllDI
(
string
deviceName
,
byte
slaveId
);
public
abstract
void
ReadAllDI
(
string
deviceName
,
byte
slaveId
);
...
...
source/DeviceLibrary/DeviceLibrary/IO/KangNaiDe/KNDManager.cs
查看文件 @
a7977d8
...
@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
Thread
.
Sleep
(
1
);
Thread
.
Sleep
(
1
);
}
}
public
override
void
ConnectionIOList
(
List
<
string
>
DIONameList
)
public
override
bool
ConnectionIOList
(
List
<
string
>
DIONameList
)
{
{
foreach
(
string
ip
in
DIONameList
)
foreach
(
string
ip
in
DIONameList
)
{
{
...
@@ -209,6 +209,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -209,6 +209,7 @@ namespace OnlineStore.DeviceLibrary
//}
//}
ConnectionIP
(
ip
);
ConnectionIP
(
ip
);
}
}
return
true
;
}
}
public
static
void
ReadMultipleDI
(
string
ioIp
,
byte
slaveId
,
ushort
StartAddress
,
ushort
length
)
public
static
void
ReadMultipleDI
(
string
ioIp
,
byte
slaveId
,
ushort
StartAddress
,
ushort
length
)
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
a7977d8
...
@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 外部调用的接口放在此文件中
/// 外部调用的接口放在此文件中
/// </summary>
/// </summary>
public
partial
class
ACServerManager
public
partial
class
ACServerManager
// AxisManager.instance
{
{
public
static
bool
IsShowMsg
=
false
;
public
static
bool
IsShowMsg
=
false
;
private
static
int
SleepMSendons
=
20
;
private
static
int
SleepMSendons
=
20
;
...
...
source/DeviceLibrary/DeviceLibrary/PanasonicServo/BatchAxisController.cs
查看文件 @
a7977d8
...
@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -12,7 +12,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// </summary>
public
class
BatchAxisController
public
class
BatchAxisController
{
{
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
private
static
bool
IsStop
=
false
;
private
static
bool
IsStop
=
false
;
private
static
System
.
Timers
.
Timer
checkTimer
=
null
;
private
static
System
.
Timers
.
Timer
checkTimer
=
null
;
private
static
string
TargetIoType
=
IO_Type
.
TrayCheck_LoadMaterial
;
private
static
string
TargetIoType
=
IO_Type
.
TrayCheck_LoadMaterial
;
...
...
source/DeviceLibrary/StoreConfig/AC/StoreConfig - 复制.csv
0 → 100644
查看文件 @
a7977d8
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/StoreConfig/AC/StoreConfig.csv
查看文件 @
a7977d8
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
DI,急停,SuddenStop_BTN,0,192.168.200.11,0,急停,X01,DI-01,0,
DI,急停,SuddenStop_BTN,0,HC,0,急停,X00,DI-00,0,
DI,复位,Reset_BTN,1,192.168.200.11,0,复位,X02,DI-02,0,
DI,复位,Reset_BTN,1,HC,0,复位,X01,DI-01,0,
DI,自动启动,AutoRun_Single,2,192.168.200.11,0,自动启动,X03,DI-03,0,
DI,自动启动,AutoRun_Single,2,HC,0,自动启动,X02,DI-02,0,
DI,安全光栅,SafetyLightCurtains,3,192.168.200.11,0,安全光栅,X04,DI-04,0,
DI,气压检测,Airpressure_Check,3,HC,0,气压检测,X03,DI-03,0,
DI,单料门上升端,Door_Up,4,192.168.200.11,0,单料门上升端,X05,DI-05,0,
DI,安全光栅,SafetyLightCurtains,4,HC,0,安全光栅,X04,DI-04,0,
DI,单料门下降端,Door_Down,5,192.168.200.11,0,单料门下降端,X06,DI-06,0,
DI,左侧电器维护门关闭,LeftDoorColse_Single,5,HC,0,左侧防护门关闭,X05,DI-05,0,
DI,分料机构气缸上升端,ClampingDisc_Up,6,192.168.200.11,0,分料机构气缸上升端,X07,DI-07,0,
DI,右侧电器维护门关闭,RightDoorColse_Single,6,HC,0,右侧防护门关闭,X06,DI-06,0,
DI,分料机构气缸下降端,ClampingDisc_Down,7,192.168.200.11,0,分料机构气缸下降端,X08,DI-08,0,
DI,批量门关闭,DoorClose_LoadMaterial,7,HC,0,上料机构门关闭,X07,DI-07,0,
DI,料盘宽度检测1,WidthCheck1,8,192.168.200.11,0,料盘宽度检测1,X09,DI-09,0,
DI,单料门上升端,Door_Up,8,HC,0,进料口门上升端,X08,DI-08,0,
DI,料盘宽度检测2,WidthCheck2,9,192.168.200.11,0,料盘宽度检测2,X10,DI-10,0,
DI,单料门下降端,Door_Down,9,HC,0,进料口门下降端,X09,DI-09,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,10,192.168.200.11,0,料盘检测1(上料机构),X11,DI-11,0,
DI,批量门锁气缸打开端,BatchDoor_Open,10,HC,0,上料机构左门锁打开端,X10,DI-10,0,
DI,上料机构出料检测,OutCheck,11,192.168.200.11,0,上料机构出料检测,X12,DI-12,0,
DI,批量门锁气缸关闭端,BatchDoor_Close,11,HC,0,上料机构左门锁关闭端,X11,DI-11,0,
DI,批量门锁气缸打开端,BatchDoor_Open,12,192.168.200.11,0,批量门锁气缸打开端,X13,DI-13,0,
DI,批量门锁气缸打开端2,BatchDoor_Open2,12,HC,0,上料机构右门锁打开端,X12,DI-12,0,
DI,批量门锁气缸关闭端,BatchDoor_Close,13,192.168.200.11,0,批量门锁气缸关闭端,X14,DI-14,0,
DI,批量门锁气缸关闭端2,BatchDoor_Close2,13,HC,0,上料机构右门锁关闭端,X13,DI-13,0,
DI,料盘检测2(夹取机构),TrayCheck_Fixture,14,192.168.200.11,0,料盘检测2(夹取机构),X15,DI-15,0,
DI,分料机构气缸上升端,ClampingDisc_Up,14,HC,0,抓取气缸上升端,X14,DI-14,0,
,压紧机构计量检测,CompressAxis_Check,15,192.168.200.11,0,压紧机构计量检测,X16,DI-16,0,
DI,分料机构气缸下降端,ClampingDisc_Down,15,HC,0,抓取气缸下降端,X15,DI-15,0,
DO,自动指示灯,AutoRun_HddLed,0,192.168.200.11,0,自动指示灯,Y01,DO-01,0,
DI,抓取机构气缸夹紧端,Clamping_Work,16,HC,0,夹爪气缸夹紧端,X16,DI-16,0,
DO,故障指示灯,Alarm_HddLed,1,192.168.200.11,0,故障指示灯,Y02,DO-02,0,
DI,抓取机构气缸放松端,Clamping_Relax,17,HC,0,夹爪气缸放松端,X17,DI-17,0,
DO,待机指示灯,RunSign_HddLed,2,192.168.200.11,0,待机指示灯,Y03,DO-03,0,
DI,料盘宽度检测1,WidthCheck1,18,HC,0,7寸料盘检测,X18,DI-18,0,
DO,进气口打开,StartOrStopBlow,3,192.168.200.11,0,进气口打开,Y04,DO-04,0,
DI,料盘宽度检测2,WidthCheck2,19,HC,0,13寸料盘检测,X19,DI-19,0,
DO,料仓伺服电源打开,Run_Sign,4,192.168.200.11,0,料仓伺服电源打开,Y05,DO-05,0,
DI,单料门料盘检测,TrayCheck_Door,20,HC,0,进出料口料盘检测,X20,DI-20,0,
DO,轴2刹车电源打开,Axis_Brake,5,192.168.200.11,0,轴2刹车电源打开,Y06,DO-06,0,
DI,料盘检测1(上料机构),TrayCheck_LoadMaterial,21,HC,0,上料定位料盘检测,X21,DI-21,0,
DO,相机辅助光源打开,CameraLight_Power,6,192.168.200.11,0,相机辅助光源打开,Y07,DO-07,0,
DI,上料机构出料检测,OutCheck,22,HC,0,上料机构出料检测,X22,DI-22,0,
,设备照明打开,,7,192.168.200.11,0,设备照明打开,Y08,DO-08,0,
DI,料盘检测2(夹取机构),TrayCheck_Fixture,23,HC,0,料叉机构料盘检测,X23,DI-23,0,
DO,单料门上升,Door_Up,8,192.168.200.11,0,单料门上升,Y09,DO-09,0,
DO,单料门下降,Door_Down,9,192.168.200.11,0,单料门下降,Y10,DO-10,0,
DO,分料机构气缸上升,ClampingDisc_Up,10,192.168.200.11,0,分料机构气缸上升,Y11,DO-11,0,
DO,分料机构气缸下降,ClampingDisc_Down,11,192.168.200.11,0,分料机构气缸下降,Y12,DO-12,0,
DO,批量门锁气缸打开,BatchDoor_Open,12,192.168.200.11,0,批量门锁气缸打开,Y13,DO-13,0,
DO,批量门锁气缸关闭,BatchDoor_Close,13,192.168.200.11,0,批量门锁气缸关闭,Y14,DO-14,0,
DO,电气维护门警报关闭,DisableDoorControl,14,192.168.200.11,0,电气维护门警报关闭,Y15,DO-15,0,
DO,报警蜂鸣器,Buzzer_Sign,15,192.168.200.11,0,报警蜂鸣器,Y16,DO-16,0,
DI,批量门关闭,DoorClose_LoadMaterial,0,192.168.200.12,0,批量门关闭,X21,DI-21,0,
DI,气压检测,Airpressure_Check,1,192.168.200.12,0,气压检测,X22,DI-22,0,
DI,左侧电器维护门关闭,LeftDoorColse_Single,2,192.168.200.12,0,左侧电器维护门关闭,X23,DI-23,0,
DI,右侧电器维护门关闭,RightDoorColse_Single,3,192.168.200.12,0,右侧电器维护门关闭,X24,DI-24,0,
DI,批量门锁气缸打开端2,BatchDoor_Open2,4,192.168.200.12,0,批量门锁气缸打开端2,X25,DI-25,0,
DI,批量门锁气缸关闭端2,BatchDoor_Close2,5,192.168.200.12,0,批量门锁气缸关闭端2,X26,DI-26,0,
DI,轴5上极限,BatchAxis_Limit,6,192.168.200.12,0,轴5上极限,X27,DI-27,0,
DI,单料门料盘检测,TrayCheck_Door,7,192.168.200.12,0,单料门料盘检测,X28,DI-28,0,
DI,抓取机构气缸夹紧端,Clamping_Work,8,192.168.200.12,0,抓取机构气缸夹紧端,X29,DI-29,0,
DI,抓取机构气缸放松端,Clamping_Relax,9,192.168.200.12,0,抓取机构气缸放松端,X30,DI-30,0,
,分料机构气缸料盘检测,,10,192.168.200.12,0,分料机构气缸料盘检测,X31,DI-31,0,
,,,11,192.168.200.12,0,,X32,DI-32,0,
,,,12,192.168.200.12,0,,X33,DI-33,0,
,,,13,192.168.200.12,0,,X34,DI-34,0,
,,,14,192.168.200.12,0,,X35,DI-35,0,
,,,15,192.168.200.12,0,,X36,DI-36,0,
DO,分料机构气缸夹紧,Clamping_Work,0,192.168.200.12,0,分料机构气缸夹紧,Y21,DO-21,0,
DO,分料机构气缸放松,Clamping_Relax,1,192.168.200.12,0,分料机构气缸放松,Y22,DO-22,0,
,,,2,192.168.200.12,0,,Y23,DO-23,0,
,,,3,192.168.200.12,0,,Y24,DO-24,0,
,,,4,192.168.200.12,0,,Y25,DO-25,0,
,,,5,192.168.200.12,0,,Y26,DO-26,0,
,,,6,192.168.200.12,0,,Y27,DO-27,0,
,,,7,192.168.200.12,0,,Y28,DO-28,0,
,,,8,192.168.200.12,0,,Y29,DO-29,0,
,,,9,192.168.200.12,0,,Y30,DO-30,0,
,,,10,192.168.200.12,0,,Y31,DO-31,0,
,,,11,192.168.200.12,0,,Y32,DO-32,0,
,,,12,192.168.200.12,0,,Y33,DO-33,0,
,,,13,192.168.200.12,0,,Y34,DO-34,0,
,,,14,192.168.200.12,0,,Y35,DO-35,0,
,,,15,192.168.200.12,0,,Y36,DO-36,0,
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.11#16;192.168.200.12#16,,,,,, ,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.11#16;192.168.200.12#16,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM1,0,,,,,
DO,自动指示灯,AutoRun_HddLed,0,HC,0,自动指示灯,Y00,DO-00,0,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM1,0,,,,,
DO,故障指示灯,Alarm_HddLed,1,HC,0,故障指示灯,Y01,DO-01,0,
AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
DO,待机指示灯,RunSign_HddLed,2,HC,0,待机指示灯,Y02,DO-02,0,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
DO,报警蜂鸣器,Buzzer_Sign,3,HC,0,报警蜂鸣器,Y03,DO-03,0,
AXIS,(轴五)批量上下料轴,Batch_Axis,5,COM1,0,,,,,
DO,相机辅助光源打开,CameraLight_Power,4,HC,0,相机光源开启,Y04,DO-04,0,
DO,设备照明打开,Device_Led,5,HC,0,设备照明开启,Y05,DO-05,0,
DO,进气口打开,StartOrStopBlow,6,HC,0,氮气阀门开启,Y06,DO-06,0,
DO,批量门锁气缸打开,BatchDoor_Open,7,HC,0,上料机构门锁打开,Y07,DO-07,0,
DO,批量门锁气缸关闭,BatchDoor_Close,8,HC,0,上料机构门锁关闭,Y08,DO-08,0,
DO,单料门上升,Door_Up,9,HC,0,进料口门上升,Y09,DO-09,0,
DO,单料门下降,Door_Down,10,HC,0,进料口门下降,Y10,DO-10,0,
DO,分料机构气缸上升,ClampingDisc_Up,11,HC,0,抓取气缸上升,Y11,DO-11,0,
DO,分料机构气缸下降,ClampingDisc_Down,12,HC,0,抓取气缸下降,Y12,DO-12,0,
DO,分料机构气缸夹紧,Clamping_Work,13,HC,0,夹爪气缸夹紧,Y13,DO-13,0,
DO,分料机构气缸放松,Clamping_Relax,14,HC,0,夹爪气缸放松,Y14,DO-14,0,
DO,电气维护门警报关闭,DisableDoorControl,15,HC,0,门禁功能屏蔽,Y15,DO-15,0,
,,,,,,,,,,
,,,,,,,,,,
AXIS,(轴一)旋转轴,Middle_Axis,1,HC,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,HC,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,HC,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,HC,0,,,,,
AXIS,(轴五)批量上下料轴,Batch_Axis,5,HC,0,,,,,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
,,,,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,343100,,,,,,,
PRO,升降轴 仓门位置P7(人工拿走盘的位置),UpDownAxis_Door_P7,343100,,,,,,,
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
a7977d8
...
@@ -80,7 +80,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -80,7 +80,10 @@ namespace OnlineStore.DeviceLibrary
{
{
Task
.
Factory
.
StartNew
(
delegate
Task
.
Factory
.
StartNew
(
delegate
{
{
IOManager
.
instance
.
ConnectionIOList
(
Config
.
DIODeviceNameList
);
if
(!
IOManager
.
instance
.
ConnectionIOList
(
Config
.
DIODeviceNameList
))
{
return
;
}
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
int
isAuto
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
);
Thread
.
Sleep
(
300
);
Thread
.
Sleep
(
300
);
//默认三个灯都亮
//默认三个灯都亮
...
@@ -707,13 +710,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -707,13 +710,13 @@ namespace OnlineStore.DeviceLibrary
public
bool
RunAxis
(
bool
isCheck
)
public
bool
RunAxis
(
bool
isCheck
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.Run_Sign, IO_VALUE.HIGH);
Thread
.
Sleep
(
1000
);
//
Thread.Sleep(1000);
//打开所有轴
//打开所有轴
foreach
(
ConfigMoveAxis
moveAxis
in
moveAxisList
)
foreach
(
ConfigMoveAxis
moveAxis
in
moveAxisList
)
{
{
string
portName
=
moveAxis
.
DeviceName
;
string
portName
=
moveAxis
.
DeviceName
;
in
t
slvAddr
=
moveAxis
.
GetAxisValue
();
shor
t
slvAddr
=
moveAxis
.
GetAxisValue
();
ACServerManager
.
OpenPort
(
portName
);
ACServerManager
.
OpenPort
(
portName
);
Thread
.
Sleep
(
50
);
Thread
.
Sleep
(
50
);
//初始化串口
//初始化串口
...
@@ -739,7 +742,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -739,7 +742,7 @@ namespace OnlineStore.DeviceLibrary
IsIntSlvBlock
=
true
;
IsIntSlvBlock
=
true
;
if
(
ACServerManager
.
ServerOnStatus
(
Config
.
UpDown_Axis
.
DeviceName
,
Config
.
UpDown_Axis
.
GetAxisValue
()))
if
(
ACServerManager
.
ServerOnStatus
(
Config
.
UpDown_Axis
.
DeviceName
,
Config
.
UpDown_Axis
.
GetAxisValue
()))
{
{
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
HIGH
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -787,7 +790,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -787,7 +790,7 @@ namespace OnlineStore.DeviceLibrary
public
void
CloseAllAxis
()
public
void
CloseAllAxis
()
{
{
//LogUtil.info(StoreName + "关闭刹车,关闭伺服");
//LogUtil.info(StoreName + "关闭刹车,关闭伺服");
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
LogUtil
.
debug
(
StoreName
+
"关闭刹车完成,开始关闭伺服"
);
LogUtil
.
debug
(
StoreName
+
"关闭刹车完成,开始关闭伺服"
);
foreach
(
ConfigMoveAxis
axis
in
moveAxisList
)
foreach
(
ConfigMoveAxis
axis
in
moveAxisList
)
{
{
...
@@ -796,8 +799,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -796,8 +799,8 @@ namespace OnlineStore.DeviceLibrary
}
}
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
LogUtil
.
debug
(
StoreName
+
"关闭伺服完成,开始关闭Run_Sign"
);
//
LogUtil.debug(StoreName + "关闭伺服完成,开始关闭Run_Sign");
IOManager
.
IOMove
(
IO_Type
.
Run_Sign
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Run_Sign, IO_VALUE.LOW);
}
}
public
int
GetAlarmCodeByAxis
(
ConfigMoveAxis
axis
)
public
int
GetAlarmCodeByAxis
(
ConfigMoveAxis
axis
)
...
@@ -884,7 +887,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -884,7 +887,7 @@ namespace OnlineStore.DeviceLibrary
if
(
alarmType
.
Equals
(
StoreAlarmType
.
AxisAlarm
)
|
alarmType
.
Equals
(
StoreAlarmType
.
AxisMoveError
))
if
(
alarmType
.
Equals
(
StoreAlarmType
.
AxisAlarm
)
|
alarmType
.
Equals
(
StoreAlarmType
.
AxisMoveError
))
{
{
LogUtil
.
error
(
LOGGER
,
StoreName
+
"轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
"轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"
);
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
StopMove
(
true
);
StopMove
(
true
);
}
}
...
@@ -892,7 +895,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -892,7 +895,7 @@ namespace OnlineStore.DeviceLibrary
{
{
isInSuddenDown
=
true
;
isInSuddenDown
=
true
;
LogUtil
.
error
(
LOGGER
,
StoreName
+
"收到急停信号,关闭刹车,停止运动,关闭轴,打开报警灯 "
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
"收到急停信号,关闭刹车,停止运动,关闭轴,打开报警灯 "
);
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
StopMove
(
true
);
StopMove
(
true
);
storeStatus
=
StoreStatus
.
SuddenStop
;
storeStatus
=
StoreStatus
.
SuddenStop
;
...
@@ -901,7 +904,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -901,7 +904,7 @@ namespace OnlineStore.DeviceLibrary
{
{
isNoAirCheck
=
true
;
isNoAirCheck
=
true
;
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 "
);
LogUtil
.
error
(
LOGGER
,
StoreName
+
" 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 "
);
IOManager
.
IOMove
(
IO_Type
.
Axis_Brake
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StoreMove
.
EndMove
();
StoreMove
.
EndMove
();
StopMove
(
true
);
StopMove
(
true
);
storeStatus
=
StoreStatus
.
SuddenStop
;
storeStatus
=
StoreStatus
.
SuddenStop
;
...
@@ -1423,7 +1426,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1423,7 +1426,7 @@ namespace OnlineStore.DeviceLibrary
// {
// {
foreach
(
ConfigMoveAxis
axisInfo
in
moveAxisList
)
foreach
(
ConfigMoveAxis
axisInfo
in
moveAxisList
)
{
{
in
t
axis
=
axisInfo
.
GetAxisValue
();
shor
t
axis
=
axisInfo
.
GetAxisValue
();
string
deviceName
=
axisInfo
.
DeviceName
;
string
deviceName
=
axisInfo
.
DeviceName
;
AxisAlarmInfo
info
=
AxisAlarmCodeMap
[
axisInfo
.
GetNameStr
()];
AxisAlarmInfo
info
=
AxisAlarmCodeMap
[
axisInfo
.
GetNameStr
()];
...
@@ -1474,12 +1477,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1474,12 +1477,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
LOGGER
,
StoreName
+
"调用StopMove"
);
LogUtil
.
info
(
LOGGER
,
StoreName
+
"调用StopMove"
);
BatchAxisController
.
StopCheck
();
BatchAxisController
.
StopCheck
();
AxisSuddenStop
();
AxisSuddenStop
();
/*
if (IsHasCompress_Axis.Equals(false) && Config.IsHasLocationCylinder >= 1)
if (IsHasCompress_Axis.Equals(false) && Config.IsHasLocationCylinder >= 1)
{
{
//定位气缸停止
//定位气缸停止
IOManager
.
IOMove
(
IO_Type
.
LocationCylinder_Down
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
IOManager
.
IOMove
(
IO_Type
.
LocationCylinder_Up
,
IO_VALUE
.
LOW
);
//
IOManager.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
}
}
*/
// MeteringSignal.StopCheck();
// MeteringSignal.StopCheck();
AutomaticBaiting
.
StopMove
();
AutomaticBaiting
.
StopMove
();
if
(
IsCloseAxis
)
if
(
IsCloseAxis
)
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_Partial.cs
查看文件 @
a7977d8
...
@@ -12,6 +12,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -12,6 +12,7 @@ namespace OnlineStore.DeviceLibrary
{
{
partial
class
AC_SA_BoxBean
partial
class
AC_SA_BoxBean
{
{
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
#
region
自动出入库参数
#
region
自动出入库参数
/// <summary>
/// <summary>
...
@@ -1097,7 +1098,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1097,7 +1098,7 @@ namespace OnlineStore.DeviceLibrary
{
{
speed
=
Config
.
BatchAxis_SlowSpeed
*
2
;
speed
=
Config
.
BatchAxis_SlowSpeed
*
2
;
}
}
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
speed
);
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_P1
,
speed
,
Config
.
Batch_Axis
.
AddSpeed
,
Config
.
Batch_Axis
.
DelSpeed
);
OutStoreLog
(
"出库:SO_02 批量上下料轴到P1点【"
+
Config
.
BatchAxis_P1
+
"】速度【"
+
speed
+
"】 "
);
OutStoreLog
(
"出库:SO_02 批量上下料轴到P1点【"
+
Config
.
BatchAxis_P1
+
"】速度【"
+
speed
+
"】 "
);
}
}
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting.cs
查看文件 @
a7977d8
...
@@ -734,7 +734,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -734,7 +734,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P2
,
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
Config
.
Batch_Axis
,
Config
.
BatchAxis_P2
,
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
));
BatchAxisController
.
StartCheck
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
);
BatchAxisController
.
StartCheck
(
IO_Type
.
OutCheck
,
IO_VALUE
.
LOW
);
StoreManager
.
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_P2
;
StoreManager
.
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_P2
;
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_OutMaxValue
,
Config
.
BatchAxis_P2_Speed
);
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_OutMaxValue
,
Config
.
BatchAxis_P2_Speed
,
Config
.
Batch_Axis
.
AddSpeed
,
Config
.
Batch_Axis
.
DelSpeed
);
}
}
}
}
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O01_BatchAxisDown
))
else
if
(
StoreMove
.
MoveStep
.
Equals
(
StoreMoveStep
.
AUTO_O01_BatchAxisDown
))
...
@@ -772,7 +772,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -772,7 +772,8 @@ namespace OnlineStore.DeviceLibrary
//int value = ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis);
//int value = ACServerManager.GetLimitPositiveSingle(StoreManager.Config.Batch_Axis);
int
currValue
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
);
int
currValue
=
ACServerManager
.
GetActualtPosition
(
StoreManager
.
Config
.
Batch_Axis
);
int
count
=
Math
.
Abs
(
currValue
-
StoreManager
.
Config
.
BatchAxis_OutMaxValue
);
int
count
=
Math
.
Abs
(
currValue
-
StoreManager
.
Config
.
BatchAxis_OutMaxValue
);
if
(
IOManager
.
IOValue
(
IO_Type
.
BatchAxis_Limit
).
Equals
(
IO_VALUE
.
HIGH
)
||
count
<
StoreManager
.
Config
.
Batch_Axis
.
CanErrorCountMax
)
//if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH) || count < StoreManager.Config.Batch_Axis.CanErrorCountMax)
if
(
count
<
StoreManager
.
Config
.
Batch_Axis
.
CanErrorCountMax
)
{
{
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O06_WaitDI12Low
);
StoreMove
.
NextMoveStep
(
StoreMoveStep
.
AUTO_O06_WaitDI12Low
);
OutStoreLog
(
"当前坐标【"
+
currValue
+
"】已到达高点 ,等待出料检测信号关闭(最多等待10秒)"
);
OutStoreLog
(
"当前坐标【"
+
currValue
+
"】已到达高点 ,等待出料检测信号关闭(最多等待10秒)"
);
...
@@ -822,7 +823,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -822,7 +823,7 @@ namespace OnlineStore.DeviceLibrary
BatchAxisController
.
StartCheck
(
IO_Type
.
OutCheck
);
BatchAxisController
.
StartCheck
(
IO_Type
.
OutCheck
);
StoreManager
.
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_OutMaxValue
;
StoreManager
.
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxis_OutMaxValue
;
int
speed
=
Config
.
BatchAxis_SlowSpeed
;
int
speed
=
Config
.
BatchAxis_SlowSpeed
;
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_OutMaxValue
,
speed
);
ACServerManager
.
AbsMove
(
Config
.
Batch_Axis
.
DeviceName
,
Config
.
Batch_Axis
.
GetAxisValue
(),
Config
.
BatchAxis_OutMaxValue
,
speed
,
Config
.
Batch_Axis
.
AddSpeed
,
Config
.
Batch_Axis
.
DelSpeed
);
}
}
private
static
void
StopOutProcess
()
private
static
void
StopOutProcess
()
...
...
source/DeviceLibrary/acSingleStore/AutomaticBaiting_Partial.cs
查看文件 @
a7977d8
...
@@ -7,11 +7,12 @@ using System.Text;
...
@@ -7,11 +7,12 @@ using System.Text;
using
System.Threading
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
public
partial
class
AutomaticBaiting
public
partial
class
AutomaticBaiting
{
{
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
private
static
int
StartMovePosition
=
0
;
private
static
int
StartMovePosition
=
0
;
private
static
int
EndMovePosition
=
0
;
private
static
int
EndMovePosition
=
0
;
//public static int AutoAxisIsMove = 0;
//public static int AutoAxisIsMove = 0;
...
@@ -23,20 +24,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -23,20 +24,20 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
LogUtil
.
debug
(
"当前坐标:"
+
StartMovePosition
+
",批量上料轴开始匀速"
+
targetSpeed
+
"上升"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
targetPosition
,
targetSingle
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxisStop
(
moveAxis
,
targetPosition
,
targetSingle
));
BatchAxisController
.
StartCheck
(
targetSingle
);
BatchAxisController
.
StartCheck
(
targetSingle
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
}
private
static
void
ACAxisAbsMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
private
static
void
ACAxisAbsMove
(
ConfigMoveAxis
moveAxis
,
int
targetPosition
,
int
targetSpeed
)
{
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
moveAxis
.
TargetPosition
=
targetPosition
;
moveAxis
.
TargetPosition
=
targetPosition
;
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
}
private
static
void
ACAxisHomeMove
(
ConfigMoveAxis
moveAxis
)
private
static
void
ACAxisHomeMove
(
ConfigMoveAxis
moveAxis
)
{
{
moveAxis
.
TargetPosition
=
0
;
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
Name
+
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
LogUtil
.
debug
(
Name
+
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
}
}
private
static
bool
ACHomeMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
out
string
msg
)
private
static
bool
ACHomeMoveIsEnd
(
ConfigMoveAxis
moveAxis
,
out
string
msg
)
...
@@ -53,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -53,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreMove
.
CanWhileCount
>
0
)
if
(
StoreMove
.
CanWhileCount
>
0
)
{
{
LogUtil
.
error
(
Name
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
LogUtil
.
error
(
Name
+
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
StoreMove
.
CanWhileCount
--;
StoreMove
.
CanWhileCount
--;
}
}
else
else
...
@@ -68,11 +69,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -68,11 +69,12 @@ namespace OnlineStore.DeviceLibrary
}
}
return
true
;
return
true
;
}
}
/*
else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
{
{
LogUtil.error("批量轴原点返回时BatchAxis_Limit=High ,停止运动", 30);
LogUtil.error("批量轴原点返回时BatchAxis_Limit=High ,停止运动", 30);
ACServerManager
.
SuddenStop
(
StoreManager
.
Config
.
Batch_Axis
);
ACServerManager.SuddenStop(StoreManager.Config.Batch_Axis
.DeviceName, StoreManager.Config.Batch_Axis.GetAxisValue()
);
}
}
*/
return
false
;
return
false
;
}
}
private
static
void
CheckWait
()
private
static
void
CheckWait
()
...
@@ -235,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -235,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
Name
+
moveAxis
.
DisplayStr
+
"目标["
+
targetPosition
+
"]当前["
+
outCount
+
LogUtil
.
error
(
Name
+
moveAxis
.
DisplayStr
+
"目标["
+
targetPosition
+
"]当前["
+
outCount
+
"],误差过大,重新运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
"],误差过大,重新运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
SuddenStop
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
ACServerManager
.
SuddenStop
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
StoreMove
.
CanWhileCount
--;
StoreMove
.
CanWhileCount
--;
}
}
else
else
...
@@ -330,7 +332,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -330,7 +332,7 @@ namespace OnlineStore.DeviceLibrary
else
else
{
{
LogUtil
.
error
(
wait
.
ToStr
()
+
" 未收到信号且停止运动,绝对运动"
+
wait
.
TargetPosition
+
" ,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
LogUtil
.
error
(
wait
.
ToStr
()
+
" 未收到信号且停止运动,绝对运动"
+
wait
.
TargetPosition
+
" ,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
AbsMove
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
(),
wait
.
TargetPosition
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
);
ACServerManager
.
AbsMove
(
wait
.
AxisInfo
.
DeviceName
,
wait
.
AxisInfo
.
GetAxisValue
(),
wait
.
TargetPosition
,
StoreManager
.
Config
.
BatchAxis_SlowSpeed
,
wait
.
AxisInfo
.
AddSpeed
,
wait
.
AxisInfo
.
DelSpeed
);
}
}
//判断是否需要重新运动
//判断是否需要重新运动
StoreMove
.
CanWhileCount
--;
StoreMove
.
CanWhileCount
--;
...
...
source/DeviceLibrary/store/AC_Store.cs
查看文件 @
a7977d8
...
@@ -18,7 +18,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -18,7 +18,7 @@ namespace OnlineStore.DeviceLibrary
public
abstract
class
AC_Store
public
abstract
class
AC_Store
{
{
protected
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
protected
static
readonly
ILog
LOGGER
=
LogManager
.
GetLogger
(
System
.
Reflection
.
MethodBase
.
GetCurrentMethod
().
DeclaringType
);
static
AxisManager
ACServerManager
=
AxisManager
.
instance
;
public
Stopwatch
runTimeWatch
=
new
Stopwatch
();
public
Stopwatch
runTimeWatch
=
new
Stopwatch
();
/// <summary>
/// <summary>
...
@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
moveAxis
.
TargetPosition
=
0
;
moveAxis
.
TargetPosition
=
0
;
LogUtil
.
debug
(
LOGGER
,
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
LogUtil
.
debug
(
LOGGER
,
moveAxis
.
DisplayStr
+
"speed["
+
moveAxis
.
TargetSpeed
+
"]开始原点返回"
);
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
true
));
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
(
short
)
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
}
/// <summary>
/// <summary>
...
@@ -382,7 +382,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -382,7 +382,7 @@ namespace OnlineStore.DeviceLibrary
{
{
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
StoreMove
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
moveAxis
,
targetPosition
,
targetSpeed
));
moveAxis
.
TargetPosition
=
targetPosition
;
moveAxis
.
TargetPosition
=
targetPosition
;
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
}
}
/// <summary>
/// <summary>
...
@@ -392,7 +392,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -392,7 +392,7 @@ namespace OnlineStore.DeviceLibrary
{
{
msg
=
""
;
msg
=
""
;
string
deviceName
=
moveAxis
.
DeviceName
;
string
deviceName
=
moveAxis
.
DeviceName
;
in
t
axisNo
=
moveAxis
.
GetAxisValue
();
shor
t
axisNo
=
moveAxis
.
GetAxisValue
();
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
bool
isOk
=
ACServerManager
.
GetBusyStatus
(
deviceName
,
axisNo
).
Equals
(
0
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
int
outCount
=
ACServerManager
.
GetActualtPosition
(
deviceName
,
axisNo
);
...
@@ -408,7 +408,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -408,7 +408,7 @@ namespace OnlineStore.DeviceLibrary
"],误差过大,重新开始运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
"],误差过大,重新开始运动,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
SuddenStop
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
ACServerManager
.
SuddenStop
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
());
Thread
.
Sleep
(
2000
);
Thread
.
Sleep
(
2000
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
ACServerManager
.
AbsMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
targetPosition
,
targetSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
StoreMove
.
CanWhileCount
--;
StoreMove
.
CanWhileCount
--;
return
false
;
return
false
;
}
}
...
@@ -451,7 +451,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -451,7 +451,7 @@ namespace OnlineStore.DeviceLibrary
if
(
StoreMove
.
CanWhileCount
>
0
)
if
(
StoreMove
.
CanWhileCount
>
0
)
{
{
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
LogUtil
.
error
(
LOGGER
,
moveAxis
.
DisplayStr
+
"收到原点完成信号,当前位置["
+
outCount
+
"],重新回原点,剩余["
+
StoreMove
.
CanWhileCount
+
"]次"
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
);
ACServerManager
.
HomeMove
(
moveAxis
.
DeviceName
,
moveAxis
.
GetAxisValue
(),
moveAxis
.
HomeHighSpeed
,
moveAxis
.
AddSpeed
,
moveAxis
.
DelSpeed
);
StoreMove
.
CanWhileCount
--;
StoreMove
.
CanWhileCount
--;
}
}
else
else
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
a7977d8
...
@@ -174,8 +174,8 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -174,8 +174,8 @@ namespace OnlineStore.LoadCSVLibrary
/// 使用康泰克板卡表示轴编号,使用Ac伺服电机表示伺服地址
/// 使用康泰克板卡表示轴编号,使用Ac伺服电机表示伺服地址
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
private
in
t
axisValue
=
-
1
;
private
shor
t
axisValue
=
-
1
;
public
in
t
GetAxisValue
()
public
shor
t
GetAxisValue
()
{
{
if
(
ProVale
.
Equals
(
""
)
||
ProVale
.
Equals
(
"-1"
))
if
(
ProVale
.
Equals
(
""
)
||
ProVale
.
Equals
(
"-1"
))
{
{
...
...
source/LoadCVSLibrary/storeConfig/config/AUTO_SA_Config.cs
查看文件 @
a7977d8
...
@@ -605,12 +605,12 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -605,12 +605,12 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"IO_DILength"
)]
[
ConfigProAttribute
(
"IO_DILength"
,
false
)]
public
string
IO_DILength
{
get
;
set
;
}
public
string
IO_DILength
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO 模块对应的DO数量 IO_DOLength 192.168.200.10#16;192.168.200.11#4
/// PRO 模块对应的DO数量 IO_DOLength 192.168.200.10#16;192.168.200.11#4
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"IO_DOLength"
)]
[
ConfigProAttribute
(
"IO_DOLength"
,
false
)]
public
string
IO_DOLength
{
get
;
set
;
}
public
string
IO_DOLength
{
get
;
set
;
}
/// <summary>
/// <summary>
...
@@ -1007,8 +1007,8 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -1007,8 +1007,8 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList
.
Add
(
IO_Type
.
Alarm_HddLed
);
MustHaveDOList
.
Add
(
IO_Type
.
Alarm_HddLed
);
MustHaveDOList
.
Add
(
IO_Type
.
RunSign_HddLed
);
MustHaveDOList
.
Add
(
IO_Type
.
RunSign_HddLed
);
MustHaveDOList
.
Add
(
IO_Type
.
StartOrStopBlow
);
MustHaveDOList
.
Add
(
IO_Type
.
StartOrStopBlow
);
MustHaveDOList
.
Add
(
IO_Type
.
Run_Sign
);
//
MustHaveDOList.Add(IO_Type.Run_Sign);
MustHaveDOList
.
Add
(
IO_Type
.
Axis_Brake
);
//
MustHaveDOList.Add(IO_Type.Axis_Brake);
MustHaveDOList
.
Add
(
IO_Type
.
CameraLight_Power
);
MustHaveDOList
.
Add
(
IO_Type
.
CameraLight_Power
);
// MustHaveDOList.Add(IO_Type.SuckingDisc_Work);
// MustHaveDOList.Add(IO_Type.SuckingDisc_Work);
MustHaveDOList
.
Add
(
IO_Type
.
Door_Up
);
MustHaveDOList
.
Add
(
IO_Type
.
Door_Up
);
...
...
source/LoadCVSLibrary/storeConfig/config/Store_IO_Type.cs
查看文件 @
a7977d8
...
@@ -40,6 +40,140 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -40,6 +40,140 @@ namespace OnlineStore.LoadCSVLibrary
}
}
/// <summary>
/// <summary>
/// 0自动指示灯Y00DO-00
/// </summary>
public
static
string
AutoRun_HddLed
=
"AutoRun_HddLed"
;
/// <summary>
/// 1故障指示灯Y01DO-01
/// </summary>
public
static
string
Alarm_HddLed
=
"Alarm_HddLed"
;
/// <summary>
/// 2待机指示灯Y02DO-02
/// </summary>
public
static
string
RunSign_HddLed
=
"RunSign_HddLed"
;
/// <summary>
/// 3报警蜂鸣器Y03DO-03
/// </summary>
public
static
string
Buzzer_Sign
=
"Buzzer_Sign"
;
/// <summary>
/// 4相机光源开启Y04DO-04
/// </summary>
public
static
string
CameraLight_Power
=
"CameraLight_Power"
;
/// <summary>
/// 5设备照明开启Y05DO-05
/// </summary>
public
static
string
Device_Led
=
"Device_Led"
;
/// <summary>
/// 6氮气阀门开启Y06DO-06
/// </summary>
public
static
string
StartOrStopBlow
=
"StartOrStopBlow"
;
/// <summary>
/// 7上料机构门锁打开Y07DO-07
/// </summary>
public
static
string
BatchDoor_Open
=
"BatchDoor_Open"
;
/// <summary>
/// 8上料机构门锁关闭Y08DO-08
/// </summary>
public
static
string
BatchDoor_Close
=
"BatchDoor_Close"
;
/// <summary>
/// 9进料口门上升Y09DO-09
/// </summary>
public
static
string
Door_Up
=
"Door_Up"
;
/// <summary>
/// 10进料口门下降Y10DO-10
/// </summary>
public
static
string
Door_Down
=
"Door_Down"
;
/// <summary>
/// 11抓取气缸上升Y11DO-11
/// </summary>
public
static
string
ClampingDisc_Up
=
"ClampingDisc_Up"
;
/// <summary>
/// 12抓取气缸下降Y12DO-12
/// </summary>
public
static
string
ClampingDisc_Down
=
"ClampingDisc_Down"
;
/// <summary>
/// 13夹爪气缸夹紧Y13DO-13
/// </summary>
public
static
string
Clamping_Work
=
"Clamping_Work"
;
/// <summary>
/// 14夹爪气缸放松Y14DO-14
/// </summary>
public
static
string
Clamping_Relax
=
"Clamping_Relax"
;
/// <summary>
/// 15门禁功能屏蔽Y15DO-15
/// </summary>
public
static
string
DisableDoorControl
=
"DisableDoorControl"
;
/// <summary>
/// 0急停X00DI-00
/// </summary>
public
static
string
SuddenStop_BTN
=
"SuddenStop_BTN"
;
/// <summary>
/// 1复位X01DI-01
/// </summary>
public
static
string
Reset_BTN
=
"Reset_BTN"
;
/// <summary>
/// 2自动启动X02DI-02
/// </summary>
public
static
string
AutoRun_Single
=
"AutoRun_Single"
;
/// <summary>
/// 3气压检测X03DI-03
/// </summary>
public
static
string
Airpressure_Check
=
"Airpressure_Check"
;
/// <summary>
/// 4安全光栅X04DI-04
/// </summary>
public
static
string
SafetyLightCurtains
=
"SafetyLightCurtains"
;
/// <summary>
/// 5左侧防护门关闭X05DI-05
/// </summary>
public
static
string
LeftDoorColse_Single
=
"LeftDoorColse_Single"
;
/// <summary>
/// 6右侧防护门关闭X06DI-06
/// </summary>
public
static
string
RightDoorColse_Single
=
"RightDoorColse_Single"
;
/// <summary>
/// 7上料机构门关闭X07DI-07
/// </summary>
public
static
string
DoorClose_LoadMaterial
=
"DoorClose_LoadMaterial"
;
/// <summary>
/// 12上料机构右门锁打开端X12DI-12
/// </summary>
public
static
string
BatchDoor_Open2
=
"BatchDoor_Open2"
;
/// <summary>
/// 13上料机构右门锁关闭端X13DI-13
/// </summary>
public
static
string
BatchDoor_Close2
=
"BatchDoor_Close2"
;
/// <summary>
/// 187寸料盘检测X18DI-18
/// </summary>
public
static
string
WidthCheck1
=
"WidthCheck1"
;
/// <summary>
/// 1913寸料盘检测X19DI-19
/// </summary>
public
static
string
WidthCheck2
=
"WidthCheck2"
;
/// <summary>
/// 20进出料口料盘检测X20DI-20
/// </summary>
public
static
string
TrayCheck_Door
=
"TrayCheck_Door"
;
/// <summary>
/// 21上料定位料盘检测X21DI-21
/// </summary>
public
static
string
TrayCheck_LoadMaterial
=
"TrayCheck_LoadMaterial"
;
/// <summary>
/// 22上料机构出料检测X22DI-22
/// </summary>
public
static
string
OutCheck
=
"OutCheck"
;
/// <summary>
/// 23料叉机构料盘检测X23DI-23
/// </summary>
public
static
string
TrayCheck_Fixture
=
"TrayCheck_Fixture"
;
/*
/// <summary>
/// 料仓,流水线 DI。急停(料仓) SuddenStop_BTN
/// 料仓,流水线 DI。急停(料仓) SuddenStop_BTN
/// </summary>
/// </summary>
public static string SuddenStop_BTN = "SuddenStop_BTN";
public static string SuddenStop_BTN = "SuddenStop_BTN";
...
@@ -200,7 +334,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -200,7 +334,7 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// <summary>
/// DI 批量轴极限信号 BatchAxis_Limit
/// DI 批量轴极限信号 BatchAxis_Limit
/// </summary>
/// </summary>
public
static
string
BatchAxis_Limit
=
"BatchAxis_Limit"
;
//
public static string BatchAxis_Limit = "BatchAxis_Limit";
/// <summary>
/// <summary>
...
@@ -247,11 +381,13 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -247,11 +381,13 @@ namespace OnlineStore.LoadCSVLibrary
/// DO 设备照明开 Device_Led 7 192.168.200.11 0 设备照明开 Y08 DO-08
/// DO 设备照明开 Device_Led 7 192.168.200.11 0 设备照明开 Y08 DO-08
/// </summary>
/// </summary>
public static string Device_Led = "Device_Led";
public static string Device_Led = "Device_Led";
*/
/// <summary>
/// <summary>
/// DI 夹爪气缸料盘检测 Clamping_Check 10 192.168.200.12 0 夹爪气缸料盘检测 X31 DI-31
///
疑似废弃
DI 夹爪气缸料盘检测 Clamping_Check 10 192.168.200.12 0 夹爪气缸料盘检测 X31 DI-31
/// </summary>
/// </summary>
public
static
string
Clamping_Check
=
"Clamping_Check"
;
public
static
string
Clamping_Check
=
"Clamping_Check"
;
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论