版博士V2.0程序
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

608 行
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. public enum DefectCodeEnum
  109. {
  110. [Description("堵孔")]
  111. dk,
  112. [Description("脏污")]
  113. zw,
  114. [Description("纤维丝")]
  115. xws,
  116. [Description("钢丝异常")]
  117. gsyc,
  118. [Description("缺口")]
  119. qk,
  120. [Description("针孔")]
  121. zk,
  122. [Description("泡泡")]
  123. pp,
  124. [Description("划伤")]
  125. hs,
  126. [Description("压线")]
  127. yx,
  128. [Description("斜边")]
  129. xb,
  130. [Description("格栅")]
  131. gs,
  132. [Description("断栅")]
  133. ds,
  134. [Description("钢丝断裂")]
  135. gsdl,
  136. [Description("残胶堵孔")]
  137. cjdk,
  138. [Description("错位")]
  139. cw,
  140. [Description("正常1")]
  141. na,
  142. [Description("正常2")]
  143. nb,
  144. [Description("正常3")]
  145. nc,
  146. [Description("正常4")]
  147. nd,
  148. }
  149. public enum DefectNameEnum
  150. {
  151. 堵孔,
  152. 脏污,
  153. 纤维丝,
  154. 钢丝异常,
  155. 缺口,
  156. 针孔,
  157. 泡泡,
  158. 划伤,
  159. 压线,
  160. 斜边,
  161. 格栅,
  162. 断栅,
  163. 钢丝断裂,
  164. 残胶堵孔,
  165. 错位,
  166. 正常1,
  167. 正常2,
  168. 正常3,
  169. 正常4
  170. }
  171. public enum ValType
  172. {
  173. 字符串,
  174. 数值,
  175. }
  176. public enum CMDName
  177. {
  178. IO默认输出 = 0,
  179. 启动按钮 = 10,//输入+输出
  180. 暂停按钮 = 11,//输入+输出
  181. 复位按钮 = 12,//输入+输出
  182. 绿灯输出 = 15,
  183. 黄灯输出 = 16,
  184. 红灯输出 = 17,
  185. 日光灯输出 = 18,
  186. 蜂鸣器输出 = 20,
  187. //张力读取结束输出 = 25,//张力读取
  188. 张力读取 = 25,//张力读取
  189. 喷墨输出 = 26,
  190. 门磁告警输入 = 30,
  191. 喷墨告警输入 = 31,
  192. 厚度气缸与轴运动告警 = 34,
  193. 下料完成输出 = 35,
  194. Y轴复位输出 = 40,
  195. Y轴复位完成输入 = 41,
  196. }
  197. public enum DOName
  198. {
  199. 三色灯红灯 = 0,
  200. 三色灯绿灯 = 1,
  201. 三色灯黄灯 = 2,
  202. 三色灯蜂鸣器 = 3,
  203. 测厚气缸 = 4,
  204. 加紧气缸 = 5,
  205. 双手启动绿灯 = 7,
  206. 启动按钮绿灯 = 8,
  207. 复位按钮黄灯 = 9,
  208. 停止按钮红灯 = 10,
  209. 触发张力按钮灯 = 11,
  210. 日光灯 = 12,
  211. X1回原 = 13,
  212. X2回原 = 14,
  213. Y轴回原点 = 15
  214. }
  215. public enum DIName
  216. {
  217. 启动按钮 = 14,
  218. 暂停按钮 = 3,
  219. 复位按钮 = 2,
  220. 触发张力 = 4,
  221. 产品有无 = 5,
  222. 右夹紧缩回 = 6,
  223. 右夹紧伸出 = 7,
  224. 前夹紧缩回 = 8,
  225. 前夹紧伸出 = 9,
  226. 侧推伸出 = 0,
  227. 侧推缩回 = 1,
  228. 双手启动 = 10,
  229. 门磁 = 11,
  230. Y轴回原点完成 = 15
  231. }
  232. /// <summary>
  233. /// 数据处理方式
  234. /// </summary>
  235. public enum DataProcess
  236. {
  237. 均值,
  238. 最大值,
  239. 最小值
  240. }
  241. /// <summary>
  242. /// 数据判断方式
  243. /// </summary>
  244. public enum DataJudgment
  245. {
  246. 均值,
  247. 单点,
  248. }
  249. public enum PointTestType
  250. {
  251. Y轴方向PT值检测,
  252. 线宽正面,
  253. 反面检测,
  254. X轴方向PT值检测,
  255. 主栅连接线检测,
  256. 主栅宽度检测,
  257. 主栅间距,
  258. 细栅间距检测,
  259. 背极宽度,
  260. 主栅长度检测,
  261. Mark点横向间距,
  262. Mark点竖向间距,
  263. 鱼叉口长,
  264. 鱼叉口宽,
  265. 鱼叉口间距,
  266. 蜈蚣角长,
  267. 蜈蚣角宽,
  268. 分片间隔,
  269. 焊点长,
  270. 焊点宽,
  271. 焊点间隔,
  272. SP2主栅宽度,
  273. 断点间隔,
  274. 三道鱼叉宽,
  275. 三道鱼叉间隔,
  276. 主栅PT,
  277. 蜈蚣脚平行段长度,
  278. Mark点斜间距,
  279. 主栅焊点间隔
  280. }
  281. #region 打印数据类型
  282. public enum PrinterType
  283. {
  284. Label,
  285. Excel
  286. }
  287. public enum PrintDataEnum
  288. {
  289. [Description("检测结果")]
  290. Qualified,
  291. [Description("外观比对")]
  292. CompareResult,
  293. [Description("张力均值")]
  294. TensionValue,
  295. [Description("膜厚均值")]
  296. HeightValue,
  297. [Description("线宽均值")]
  298. LineWidthValue,
  299. [Description("Y-PT均值")]
  300. PTValue,
  301. [Description("X-PT均值")]
  302. XPTValue,
  303. [Description("反面线宽均值")]
  304. FLineWidthValue,
  305. [Description("主栅连接线均值")]
  306. MGridIntervalValue,
  307. [Description("主栅宽度均值")]
  308. MGridWidthValue,
  309. [Description("主栅间距均值")]
  310. MGridSpreadValue,
  311. [Description("细栅间距均值")]
  312. FGridSpreadValue,
  313. [Description("背极宽度均值")]
  314. BackPoleWidthValue,
  315. [Description("主栅长度均值")]
  316. MGridLengthValue,
  317. [Description("Mark点横向间距均值")]
  318. MarkXDisValue ,
  319. [Description("Mark点竖向间距均值")]
  320. MarkYDisValue ,
  321. [Description("鱼叉口长均值")]
  322. ForkLengthValue,
  323. [Description("鱼叉口宽均值")]
  324. ForkWidthValue ,
  325. [Description("鱼叉口间距均值")]
  326. ForkDisValue ,
  327. [Description("蜈蚣角长均值")]
  328. ChilopodLengthValue,
  329. [Description("蜈蚣角宽均值")]
  330. ChilopodWidthValue ,
  331. [Description("分片间隔均值")]
  332. ShardingDisValue ,
  333. [Description("焊点间隔均值")]
  334. WeldingSpotDisValue,
  335. [Description("焊点长均值")]
  336. WeldingSpotLengthValue ,
  337. [Description("焊点宽均值")]
  338. WeldingSpotWidthValue ,
  339. [Description("张力上下限")]
  340. TensionValueLimit,
  341. [Description("膜厚上下限")]
  342. HeightValueLimit,
  343. [Description("线宽上下限")]
  344. LineWidthValueLimit,
  345. [Description("Y-PT上下限")]
  346. PTValueLimit,
  347. [Description("X-PT上下限")]
  348. XPTValueLimit,
  349. [Description("反面线宽上下限")]
  350. FLineWidthValueLimit,
  351. [Description("主栅连接线上下限")]
  352. MGridIntervalValueLimit,
  353. [Description("主栅宽度上下限")]
  354. MGridWidthValueLimit,
  355. [Description("主栅间距上下限")]
  356. MGridSpreadValueLimit,
  357. [Description("细栅间距上下限")]
  358. FGridSpreadValueLimit,
  359. [Description("背极宽度上下限")]
  360. BackPoleWidthValueLimit,
  361. [Description("主栅长度上下限")]
  362. MGridLengthValueLimit,
  363. [Description("Mark点横向间距上下限")]
  364. MarkXDisValueLimit,
  365. [Description("Mark点竖向间距上下限")]
  366. MarkYDisValueLimit,
  367. [Description("鱼叉口长上下限")]
  368. ForkLengthValueLimit,
  369. [Description("鱼叉口宽上下限")]
  370. ForkWidthValueLimit,
  371. [Description("鱼叉口间距上下限")]
  372. ForkDisValueLimit,
  373. [Description("蜈蚣角长上下限")]
  374. ChilopodLengthValueLimit,
  375. [Description("蜈蚣角宽上下限")]
  376. ChilopodWidthValueLimit,
  377. [Description("分片间隔上下限")]
  378. ShardingDisValueLimit,
  379. [Description("焊点间隔上下限")]
  380. WeldingSpotDisValueLimit,
  381. [Description("焊点长上下限")]
  382. WeldingSpotLengthValueLimit,
  383. [Description("焊点宽上下限")]
  384. WeldingSpotWidthValueLimit,
  385. [Description("缺陷总数")]
  386. DefectCount,
  387. [Description("堵孔数量")]
  388. DKCount,
  389. [Description("脏污数量")]
  390. ZWCount,
  391. [Description("钢丝异常数量")]
  392. GSYCCount,
  393. [Description("纤维丝数量")]
  394. XWSCount,
  395. [Description("缺口数量")]
  396. QKCount,
  397. [Description("针孔数量")]
  398. ZKCount,
  399. [Description("泡泡数量")]
  400. PPCount,
  401. [Description("划伤数量")]
  402. HSCount,
  403. [Description("压线数量")]
  404. YXCount,
  405. [Description("斜边数量")]
  406. XBCount,
  407. [Description("栅线数量")]
  408. SXCount,
  409. [Description("断栅数量")]
  410. DSCount,
  411. [Description("钢丝断裂数量")]
  412. GSDLCount,
  413. [Description("残胶堵孔数量")]
  414. CJDKCount,
  415. [Description("检测单号")]
  416. DetectOrder,
  417. [Description("料号")]
  418. OrderCode,
  419. [Description("料号名称")]
  420. OrderName,
  421. [Description("料号批次")]
  422. BatchId,
  423. [Description("网版编码")]
  424. SN,
  425. [Description("检测时间")]
  426. Time,
  427. [Description("操作员")]
  428. OperatorName,
  429. }
  430. public enum PrintDataPdtEnum
  431. {
  432. [Description("检测结果")]
  433. Qualified,
  434. [Description("外观比对")]
  435. CompareResult,
  436. [Description("检测单号")]
  437. DetectOrder,
  438. [Description("检测数量")]
  439. DetectCnt,
  440. [Description("合格数量")]
  441. OKCnt,
  442. [Description("不合格数量")]
  443. NgCnt,
  444. [Description("料号")]
  445. OrderCode,
  446. [Description("料号名称")]
  447. OrderName,
  448. [Description("料号批次")]
  449. BatchId,
  450. [Description("供应商")]
  451. GYS,
  452. [Description("网版编码")]
  453. SN,
  454. [Description("检测时间")]
  455. Time,
  456. [Description("检测日期")]
  457. Date,
  458. [Description("操作员")]
  459. OperatorName,
  460. }
  461. static class EnumExtensions
  462. {
  463. public static string GetDescription(this Enum val)
  464. {
  465. var field = val.GetType().GetField(val.ToString());
  466. var customAttribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute));
  467. return customAttribute == null ? val.ToString() : ((DescriptionAttribute)customAttribute).Description;
  468. }
  469. }
  470. #endregion
  471. #region MES代码
  472. public enum MesCodeEnum
  473. {
  474. [Description("检测单号")]
  475. MM0001,
  476. [Description("料号")]
  477. MM0002,
  478. [Description("料号名称")]
  479. MM0003,
  480. [Description("网版编码")]
  481. MM0004,
  482. [Description("操作员")]
  483. MM0005,
  484. [Description("检测时间")]
  485. MM0006,
  486. [Description("料号批次")]
  487. MM0007,
  488. [Description("外观比对")]
  489. MM0008,
  490. [Description("检测结果")]
  491. MM0009,
  492. [Description("张力均值")]
  493. MM0010,
  494. [Description("膜厚均值")]
  495. MM0011,
  496. [Description("线宽均值")]
  497. MM0012,
  498. [Description("Y-PT均值")]
  499. MM0013,
  500. [Description("X-PT均值")]
  501. MM0014,
  502. [Description("主栅连接线检测(主栅间隔)")]
  503. MM0015,
  504. [Description("主栅宽度检测")]
  505. MM0016,
  506. [Description("主栅间距")]
  507. MM0017,
  508. [Description("细栅间距检测")]
  509. MM0018,
  510. [Description("背极宽度")]
  511. MM0019,
  512. [Description("主栅长度检测")]
  513. MM0020,
  514. [Description("Mark点横向间距")]
  515. MM0021,
  516. [Description("Mark点竖向间距")]
  517. MM0022,
  518. [Description("鱼叉口长")]
  519. MM0023,
  520. [Description("鱼叉口宽")]
  521. MM0024,
  522. [Description("鱼叉口间距")]
  523. MM0025,
  524. [Description("蜈蚣角长")]
  525. MM0026,
  526. [Description("蜈蚣角宽")]
  527. MM0027,
  528. [Description("缺陷总数")]
  529. MALL000,
  530. [Description("堵孔数量")]
  531. MDK000,
  532. [Description("脏污数量")]
  533. MZW000,
  534. [Description("钢丝异常数量")]
  535. MGSYC000,
  536. [Description("纤维丝数量")]
  537. MQWS000,
  538. [Description("缺口数量")]
  539. MQK000,
  540. [Description("针孔数量")]
  541. MZK000,
  542. [Description("泡泡数量")]
  543. MPP000,
  544. [Description("划伤数量")]
  545. MHS000,
  546. [Description("压线数量")]
  547. MYX000,
  548. [Description("斜边数量")]
  549. MXB000,
  550. [Description("栅线数量")]
  551. MSX000,
  552. [Description("检测单号")]
  553. DetectOrder,
  554. [Description("料号")]
  555. OrderCode,
  556. [Description("料号名称")]
  557. OrderName,
  558. [Description("料号批次")]
  559. BatchId,
  560. [Description("网版编码")]
  561. SN,
  562. }
  563. #endregion
  564. }