Commit 9af14a7c LN

增加父类equipBase

1 个父辈 4f262f65
......@@ -128,7 +128,7 @@ namespace OnlineStore.DUOStore
private void ExitApp()
{
DialogResult result = MessageBox.Show("是否确定退出包装料料仓客户端?", "提示", MessageBoxButtons.YesNo);
DialogResult result = MessageBox.Show("是否确定退出DUO料仓客户端?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
//如果料仓还在运行状态,先关闭料仓
......@@ -255,7 +255,7 @@ namespace OnlineStore.DUOStore
{
if (store.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(store.Name + "包装料料仓未启动,不需要停止");
MessageBox.Show(store.Name + "DUO料仓未启动,不需要停止");
return;
}
if (store != null)
......@@ -270,7 +270,7 @@ namespace OnlineStore.DUOStore
{
if (store.storeRunStatus.Equals(StoreRunStatus.Wait))
{
MessageBox.Show(store.Name + "包装料料仓未启动,无法复位");
MessageBox.Show(store.Name + "DUO料仓未启动,无法复位");
return;
}
store.Reset();
......@@ -316,7 +316,7 @@ namespace OnlineStore.DUOStore
var prevCpuTime = TimeSpan.Zero;
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);
totalMemery += process.PrivateMemorySize64 / 1024;
......
......@@ -79,6 +79,7 @@
<Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\DUOStoreBean_Partial.cs" />
<Compile Include="duoStore\EquipBase.cs" />
<Compile Include="duoStore\HoisterCylinder.cs" />
<Compile Include="duoStore\HumitureBean.cs" />
<Compile Include="duoStore\DUOStoreBean.cs" />
......
......@@ -287,10 +287,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
LogUtil.info(Name + " 【" + posId + "】入库结束,耗时【" + FormUtil.GetSpanStr(span) + "】");
MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing;
//设备连接,入库后,BOX恢复原始状态
storeStatus = StoreStatus.StoreOnline;
MoveEndP();
AutoInout.InOutEndProcess(this, MoveType.InStore);
}
......@@ -341,9 +338,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
LogUtil.info(Name + " 【" + posId + "】NG料送料结束,耗时【" + FormUtil.GetSpanStr(span) + "】");
MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing;
storeStatus = StoreStatus.StoreOnline;
MoveEndP();
}
......@@ -498,12 +493,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_GoBack)
{
TimeSpan span = DateTime.Now - startOutStoreTime;
string posId = MoveInfo.MoveParam.PosID;
storeStatus = StoreStatus.StoreOnline;
string posId = MoveInfo.MoveParam.PosID;
LogUtil.info(Name + " 【" + posId + "】 出库结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing;
MoveEndP();
AutoInout.InOutEndProcess(this, MoveType.OutStore);
}
#endregion
......@@ -550,11 +543,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.SO_26_GoBack))
{
TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
storeStatus = StoreStatus.StoreOnline;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
LogUtil.info(Name + " 【" + posId + "】 单盘出库结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing;
MoveEndP();
AutoInout.InOutEndProcess(this, MoveType.OutStore);
}
......
......@@ -41,7 +41,7 @@ namespace OnlineStore.DeviceLibrary
private StoreRunStatus storerunstatus = StoreRunStatus.Wait;
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();
private bool isInit = false;
......@@ -75,33 +75,7 @@ namespace OnlineStore.DeviceLibrary
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>
......@@ -144,7 +118,7 @@ namespace OnlineStore.DeviceLibrary
ResetProcess();
isInPro = false;
break;
case MoveType.StoreReset:
case MoveType.Reset:
ResetProcess();
isInPro = false;
break;
......@@ -236,10 +210,10 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Elapsed += timersTimer_Elapsed;
mainTimer.AutoReset = true;
serverConnectTimer = new System.Timers.Timer();
serverConnectTimer.Interval = 1000;
serverConnectTimer.AutoReset = true;
serverConnectTimer.Enabled = false;
serverConTimer = new System.Timers.Timer();
serverConTimer.Interval = 1000;
serverConTimer.AutoReset = true;
serverConTimer.Enabled = false;
IoCheckTimer = new System.Timers.Timer();
IoCheckTimer.Interval = 200;
......
......@@ -113,6 +113,20 @@ namespace OnlineStore.DeviceLibrary
{
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
......@@ -377,14 +391,6 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 重置
/// </summary>
StoreReset = 4,
///// <summary>
///// 移栽装置的停止,需要先远点返回,然后停止
///// </summary>
//StopMove=5,
///// <summary>
///// 移栽检测托盘
///// </summary>
//CheckFixture=6,
Reset = 4,
}
}
......@@ -40,7 +40,7 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public static string RC_AC_SA = "RC_AC_SA";
/// <summary>
/// 松下伺服控制的包装料料仓
/// 松下伺服控制的DUO料仓
/// </summary>
public static string RC_AC_PA = "RC_AC_PA";
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!