Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit dafb1ec5
由
LN
编写于
2019-12-02 16:08:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
227f7be8
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
144 行增加
和
72 行删除
source/AssemblyLineClient/FrmEquipBase.cs
source/AssemblyLineClient/FrmFeedingEquip.cs
source/Common/util/LogUtil.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/model/KTK_Store.cs
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
source/AssemblyLineClient/FrmEquipBase.cs
查看文件 @
dafb1ec
...
...
@@ -104,14 +104,16 @@ namespace OnlineStore.AssemblyLine
{
try
{
if
(
equipBase
.
runStatus
>=
LineRunStatus
.
HomeMoving
)
if
(
equipBase
.
runStatus
<=
LineRunStatus
.
Wait
)
{
equipBase
.
StopRun
();
FormStatus
(
false
);
MessageBox
.
Show
(
equipBase
.
Name
+
"请先启动设备"
);
}
else
{
MessageBox
.
Show
(
equipBase
.
Name
+
"请先启动设备"
);
LogUtil
.
info
(
equipBase
.
Name
+
"点击:停止运行"
);
equipBase
.
StopRun
();
FormStatus
(
false
);
}
}
catch
(
Exception
ex
)
...
...
source/AssemblyLineClient/FrmFeedingEquip.cs
查看文件 @
dafb1ec
...
...
@@ -105,6 +105,14 @@ namespace OnlineStore.AssemblyLine
ReadIOList
();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
}
if
(
equipBean
.
runStatus
>
LineRunStatus
.
Wait
)
{
lblName
.
BackColor
=
Color
.
Green
;
}
else
{
lblName
.
BackColor
=
System
.
Drawing
.
Color
.
DodgerBlue
;
}
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
)
?
"紧急出料模块"
:
"入料模块"
;
...
...
source/Common/util/LogUtil.cs
查看文件 @
dafb1ec
...
...
@@ -95,6 +95,10 @@ namespace OnlineStore.Common
}
public
static
void
error
(
ILog
log
,
string
errorMsg
)
{
if
(
errorMsg
.
Trim
().
Equals
(
""
))
{
return
;
}
//if (!lasErrorLogList.Contains(errorMsg))
{
log
.
Error
(
errorMsg
);
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
dafb1ec
...
...
@@ -52,7 +52,14 @@ namespace OnlineStore.DeviceLibrary
{
return
;
}
if
(
alarmType
.
Equals
(
LineAlarmType
.
SuddenStop
))
{
isInSuddenDown
=
true
;
}
else
if
(
alarmType
.
Equals
(
LineAlarmType
.
NoAirCheck
))
{
isNoAirCheck
=
true
;
}
this
.
alarmType
=
alarmType
;
if
(
alarmType
.
Equals
(
LineAlarmType
.
SuddenStop
)
||
alarmType
.
Equals
(
LineAlarmType
.
NoAirCheck
))
{
...
...
@@ -276,7 +283,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
info
(
Name
+
"关闭刹车,关闭伺服"
);
IOMove
(
axis
.
Config
.
BreakOnDO
,
IO_VALUE
.
LOW
);
axis
.
Close
();
axis
.
ServoOff
();
Thread
.
Sleep
(
100
);
IOMove
(
axis
.
Config
.
ServerOnDO
,
IO_VALUE
.
LOW
);
}
...
...
@@ -344,9 +351,15 @@ namespace OnlineStore.DeviceLibrary
// LogUtil.debug(moveInfo.Name + "未检测到:IsUse_Tray_Check= " + wait.IoValue + ",直接跳过检测继续下一步");
//}
//夹紧按钮若果超过一秒钟还未收到,默认成功
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
ClampCylinder_Slack
)
&&
wait
.
IoValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
span
.
TotalMilliseconds
>
4000
)
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
ClampCylinder_Slack
)
&&
wait
.
IoValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
span
.
TotalMilliseconds
>
6000
)
{
LogInfo
(
"未检测到:ClampCylinder_Slack=HIGH,超过6秒钟,默认下一步骤"
);
wait
.
IsEnd
=
true
;
}
else
if
(
wait
.
IoType
.
Equals
(
IO_Type
.
SL_MoveCylinder_Tighten
)
&&
wait
.
IoValue
.
Equals
(
IO_VALUE
.
HIGH
)
&&
span
.
TotalMilliseconds
>
6000
)
{
LogInfo
(
"未检测到:
ClampCylinder_Slack=HIGH,超过4
秒钟,默认下一步骤"
);
LogInfo
(
"未检测到:
SL_MoveCylinder_Tighten=HIGH,超过6
秒钟,默认下一步骤"
);
wait
.
IsEnd
=
true
;
}
else
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip.cs
查看文件 @
dafb1ec
...
...
@@ -52,6 +52,11 @@ namespace OnlineStore.DeviceLibrary
AgvClient
.
Init
();
}
}
if
(
IOValue
(
IO_Type
.
SL_SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
SetWarnMsg
(
Name
+
"启动失败:急停未开"
);
return
false
;
}
if
(
RunAxis
(
true
,
BatchAxis
)
&&
RunAxis
(
true
,
UpdownAxis
))
{
mainTimer
.
Enabled
=
false
;
...
...
@@ -97,8 +102,9 @@ namespace OnlineStore.DeviceLibrary
lineStatus
=
LineStatus
.
ResetMove
;
IOMove
(
IO_Type
.
SL_HddLed
,
IO_VALUE
.
HIGH
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_01_MoveCylinder_Up
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
MoveStep
+
":上料横移机构上升,所有阻挡气缸上升"
);
LogInfo
(
MoveInfo
.
MoveType
+
":"
+
MoveInfo
.
MoveStep
+
":上料横移机构上升,
出口顶升下降,
所有阻挡气缸上升"
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
if
(
Config
.
SidesWayNum
<=
0
)
{
IOMove
(
IO_Type
.
FL_StopCylinder_Down1
,
IO_VALUE
.
LOW
);
...
...
@@ -159,14 +165,27 @@ namespace OnlineStore.DeviceLibrary
break
;
case
LineMoveStep
.
FR_04_LocationCylinder_Down
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_05_TopCylinderDown:SL1定位气缸下降SOL"
);
LogInfo
(
MoveInfo
.
MoveType
+
":FR_05_TopCylinderDown:SL1定位气缸下降SOL
,出口顶升气缸下降
"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_05_TopCylinderDown
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Up
,
IO_Type
.
SL_LocationCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
break
;
case
LineMoveStep
.
FR_05_TopCylinderDown
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_06_BatchAxisToP1:提升伺服在上升到P1点"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_06_BatchAxisToP1
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
//判断定位工位是否有料架
if
(
IOValue
(
IO_Type
.
SL_Location_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogInfo
(
MoveInfo
.
MoveType
+
":FR_06_BatchAxisToP1:定位工位有料架,提升伺服不需要到P1"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_06_BatchAxisToP1
);
// BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
}
else
{
LogInfo
(
MoveInfo
.
MoveType
+
":FR_06_BatchAxisToP1:定位工位无料架,提升伺服上升到P1点"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_06_BatchAxisToP1
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP1
,
Config
.
BatchAxis_P1Speed
);
}
break
;
case
LineMoveStep
.
FR_06_BatchAxisToP1
:
// LogInfo(MoveInfo.MoveType + ":FR_07_MoveCylinder_Up:上料横移机构上升SOL");
...
...
@@ -198,11 +217,11 @@ namespace OnlineStore.DeviceLibrary
}
break
;
case
LineMoveStep
.
FR_09_MoveCylinder_Give
:
LogInfo
(
MoveInfo
.
MoveType
+
":FR_10_OutTopCylinder_Down: 出口顶升下降SOL"
);
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FR_10_OutTopCylinder_Down
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_OutTopCylinder_Up
,
IO_Type
.
SL_OutTopCylinder_Down
);
break
;
case
LineMoveStep
.
FR_10_OutTopCylinder_Down
:
//
LogInfo(MoveInfo.MoveType + ":FR_10_OutTopCylinder_Down: 出口顶升下降SOL");
//
MoveInfo.NextMoveStep(LineMoveStep.FR_10_OutTopCylinder_Down);
//
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
//
break;
//
case LineMoveStep.FR_10_OutTopCylinder_Down:
LogInfo
(
"重置完成!"
);
runStatus
=
LineRunStatus
.
Runing
;
lineStatus
=
LineStatus
.
StoreOnline
;
...
...
@@ -220,6 +239,9 @@ namespace OnlineStore.DeviceLibrary
BatchAxisStopCheck
();
BatchAxis
.
SuddenStop
();
UpdownAxis
.
SuddenStop
();
CloseAxis
(
BatchAxis
);
CloseAxis
(
UpdownAxis
);
if
(
Config
.
SidesWayNum
<=
0
)
{
IOMove
(
IO_Type
.
FL_StopCylinder_Down1
,
IO_VALUE
.
LOW
);
...
...
@@ -254,9 +276,11 @@ namespace OnlineStore.DeviceLibrary
{
if
(
IOValue
(
IO_Type
.
SL_SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
SetWarnMsg
(
Name
+
"收到急停信号"
);
Alarm
(
LineAlarmType
.
SuddenStop
);
if
(
isInSuddenDown
.
Equals
(
false
))
{
SetWarnMsg
(
Name
+
"收到急停信号"
);
Alarm
(
LineAlarmType
.
SuddenStop
);
}
return
;
}
...
...
@@ -284,15 +308,16 @@ namespace OnlineStore.DeviceLibrary
//判断流水线打开了才可以运行
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
if
(
LineManager
.
Line
.
CanProcessLine
()
&&
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
StartCheckFixture
();
}
if
(
Config
.
IsCanOut
.
Equals
(
false
))
if
(
Config
.
IsCanOut
.
Equals
(
0
))
{
StartInStoreP
();
}
}
if
(
LineManager
.
Line
.
CanProcessLine
()
&&
SecondMoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
StartCheckFixture
();
}
IOTimeOutProcess
();
}
...
...
source/DeviceLibrary/assemblyLine/FeedingEquip_Partial.cs
查看文件 @
dafb1ec
...
...
@@ -44,7 +44,22 @@ namespace OnlineStore.DeviceLibrary
if
(
Config
.
SidesWayNum
>
0
)
{
int
num
=
TrayManager
.
GetTrayNum
(
DeviceID
);
if
(
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
num
>
0
&&
preTrayNum
.
Equals
(
num
).
Equals
(
false
)
&&
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
))
if
(
LineManager
.
Line
.
IsDebug
&&
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SW_ReelCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
NeedCurrTray
())
{
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
2
);
CheckLog
(
"托盘检测(流水线阻挡)SecondStoreMove:(MIO_06_TopCylinderUp 横移顶升气缸上 升 )"
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_06_TopCylinderUp
);
CylinderMove
(
SecondMoveInfo
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
}
else
{
preTrayNum
=
num
;
TrayManager
.
UpdateSWState
(
Config
.
SidesWayNum
,
1
);
}
}
else
if
(
IOValue
(
IO_Type
.
SW_TrayCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
num
>
0
&&
preTrayNum
.
Equals
(
num
).
Equals
(
false
)
&&
LineManager
.
Line
.
SwNoProcess
(
Config
.
SidesWayNum
))
{
//判断是否是需要的托盘
if
(
NeedCurrTray
())
...
...
@@ -496,9 +511,10 @@ namespace OnlineStore.DeviceLibrary
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_07_LocationCylinder_Up
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_08_BatchAxisToP2
);
InStoreLog
(
" FI_08_BatchAxisToP2 开始:提升轴下降到位P2"
);
InStoreLog
(
" FI_08_BatchAxisToP2 开始:提升轴下降到位P2
,定位气缸上升
"
);
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP2
,
Config
.
BatchAxis_P2Speed
);
CylinderMove
(
MoveInfo
,
IO_Type
.
SL_LocationCylinder_Down
,
IO_Type
.
SL_LocationCylinder_Up
);
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
FI_08_BatchAxisToP2
))
{
...
...
@@ -528,20 +544,20 @@ namespace OnlineStore.DeviceLibrary
if
(
IOValue
(
IO_Type
.
SL_MoveCylinder_Give
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOValue
(
IO_Type
.
SL_MoveCylinder_Take
).
Equals
(
IO_VALUE
.
LOW
))
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_13_ScanCode
);
InStoreLog
(
" FI_13_ScanCode 料盘移栽:开始扫码"
);
InStoreLog
(
" FI_13_ScanCode 料盘移栽:开始扫码
:暂时不扫码
"
);
LastCodeList
=
new
List
<
string
>();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitFeedScanCode
());
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
Task
<
List
<
string
>>
scanTask
=
Task
.
Factory
.
StartNew
(
delegate
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
());
if
(
LastCodeList
.
Count
<=
0
)
{
LastCodeList
=
CodeManager
.
CameraScan
(
Config
.
GetCameraList
());
}
return
LastCodeList
;
});
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitFeedScanCode());
//
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
//
Task<List<string>> scanTask = Task.Factory.StartNew(delegate
//
{
//
LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
//
if (LastCodeList.Count <= 0)
//
{
//
LastCodeList = CodeManager.CameraScan(Config.GetCameraList());
//
}
//
return LastCodeList;
//
});
}
else
{
...
...
@@ -766,12 +782,13 @@ namespace OnlineStore.DeviceLibrary
private
void
BatchAxisToP3
()
{
MoveInfo
.
CanWhileCount
=
0
;
MoveInfo
.
TimeOutSeconds
=
200
;
MoveInfo
.
CanWhileCount
=
3
;
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition
=
BatchAxis
.
GetAclPosition
();
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitBatchAxis
(
Config
.
Batch_Axis
,
Config
.
BatchAxisP3
,
Config
.
BatchAxis_P3Speed
));
Config
.
Batch_Axis
.
TargetPosition
=
Config
.
BatchAxisP3
;
BatchAxis
.
AbsMove
(
MoveInfo
,
Config
.
BatchAxisP3
,
Config
.
BatchAxis_P3Speed
);
BatchAxis
.
AbsMove
(
Config
.
BatchAxisP3
,
Config
.
BatchAxis_P3Speed
);
//开始检测信号
BatchAxisStartCheck
();
}
...
...
@@ -833,7 +850,7 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns>
internal
bool
NeedCurrTray
(
bool
checkAndMove
=
false
)
{
if
(
IsDebug
||
runStatus
<=
LineRunStatus
.
Wait
)
if
(
IsDebug
&&
runStatus
<=
LineRunStatus
.
Wait
)
{
return
false
;
}
...
...
@@ -862,7 +879,8 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if
(!
isFull
&&
runStatus
.
Equals
(
LineRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))
if
((
LineManager
.
Line
.
IsDebug
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
))||
(
!
isFull
&&
runStatus
.
Equals
(
LineRunStatus
.
Runing
)
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
InStore
)))
{
//入料执行中, 且需要空托盘
if
(
MoveInfo
.
MoveStep
>=
LineMoveStep
.
FI_11_MoveCylinder_Up
&&
MoveInfo
.
MoveStep
<=
LineMoveStep
.
FI_20_WaitTray
)
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
dafb1ec
...
...
@@ -212,6 +212,10 @@ namespace OnlineStore.DeviceLibrary
public
string
CanStart
()
{
if
(!
canStart
)
{
return
"启动失败:设备未初始化完成"
;
}
if
(
MoveEquipMap
==
null
)
{
return
"启动失败:未加载到移栽信息"
;
...
...
@@ -219,12 +223,7 @@ namespace OnlineStore.DeviceLibrary
if
(
IsDebug
)
{
return
""
;
}
if
(!
canStart
)
{
return
"启动失败:设备未初始化完成"
;
}
}
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
{
...
...
@@ -409,7 +408,7 @@ namespace OnlineStore.DeviceLibrary
}
if
(
alarmType
==
LineAlarmType
.
SuddenStop
||
alarmType
.
Equals
(
LineAlarmType
.
NoAirCheck
))
{
{
LogUtil
.
error
(
WarnMsg
);
StopMove
();
}
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
dafb1ec
...
...
@@ -177,20 +177,20 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
static
int
GetTrayNum
(
int
subType
)
{
string
ip
=
GetRFIP
(
subType
);
//获取盘号
RFIDData
data
=
RFIDManager
.
ReadData
(
ip
);
if
(
data
!=
null
)
{
if
(
data
.
RFType
.
Equals
(
"E"
))
{
return
data
.
Num
;
}
else
{
LogUtil
.
error
(
"读取托盘RFID["
+
subType
+
"]["
+
ip
+
"]的数据出错:"
+
data
.
ToStr
());
}
}
//
string ip = GetRFIP(subType);
//
//
获取盘号
//
RFIDData data = RFIDManager.ReadData(ip);
//
if (data != null)
//
{
//
if (data.RFType.Equals("E"))
//
{
//
return data.Num;
//
}
//
else
//
{
//
LogUtil.error("读取托盘RFID[" + subType + "][" + ip + "]的数据出错:" + data.ToStr());
//
}
//
}
return
0
;
}
public
static
RFIDData
GetShelfData
(
int
subType
)
...
...
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
dafb1ec
...
...
@@ -97,7 +97,7 @@ namespace OnlineStore.DeviceLibrary
return
true
;
}
public
void
Close
()
public
void
ServoOff
()
{
LogUtil
.
info
(
"ServoOff【"
+
AxisName
+
"】"
);
ACServerManager
.
ServoOff
(
Config
.
DeviceName
,
Config
.
GetAxisValue
());
...
...
@@ -114,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
/// 松下伺服电机运动
/// </summary>
public
void
AbsMove
(
LineMoveInfo
MoveInfo
,
int
targetPosition
,
int
targetSpeed
)
{
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitAxis
(
Config
,
targetPosition
,
targetSpeed
));
Config
.
TargetPosition
=
targetPosition
;
ACServerManager
.
AbsMove
(
Config
.
DeviceName
,
Config
.
GetAxisValue
(),
targetPosition
,
targetSpeed
);
...
...
@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
{
msg
=
" storeMoveStep="
+
MoveInfo
.
MoveStep
+
axis
.
DisplayStr
+
"目标位置["
+
targetPosition
+
"]当前位置["
+
outCount
+
"],误差过大,需要报警"
;
LogUtil
.
error
(
msg
);
LogUtil
.
error
(
msg
,
34
);
}
}
return
false
;
...
...
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
dafb1ec
...
...
@@ -33,6 +33,7 @@ namespace OnlineStore.DeviceLibrary
public
override
void
ConnectionIOList
(
List
<
string
>
DIONameList
)
{
if
(
conTimer
==
null
)
{
conTimer
=
new
System
.
Timers
.
Timer
();
...
...
@@ -42,6 +43,7 @@ namespace OnlineStore.DeviceLibrary
}
conTimer
.
Enabled
=
false
;
IoIPLIst
=
new
List
<
string
>(
DIONameList
);
conCount
=
3
;
foreach
(
string
ip
in
DIONameList
)
{
ConnectionIP
(
ip
);
...
...
@@ -69,6 +71,7 @@ namespace OnlineStore.DeviceLibrary
if
(
list
.
Count
>
0
)
{
LogUtil
.
info
(
"开始重连IO模块 ------------"
);
conCount
=
1
;
foreach
(
string
ip
in
list
)
{
ConnectionIP
(
ip
);
...
...
@@ -82,7 +85,7 @@ namespace OnlineStore.DeviceLibrary
}
isProcess
=
false
;
}
private
int
conCount
=
3
;
public
void
ConnectionIP
(
string
ioIp
)
{
AIOBOX
aioBox
=
null
;
...
...
@@ -140,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
AIOMap
.
Add
(
ioIp
,
aioBox
);
LogUtil
.
debug
(
"开始连接"
+
logName
+
",尝试重连3次"
);
for
(
int
i
=
1
;
i
<=
3
;
i
++)
for
(
int
i
=
1
;
i
<=
conCount
;
i
++)
{
bool
result
=
aioBox
.
Connect
();
if
(
result
)
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
dafb1ec
...
...
@@ -252,7 +252,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg
=
msg
;
if
(
String
.
IsNullOrEmpty
(
WarnMsg
).
Equals
(
false
))
{
LogUtil
.
error
(
Name
+
WarnMsg
);
LogUtil
.
error
(
WarnMsg
);
}
}
public
static
string
GetRunStr
(
LineStatus
ls
,
LineRunStatus
runs
)
...
...
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
查看文件 @
dafb1ec
...
...
@@ -162,7 +162,7 @@ namespace OnlineStore.LoadCSVLibrary
}
public
static
DeviceConfig
LoadConfig
(
DeviceConfig
config
)
{
LOGGER
.
Info
(
"开始读取文件:"
+
config
.
ConfigFilePath
);
LOGGER
.
Debug
(
"开始读取文件:"
+
config
.
ConfigFilePath
);
if
(
config
==
null
||
config
.
ConfigFilePath
.
Equals
(
""
))
{
return
null
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论