|
|
/////////////////////////////////////////////////////////////////
|
|
|
//
|
|
|
// (C) Copyright 2013, Kenneth, Inc.
|
|
|
// All rights reserved. Confidential. Except as pursuant
|
|
|
// to a written agreement with Kenneth, this software may
|
|
|
// not be used or distributed. This software may be covered
|
|
|
// by one or more patents.
|
|
|
//
|
|
|
// 本软件为Kenneth开发,版权所有,违者必究,320325198102218110,23810511@qq.com
|
|
|
//
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Reflection;
|
|
|
using GummingCommon;
|
|
|
|
|
|
namespace GummingEntity
|
|
|
{
|
|
|
public enum FlowNodeType
|
|
|
{
|
|
|
DelayIO = 0, //吸真空打开1s
|
|
|
IO = 1,//PR手臂升降上升 1 IO
|
|
|
Axis = 2,//PR手臂回原点 2 Axis
|
|
|
RobotPut = 3,//机器人放片到位 3
|
|
|
RobotZDown = 4,//机器人Z轴微降
|
|
|
RobotBack = 5,//机器人手臂缩回
|
|
|
RobotGet = 6,//机器人取片
|
|
|
RobotGetDone = 7,//机器人取片完成
|
|
|
ExecSub = 8,//执行配方
|
|
|
ExecSubDone = 9//执行配方结束
|
|
|
}
|
|
|
|
|
|
public enum IOHigh
|
|
|
{
|
|
|
NotNeed = 0,
|
|
|
High = 1,
|
|
|
Low = 2,
|
|
|
Turn =3, //反转
|
|
|
}
|
|
|
|
|
|
public partial class HardFormulaFlowEntity
|
|
|
{
|
|
|
public int SlotIndex { get; set; }
|
|
|
public string FormulaId { get; set; }
|
|
|
public ExecuteStatusEnum Status { get; set; }
|
|
|
public List<HardFormulaCOTEntity> COTSteps { get; set; }
|
|
|
public List<HardFormulaDEVEntity> DEVSteps { get; set; }
|
|
|
public List<HardFormulaHPEntity> HPSteps { get; set; }
|
|
|
public List<HardFormulaCPEntity> CPSteps { get; set; }
|
|
|
public List<HardFormulaCAEntity> CASteps { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// HardFormulaFlow
|
|
|
/// </summary>
|
|
|
[Serializable]
|
|
|
public partial class HardFormulaFlowEntity : ViewModelBase, ICloneable
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _RecId;
|
|
|
public string RecId
|
|
|
{
|
|
|
get { return _RecId; }
|
|
|
set
|
|
|
{
|
|
|
_RecId = value;
|
|
|
OnPropertyChanged("RecId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 步骤顺序
|
|
|
/// </summary>
|
|
|
private int _StepIndex;
|
|
|
public int StepIndex
|
|
|
{
|
|
|
get { return _StepIndex; }
|
|
|
set
|
|
|
{
|
|
|
_StepIndex = value;
|
|
|
OnPropertyChanged("StepIndex");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 步骤类型
|
|
|
/// </summary>
|
|
|
private int? _StepType;
|
|
|
public int? StepType
|
|
|
{
|
|
|
get { return _StepType; }
|
|
|
set
|
|
|
{
|
|
|
_StepType = value;
|
|
|
OnPropertyChanged("StepType");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 硬件类型
|
|
|
/// </summary>
|
|
|
private int? _NodeType;
|
|
|
public int? NodeType
|
|
|
{
|
|
|
get { return _NodeType; }
|
|
|
set
|
|
|
{
|
|
|
_NodeType = value;
|
|
|
OnPropertyChanged("NodeType");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// NodeId
|
|
|
/// </summary>
|
|
|
private ushort _NodeId;
|
|
|
public ushort NodeId
|
|
|
{
|
|
|
get { return _NodeId; }
|
|
|
set
|
|
|
{
|
|
|
_NodeId = value;
|
|
|
OnPropertyChanged("NodeId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// SlotId
|
|
|
/// </summary>
|
|
|
private ushort _SlotId;
|
|
|
public ushort SlotId
|
|
|
{
|
|
|
get { return _SlotId; }
|
|
|
set
|
|
|
{
|
|
|
_SlotId = value;
|
|
|
OnPropertyChanged("SlotId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// BitNum
|
|
|
/// </summary>
|
|
|
private ushort _BitNum;
|
|
|
public ushort BitNum
|
|
|
{
|
|
|
get { return _BitNum; }
|
|
|
set
|
|
|
{
|
|
|
_BitNum = value;
|
|
|
OnPropertyChanged("BitNum");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 开关
|
|
|
/// </summary>
|
|
|
private ushort _BitValue;
|
|
|
public ushort BitValue
|
|
|
{
|
|
|
get { return _BitValue; }
|
|
|
set
|
|
|
{
|
|
|
_BitValue = value;
|
|
|
OnPropertyChanged("BitValue");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 开关延迟
|
|
|
/// </summary>
|
|
|
private int _BitDelay;
|
|
|
public int BitDelay
|
|
|
{
|
|
|
get { return _BitDelay; }
|
|
|
set
|
|
|
{
|
|
|
_BitDelay = value;
|
|
|
OnPropertyChanged("BitDelay");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 步骤编号
|
|
|
/// </summary>
|
|
|
private string _StepCode;
|
|
|
public string StepCode
|
|
|
{
|
|
|
get { return _StepCode; }
|
|
|
set
|
|
|
{
|
|
|
_StepCode = value;
|
|
|
OnPropertyChanged("StepCode");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 步骤名称
|
|
|
/// </summary>
|
|
|
private string _StepName;
|
|
|
public string StepName
|
|
|
{
|
|
|
get { return _StepName; }
|
|
|
set
|
|
|
{
|
|
|
_StepName = value;
|
|
|
OnPropertyChanged("StepName");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 工位编号
|
|
|
/// </summary>
|
|
|
private string _StationCode;
|
|
|
public string StationCode
|
|
|
{
|
|
|
get { return _StationCode; }
|
|
|
set
|
|
|
{
|
|
|
_StationCode = value;
|
|
|
OnPropertyChanged("StationCode");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 准备动作
|
|
|
/// </summary>
|
|
|
private bool _IsPrepare;
|
|
|
public bool IsPrepare
|
|
|
{
|
|
|
get { return _IsPrepare; }
|
|
|
set
|
|
|
{
|
|
|
_IsPrepare = value;
|
|
|
OnPropertyChanged("IsPrepare");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 取片准备动作
|
|
|
/// </summary>
|
|
|
private bool _GetPrepare;
|
|
|
public bool GetPrepare
|
|
|
{
|
|
|
get { return _GetPrepare; }
|
|
|
set
|
|
|
{
|
|
|
_GetPrepare = value;
|
|
|
OnPropertyChanged("GetPrepare");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 是否高位
|
|
|
/// </summary>
|
|
|
private int _IsHigh;
|
|
|
public int IsHigh
|
|
|
{
|
|
|
get { return _IsHigh; }
|
|
|
set
|
|
|
{
|
|
|
_IsHigh = value;
|
|
|
OnPropertyChanged("IsHigh");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 高位输入
|
|
|
/// </summary>
|
|
|
private string _RefPortHigh;
|
|
|
public string RefPortHigh
|
|
|
{
|
|
|
get { return _RefPortHigh; }
|
|
|
set
|
|
|
{
|
|
|
_RefPortHigh = value;
|
|
|
OnPropertyChanged("RefPortHigh");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 低位输入
|
|
|
/// </summary>
|
|
|
private string _RefPortLow;
|
|
|
public string RefPortLow
|
|
|
{
|
|
|
get { return _RefPortLow; }
|
|
|
set
|
|
|
{
|
|
|
_RefPortLow = value;
|
|
|
OnPropertyChanged("RefPortLow");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private int? _OrderBy;
|
|
|
public int? OrderBy
|
|
|
{
|
|
|
get { return _OrderBy; }
|
|
|
set
|
|
|
{
|
|
|
_OrderBy = value;
|
|
|
OnPropertyChanged("OrderBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _CreateBy;
|
|
|
public string CreateBy
|
|
|
{
|
|
|
get { return _CreateBy; }
|
|
|
set
|
|
|
{
|
|
|
_CreateBy = value;
|
|
|
OnPropertyChanged("CreateBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private DateTime? _CreateTime;
|
|
|
public DateTime? CreateTime
|
|
|
{
|
|
|
get { return _CreateTime; }
|
|
|
set
|
|
|
{
|
|
|
_CreateTime = value;
|
|
|
OnPropertyChanged("CreateTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _ModifyBy;
|
|
|
public string ModifyBy
|
|
|
{
|
|
|
get { return _ModifyBy; }
|
|
|
set
|
|
|
{
|
|
|
_ModifyBy = value;
|
|
|
OnPropertyChanged("ModifyBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private DateTime? _ModifyTime;
|
|
|
public DateTime? ModifyTime
|
|
|
{
|
|
|
get { return _ModifyTime; }
|
|
|
set
|
|
|
{
|
|
|
_ModifyTime = value;
|
|
|
OnPropertyChanged("ModifyTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private int? _IsActive;
|
|
|
public int? IsActive
|
|
|
{
|
|
|
get { return _IsActive; }
|
|
|
set
|
|
|
{
|
|
|
_IsActive = value;
|
|
|
OnPropertyChanged("IsActive");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public object Clone()
|
|
|
{
|
|
|
HardFormulaFlowEntity obj = new HardFormulaFlowEntity();
|
|
|
Type t = this.GetType();
|
|
|
PropertyInfo[] properties = t.GetProperties();
|
|
|
foreach (PropertyInfo pi in properties)
|
|
|
{
|
|
|
if (pi.CanWrite)
|
|
|
{
|
|
|
object value = pi.GetValue(this, null);
|
|
|
if (obj.GetType().GetProperty(pi.Name) != null)
|
|
|
{
|
|
|
pi.SetValue(obj, value, null);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return obj;
|
|
|
}
|
|
|
}
|
|
|
} |