|
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace MaiMuAOI.SysCtrl
- {
- public enum LightChannelEnum
- {
- [Description("通道1")]
- CH1 = 1,
- [Description("通道2")]
- CH2 = 2,
- [Description("通道3")]
- CH3 = 3,
- [Description("通道4")]
- CH4 = 4,
- [Description("通道5")]
- CH5 = 5,
- [Description("通道6")]
- CH6 = 6,
- }
- public enum AxisName
- {
- [Description("0-X1轴")]
- Axis0 = 0,
- [Description("1-X2轴")]
- Axis1 = 1,
- [Description("2-Y轴")]
- Axis2 = 2,
- [Description("3-Z轴")]
- Axis3 = 3,
- }
- public enum AxMoveMode
- {
- //MODE1_Abs = 0,
- //MODE2_Rel = 1,
- 绝对位置 = 0,
- 相对位置 = 1,
- }
-
- public enum MarkCam
- {
- 尺寸检测Mark,
- 缺陷检测Mark
- }
- public enum SmallAxCmdPos
- {
- 倍率0_58X = 0,
- 倍率1_0X = 4600,
- 倍率1_5X = 6700,
- 倍率2_0X = 8400,
- 倍率2_5X = 10300,
- 倍率3_0X = 11700,
- 倍率3_5X = 12800,
- 倍率4_0X = 13650,
- 倍率4_5X = 14500,
- 倍率5_0X = 15200,
- 倍率5_5X = 15900,
- 倍率6_0X = 16500,
- 倍率6_5X = 17150,
- 倍率7_0X = 17700,
- 倍率7_5X = 18650,
- }
- public enum IODirectionEnum
- {
- [Description("仅输入")]
- 输入 = 0,
- [Description("仅输出")]
- 输出 = 1,
- [Description("输入与输出")]
- 输入输出 = 2,
- }
- public enum AxisState : uint
- {
- STA_AX_DISABLE,
- STA_AX_READY,
- STA_AX_STOPPING,
- STA_AX_ERROR_STOP,
- STA_AX_HOMING,
- STA_AX_PTP_MOT,
- STA_AX_CONTI_MOT,
- STA_AX_SYNC_MOT,
- STA_AX_EXT_JOG,
- STA_AX_EXT_MPG,
- STA_AX_PAUSE,
- STA_AX_BUSY,
- STA_AX_WAIT_DI,
- STA_AX_WAIT_PTP,
- STA_AX_WAIT_VEL
- }
- public enum ScannerType
- {
- [Description("板卡相机")]
- GENTL = 0,
- [Description("网口相机")]
- CC = 1,
- }
- public enum AIEngineLibEnum
- {
- [Description("缺陷库")]
- 缺陷库 = 0,
- [Description("测量库")]
- 测量库 = 1,
- [Description("缺陷与测量库")]
- 缺陷与测量库 = 2,
- }
- public enum DefectCodeEnum
- {
- [Description("堵孔")]
- dk,
- [Description("脏污")]
- zw,
- [Description("纤维丝")]
- xws,
- [Description("钢丝异常")]
- gsyc,
- [Description("缺口")]
- qk,
- [Description("针孔")]
- zk,
- [Description("泡泡")]
- pp,
- [Description("划伤")]
- hs,
- [Description("压线")]
- yx,
- [Description("斜边")]
- xb,
- [Description("栅线")]
- sx,
- [Description("断栅")]
- ds,
- [Description("钢丝断裂")]
- gsdl,
- [Description("残胶堵孔")]
- cjdk,
- }
- public enum DefectNameEnum
- {
- 堵孔,
- 脏污,
- 纤维丝,
- 钢丝异常,
- 缺口,
- 针孔,
- 泡泡,
- 划伤,
- 压线,
- 斜边,
- 栅线,
- 断栅,
- 钢丝断裂,
- 残胶堵孔
- }
- public enum ValType
- {
- 字符串,
- 数值,
- }
-
- public enum CMDName
- {
- IO默认输出 = 0,
-
- 启动按钮 = 10,//输入+输出
- 暂停按钮 = 11,//输入+输出
- 复位按钮 = 12,//输入+输出
-
- 绿灯输出 = 15,
- 黄灯输出 = 16,
- 红灯输出 = 17,
- 日光灯输出 = 18,
-
- 蜂鸣器输出 = 20,
-
- //张力读取结束输出 = 25,//张力读取
- 张力读取 = 25,//张力读取
- 喷墨输出 = 26,
-
- 门磁告警输入 = 30,
- 喷墨告警输入 = 31,
- 厚度气缸与轴运动告警 = 34,
-
- 下料完成输出 = 35,
-
- Y轴复位输出 = 40,
- Y轴复位完成输入 = 41,
- }
- public enum DOName
- {
- 三色灯红灯 = 0,
- 三色灯绿灯 = 1,
- 三色灯黄灯 = 2,
- 三色灯蜂鸣器 = 3,
-
- 测厚气缸 = 4,
- 加紧气缸 = 5,
-
- 双手启动绿灯 = 7,
- 启动按钮绿灯 = 8,
- 复位按钮黄灯 = 9,
- 停止按钮红灯 = 10,
-
- 触发张力按钮灯 = 11,
-
- 日光灯 = 12,
-
- X1回原 = 13,
- X2回原 = 14,
-
- Y轴回原点 = 15
- }
-
- public enum DIName
- {
- 启动按钮 = 14,
- 暂停按钮 = 3,
- 复位按钮 = 2,
-
- 触发张力 = 4,
-
- 产品有无 = 5,
-
- 右夹紧缩回 = 6,
- 右夹紧伸出 = 7,
- 前夹紧缩回 = 8,
- 前夹紧伸出 = 9,
- 侧推伸出 = 0,
- 侧推缩回 = 1,
-
- 双手启动 = 10,
- 门磁 = 11,
- Y轴回原点完成 = 15
- }
- /// <summary>
- /// 数据处理方式
- /// </summary>
- public enum DataProcess
- {
- 均值,
- 最大值,
- 最小值
- }
-
- /// <summary>
- /// 数据判断方式
- /// </summary>
- public enum DataJudgment
- {
- 均值,
- 单点,
- }
-
- public enum PointTestType
- {
- Y轴方向PT值检测,
- 线宽正面,
- 反面检测,
- X轴方向PT值检测,
- 主栅连接线检测,
- 主栅宽度检测,
- 主栅间距,
- 细栅间距检测,
- 背极宽度,
- 主栅长度检测,
- Mark点横向间距,
- Mark点竖向间距,
- 鱼叉口长,
- 鱼叉口宽,
- 鱼叉口间距,
- 蜈蚣角长,
- 蜈蚣角宽,
- 分片间隔,
- 焊点长,
- 焊点宽,
- 焊点间隔,
- SP2主栅宽度
- }
-
- #region 打印数据类型
- public enum PrinterType
- {
- Label,
- Excel
- }
- public enum PrintDataEnum
- {
- [Description("检测结果")]
- Qualified,
- [Description("外观比对")]
- CompareResult,
-
- [Description("张力均值")]
- TensionValue,
- [Description("膜厚均值")]
- HeightValue,
- [Description("线宽均值")]
- LineWidthValue,
- [Description("Y-PT均值")]
- PTValue,
- [Description("X-PT均值")]
- XPTValue,
- [Description("反面线宽均值")]
- FLineWidthValue,
- [Description("主栅连接线均值")]
- MGridIntervalValue,
- [Description("主栅宽度均值")]
- MGridWidthValue,
- [Description("主栅间距均值")]
- MGridSpreadValue,
- [Description("细栅间距均值")]
- FGridSpreadValue,
- [Description("背极宽度均值")]
- BackPoleWidthValue,
- [Description("主栅长度均值")]
- MGridLengthValue,
- [Description("Mark点横向间距均值")]
- MarkXDisValue ,
- [Description("Mark点竖向间距均值")]
- MarkYDisValue ,
- [Description("鱼叉口长均值")]
- ForkLengthValue,
- [Description("鱼叉口宽均值")]
- ForkWidthValue ,
- [Description("鱼叉口间距均值")]
- ForkDisValue ,
- [Description("蜈蚣角长均值")]
- ChilopodLengthValue,
- [Description("蜈蚣角宽均值")]
- ChilopodWidthValue ,
- [Description("分片间隔均值")]
- ShardingDisValue ,
- [Description("焊点间隔均值")]
- WeldingSpotDisValue,
- [Description("焊点长均值")]
- WeldingSpotLengthValue ,
- [Description("焊点宽均值")]
- WeldingSpotWidthValue ,
-
- [Description("张力上下限")]
- TensionValueLimit,
- [Description("膜厚上下限")]
- HeightValueLimit,
- [Description("线宽上下限")]
- LineWidthValueLimit,
- [Description("Y-PT上下限")]
- PTValueLimit,
- [Description("X-PT上下限")]
- XPTValueLimit,
- [Description("反面线宽上下限")]
- FLineWidthValueLimit,
- [Description("主栅连接线上下限")]
- MGridIntervalValueLimit,
- [Description("主栅宽度上下限")]
- MGridWidthValueLimit,
- [Description("主栅间距上下限")]
- MGridSpreadValueLimit,
- [Description("细栅间距上下限")]
- FGridSpreadValueLimit,
- [Description("背极宽度上下限")]
- BackPoleWidthValueLimit,
- [Description("主栅长度上下限")]
- MGridLengthValueLimit,
- [Description("Mark点横向间距上下限")]
- MarkXDisValueLimit,
- [Description("Mark点竖向间距上下限")]
- MarkYDisValueLimit,
- [Description("鱼叉口长上下限")]
- ForkLengthValueLimit,
- [Description("鱼叉口宽上下限")]
- ForkWidthValueLimit,
- [Description("鱼叉口间距上下限")]
- ForkDisValueLimit,
- [Description("蜈蚣角长上下限")]
- ChilopodLengthValueLimit,
- [Description("蜈蚣角宽上下限")]
- ChilopodWidthValueLimit,
- [Description("分片间隔上下限")]
- ShardingDisValueLimit,
- [Description("焊点间隔上下限")]
- WeldingSpotDisValueLimit,
- [Description("焊点长上下限")]
- WeldingSpotLengthValueLimit,
- [Description("焊点宽上下限")]
- WeldingSpotWidthValueLimit,
-
- [Description("缺陷总数")]
- DefectCount,
- [Description("堵孔数量")]
- DKCount,
- [Description("脏污数量")]
- ZWCount,
- [Description("钢丝异常数量")]
- GSYCCount,
- [Description("纤维丝数量")]
- XWSCount,
- [Description("缺口数量")]
- QKCount,
- [Description("针孔数量")]
- ZKCount,
- [Description("泡泡数量")]
- PPCount,
- [Description("划伤数量")]
- HSCount,
- [Description("压线数量")]
- YXCount,
- [Description("斜边数量")]
- XBCount,
- [Description("栅线数量")]
- SXCount,
- [Description("钢丝断裂数量")]
- GSDLCount,
- [Description("残胶堵孔数量")]
- CJDKCount,
-
- [Description("检测单号")]
- DetectOrder,
- [Description("料号")]
- OrderCode,
- [Description("料号名称")]
- OrderName,
- [Description("料号批次")]
- BatchId,
- [Description("网版编码")]
- SN,
-
- [Description("检测时间")]
- Time,
- [Description("操作员")]
- OperatorName,
- }
-
- public enum PrintDataPdtEnum
- {
- [Description("检测结果")]
- Qualified,
- [Description("外观比对")]
- CompareResult,
-
- [Description("检测单号")]
- DetectOrder,
- [Description("料号")]
- OrderCode,
- [Description("料号名称")]
- OrderName,
- [Description("料号批次")]
- BatchId,
- [Description("网版编码")]
- SN,
-
- [Description("检测时间")]
- Time,
- [Description("操作员")]
- OperatorName,
- }
- static class EnumExtensions
- {
- public static string GetDescription(this Enum val)
- {
- var field = val.GetType().GetField(val.ToString());
- var customAttribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute));
- return customAttribute == null ? val.ToString() : ((DescriptionAttribute)customAttribute).Description;
- }
- }
-
- #endregion
-
- #region MES代码
- public enum MesCodeEnum
- {
- [Description("检测单号")]
- MM0001,
- [Description("料号")]
- MM0002,
- [Description("料号名称")]
- MM0003,
- [Description("网版编码")]
- MM0004,
- [Description("操作员")]
- MM0005,
- [Description("检测时间")]
- MM0006,
- [Description("料号批次")]
- MM0007,
-
-
- [Description("外观比对")]
- MM0008,
- [Description("检测结果")]
- MM0009,
-
- [Description("张力均值")]
- MM0010,
- [Description("膜厚均值")]
- MM0011,
- [Description("线宽均值")]
- MM0012,
- [Description("Y-PT均值")]
- MM0013,
- [Description("X-PT均值")]
- MM0014,
-
- [Description("主栅连接线检测(主栅间隔)")]
- MM0015,
- [Description("主栅宽度检测")]
- MM0016,
- [Description("主栅间距")]
- MM0017,
- [Description("细栅间距检测")]
- MM0018,
- [Description("背极宽度")]
- MM0019,
- [Description("主栅长度检测")]
- MM0020,
- [Description("Mark点横向间距")]
- MM0021,
- [Description("Mark点竖向间距")]
- MM0022,
- [Description("鱼叉口长")]
- MM0023,
- [Description("鱼叉口宽")]
- MM0024,
- [Description("鱼叉口间距")]
- MM0025,
- [Description("蜈蚣角长")]
- MM0026,
- [Description("蜈蚣角宽")]
- MM0027,
-
- [Description("缺陷总数")]
- MALL000,
- [Description("堵孔数量")]
- MDK000,
- [Description("脏污数量")]
- MZW000,
- [Description("钢丝异常数量")]
- MGSYC000,
- [Description("纤维丝数量")]
- MQWS000,
- [Description("缺口数量")]
- MQK000,
- [Description("针孔数量")]
- MZK000,
- [Description("泡泡数量")]
- MPP000,
- [Description("划伤数量")]
- MHS000,
- [Description("压线数量")]
- MYX000,
- [Description("斜边数量")]
- MXB000,
- [Description("栅线数量")]
- MSX000,
-
- [Description("检测单号")]
- DetectOrder,
- [Description("料号")]
- OrderCode,
- [Description("料号名称")]
- OrderName,
- [Description("料号批次")]
- BatchId,
- [Description("网版编码")]
- SN,
-
-
- }
- #endregion
- }
|