Commit 9af14a7c LN

增加父类equipBase

1 个父辈 4f262f65
...@@ -128,7 +128,7 @@ namespace OnlineStore.DUOStore ...@@ -128,7 +128,7 @@ namespace OnlineStore.DUOStore
private void ExitApp() private void ExitApp()
{ {
DialogResult result = MessageBox.Show("是否确定退出包装料料仓客户端?", "提示", MessageBoxButtons.YesNo); DialogResult result = MessageBox.Show("是否确定退出DUO料仓客户端?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes)) if (result.Equals(DialogResult.Yes))
{ {
//如果料仓还在运行状态,先关闭料仓 //如果料仓还在运行状态,先关闭料仓
...@@ -255,7 +255,7 @@ namespace OnlineStore.DUOStore ...@@ -255,7 +255,7 @@ namespace OnlineStore.DUOStore
{ {
if (store.storeRunStatus.Equals(StoreRunStatus.Wait)) if (store.storeRunStatus.Equals(StoreRunStatus.Wait))
{ {
MessageBox.Show(store.Name + "包装料料仓未启动,不需要停止"); MessageBox.Show(store.Name + "DUO料仓未启动,不需要停止");
return; return;
} }
if (store != null) if (store != null)
...@@ -270,7 +270,7 @@ namespace OnlineStore.DUOStore ...@@ -270,7 +270,7 @@ namespace OnlineStore.DUOStore
{ {
if (store.storeRunStatus.Equals(StoreRunStatus.Wait)) if (store.storeRunStatus.Equals(StoreRunStatus.Wait))
{ {
MessageBox.Show(store.Name + "包装料料仓未启动,无法复位"); MessageBox.Show(store.Name + "DUO料仓未启动,无法复位");
return; return;
} }
store.Reset(); store.Reset();
...@@ -316,7 +316,7 @@ namespace OnlineStore.DUOStore ...@@ -316,7 +316,7 @@ namespace OnlineStore.DUOStore
var prevCpuTime = TimeSpan.Zero; var prevCpuTime = TimeSpan.Zero;
foreach (Process process in processes) foreach (Process process in processes)
{ {
if (process.ProcessName.EndsWith("ACPackingStore")) if (process.ProcessName.EndsWith("DUOStore"))
{ {
sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + ", 名称:{0} 内存大小:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F); sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + ", 名称:{0} 内存大小:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F);
totalMemery += process.PrivateMemorySize64 / 1024; totalMemery += process.PrivateMemorySize64 / 1024;
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<Compile Include="duoStore\BoxBean_Partial.cs" /> <Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" /> <Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\DUOStoreBean_Partial.cs" /> <Compile Include="duoStore\DUOStoreBean_Partial.cs" />
<Compile Include="duoStore\EquipBase.cs" />
<Compile Include="duoStore\HoisterCylinder.cs" /> <Compile Include="duoStore\HoisterCylinder.cs" />
<Compile Include="duoStore\HumitureBean.cs" /> <Compile Include="duoStore\HumitureBean.cs" />
<Compile Include="duoStore\DUOStoreBean.cs" /> <Compile Include="duoStore\DUOStoreBean.cs" />
......
...@@ -287,10 +287,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -287,10 +287,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - startInStoreTime; TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
LogUtil.info(Name + " 【" + posId + "】入库结束,耗时【" + FormUtil.GetSpanStr(span) + "】"); LogUtil.info(Name + " 【" + posId + "】入库结束,耗时【" + FormUtil.GetSpanStr(span) + "】");
MoveInfo.EndMove(); MoveEndP();
storeRunStatus = StoreRunStatus.Runing;
//设备连接,入库后,BOX恢复原始状态
storeStatus = StoreStatus.StoreOnline;
AutoInout.InOutEndProcess(this, MoveType.InStore); AutoInout.InOutEndProcess(this, MoveType.InStore);
} }
...@@ -341,9 +338,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -341,9 +338,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - startInStoreTime; TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
LogUtil.info(Name + " 【" + posId + "】NG料送料结束,耗时【" + FormUtil.GetSpanStr(span) + "】"); LogUtil.info(Name + " 【" + posId + "】NG料送料结束,耗时【" + FormUtil.GetSpanStr(span) + "】");
MoveInfo.EndMove(); MoveEndP();
storeRunStatus = StoreRunStatus.Runing;
storeStatus = StoreStatus.StoreOnline;
} }
...@@ -498,12 +493,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -498,12 +493,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_GoBack) else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_GoBack)
{ {
TimeSpan span = DateTime.Now - startOutStoreTime; TimeSpan span = DateTime.Now - startOutStoreTime;
string posId = MoveInfo.MoveParam.PosID; string posId = MoveInfo.MoveParam.PosID;
storeStatus = StoreStatus.StoreOnline;
LogUtil.info(Name + " 【" + posId + "】 出库结束,耗时【" + FormUtil.GetSpanStr(span) + "】!"); LogUtil.info(Name + " 【" + posId + "】 出库结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing; MoveEndP();
AutoInout.InOutEndProcess(this, MoveType.OutStore); AutoInout.InOutEndProcess(this, MoveType.OutStore);
} }
#endregion #endregion
...@@ -550,11 +543,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -550,11 +543,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.SO_26_GoBack)) else if (MoveInfo.IsStep(StoreMoveStep.SO_26_GoBack))
{ {
TimeSpan span = DateTime.Now - startInStoreTime; TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
storeStatus = StoreStatus.StoreOnline;
LogUtil.info(Name + " 【" + posId + "】 单盘出库结束,耗时【" + FormUtil.GetSpanStr(span) + "】!"); LogUtil.info(Name + " 【" + posId + "】 单盘出库结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing; MoveEndP();
AutoInout.InOutEndProcess(this, MoveType.OutStore); AutoInout.InOutEndProcess(this, MoveType.OutStore);
} }
......
...@@ -41,7 +41,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -41,7 +41,7 @@ namespace OnlineStore.DeviceLibrary
private StoreRunStatus storerunstatus = StoreRunStatus.Wait; private StoreRunStatus storerunstatus = StoreRunStatus.Wait;
protected System.Timers.Timer mainTimer; protected System.Timers.Timer mainTimer;
protected System.Timers.Timer serverConnectTimer = new System.Timers.Timer(); protected System.Timers.Timer serverConTimer = new System.Timers.Timer();
protected System.Timers.Timer IoCheckTimer = new System.Timers.Timer(); protected System.Timers.Timer IoCheckTimer = new System.Timers.Timer();
private bool isInit = false; private bool isInit = false;
...@@ -75,33 +75,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,33 +75,7 @@ namespace OnlineStore.DeviceLibrary
public AlarmInfo alarmInfo = new AlarmInfo(); public AlarmInfo alarmInfo = new AlarmInfo();
/// <summary>
/// 记录上一次的部分IO状态,主要是急停,气压检测信号,复位信号,用来判断是否io发生改变
/// </summary>
public Dictionary<string, IO_VALUE> DILastValueMap = new Dictionary<string, IO_VALUE>();
public object lastDiListLock = "";
public void addLastDI(string type, IO_VALUE value)
{
try
{
lock (lastDiListLock)
{
if (DILastValueMap.ContainsKey(type))
{
DILastValueMap.Remove(type);
}
DILastValueMap.Add(type, value);
}
}
catch (Exception ex)
{
LogUtil.error(ex.ToString());
}
}
/// <summary> /// <summary>
/// 获取料仓运行的时间 /// 获取料仓运行的时间
/// </summary> /// </summary>
...@@ -144,7 +118,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -144,7 +118,7 @@ namespace OnlineStore.DeviceLibrary
ResetProcess(); ResetProcess();
isInPro = false; isInPro = false;
break; break;
case MoveType.StoreReset: case MoveType.Reset:
ResetProcess(); ResetProcess();
isInPro = false; isInPro = false;
break; break;
...@@ -236,10 +210,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -236,10 +210,10 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Elapsed += timersTimer_Elapsed; mainTimer.Elapsed += timersTimer_Elapsed;
mainTimer.AutoReset = true; mainTimer.AutoReset = true;
serverConnectTimer = new System.Timers.Timer(); serverConTimer = new System.Timers.Timer();
serverConnectTimer.Interval = 1000; serverConTimer.Interval = 1000;
serverConnectTimer.AutoReset = true; serverConTimer.AutoReset = true;
serverConnectTimer.Enabled = false; serverConTimer.Enabled = false;
IoCheckTimer = new System.Timers.Timer(); IoCheckTimer = new System.Timers.Timer();
IoCheckTimer.Interval = 200; IoCheckTimer.Interval = 200;
......
...@@ -113,6 +113,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -113,6 +113,20 @@ namespace OnlineStore.DeviceLibrary
{ {
return moveStep.Equals(step); return moveStep.Equals(step);
} }
public bool IsTimeOut(int timeOutSeconds = 60)
{
TimeSpan span = DateTime.Now - LastSetpTime;
if (span.TotalSeconds > timeOutSeconds)
{
return true;
}
return false;
}
public TimeSpan StepSpan()
{
TimeSpan span = DateTime.Now - LastSetpTime;
return span;
}
} }
public class WaitResultInfo public class WaitResultInfo
...@@ -377,14 +391,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -377,14 +391,6 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 重置 /// 重置
/// </summary> /// </summary>
StoreReset = 4, Reset = 4,
///// <summary>
///// 移栽装置的停止,需要先远点返回,然后停止
///// </summary>
//StopMove=5,
///// <summary>
///// 移栽检测托盘
///// </summary>
//CheckFixture=6,
} }
} }
...@@ -40,7 +40,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -40,7 +40,7 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string RC_AC_SA = "RC_AC_SA"; public static string RC_AC_SA = "RC_AC_SA";
/// <summary> /// <summary>
/// 松下伺服控制的包装料料仓 /// 松下伺服控制的DUO料仓
/// </summary> /// </summary>
public static string RC_AC_PA = "RC_AC_PA"; public static string RC_AC_PA = "RC_AC_PA";
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!