Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8f31be6a
由
LN
编写于
2019-12-02 09:20:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上料机构升降轴增加点取料位置P3
1 个父辈
0432b9cd
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
195 行增加
和
84 行删除
dll/RFID/Asa.RFID - 副本.dll
dll/RFID/Asa.RFID.dll
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
source/DeviceLibrary/LineConfig/Config_FeedingEquip_1.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_2.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/ALineManager.cs
source/DeviceLibrary/deviceLibrary/PanasonicServo/ACServerManager.cs
source/DeviceLibrary/deviceLibrary/PanasonicServo/ACServerManager_Partial.cs
source/DeviceLibrary/deviceLibrary/RFID/RFIDManager.cs
source/DeviceLibrary/model/StoreStep.cs
source/LoadCVSLibrary/storeConfig/config/FeedingEquip_Config.cs
dll/RFID/Asa.RFID - 副本.dll
0 → 100644
查看文件 @
8f31be6
此文件类型无法预览
dll/RFID/Asa.RFID.dll
查看文件 @
8f31be6
此文件类型无法预览
source/AssemblyLineClient/FrmFeedingEquip.Designer.cs
查看文件 @
8f31be6
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
8f31be6
...
...
@@ -105,9 +105,9 @@ namespace OnlineStore.AssemblyLine
ReadIOList
();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
}
lblAgvInfo
.
Text
=
"AGV-"
+
equipBean
.
Config
.
AgvInName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvInName
).
ToString
()+
"\t AGV-"
+
equipBean
.
Config
.
AgvOutName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvOutName
).
ToString
()
+
""
;
string
canOut
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
)
?
"紧急出料模块"
:
"入料模块"
;
lblAgvInfo
.
Text
=
"AGV-"
+
equipBean
.
Config
.
AgvInName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvInName
).
ToString
()
+
"\t AGV-"
+
equipBean
.
Config
.
AgvOutName
+
" 状态:"
+
AgvClient
.
GetAction
(
equipBean
.
Config
.
AgvOutName
).
ToString
()
+
""
;
string
canOut
=
equipBean
.
Config
.
IsCanOut
.
Equals
(
1
)
?
"紧急出料模块"
:
"入料模块"
;
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
)
+
"("
+
canOut
+
")"
;
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
string
text
=
""
;
...
...
@@ -123,7 +123,7 @@ namespace OnlineStore.AssemblyLine
if
(!
lblInstoreList
.
Text
.
Equals
(
text
))
{
lblInstoreList
.
Text
=
text
;
}
}
lblMoveInfo
.
Text
=
equipBean
.
GetMoveStr
();
}
catch
(
Exception
ex
)
...
...
@@ -222,7 +222,7 @@ namespace OnlineStore.AssemblyLine
lblStoreStatus
.
Text
=
KTK_Store
.
GetRunStr
(
equipBean
.
lineStatus
,
equipBean
.
runStatus
);
lblThisSta
.
Text
=
equipBean
.
WarnMsg
;
txtP1
.
Text
=
equipBean
.
Config
.
UpDownAxisP1
.
ToString
();
txtUpdownP3
.
Text
=
equipBean
.
Config
.
UpDownAxisP3
.
ToString
();
if
(
equipBean
.
Config
.
SidesWayNum
>
0
)
{
btnSwLocationCylinder
.
Visible
=
true
;
...
...
@@ -256,11 +256,11 @@ namespace OnlineStore.AssemblyLine
e
.
Graphics
.
DrawString
(
io
.
DisplayStr
,
e
.
Font
,
new
SolidBrush
(
e
.
ForeColor
),
e
.
Bounds
.
X
,
e
.
Bounds
.
Y
+
3
);
}
}
private
void
btnReadIO_Click
(
object
sender
,
EventArgs
e
)
{
ReadIOList
();
}
}
internal
override
void
FormStatus
(
bool
isStart
)
{
btnStart
.
Enabled
=
!
isStart
;
...
...
@@ -277,7 +277,7 @@ namespace OnlineStore.AssemblyLine
private
void
btnStart_Click
(
object
sender
,
EventArgs
e
)
{
StartDebug
();
}
}
private
void
btnStop_Click
(
object
sender
,
EventArgs
e
)
{
StopRun
();
...
...
@@ -371,7 +371,14 @@ namespace OnlineStore.AssemblyLine
}
private
void
btnFeedSideWayCylinder_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnFeedSideWayCylinder
,
"上料横移气缸取料端"
,
"上料横移气缸放料端"
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
if
(
equipBean
.
MoveCylineCanTakeOrGive
())
{
BtnMove
(
btnFeedSideWayCylinder
,
"上料横移气缸取料端"
,
"上料横移气缸放料端"
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
else
{
MessageBox
.
Show
(
"上料横移机构不在上升端"
,
"错误"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
}
}
private
void
btnTrayLocationCylinder_Click
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -401,7 +408,7 @@ namespace OnlineStore.AssemblyLine
int
size
=
0
;
try
{
size
=
Convert
.
ToInt32
(
cmbSizeList
.
Text
);
}
catch
(
Exception
ex
)
{
}
txtSizePosition
.
Text
=
equipBean
.
Config
.
GetUpdownPositionP2
(
size
).
ToString
();
btnMoveto
.
Text
=
size
+
"寸移栽位置 :"
;
btnMoveto
.
Text
=
size
+
"寸移栽位置
P2
:"
;
}
private
void
btnMoveto_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -409,7 +416,7 @@ namespace OnlineStore.AssemblyLine
int
position
=
FormUtil
.
GetIntValue
(
txtSizePosition
);
int
speed
=
equipBean
.
Config
.
UpdownAxis_P2Speed
;
LogUtil
.
info
(
"点击【移栽位置】,料盘高度【"
+
cmbSizeList
.
Text
+
"】 位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
LogUtil
.
info
(
"点击【移栽位置
P2
】,料盘高度【"
+
cmbSizeList
.
Text
+
"】 位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
equipBean
.
UpdownAxis
.
AbsMove
(
position
,
speed
);
}
...
...
@@ -424,7 +431,7 @@ namespace OnlineStore.AssemblyLine
private
void
btnCloseAll_Click
(
object
sender
,
EventArgs
e
)
{
{
foreach
(
Control
con
in
groupBox5
.
Controls
)
{
if
(
con
is
Button
)
...
...
@@ -440,25 +447,23 @@ namespace OnlineStore.AssemblyLine
private
void
button3_Click
(
object
sender
,
EventArgs
e
)
{
int
position
=
FormUtil
.
GetIntValue
(
txtP1
);
int
speed
=
equipBean
.
Config
.
UpdownAxis_P2Speed
;
LogUtil
.
info
(
"点击【P1点测试】, 位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
equipBean
.
UpdownAxis
.
AbsMove
(
position
,
speed
);
int
position
=
FormUtil
.
GetIntValue
(
txtP1
);
int
speed
=
equipBean
.
Config
.
UpdownAxis_P1Speed
;
LogUtil
.
info
(
"点击【移栽升降轴待机位置P1:】, 位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
equipBean
.
UpdownAxis
.
AbsMove
(
position
,
speed
);
}
private
void
btnSave_Click
(
object
sender
,
EventArgs
e
)
{
int
p1Position
=
FormUtil
.
GetIntValue
(
txtP1
);
equipBean
.
Config
.
Batch
AxisP1
=
p1Position
;
equipBean
.
Config
.
UpDown
AxisP1
=
p1Position
;
int
p3Position
=
FormUtil
.
GetIntValue
(
txtUpdownP3
);
equipBean
.
Config
.
UpDownAxisP3
=
p3Position
;
int
size
=
0
;
try
{
size
=
Convert
.
ToInt32
(
cmbSizeList
.
Text
);
}
catch
(
Exception
ex
)
{
}
int
sizePosition
=
FormUtil
.
GetIntValue
(
txtSizePosition
);
equipBean
.
Config
.
UpdateUpdownPositon
(
size
,
sizePosition
);
//equipBean.Config.UpdateUpdownBoxPositon(size, sizeBoxP);
equipBean
.
Config
.
UpdateUpdownP2
(
size
,
sizePosition
);
LineManager
.
SaveFeedingEquipConfig
(
equipBean
.
Config
);
MessageBox
.
Show
(
"保存成功!"
);
}
...
...
@@ -525,15 +530,34 @@ namespace OnlineStore.AssemblyLine
string
msg
=
""
;
if
(
LastCodeList
.
Count
>
0
)
{
foreach
(
string
str
in
LastCodeList
)
foreach
(
string
str
in
LastCodeList
)
{
msg
=
str
+
"\r\n"
;
}
}
LogUtil
.
info
(
equipBean
.
Name
+
"扫码测试结果:"
+
msg
);
LogUtil
.
info
(
equipBean
.
Name
+
"扫码测试结果:"
+
msg
);
MessageBox
.
Show
(
equipBean
.
Name
+
"扫码测试结果:"
+
msg
);
}
private
void
btnUpdownP3_Click
(
object
sender
,
EventArgs
e
)
{
int
position
=
FormUtil
.
GetIntValue
(
txtUpdownP3
);
int
speed
=
equipBean
.
Config
.
UpdownAxis_P3Speed
;
LogUtil
.
info
(
"点击【移栽升降轴取料位置P3:】, 位置【"
+
position
+
"】速度【"
+
speed
+
"】"
);
equipBean
.
UpdownAxis
.
AbsMove
(
position
,
speed
);
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
IsLoad
)
{
return
;
}
equipBean
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
equipBean
.
Name
+
"用户切换是否暂停: "
+
equipBean
.
MoveStop
);
}
}
}
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_1.csv
查看文件 @
8f31be6
...
...
@@ -23,8 +23,9 @@ PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,2,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownP2ListP2,0=180000;,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000;,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
...
...
@@ -33,6 +34,7 @@ PRO,0,移栽上下轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,
PRO,0,移栽上下轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,,,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,400,,,,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,400,,,,,
,,,,,,,,,
,,,,,,,,,
DI,0,SL1急停,SL_SuddenStop_BTN,0,PRO_AOI_IP_11,0,SL1急停,X101,X101
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_2.csv
查看文件 @
8f31be6
...
...
@@ -23,8 +23,9 @@ PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,4,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownP2ListP2,0=180000;,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000;,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
...
...
@@ -33,6 +34,7 @@ PRO,0,移栽上下轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,
PRO,0,移栽上下轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,,,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,400,,,,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,400,,,,,
,,,,,,,,,
,,,,,,,,,
DI,0,SL2急停,SL_SuddenStop_BTN,0,PRO_AOI_IP_13,0,SL2急停,X141,X141
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
查看文件 @
8f31be6
...
...
@@ -23,8 +23,9 @@ PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,6,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownP2ListP2,0=180000;,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000;,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
...
...
@@ -33,6 +34,7 @@ PRO,0,移栽上下轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,
PRO,0,移栽上下轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,,,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,400,,,,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,400,,,,,
,,,,,,,,,
,,,,,,,,,
DI,0,SL3急停,SL_SuddenStop_BTN,0,PRO_AOI_IP_15,0,SL3急停,X181,X181
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_4.csv
查看文件 @
8f31be6
...
...
@@ -23,8 +23,9 @@ PRO,0,提升上料轴P3速度,BatchAxis_P3Speed,50,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,5000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,20000,,,,,
PRO,0,移栽上下轴在移栽上下降的位置P2集合,UpDownP2ListP2,0=180000;,,,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000;,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,20000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
...
...
@@ -33,6 +34,7 @@ PRO,0,移栽上下轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,
PRO,0,移栽上下轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,
PRO,0,移栽上下轴P1速度,UpdownAxis_P1Speed,400,,,,,
PRO,0,移栽上下轴P2速度,UpdownAxis_P2Speed,400,,,,,
PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,400,,,,,
,,,,,,,,,
,,,,,,,,,
DI,0,SL4急停,SL_SuddenStop_BTN,0,PRO_AOI_IP_17,0,SL4急停,X221,X221
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
8f31be6
...
...
@@ -59,11 +59,17 @@ namespace OnlineStore.DeviceLibrary
StopMove
();
}
}
public
bool
MoveStop
=
false
;
/// <summary>
/// 运动处理
/// </summary>
protected
override
void
BusyMoveProcess
()
{
if
(
MoveStop
)
{
return
;
}
switch
(
MoveInfo
.
MoveType
)
{
case
LineMoveType
.
InStore
:
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
8f31be6
...
...
@@ -94,17 +94,17 @@ namespace OnlineStore.DeviceLibrary
ResetClearData
();
lineStatus
=
LineStatus
.
ResetMove
;
IOMove
(
IO_Type
.
SL_HddLed
,
IO_VALUE
.
HIGH
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_01_BatchAxisHome
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
MoveStep
+
":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升"
);
BatchAxis
.
HomeMove
(
MoveInfo
);
UpdownAxis
.
HomeMove
(
MoveInfo
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_01_MoveCylinder_Up
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
MoveStep
+
":上料横移机构上升,所有阻挡气缸上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
if
(
Config
.
SidesWayNum
<=
0
)
{
IOMove
(
IO_Type
.
FL_StopCylinder_Down1
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
FL_StopCylinder_Down2
,
IO_VALUE
.
LOW
);
//顶升气缸下降
CylinderMove
(
MoveInfo
,
IO_Type
.
FL_TopCylinder_Up
,
IO_Type
.
FL_TopCylinder_Down
);
}
else
if
(
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
)
}
else
if
(
LineManager
.
Line
.
runStatus
<=
LineRunStatus
.
Wait
)
{
CylinderMove
(
MoveInfo
,
IO_Type
.
SW_LocationCylinder_Up
,
IO_Type
.
SW_LocationCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SW_TopCylinder_Up
,
IO_Type
.
SW_TopCylinder_Down
);
...
...
@@ -136,7 +136,13 @@ namespace OnlineStore.DeviceLibrary
case
LineMoveStep
.
Wait
:
StartReset
();
break
;
case
LineMoveStep
.
FR_01_BatchAxisHome
:
case
LineMoveStep
.
FR_01_MoveCylinder_Up
:
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_02_BatchAxisHome
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
MoveStep
+
":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升"
);
BatchAxis
.
HomeMove
(
MoveInfo
);
UpdownAxis
.
HomeMove
(
MoveInfo
);
break
;
case
LineMoveStep
.
FR_02_BatchAxisHome
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_03_BatchAxisToP2:提升伺服下降到P2点,升降伺服上升到待机点"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_03_BatchAxisToP2
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
...
...
@@ -159,9 +165,14 @@ namespace OnlineStore.DeviceLibrary
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
break
;
case
LineMoveStep
.
FR_06_BatchAxisToP1
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_07_MoveCylinder_Up:上料横移机构上升SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_07_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
// LogInfo(MoveInfo.MoveType + ":FR_07_MoveCylinder_Up:上料横移机构上升SOL");
// MoveInfo.NextMoveStep(LineMoveStep.FR_07_MoveCylinder_Up);
// CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
// break;
//case LineMoveStep.FR_07_MoveCylinder_Up:
// LogInfo(MoveInfo.MoveType + ":FR_08_MoveCylinder_Slack:上料气缸放松SOL");
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_08_MoveCylinder_Slack
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Tighten
,
IO_Type
.
SL_MoveCylinder_Slack
);
break
;
case
LineMoveStep
.
FR_07_MoveCylinder_Up
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_08_MoveCylinder_Slack:上料气缸放松SOL"
);
...
...
@@ -169,9 +180,18 @@ namespace OnlineStore.DeviceLibrary
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Tighten
,
IO_Type
.
SL_MoveCylinder_Slack
);
break
;
case
LineMoveStep
.
FR_08_MoveCylinder_Slack
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_09_MoveCylinder_Take: 上料横移气缸取料端SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_09_MoveCylinder_Take
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
if
(
MoveCylineCanTakeOrGive
())
{
LogInfo
(
MoveInfo
.
MoveType
+
":FR_09_MoveCylinder_Take: 上料横移气缸取料端SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_09_MoveCylinder_Take
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Give
,
IO_Type
.
SL_MoveCylinder_Take
);
}
else
{
LogInfo
(
MoveInfo
.
MoveType
+
":FR_07_MoveCylinder_Up:上料横移机构上升SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_07_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
break
;
case
LineMoveStep
.
FR_09_MoveCylinder_Take
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_10_OutTopCylinder_Down: 出口顶升下降SOL"
);
...
...
@@ -331,6 +351,18 @@ namespace OnlineStore.DeviceLibrary
}
}
/// <summary>
/// 判断上料横移机构是否可以横移运动
/// </summary>
/// <returns></returns>
public
bool
MoveCylineCanTakeOrGive
()
{
if
(
IOValue
(
IO_Type
.
SL_MoveCylinder_Down
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOValue
(
IO_Type
.
SL_MoveCylinder_Up
).
Equals
(
IO_VALUE
.
HIGH
))
{
return
true
;
}
return
false
;
}
#
region
提升轴匀速上升处理
private
System
.
Timers
.
Timer
axisCheckTimer
=
null
;
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
查看文件 @
8f31be6
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/assemblymanager/ALineManager.cs
查看文件 @
8f31be6
...
...
@@ -27,9 +27,10 @@ namespace OnlineStore.DeviceLibrary
public
static
void
CheckEnum
(
Type
type
)
{
if
(
type
.
IsEnum
)
{
{
List
<
int
>
valueList
=
new
List
<
int
>();
foreach
(
int
item
in
Enum
.
GetValues
(
type
))
Array
array
=
Enum
.
GetValues
(
type
);
foreach
(
int
item
in
array
)
{
if
(
valueList
.
Contains
(
item
))
{
...
...
source/DeviceLibrary/deviceLibrary/PanasonicServo/ACServerManager.cs
查看文件 @
8f31be6
...
...
@@ -15,8 +15,8 @@ namespace OnlineStore.DeviceLibrary
public
partial
class
ACServerManager
{
public
static
bool
IsShowMsg
=
false
;
private
static
int
SleepMSendons
=
5
0
;
private
static
int
ReviceOutTimeMS
=
2
00
;
private
static
int
SleepMSendons
=
2
0
;
private
static
int
ReviceOutTimeMS
=
1
00
;
private
static
Dictionary
<
string
,
Dictionary
<
string
,
int
>>
ComAddrValue
=
new
Dictionary
<
string
,
Dictionary
<
string
,
int
>>();
private
static
string
mapObj
=
""
;
...
...
source/DeviceLibrary/deviceLibrary/PanasonicServo/ACServerManager_Partial.cs
查看文件 @
8f31be6
...
...
@@ -98,10 +98,10 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
int
timeOut
=
ReviceOutTimeMS
;
if
(
data
[
1
].
Equals
((
byte
)
10
))
{
timeOut
=
1000
;
}
//
if (data[1].Equals((byte)10))
//
{
//
timeOut = 1000;
//
}
bool
result
=
false
;
byte
[]
returnData
=
SendCommand
(
portName
,
data
,
timeOut
,
8
,
out
result
);
if
(
returnData
!=
null
)
...
...
source/DeviceLibrary/deviceLibrary/RFID/RFIDManager.cs
查看文件 @
8f31be6
...
...
@@ -86,24 +86,34 @@ namespace OnlineStore.DeviceLibrary
// rfidReader.LocalIP = "192.168.100.101";
rfidReader
.
RemoteIP
=
rfid
;
string
[]
array
=
rfid
.
Split
(
'.'
);
int
index
=
Convert
.
ToInt32
(
array
[
3
]);
bool
result
=
rfidReader
.
Connect
(
index
);
//
string[] array = rfid.Split('.');
//
int index = Convert.ToInt32(array[3]);
bool
result
=
rfidReader
.
Connect
();
if
(
result
)
{
rfidReader
.
AutoScan
(
true
);
LogUtil
.
info
(
"连接 "
+
logName
+
"
["
+
index
+
"]
成功"
);
LogUtil
.
info
(
"连接 "
+
logName
+
"成功"
);
RFReaderMap
.
Add
(
rfid
,
rfidReader
);
if
(
RfIPList
.
Contains
(
rfid
))
{
RfIPList
.
Remove
(
rfid
);
}
return
true
;
}
else
{
LogUtil
.
error
(
"连接 "
+
logName
+
"
["
+
index
+
"]
失败"
+
""
);
LogUtil
.
error
(
"连接 "
+
logName
+
"失败"
+
""
);
}
Thread
.
Sleep
(
5
);
}
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
8f31be6
...
...
@@ -470,11 +470,14 @@ namespace OnlineStore.DeviceLibrary
#
endregion
#
region
入料装置原点返回,
10000
开始
/// <summary>
/// 横移装置上升
/// </summary>
FR_01_MoveCylinder_Up
=
10001
,
/// <summary>
/// 提升伺服回原点,升降伺服回原点
/// </summary>
FR_0
1_BatchAxisHome
=
10001
,
FR_0
2_BatchAxisHome
=
10002
,
/// <summary>
/// 然后提升伺服下降到P2点,升降伺服上升到待机点
...
...
@@ -588,63 +591,77 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
FI_10_AxisUpMove
=
11010
,
/// <summary>
/// 入料取料:横移机构先上升
/// </summary>
FI_11_MoveCylinder_Up
=
11011
,
/// <summary>
/// 入料取料:上料机构到放料端
/// </summary>
FI_12_MoveCylinder_Give
=
11012
,
/// <summary>
/// 入料检测到料盘:扫码
/// </summary>
FI_13_ScanCode
=
11013
,
/// <summary>
/// 料盘移栽:有料盘:上料横移机构取料
/// </summary>
FI_1
1_MoveCylinder_Take
=
11011
,
FI_1
4_MoveCylinder_Take
=
11014
,
/// <summary>
/// 料盘移栽:
上料横移机构下降
/// 料盘移栽:
升降轴到P3
/// </summary>
FI_1
2_MoveCylinder_Down
=
11012
,
FI_1
5_UpdownAxisToP3
=
11015
,
/// <summary>
/// 料盘移栽:上料横移机构夹紧
/// </summary>
FI_1
3_MoveCylinder_Tighten
=
11013
,
FI_1
6_MoveCylinder_Tighten
=
11016
,
/// <summary>
/// 料盘移栽:上料横移机构上升,同时伺服运动到P3
/// </summary>
FI_1
4_MoveCylinder_Up
=
11014
,
FI_1
7_UpdownAxisToP1
,
/// <summary>
/// 料盘移栽:记录高度尺寸
/// </summary>
FI_1
5_SaveSize
=
11015
,
FI_1
8_SaveSize
,
/// <summary>
/// 料盘移栽: 上料横移气缸放料SOL
/// </summary>
FI_1
6_MoveCylinder_Emptying
=
11016
,
FI_1
9_MoveCylinder_Emptying
,
/// <summary>
/// 料盘移栽:等待空托盘到达,并顶升上升,定位上升
/// </summary>
FI_
17_WaitTray
=
11017
,
FI_
20_WaitTray
,
/// <summary>
/// 料盘移栽: 上料机构下降
/// </summary>
FI_
18_MoveCylinder_Down
=
11018
,
FI_
21_MoveCylinder_Down
,
/// <summary>
/// 料盘移栽: 移栽伺服下降到指定位置
/// </summary>
FI_
19_UpdownAxisToP2
=
11019
,
FI_
22_UpdownAxisToP2
,
/// <summary>
/// 料盘移栽: 上料气缸放松
/// </summary>
FI_2
0_MoveCylinder_Slack
=
11020
,
FI_2
3_MoveCylinder_Slack
,
/// <summary>
/// 料盘移栽:升降伺服到P1点
/// </summary>
FI_2
1_UpDownAxisToP1
=
11021
,
FI_2
4_UpDownAxisToP1
,
/// <summary>
/// 料盘移栽:上料横移机构上升
/// </summary>
FI_2
2_MoveCylinder_Up
=
11022
,
/// <summary>
/// 料盘移栽:上料横移机构到取料端
/// </summary>
FI_23_MoveCylinder_Take
=
11023
,
FI_2
5_MoveCylinder_Up
,
///
//
<summary>
///
//
料盘移栽:上料横移机构到取料端
///
//
</summary>
//
FI_23_MoveCylinder_Take = 11023,
...
...
source/LoadCVSLibrary/storeConfig/config/FeedingEquip_Config.cs
查看文件 @
8f31be6
...
...
@@ -135,11 +135,7 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[
ConfigProAttribute
(
"Height_ChangeValue"
,
true
)]
public
int
Height_ChangeValue
{
get
;
set
;
}
/// <summary>
/// PRO 0 提升上料轴在移栽上下降的位置 UpDownP2ListP2 0=180000
/// </summary>
[
ConfigProAttribute
(
"UpDownP2ListP2"
,
true
)]
public
string
UpDownP2ListP2
{
get
;
set
;
}
/// <summary>
...
...
@@ -153,6 +149,18 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"UpDownAxisP1"
,
true
)]
public
int
UpDownAxisP1
{
get
;
set
;
}
/// <summary>
/// PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=180000;,,,,,
/// </summary>
[
ConfigProAttribute
(
"UpDownP2List"
,
true
)]
public
string
UpDownP2List
{
get
;
set
;
}
/// <summary>
/// PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,20000,,,,,
/// </summary>
[
ConfigProAttribute
(
"UpDownAxisP3"
,
true
)]
public
int
UpDownAxisP3
{
get
;
set
;
}
/// <summary>
/// PRO 0 移栽上下轴目标速度 UpdownAxis_TargetSpeed 150
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_TargetSpeed"
,
true
)]
...
...
@@ -196,6 +204,11 @@ namespace OnlineStore.LoadCSVLibrary
public
int
UpdownAxis_P2Speed
{
get
;
set
;
}
/// <summary>
/// PRO,0,移栽上下轴P3速度,UpdownAxis_P3Speed,400,,,,,
/// </summary>
[
ConfigProAttribute
(
"UpdownAxis_P3Speed"
,
true
)]
public
int
UpdownAxis_P3Speed
{
get
;
set
;
}
/// <summary>
/// PRO,0,是否是用来出料,IsCanOut,1,,,,,
/// </summary>
[
ConfigProAttribute
(
"IsCanOut"
,
false
)]
...
...
@@ -230,7 +243,7 @@ namespace OnlineStore.LoadCSVLibrary
if
(
UpDownPositionP2Map
==
null
)
{
UpDownPositionP2Map
=
new
Dictionary
<
int
,
int
>();
string
[]
arrayList
=
UpDownP2List
P2
.
Split
(
';'
);
string
[]
arrayList
=
UpDownP2List
.
Split
(
';'
);
foreach
(
string
str
in
arrayList
)
{
string
[]
arrStr
=
str
.
Split
(
'='
);
...
...
@@ -257,7 +270,7 @@ namespace OnlineStore.LoadCSVLibrary
return
-
1
;
}
public
void
UpdateUpdownP
ositon
(
int
size
,
int
sizePosition
)
public
void
UpdateUpdownP
2
(
int
size
,
int
sizePosition
)
{
string
newPositionStr
=
""
;
if
(
UpDownPositionP2Map
.
ContainsKey
(
size
))
...
...
@@ -274,7 +287,7 @@ namespace OnlineStore.LoadCSVLibrary
newPositionStr
+=
key
+
"="
+
UpDownPositionP2Map
[
key
]
+
";"
;
}
newPositionStr
=
newPositionStr
.
Substring
(
0
,
newPositionStr
.
Length
-
1
);
UpDownP2List
P2
=
newPositionStr
;
UpDownP2List
=
newPositionStr
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论