Commit 279e5762 renym1968

同步

1 个父辈 122c4d64
......@@ -39,7 +39,8 @@
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
......
......@@ -145,11 +145,15 @@ namespace OnlineStore.DeviceLibrary
moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis);
moveAxisList.Add(Config.InOut_Axis);
//2018-11-22
moveAxisList.Add(Config.Charging_Axis);
this.AxisAlarmCodeMap = new Dictionary<string , AxisAlarmInfo>();
this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.DeviceName, new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(Config.InOut_Axis.DeviceName, new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.DeviceName, new AxisAlarmInfo());
//add 2018-11-22
if (this.Config.Charging_Axis != null)
this.AxisAlarmCodeMap.Add(this.Config.Charging_Axis.DeviceName, new AxisAlarmInfo());
}
/// <summary>
......@@ -256,7 +260,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NewMove(StoreMoveType.StoreReset);
StoreMove.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_InOutToP1);
LogUtil.info(LOGGER, StoreName + "到待机状态,进出轴到P1,判断叉子没有料盘");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed );
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
//判断叉子没有料盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
}
......@@ -297,7 +301,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NewMove(StoreMoveType.StoreReset);
WarnMsg = "";
if (!RunAxis(true ))
if (!RunAxis(true))
////打开四个轴
//if (!OpenAllAxis())
{
......@@ -452,7 +456,7 @@ namespace OnlineStore.DeviceLibrary
{
if (IsHasCompress_Axis)
{
LogUtil.debug("压紧轴绝对运动目标位置:"+targetPosition);
LogUtil.debug("压紧轴绝对运动目标位置:" + targetPosition);
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, targetPosition, false));
ShuoKeControls.AbsMove(Config.CompressAxis_Slv, targetPosition);
Thread.Sleep(100);
......@@ -622,7 +626,7 @@ namespace OnlineStore.DeviceLibrary
public void CloseAllAxis()
{
LogUtil.info(StoreName+"关闭刹车,关闭伺服");
LogUtil.info(StoreName + "关闭刹车,关闭伺服");
KNDIOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
foreach (ConfigMoveAxis axis in moveAxisList)
{
......@@ -700,7 +704,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(LOGGER, StoreName + "轴报警,关闭刹车,停止运动,关闭轴,打开报警灯");
KNDIOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StopMove(true );
StopMove(true);
}
else if (alarmType == StoreAlarmType.SuddenStop)
{
......@@ -717,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LOGGER, StoreName + " 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 ");
KNDIOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StoreMove.EndMove();
StopMove(true );
StopMove(true);
storeStatus = StoreStatus.SuddenStop;
}
//if (alarmType != StoreAlarmType.IoSingleTimeOut)
......@@ -754,7 +758,7 @@ namespace OnlineStore.DeviceLibrary
TimerProcess();
ShowTimeLog("TimerProcess");
//检查运动轴报警
if (storeRunStatus > StoreRunStatus.Wait && (!isInSuddenDown)&&(!isNoAirCheck))
if (storeRunStatus > StoreRunStatus.Wait && (!isInSuddenDown) && (!isNoAirCheck))
{
ShowTimeLog("开始检测轴报警");
CheckAxisAlarm();
......@@ -928,7 +932,7 @@ namespace OnlineStore.DeviceLibrary
{
//取新的Io状态
IO_VALUE autoSingle = KNDIOValue(IO_Type.AutoRun_Single);
if (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun) .Equals( 1))
if (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1))
{
if (autoSingle.Equals(IO_VALUE.HIGH) && lastAutoRun.Equals(IO_VALUE.LOW))
{
......@@ -1005,7 +1009,7 @@ namespace OnlineStore.DeviceLibrary
//}
}
private object safetyInProcess="";
private object safetyInProcess = "";
/// <summary>
/// 光栅处理
/// </summary>
......@@ -1018,6 +1022,7 @@ namespace OnlineStore.DeviceLibrary
//遮挡光栅信号
if (KNDIOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW))
{
if (NeedCheckSafetyLight.Equals(1))
{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
......@@ -1036,6 +1041,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
if (NeedCheckSafetyLight.Equals(2))
{
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_10_DeviceToDoor))
......@@ -1051,6 +1057,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
catch (Exception ex)
{
LogUtil.error("光栅处理出错:" + ex.ToString());
......@@ -1059,6 +1066,8 @@ namespace OnlineStore.DeviceLibrary
{
Monitor.Exit(safetyInProcess);
}
}
}
public void TimerProcess()
......@@ -1497,9 +1506,13 @@ namespace OnlineStore.DeviceLibrary
//}
List<string> codeList = CodeManager.CameraScan();
foreach (string str in codeList)
{
message = message + "=1+0x0-7x" + height + " =" + str + spiltStr;
}
if (!outMsg.Equals(""))
{
......
......@@ -192,6 +192,7 @@ namespace OnlineStore.DeviceLibrary
NotOkMsg += "" +info.ToShowStr();
}
ShuoKeControls.GetStatus(wait.SlvAddr);
}
}
......@@ -774,6 +775,28 @@ namespace OnlineStore.DeviceLibrary
}
}
#endregion
#region 自动上料上料机构处理
public void ChargingLoad()
{
//1、上料门是否关闭
if (KNDIOValue(IO_Type.Load_DoorClose).Equals(IO_VALUE.HIGH)) //上料门关闭
{
//2、 进/料轴是否退回
//3、吸盘在最高端
if (KNDIOValue(IO_Type.Chuck_Up).Equals(IO_VALUE.HIGH))
{
}
//if (KNDIOValue(IO_Type.Load_DoorClose).Equals(IO_VALUE.HIGH))
//通过读伺服线圈信息,判断伺服在最高位置还是在最低位置
int value=ACServerManager.GetNotStatus(Config.Charging_Axis.DeviceName, Config.Charging_Axis.GetAxisValue());
//4、判断上料机构是否在最高点? 是---》无料盘 TrayCheck_Door
//5、是否检测到料盘?检测到,不运行;检测不到伺服运行
//电机运动 ACAxisMove(Config.Charging_Axis, ??, Config.Charging_Axis.TargetSpeed);
}
}
#endregion
public List<FixtureCodeInfo> waitOutStoreList = new List<FixtureCodeInfo>();
public object waitOutListLock = "";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!