版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

590 lines
15 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace MaiMuAOI.SysCtrl
  8. {
  9. public enum LightChannelEnum
  10. {
  11. [Description("通道1")]
  12. CH1 = 1,
  13. [Description("通道2")]
  14. CH2 = 2,
  15. [Description("通道3")]
  16. CH3 = 3,
  17. [Description("通道4")]
  18. CH4 = 4,
  19. [Description("通道5")]
  20. CH5 = 5,
  21. [Description("通道6")]
  22. CH6 = 6,
  23. }
  24. public enum AxisName
  25. {
  26. [Description("0-X1轴")]
  27. Axis0 = 0,
  28. [Description("1-X2轴")]
  29. Axis1 = 1,
  30. [Description("2-Y轴")]
  31. Axis2 = 2,
  32. [Description("3-Z轴")]
  33. Axis3 = 3,
  34. }
  35. public enum AxMoveMode
  36. {
  37. //MODE1_Abs = 0,
  38. //MODE2_Rel = 1,
  39. 绝对位置 = 0,
  40. 相对位置 = 1,
  41. }
  42. public enum MarkCam
  43. {
  44. 尺寸检测Mark,
  45. 缺陷检测Mark
  46. }
  47. public enum SmallAxCmdPos
  48. {
  49. 倍率0_58X = 0,
  50. 倍率1_0X = 4600,
  51. 倍率1_5X = 6700,
  52. 倍率2_0X = 8400,
  53. 倍率2_5X = 10300,
  54. 倍率3_0X = 11700,
  55. 倍率3_5X = 12800,
  56. 倍率4_0X = 13650,
  57. 倍率4_5X = 14500,
  58. 倍率5_0X = 15200,
  59. 倍率5_5X = 15900,
  60. 倍率6_0X = 16500,
  61. 倍率6_5X = 17150,
  62. 倍率7_0X = 17700,
  63. 倍率7_5X = 18650,
  64. }
  65. public enum IODirectionEnum
  66. {
  67. [Description("仅输入")]
  68. 输入 = 0,
  69. [Description("仅输出")]
  70. 输出 = 1,
  71. [Description("输入与输出")]
  72. 输入输出 = 2,
  73. }
  74. public enum AxisState : uint
  75. {
  76. STA_AX_DISABLE,
  77. STA_AX_READY,
  78. STA_AX_STOPPING,
  79. STA_AX_ERROR_STOP,
  80. STA_AX_HOMING,
  81. STA_AX_PTP_MOT,
  82. STA_AX_CONTI_MOT,
  83. STA_AX_SYNC_MOT,
  84. STA_AX_EXT_JOG,
  85. STA_AX_EXT_MPG,
  86. STA_AX_PAUSE,
  87. STA_AX_BUSY,
  88. STA_AX_WAIT_DI,
  89. STA_AX_WAIT_PTP,
  90. STA_AX_WAIT_VEL
  91. }
  92. public enum ScannerType
  93. {
  94. [Description("板卡相机")]
  95. GENTL = 0,
  96. [Description("网口相机")]
  97. CC = 1,
  98. }
  99. public enum AIEngineLibEnum
  100. {
  101. [Description("缺陷库")]
  102. 缺陷库 = 0,
  103. [Description("测量库")]
  104. 测量库 = 1,
  105. [Description("缺陷与测量库")]
  106. 缺陷与测量库 = 2,
  107. }
  108. //禁用,使用文本管理
  109. //public enum DefectCodeEnum
  110. //{
  111. // [Description("堵孔")]
  112. // dk,
  113. // [Description("脏污")]
  114. // zw,
  115. // [Description("纤维丝")]
  116. // xws,
  117. // [Description("钢丝异常")]
  118. // gsyc,
  119. // [Description("缺口")]
  120. // qk,
  121. // [Description("针孔")]
  122. // zk,
  123. // [Description("泡泡")]
  124. // pp,
  125. // [Description("划伤")]
  126. // hs,
  127. // [Description("压线")]
  128. // yx,
  129. // [Description("斜边")]
  130. // xb,
  131. // [Description("栅线")]
  132. // sx,
  133. // [Description("断栅")]
  134. // ds,
  135. // //[Description("钢丝断裂")]
  136. // //gsdl,
  137. // //[Description("残胶堵孔")]
  138. // //cjdk,
  139. // //[Description("正常")]
  140. // //normal,
  141. //}
  142. //public enum DefectNameEnum
  143. //{
  144. // 堵孔,
  145. // 脏污,
  146. // 纤维丝,
  147. // 钢丝异常,
  148. // 缺口,
  149. // 针孔,
  150. // 泡泡,
  151. // 划伤,
  152. // 压线,
  153. // 斜边,
  154. // 栅线,
  155. // 断栅,
  156. // //钢丝断裂,
  157. // //残胶堵孔,
  158. // //正常
  159. //}
  160. public enum ValType
  161. {
  162. 字符串,
  163. 数值,
  164. }
  165. public enum CMDName
  166. {
  167. IO默认输出 = 0,
  168. 启动按钮 = 10,//输入+输出
  169. 暂停按钮 = 11,//输入+输出
  170. 复位按钮 = 12,//输入+输出
  171. 绿灯输出 = 15,
  172. 黄灯输出 = 16,
  173. 红灯输出 = 17,
  174. 日光灯输出 = 18,
  175. 蜂鸣器输出 = 20,
  176. //张力读取结束输出 = 25,//张力读取
  177. 张力读取 = 25,//张力读取
  178. 喷墨输出 = 26,
  179. 门磁告警输入 = 30,
  180. 喷墨告警输入 = 31,
  181. 厚度气缸与轴运动告警 = 34,
  182. 下料完成输出 = 35,
  183. Y轴复位输出 = 40,
  184. Y轴复位完成输入 = 41,
  185. }
  186. public enum DOName
  187. {
  188. 三色灯红灯 = 0,
  189. 三色灯绿灯 = 1,
  190. 三色灯黄灯 = 2,
  191. 三色灯蜂鸣器 = 3,
  192. 测厚气缸 = 4,
  193. 加紧气缸 = 5,
  194. 双手启动绿灯 = 7,
  195. 启动按钮绿灯 = 8,
  196. 复位按钮黄灯 = 9,
  197. 停止按钮红灯 = 10,
  198. 触发张力按钮灯 = 11,
  199. 日光灯 = 12,
  200. X1回原 = 13,
  201. X2回原 = 14,
  202. Y轴回原点 = 15
  203. }
  204. public enum DIName
  205. {
  206. 启动按钮 = 14,
  207. 暂停按钮 = 3,
  208. 复位按钮 = 2,
  209. 触发张力 = 4,
  210. 产品有无 = 5,
  211. 右夹紧缩回 = 6,
  212. 右夹紧伸出 = 7,
  213. 前夹紧缩回 = 8,
  214. 前夹紧伸出 = 9,
  215. 侧推伸出 = 0,
  216. 侧推缩回 = 1,
  217. 双手启动 = 10,
  218. 门磁 = 11,
  219. Y轴回原点完成 = 15
  220. }
  221. /// <summary>
  222. /// 数据处理方式
  223. /// </summary>
  224. public enum DataProcess
  225. {
  226. 均值,
  227. 最大值,
  228. 最小值
  229. }
  230. /// <summary>
  231. /// 数据判断方式
  232. /// </summary>
  233. public enum DataJudgment
  234. {
  235. 均值,
  236. 单点,
  237. }
  238. //禁用,使用文本加载
  239. //public enum PointTestType
  240. //{
  241. // Y轴方向PT值检测,
  242. // 线宽正面,
  243. // 反面检测,
  244. // X轴方向PT值检测,
  245. // 主栅连接线检测,
  246. // 主栅宽度检测,
  247. // 主栅间距,
  248. // 细栅间距检测,
  249. // 背极宽度,
  250. // 主栅长度检测,
  251. // Mark点横向间距,
  252. // Mark点竖向间距,
  253. // 鱼叉口长,
  254. // 鱼叉口宽,
  255. // 鱼叉口间距,
  256. // 蜈蚣角长,
  257. // 蜈蚣角宽,
  258. // 分片间隔,
  259. // 焊点长,
  260. // 焊点宽,
  261. // 焊点间隔,
  262. // SP2主栅宽度
  263. //}
  264. #region 打印数据类型
  265. public enum PrinterType
  266. {
  267. Label,
  268. Excel
  269. }
  270. public enum PrintDataEnum
  271. {
  272. [Description("检测结果")]
  273. Qualified,
  274. [Description("外观比对")]
  275. CompareResult,
  276. [Description("张力均值")]
  277. TensionValue,
  278. [Description("膜厚均值")]
  279. HeightValue,
  280. [Description("线宽均值")]
  281. LineWidthValue,
  282. [Description("Y-PT均值")]
  283. PTValue,
  284. [Description("X-PT均值")]
  285. XPTValue,
  286. [Description("反面线宽均值")]
  287. FLineWidthValue,
  288. [Description("主栅连接线均值")]
  289. MGridIntervalValue,
  290. [Description("主栅宽度均值")]
  291. MGridWidthValue,
  292. [Description("主栅间距均值")]
  293. MGridSpreadValue,
  294. [Description("细栅间距均值")]
  295. FGridSpreadValue,
  296. [Description("背极宽度均值")]
  297. BackPoleWidthValue,
  298. [Description("主栅长度均值")]
  299. MGridLengthValue,
  300. [Description("Mark点横向间距均值")]
  301. MarkXDisValue ,
  302. [Description("Mark点竖向间距均值")]
  303. MarkYDisValue ,
  304. [Description("鱼叉口长均值")]
  305. ForkLengthValue,
  306. [Description("鱼叉口宽均值")]
  307. ForkWidthValue ,
  308. [Description("鱼叉口间距均值")]
  309. ForkDisValue ,
  310. [Description("蜈蚣角长均值")]
  311. ChilopodLengthValue,
  312. [Description("蜈蚣角宽均值")]
  313. ChilopodWidthValue ,
  314. [Description("分片间隔均值")]
  315. ShardingDisValue ,
  316. [Description("焊点间隔均值")]
  317. WeldingSpotDisValue,
  318. [Description("焊点长均值")]
  319. WeldingSpotLengthValue ,
  320. [Description("焊点宽均值")]
  321. WeldingSpotWidthValue ,
  322. [Description("张力上下限")]
  323. TensionValueLimit,
  324. [Description("膜厚上下限")]
  325. HeightValueLimit,
  326. [Description("线宽上下限")]
  327. LineWidthValueLimit,
  328. [Description("Y-PT上下限")]
  329. PTValueLimit,
  330. [Description("X-PT上下限")]
  331. XPTValueLimit,
  332. [Description("反面线宽上下限")]
  333. FLineWidthValueLimit,
  334. [Description("主栅连接线上下限")]
  335. MGridIntervalValueLimit,
  336. [Description("主栅宽度上下限")]
  337. MGridWidthValueLimit,
  338. [Description("主栅间距上下限")]
  339. MGridSpreadValueLimit,
  340. [Description("细栅间距上下限")]
  341. FGridSpreadValueLimit,
  342. [Description("背极宽度上下限")]
  343. BackPoleWidthValueLimit,
  344. [Description("主栅长度上下限")]
  345. MGridLengthValueLimit,
  346. [Description("Mark点横向间距上下限")]
  347. MarkXDisValueLimit,
  348. [Description("Mark点竖向间距上下限")]
  349. MarkYDisValueLimit,
  350. [Description("鱼叉口长上下限")]
  351. ForkLengthValueLimit,
  352. [Description("鱼叉口宽上下限")]
  353. ForkWidthValueLimit,
  354. [Description("鱼叉口间距上下限")]
  355. ForkDisValueLimit,
  356. [Description("蜈蚣角长上下限")]
  357. ChilopodLengthValueLimit,
  358. [Description("蜈蚣角宽上下限")]
  359. ChilopodWidthValueLimit,
  360. [Description("分片间隔上下限")]
  361. ShardingDisValueLimit,
  362. [Description("焊点间隔上下限")]
  363. WeldingSpotDisValueLimit,
  364. [Description("焊点长上下限")]
  365. WeldingSpotLengthValueLimit,
  366. [Description("焊点宽上下限")]
  367. WeldingSpotWidthValueLimit,
  368. [Description("缺陷总数")]
  369. DefectCount,
  370. [Description("堵孔数量")]
  371. DKCount,
  372. [Description("脏污数量")]
  373. ZWCount,
  374. [Description("钢丝异常数量")]
  375. GSYCCount,
  376. [Description("纤维丝数量")]
  377. XWSCount,
  378. [Description("缺口数量")]
  379. QKCount,
  380. [Description("针孔数量")]
  381. ZKCount,
  382. [Description("泡泡数量")]
  383. PPCount,
  384. [Description("划伤数量")]
  385. HSCount,
  386. [Description("压线数量")]
  387. YXCount,
  388. [Description("斜边数量")]
  389. XBCount,
  390. [Description("栅线数量")]
  391. SXCount,
  392. [Description("断栅数量")]
  393. DSCount,
  394. [Description("钢丝断裂数量")]
  395. GSDLCount,
  396. [Description("残胶堵孔数量")]
  397. CJDKCount,
  398. [Description("检测单号")]
  399. DetectOrder,
  400. [Description("料号")]
  401. OrderCode,
  402. [Description("料号名称")]
  403. OrderName,
  404. [Description("料号批次")]
  405. BatchId,
  406. [Description("网版编码")]
  407. SN,
  408. [Description("检测时间")]
  409. Time,
  410. [Description("操作员")]
  411. OperatorName,
  412. }
  413. public enum PrintDataPdtEnum
  414. {
  415. [Description("检测结果")]
  416. Qualified,
  417. [Description("外观比对")]
  418. CompareResult,
  419. [Description("检测单号")]
  420. DetectOrder,
  421. [Description("检测数量")]
  422. DetectCnt,
  423. [Description("合格数量")]
  424. OKCnt,
  425. [Description("不合格数量")]
  426. NgCnt,
  427. [Description("料号")]
  428. OrderCode,
  429. [Description("料号名称")]
  430. OrderName,
  431. [Description("料号批次")]
  432. BatchId,
  433. [Description("网版编码")]
  434. SN,
  435. [Description("检测时间")]
  436. Time,
  437. [Description("检测日期")]
  438. Date,
  439. [Description("操作员")]
  440. OperatorName,
  441. }
  442. static class EnumExtensions
  443. {
  444. public static string GetDescription(this Enum val)
  445. {
  446. var field = val.GetType().GetField(val.ToString());
  447. var customAttribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute));
  448. return customAttribute == null ? val.ToString() : ((DescriptionAttribute)customAttribute).Description;
  449. }
  450. }
  451. #endregion
  452. #region MES代码
  453. public enum MesCodeEnum
  454. {
  455. [Description("检测单号")]
  456. MM0001,
  457. [Description("料号")]
  458. MM0002,
  459. [Description("料号名称")]
  460. MM0003,
  461. [Description("网版编码")]
  462. MM0004,
  463. [Description("操作员")]
  464. MM0005,
  465. [Description("检测时间")]
  466. MM0006,
  467. [Description("料号批次")]
  468. MM0007,
  469. [Description("外观比对")]
  470. MM0008,
  471. [Description("检测结果")]
  472. MM0009,
  473. [Description("张力均值")]
  474. MM0010,
  475. [Description("膜厚均值")]
  476. MM0011,
  477. [Description("线宽均值")]
  478. MM0012,
  479. [Description("Y-PT均值")]
  480. MM0013,
  481. [Description("X-PT均值")]
  482. MM0014,
  483. [Description("主栅连接线检测(主栅间隔)")]
  484. MM0015,
  485. [Description("主栅宽度检测")]
  486. MM0016,
  487. [Description("主栅间距")]
  488. MM0017,
  489. [Description("细栅间距检测")]
  490. MM0018,
  491. [Description("背极宽度")]
  492. MM0019,
  493. [Description("主栅长度检测")]
  494. MM0020,
  495. [Description("Mark点横向间距")]
  496. MM0021,
  497. [Description("Mark点竖向间距")]
  498. MM0022,
  499. [Description("鱼叉口长")]
  500. MM0023,
  501. [Description("鱼叉口宽")]
  502. MM0024,
  503. [Description("鱼叉口间距")]
  504. MM0025,
  505. [Description("蜈蚣角长")]
  506. MM0026,
  507. [Description("蜈蚣角宽")]
  508. MM0027,
  509. [Description("缺陷总数")]
  510. MALL000,
  511. [Description("堵孔数量")]
  512. MDK000,
  513. [Description("脏污数量")]
  514. MZW000,
  515. [Description("钢丝异常数量")]
  516. MGSYC000,
  517. [Description("纤维丝数量")]
  518. MQWS000,
  519. [Description("缺口数量")]
  520. MQK000,
  521. [Description("针孔数量")]
  522. MZK000,
  523. [Description("泡泡数量")]
  524. MPP000,
  525. [Description("划伤数量")]
  526. MHS000,
  527. [Description("压线数量")]
  528. MYX000,
  529. [Description("斜边数量")]
  530. MXB000,
  531. [Description("栅线数量")]
  532. MSX000,
  533. [Description("检测单号")]
  534. DetectOrder,
  535. [Description("料号")]
  536. OrderCode,
  537. [Description("料号名称")]
  538. OrderName,
  539. [Description("料号批次")]
  540. BatchId,
  541. [Description("网版编码")]
  542. SN,
  543. }
  544. #endregion
  545. }