using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DH.Commons.Enums { public enum ModelType { 图像分类 = 1, 目标检测 = 2, 语义分割 = 3, 实例分割 = 4, 目标检测GPU = 5 } public enum SelectPicType { [Description("训练图片")] train = 0, [Description("测试图片")] test } public enum NetModel { [Description("目标检测")] training = 0, [Description("语义分割")] train_seg, [Description("模型导出")] emport, [Description("推理预测")] infernce } public enum EnumCamType { [Description("度申相机")] 度申Do3think = 0, [Description("海康相机")] 海康hik , } public enum EnumPLCType { [Description("信捷XC串口")] 信捷XC串口 = 0, [Description("信捷XC网口")] 信捷XC网口 = 1, [Description("信捷XD串口")] 信捷XD串口 = 2, [Description("信捷XD网口")] 信捷XD网口 = 3 } public enum EnumPLCInputIO { 启动=0, 复位=1, 停止=2, 急停=3 } public enum EnumPLCOutputIO { 转盘方向=0, 转盘速度, 转盘使能, 转盘启动, 转盘清料, 指示灯绿, 指示灯黄, 指示灯红, 蜂鸣器, 振动盘, 皮带, 工位1, 工位2, 工位3, 工位4, 工位5, 工位6 , 工位7 , 工位8 , 工位9 , 工位10 , OK料盒 , NG料盒, OK吹气时间, NG吹气时间, 产品计数, 计数清零, 工件最小值, 工件最大值, 启用心跳, 心跳地址, 挡料电机回原点, 挡料电机回原点速度, 挡料电机速度, 挡料电机顺时针, 挡料电机逆时针, 挡料电机位置, OK脉冲, NG脉冲, } public enum EnumPLCDataType { HD, D, M } public enum EnumPLCINTType { 单字16位, 单字32位, 双字16位, 双字32位 } public enum StreamFormat { [Description("8位图像")] S_RAW8 = 0, [Description("10位图像")] S_RAW10 = 1, [Description("12位图像")] S_RAW12 = 2, [Description("14位图像")] S_RAW14 = 3, [Description("16位图像")] S_RAW16 = 4, [Description("BGR三通道24比特图像")] S_BGR24 = 10, [Description("BGRA四通道32比特图像")] S_BGR32 = 11, [Description("BGRA四通道48比特图像")] S_BGR48 = 12, [Description("BGRA四通道64比特图像")] S_BGR64 = 13, [Description("RGB三通道24比特图像")] S_RGB24 = 14, [Description("RGBA四通道32比特图像")] S_RGB32 = 15, [Description("RGBA四通道48比特图像")] S_RGB48 = 16, [Description("RGBA四通道64比特图像")] S_RGB64 = 17, [Description("YUV411")] S_YCBCR_411 = 20, [Description("YUV422")] S_YCBCR_422 = 21, [Description("YUV444")] S_YCBCR_444 = 22, [Description("8位灰度图像")] S_MONO8 = 30, [Description("10位灰度图像")] S_MONO10 = 31, [Description("12位灰度图像")] S_MONO12 = 32, [Description("14位灰度图像")] S_MONO14 = 33, [Description("16位灰度图像")] S_MONO16 = 34, S_B8_G8_R8 = 40, S_B16_G16_R16 = 44 } /// /// 主板型号 /// public enum BoardModelEnum { EC3216 = 0, EC3224, EC3416, } /// /// 扩展板类型 /// public enum ExtensionBoardEnum { [Description("未外接扩展板")] None, [Description("一个IO扩展板")] ExtIO_1, [Description("一个EC3216扩展板")] ExtEC3216_1, [Description("一个EC3224扩展板")] ExtEC3224_1, [Description("一个EC3416扩展板")] ExtEC3416_1, } /// /// 转盘类型 /// public enum MachineDiskType { [Description("单转盘")] SingleDisk = 1, [Description("双转盘")] DoubleDisk = 2, } /// /// 运动板卡 IO 类型(IN OUT) /// public enum IOType { [Description("INPUT")] INPUT = 0, [Description("OUTPUT")] OUTPUT = 1 } public enum IOValue { [Description("关闭")] FALSE = 0, [Description("开启")] TRUE = 1, [Description("反转")] REVERSE = 2, } public enum RotationDirectionEnum { [Description("顺时针(正方向)")] Clockwise = 0, [Description("逆时针(负方向)")] AntiClockwise = 1, } /// /// IO预定义类型 主要针对输出 /// public enum IOPrestatement { [Description("自定义")] Customized = 0, [Description("指示灯-黄")] Light_Yellow = 1, [Description("指示灯-绿")] Light_Green = 2, [Description("指示灯-红")] Light_Red = 3, [Description("蜂鸣器")] Beep = 4, [Description("照明灯")] Light = 5, [Description("急停")] EmergencyStop = 99, } /// /// 相机信号IO输出模式 /// public enum ActionMode { [Description("IO断路输出")] OpenCircuit = 1, [Description("IO开漏输出低电平")] LowLevel = 2, [Description("取反IO")] Reverse = 3, [Description("输出500us低脉冲")] OutputPulse500us = 5, [Description("输出1ms低脉冲")] OutputPulse1ms = 6, [Description("输出2ms低脉冲")] OutputPulse2ms = 9, [Description("输出3ms低脉冲")] OutputPulse3ms = 10, [Description("输出4ms低脉冲")] OutputPulse4ms = 11, [Description("输出5ms低脉冲")] OutputPulse5ms = 12, [Description("输出6ms低脉冲")] OutputPulse6ms = 13, [Description("输出7ms低脉冲")] OutputPulse7ms = 14, [Description("输出8ms低脉冲")] OutputPulse8ms = 15, [Description("输出9ms低脉冲")] OutputPulse9ms = 16, [Description("输出10ms低脉冲")] OutputPulse10ms = 17, [Description("输出20ms低脉冲")] OutputPulse20ms = 18, [Description("输出30ms低脉冲")] OutputPulse30ms = 19, [Description("输出40ms低脉冲")] OutputPulse40ms = 20, [Description("输出50ms低脉冲")] OutputPulse50ms = 21, [Description("输出60ms低脉冲")] OutputPulse60ms = 22, [Description("输出70ms低脉冲")] OutputPulse70ms = 23, [Description("输出80ms低脉冲")] OutputPulse80ms = 24, [Description("输出90ms低脉冲")] OutputPulse90ms = 25, [Description("输出100ms低脉冲")] OutputPulse100ms = 26, [Description("输出200ms低脉冲")] OutputPulse200ms = 27, [Description("输出300ms低脉冲")] OutputPulse300ms = 28, } /// /// 吹气信号IO输出模式 /// public enum BlowType { [Description("OK吹气口")] OK, [Description("NG吹气口")] NG, [Description("吹气口1")] Blow1, [Description("吹气口2")] Blow2, [Description("吹气口3")] Blow3, [Description("吹气口4")] Blow4, [Description("吹气口5")] Blow5, [Description("吹气口6")] Blow6, } /// /// 来料检测位号,目前支持两路 /// public enum BitInputNumberEnum { [Description("第0路")] BitInput0 = 0, [Description("第1路")] BitInput1, } /// /// 电平 /// public enum LogicLevelEnum { [Description("低电平")] LowLevel = 0, [Description("高电平")] HighLevel, } /// /// 捕捉位置模式 /// public enum PositionSourceEnum { [Description("指令位置")] CommandPosition = 0, [Description("编码器位置")] EncoderPosition = 1, } /// /// 来料检测捕获位置 /// public enum SortingInputPositionModeEnum { [Description("前部")] Front = 0, [Description("中间")] Middle, } /// /// 回原点模式1 /// public enum GoHomeMode { // Negative: 负极限、负方向 // Positive: 正极限、正方向 // NeL:负限开关 // N:无 //[ColorSelect("Gray")] //[FontColorSelect("Black")] [Description("1 负极限:负限开关_中间:无_正极限:无_Index位置:负限位正边_偏移:正方向")] Negative_Ne_Center_N_Positive_N_Index_NePo_Offset_Po = 1, [Description("2 负极限:无_中间:无_正极限:正限开关_Index位置:正限位负边_偏移:负方向")] Negative_N_Center_N_Positive_Po_Index_PoNe_Offset_Ne = 2, [Description("3 负极限:无_中间:无_正极限:原点开关_Index位置:原点负边外侧_偏移:负方向")] Negative_N_Center_N_Positive_H_Index_HNeO_Offset_Ne = 3, [Description("4 负极限:无_中间:无_正极限:原点开关_Index位置:原点负边内侧_偏移:正方向")] Negative_N_Center_N_Positive_H_Index_HNeI_Offset_Po = 4, [Description("5 负极限:原点开关_中间:无_正极限:无_Index位置:原点正边外侧_偏移:正方向")] Negative_H_Center_N_Positive_N_Index_HPoO_Offset_Po = 5, [Description("6 负极限:原点开关_中间:无_正极限:无_Index位置:原点正边内侧_偏移:负方向")] Negative_H_Center_N_Positive_N_Index_HPoI_Offset_Ne = 6, [Description("7 负极限:无_中间:原点开关_正极限:正限开关_Index位置:原点负边外侧_偏移:负方向")] Negative_N_Center_H_Positive_Po_Index_HNeO_Offset_Ne = 7, [Description("8 负极限:无_中间:原点开关_正极限:正限开关_Index位置:原点负边内侧_偏移:正方向")] Negative_N_Center_H_Positive_Po_Index_HNeI_Offset_Po = 8, [Description("9 负极限:无_中间:原点开关_正极限:正限开关_Index位置:原点正边内侧_偏移:负方向")] Negative_N_Center_H_Positive_Po_Index_HPoI_Offset_Ne = 9, [Description("10 负极限:无_中间:原点开关_正极限:正限开关_Index位置:原点正边外侧_偏移:正方向")] Negative_N_Center_H_Positive_Po_Index_HPoO_Offset_Po = 10, [Description("11 负极限:负限开关_中间:原点开关_正极限:无_Index位置:原点正边外侧_偏移:正方向")] Negative_Ne_Center_H_Positive_N_Index_HPoO_Offset_Po = 11, [Description("12 负极限:负限开关_中间:原点开关_正极限:无_Index位置:原点正边内侧_偏移:负方向")] Negative_Ne_Center_H_Positive_N_Index_HPoI_Offset_Ne = 12, [Description("13 负极限:负限开关_中间:原点开关_正极限:无_Index位置:原点负边内侧_偏移:正方向")] Negative_Ne_Center_H_Positive_N_Index_HNeI_Offset_Po = 13, [Description("14 负极限:负限开关_中间:原点开关_正极限:无_Index位置:原点负边外侧_偏移:负方向")] Negative_Ne_Center_H_Positive_N_Index_HNeO_Offset_Ne = 14, [Description("17 负极限:负限开关_中间:无_正极限:无_停止位置:负限位正边_偏移:正方向")] Negative_Ne_Center_N_Positive_N_Stop_NePo_Offset_Po = 17, [Description("18 负极限:无_中间:无_正极限:正限开关_停止位置:正极限负边_偏移:负方向")] Negative_N_Center_N_Positive_Po_Stop_PoNe_Offset_Ne = 18, [Description("19 负极限:无_中间:无_正极限:原点开关_停止位置:原点负边外侧_偏移:负方向")] Negative_N_Center_N_Positive_H_Stop_HNeO_Offset_Ne = 19, [Description("20 负极限:无_中间:无_正极限:原点开关_停止位置:原点负边内侧_偏移:正方向")] Negative_N_Center_N_Positive_H_Stop_HNeI_Offset_Po = 20, [Description("21 负极限:原点开关_中间:无_正极限:无_停止位置:原点正边外侧_偏移:正方向")] Negative_H_Center_N_Positive_N_Stop_HPoO_Offset_Po = 21, [Description("22 负极限:原点开关_中间:无_正极限:无_停止位置:原点正边内侧_偏移:负方向")] Negative_H_Center_N_Positive_N_Stop_HPoI_Offset_Ne = 22, [Description("23 负极限:无_中间:原点开关_正极限:正限开关_停止位置:原点负边外侧_偏移:负方向")] Negative_N_Center_H_Positive_Po_Stop_HNeO_Offset_Ne = 23, [Description("24 负极限:无_中间:原点开关_正极限:正限开关_停止位置:原点负边内侧_偏移:正方向")] Negative_N_Center_H_Positive_Po_Stop_HNeI_Offset_Po = 24, [Description("25 负极限:无_中间:原点开关_正极限:正限开关_停止位置:原点正边内侧_偏移:负方向")] Negative_N_Center_H_Positive_Po_Stop_HPoI_Offset_Ne = 25, [Description("26 负极限:无_中间:原点开关_正极限:正限开关_停止位置:原点正边外侧_偏移:正方向")] Negative_N_Center_H_Positive_Po_Stop_HPoO_Offset_Po = 26, [Description("27 负极限:负限开关_中间:原点开关_正极限:无_停止位置:原点正边外侧_偏移:正方向")] Negative_Ne_Center_H_Positive_N_Stop_HPoO_Offset_Ne = 27, [Description("28 负极限:负限开关_中间:原点开关_正极限:无_停止位置:原点正边内侧_偏移:负方向")] Negative_Ne_Center_H_Positive_N_Stop_HPoI_Offset_Po = 28, [Description("29 负极限:负限开关_中间:原点开关_正极限:无_停止位置:原点负边内侧_偏移:正方向")] Negative_Ne_Center_H_Positive_N_Stop_HNeI_Offset_Ne = 29, [Description("30 负极限:负限开关_中间:原点开关_正极限:无_停止位置:原点负边外侧_偏移:负方向")] Negative_Ne_Center_H_Positive_N_Stop_HNeO_Offset_Po = 30, [Description("33 负极限:无_中间:无_正极限:无_Index位置:负方向Index_偏移:负方向")] Negative_N_Center_N_Positive_N_Index_NeIndex_Offset_Ne = 33, [Description("34 负极限:无_中间:无_正极限:无_Index位置:正方向Index_偏移:正方向")] Negative_N_Center_N_Positive_N_Index_PoIndex_Offset_Po = 34, } /// /// 马达/运动板卡运行模式 /// public enum MotionMode { /// /// 普通点位运动 /// [Description("普通点位运动")] P2P = 1, /// /// 找正限位运动 /// [Description("找正限位运动")] FindPositive = 4, /// /// 离开正限位 /// [Description("离开正限位")] LeavePositive = 5, /// /// 找负限位运动 /// [Description("找负限位运动")] FindNegative = 6, /// /// 离开负限位 /// [Description("离开负限位")] LeaveNegative = 7, /// /// 找原点运动 /// [Description("回原点运动")] GoHome = 8, /// /// Jog模式 /// [Description("Jog模式")] Jog = 9, ///// ///// 读数头找原点方式 ///// //[Description("找原点inde")] //FindOriIndex = 10, ///// ///// 插补模式 ///// //[Description("插补模式")] //Coordinate = 11 } public enum CameraAcquisitionMode { 连续模式=0, 触发模式=1 } public enum CameraTriggerMode { 软触发 = 0, 硬触发 = 1 } }