623 lines
17 KiB
C#
Raw Normal View History

2025-03-07 09:06:46 +08:00
using System;
using System.Collections.Generic;
2025-03-10 17:18:45 +08:00
using System.ComponentModel;
2025-03-07 09:06:46 +08:00
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DH.Commons.Enums
{
2025-03-21 08:51:20 +08:00
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
}
2025-03-22 16:16:34 +08:00
public enum EnumCamType
{
[Description("度申相机")]
Do3think = 0,
[Description("海康相机")]
hik ,
}
2025-03-21 08:51:20 +08:00
2025-03-07 09:06:46 +08:00
public enum EnumPLCType
{
2025-03-21 08:51:20 +08:00
[Description("信捷XC串口")]
XC串口 = 0,
[Description("信捷XC网口")]
XC网口 = 1,
[Description("信捷XD串口")]
XD串口 = 2,
[Description("信捷XD网口")]
XD网口 = 3
2025-03-07 09:06:46 +08:00
}
public enum EnumPLCInputIO
{
=0,
=1,
=2,
=3
}
public enum EnumPLCOutputIO
{
=0,
=1,
使=2,
=3,
=4,
绿=5,
=6,
=7,
=8,
=9,
=10,
1=11,
2=12,
3=13,
4=14,
5=15,
2025-03-21 08:51:20 +08:00
6 = 16,
7 = 17,
8 = 18,
9 = 19,
10 = 20,
OK料盒 =21,
NG料盒=22,
OK吹气时间=23,
NG吹气时间=24,
=25,
=26,
=27,
=28,
=29,
2025-03-22 16:16:34 +08:00
=30,
,
,
2025-03-07 09:06:46 +08:00
}
2025-03-10 17:18:45 +08:00
2025-03-21 08:51:20 +08:00
public enum EnumPLCDataType
{
HD,
D,
M
}
public enum EnumPLCINTType
{
16,
32,
16,
32
}
2025-03-10 17:18:45 +08:00
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
}
/// <summary>
/// 主板型号
/// </summary>
public enum BoardModelEnum
{
EC3216 = 0,
EC3224,
EC3416,
}
/// <summary>
/// 扩展板类型
/// </summary>
public enum ExtensionBoardEnum
{
[Description("未外接扩展板")]
None,
[Description("一个IO扩展板")]
ExtIO_1,
[Description("一个EC3216扩展板")]
ExtEC3216_1,
[Description("一个EC3224扩展板")]
ExtEC3224_1,
[Description("一个EC3416扩展板")]
ExtEC3416_1,
}
/// <summary>
/// 转盘类型
/// </summary>
public enum MachineDiskType
{
[Description("单转盘")]
SingleDisk = 1,
[Description("双转盘")]
DoubleDisk = 2,
}
/// <summary>
/// 运动板卡 IO 类型IN OUT
/// </summary>
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,
}
/// <summary>
/// IO预定义类型 主要针对输出
/// </summary>
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,
}
/// <summary>
/// 相机信号IO输出模式
/// </summary>
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,
}
/// <summary>
/// 吹气信号IO输出模式
/// </summary>
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,
}
/// <summary>
/// 来料检测位号,目前支持两路
/// </summary>
public enum BitInputNumberEnum
{
[Description("第0路")]
BitInput0 = 0,
[Description("第1路")]
BitInput1,
}
/// <summary>
/// 电平
/// </summary>
public enum LogicLevelEnum
{
[Description("低电平")]
LowLevel = 0,
[Description("高电平")]
HighLevel,
}
/// <summary>
/// 捕捉位置模式
/// </summary>
public enum PositionSourceEnum
{
[Description("指令位置")]
CommandPosition = 0,
[Description("编码器位置")]
EncoderPosition = 1,
}
/// <summary>
/// 来料检测捕获位置
/// </summary>
public enum SortingInputPositionModeEnum
{
[Description("前部")]
Front = 0,
[Description("中间")]
Middle,
}
/// <summary>
/// 回原点模式1
/// </summary>
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,
}
/// <summary>
/// 马达/运动板卡运行模式
/// </summary>
public enum MotionMode
{
/// <summary>
/// 普通点位运动
/// </summary>
[Description("普通点位运动")]
P2P = 1,
/// <summary>
/// 找正限位运动
/// </summary>
[Description("找正限位运动")]
FindPositive = 4,
/// <summary>
/// 离开正限位
/// </summary>
[Description("离开正限位")]
LeavePositive = 5,
/// <summary>
/// 找负限位运动
/// </summary>
[Description("找负限位运动")]
FindNegative = 6,
/// <summary>
/// 离开负限位
/// </summary>
[Description("离开负限位")]
LeaveNegative = 7,
/// <summary>
/// 找原点运动
/// </summary>
[Description("回原点运动")]
GoHome = 8,
/// <summary>
/// Jog模式
/// </summary>
[Description("Jog模式")]
Jog = 9,
///// <summary>
///// 读数头找原点方式
///// </summary>
//[Description("找原点inde")]
//FindOriIndex = 10,
///// <summary>
///// 插补模式
///// </summary>
//[Description("插补模式")]
//Coordinate = 11
}
2025-03-18 14:19:33 +08:00
public enum CameraAcquisitionMode
{
=0,
=1
}
2025-03-10 17:18:45 +08:00
2025-03-18 14:19:33 +08:00
public enum CameraTriggerMode
{
= 0,
= 1
}
2025-03-07 09:06:46 +08:00
}