geboshi_V1/LeatherProject/LeatherApp/Enums.cs

258 lines
6.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LeatherApp
{
//public enum CurrentPTEnum
//{
// [Description("初始位")]
// InitPT = 1,
// [Description("上料位")]
// UpPT = 2,
// [Description("下料位")]
// DownPT = 3,
// [Description("运行中")]
// Moving = 4,
// [Description("打标中")]
// MakeTag = 5
//}
public enum CurrentStateEnum
{
= 0,
//等待启动 = 1,
//等待扫码 = 2,//在暂停3和运行中4时都可以等待扫码扫码后即开始等待相机照片
= 3,//解除告警->等待启动 (可复位、下料中)
//急停 = 4, //解除告警->等待复位
= 5,
//下料中 = 6, //没有暂停,完成后->等待启动
//打标中=7,//可复位、暂停、急停、下料
//结束 = 8,// 同等待启动-1
}
public enum WarningEnum
{
[Description("正常")]
Normal = 0,
[Description("低(可继续)")]
Low = 1,
[Description("严重")]
High = 2
}
public enum IODirectionEnum
{
[Description("仅输入")]
= 0,
[Description("仅输出")]
= 1,
[Description("输入与输出")]
= 2,
}
public enum AIEngineLibEnum
{
[Description("缺陷库")]
= 0,
[Description("测量库")]
= 1,
[Description("缺陷与测量库")]
= 2,
}
//public enum PowerLevelEnum
//{
// [Description("低电平")]
// 高 = 0,
// [Description("高电平")]
// 低 = 1,
//}
public enum AxisName
{
[Description("0-Axis")]
Axis0 = 0,
[Description("1-Axis")]
Axis1 = 1,
[Description("2-Axis")]
Axis2 = 2,
[Description("3-Axis")]
Axis3 = 3,
}
//[Serializable]
//[TypeConverter(typeof(ExpandableObjectConverter))]
//public class MultiAxisName
//{
// public int Axis0 { get; set; }
// public int Axis1 { get; set; }
// //public bool Axis2 { get; set; }
// //public bool Axis3 { get; set; }
//}
/// <summary>
/// 轴脉冲模式
/// </summary>
public enum AxisPulseOutMode
{
OUT_DIR = 0x1,
OUT_DIR_OUT_NEG = 0x02,
OUT_DIR_DIR_NEG = 0x04,
OUT_DIR_ALL_NEG = 0x08,
O_CW_CCW = 0x10,
CW_CCW_ALL_NEG = 0x20,
}
/// <summary>
/// 回原点方式
/// </summary>
public enum AxitHomeMode
{
MODE1_Abs = 0,
MODE2_Lmt = 1,
MODE3_Ref = 2,
MODE4_Abs_Ref = 3,
MODE5_Abs_NegRef = 4,
MODE6_Lmt_Ref = 5,
MODE7_AbsSearch = 6,
MODE8_LmtSearch = 7,
MODE9_AbsSearch_Ref = 8,
MODE10_AbsSearch_NegRef = 9,
MODE11_LmtSearch_Ref = 10,
MODE12_AbsSearchReFind = 11,
MODE13_LmtSearchReFind = 12,
MODE14_AbsSearchReFind_Ref = 13,
MODE15_AbsSearchReFind_NegRef = 14,
MODE16_LmtSearchReFind_Ref = 15,
}
public enum AxHomeDirection
{
= 0,
= 1,
}
public enum AxMoveMode
{
MODE1_Abs = 0,
MODE2_Rel = 1,
}
public enum SmallAxCmdPos
{
0_679X = 0,
0_7X = 550,
1_0X = 4780,
1_5X = 7850,
2_0X = 10500,
2_5X = 13300,
3_0X = 15360,
3_5X = 16890,
4_0X = 18230,
4_5X = 19350,
}
public enum CMDName
{
IO默认输出 = 0,
= 10,//输入+输出
= 11,//输入+输出
= 12,//输入+输出
绿 = 15,
= 16,
= 17,
= 18,
= 20,
= 25,//张力读取
//喷墨输出 = 26,
//门磁告警输入=30,
//喷墨告警输入 = 31,
//厚度气缸与轴运动告警 = 34,
= 35,
= 40,
//Y轴复位完成输入 = 41,
}
//---
//public int DKCount { get; set; }//堵孔数量
//public int ZWCount { get; set; }//脏污数量
//public int GSYCCount { get; set; }//钢丝异常数量
//public int XWSCount { get; set; }//纤维丝数量
//public int QKCount { get; set; }//缺口数量
//public int ZKCount { get; set; }//针孔数量
//public int PPCount { get; set; }//泡泡数量
//public int HSCount { get; set; }//划伤数量
//public int YXCount { get; set; }//压线数量
//public int XBCount { get; set; }//斜边数量 new
//public int SXCount { get; set; }//栅线数量 new
public enum DefectCodeEnum
{
jb,
wy,
mj,
hy,
lj,
yss,
zy,
wc,
cs,
cy,
tcy,
jt,
}
public enum DefectNameEnum
{
,
,
,
,
,
,
,
,
,
,
,
,
}
public enum ValType
{
,
,
}
public static class EnumConvert
{
public static List<Color> DefectColor = new List<Color>() { Color.Red, Color.Green, Color.DarkViolet , Color.Magenta, Color.Orange, Color.Brown,
Color.Olive, Color.PaleGreen, Color.CadetBlue,Color.Aqua,Color.YellowGreen,Color.Blue,Color.SpringGreen,Color.Fuchsia };
public static DefectNameEnum ConvertDefectCode2Name(DefectCodeEnum val)
{
int v = (int)val;
return (DefectNameEnum)v;
}
public static DefectCodeEnum ConvertDefectName2Code(DefectNameEnum val)
{
int v = (int)val;
return (DefectCodeEnum)v;
}
}
#region
public enum LightDevNameEnum
{
= 0,
= 10,
}
public enum CamerDevNameEnum
{
= 0,
= 10,
}
#endregion
}