You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Rs.MotionPlat.Commom;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Rs.MotionPlat.Flow
|
|
|
|
|
{
|
|
|
|
|
public enum EMachineStatus
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 未初始化
|
|
|
|
|
/// </summary>
|
|
|
|
|
NotInit,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 未回原
|
|
|
|
|
/// </summary>
|
|
|
|
|
NotHomed,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 回原中
|
|
|
|
|
/// </summary>
|
|
|
|
|
Homing,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 回零失败
|
|
|
|
|
/// </summary>
|
|
|
|
|
HomeFail,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 回原完成
|
|
|
|
|
/// </summary>
|
|
|
|
|
Homed,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 工作中
|
|
|
|
|
/// </summary>
|
|
|
|
|
Working,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 暂停
|
|
|
|
|
/// </summary>
|
|
|
|
|
Stop,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 报警中
|
|
|
|
|
/// </summary>
|
|
|
|
|
Warning,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 急停中
|
|
|
|
|
/// </summary>
|
|
|
|
|
EStop
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class MachineManage
|
|
|
|
|
{
|
|
|
|
|
private static MachineManage instace;
|
|
|
|
|
public static MachineManage Instance
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (instace == null)
|
|
|
|
|
instace = new MachineManage();
|
|
|
|
|
return instace;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private MachineManage() { }
|
|
|
|
|
|
|
|
|
|
public EMachineStatus MachineStatus = EMachineStatus.NotInit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 上下料状态(Waiting,Busying,Unloading,Error,Interrupt,)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ERunState RunState { get; set; } = ERunState.Interrupt;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备运行状态(Started,Stopped,InAlarm,EMGStop)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ERunStatus RunStatus { get; set; } = ERunStatus.Stopped;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 运行模式(Manual,Automatic)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ERunMode RunMode { get; set; } = ERunMode.Manual;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 初始化状态(Uninitialized,Initializing,Initialized)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EInitializeState InitializeState { get; set; } = EInitializeState.Uninitialized;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 物料分配模式(正常或空跑)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EAssignMode AssignMode { get; set; } = EAssignMode.Normal;
|
|
|
|
|
|
|
|
|
|
public bool NeedRestoreMove { get; set; } = false;
|
|
|
|
|
}
|
|
|
|
|
}
|