PlcAddressConfig.cs 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368
  1. using Prism.Mvvm;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using TeamAAS_VP.Models.PLC;
  8. namespace TeamAAS_VP.Models.PLC
  9. {
  10. public class PlcAddressConfig : BindableBase
  11. {
  12. #region 写入到PLC的地址
  13. private PlcPointAddress _QrCodeCamera = new PlcPointAddress();
  14. /// <summary>
  15. /// 二维码拍照点位参数
  16. /// </summary>
  17. public PlcPointAddress Out_QrCodeCamera
  18. {
  19. get { return _QrCodeCamera; }
  20. set { SetProperty(ref _QrCodeCamera, value); }
  21. }
  22. private PlcAddress _QrCodePhotoResault = new PlcAddress();
  23. /// <summary>
  24. /// pc发送二维码拍照点位成功后 =1 失败=2 未执行=0
  25. /// </summary>
  26. public PlcAddress Out_QrCodePhotoResault
  27. {
  28. get { return _QrCodePhotoResault; }
  29. set { SetProperty(ref _QrCodePhotoResault, value); }
  30. }
  31. private int _PlcNo;
  32. public int PlcNo
  33. {
  34. get { return _PlcNo; }
  35. set { SetProperty(ref _PlcNo, value); }
  36. }
  37. private PlcAddress _Out_ProductLoadMode;
  38. /// <summary>
  39. /// 产品切换类型
  40. /// </summary>
  41. public PlcAddress Out_ProductLoadMode
  42. {
  43. get { return _Out_ProductLoadMode; }
  44. set { SetProperty(ref _Out_ProductLoadMode, value); }
  45. }
  46. private PlcAddress _Out_WorkMode = new PlcAddress();
  47. /// <summary>
  48. /// 工作模式 =1 拍1打1 =2 拍1打所有
  49. /// </summary>
  50. public PlcAddress Out_WorkMode
  51. {
  52. get { return _Out_WorkMode; }
  53. set { SetProperty(ref _Out_WorkMode, value); }
  54. }
  55. private PlcAddress _PickPointNum = new PlcAddress();
  56. /// <summary>
  57. /// 取料位置 =0 不需要取料 =1 需要取料
  58. /// </summary>
  59. public PlcAddress Out_PickPointNum
  60. {
  61. get { return _PickPointNum; }
  62. set { SetProperty(ref _PickPointNum, value); }
  63. }
  64. private PlcAddress _DowmCameraNum = new PlcAddress();
  65. /// <summary>
  66. /// 下相机拍照次数=0 无
  67. /// </summary>
  68. public PlcAddress Out_DowmCameraNum
  69. {
  70. get => _DowmCameraNum;
  71. set => SetProperty(ref _DowmCameraNum, value);
  72. }
  73. private PlcAddress _UpCameraPickNum = new PlcAddress();
  74. /// <summary>
  75. /// 上相机取料拍照次数=0 无
  76. /// </summary>
  77. public PlcAddress Out_UpCameraPickNum
  78. {
  79. get => _UpCameraPickNum;
  80. set => SetProperty(ref _UpCameraPickNum, value);
  81. }
  82. private PlcAddress _UpCameraPutNum = new PlcAddress();
  83. /// <summary>
  84. /// 上相机放料拍照次数=0 无
  85. /// </summary>
  86. public PlcAddress Out_UpCameraPutNum
  87. {
  88. get => _UpCameraPutNum;
  89. set => SetProperty(ref _UpCameraPutNum, value);
  90. }
  91. private PlcAddress _UPCameracheckNum = new PlcAddress();
  92. /// <summary>
  93. /// 上相机锁附/组装次数=0 无
  94. /// </summary>
  95. public PlcAddress Out_UPCameracheckNum
  96. {
  97. get => _UPCameracheckNum;
  98. set => SetProperty(ref _UPCameracheckNum, value);
  99. }
  100. private PlcAddress _FixedCameraPickNum = new PlcAddress();
  101. /// <summary>
  102. /// 取料固定位置拍产品相机数量 =0 无
  103. /// </summary>
  104. public PlcAddress Out_FixedCameraPickNum
  105. {
  106. get => _FixedCameraPickNum;
  107. set => SetProperty(ref _FixedCameraPickNum, value);
  108. }
  109. private PlcAddress _FixedCameraPutNum = new PlcAddress();
  110. /// <summary>
  111. /// 锁附/组装固定位置拍产品相机数量 =0 无
  112. /// </summary>
  113. public PlcAddress Out_FixedCameraPutNum
  114. {
  115. get => _FixedCameraPutNum;
  116. set => SetProperty(ref _FixedCameraPutNum, value);
  117. }
  118. private PlcAddress _FixedCameracheckNum = new PlcAddress();
  119. /// <summary>
  120. /// 固定相机检测锁附/组装次数=0 无
  121. /// </summary>
  122. public PlcAddress Out_FixedCameracheckNum
  123. {
  124. get => _FixedCameracheckNum;
  125. set => SetProperty(ref _FixedCameracheckNum, value);
  126. }
  127. private PlcAddress _WorkNum = new PlcAddress();
  128. /// <summary>
  129. /// 锁附/组装数量
  130. /// </summary>
  131. public PlcAddress Out_WorkNum
  132. {
  133. get { return _WorkNum; }
  134. set { SetProperty(ref _WorkNum, value); }
  135. }
  136. private PlcAddress _RemoveNum = new PlcAddress();
  137. /// <summary>
  138. /// 锁撕膜点位数量
  139. /// </summary>
  140. public PlcAddress Out_RemoveNum
  141. {
  142. get { return _RemoveNum; }
  143. set { SetProperty(ref _RemoveNum, value); }
  144. }
  145. private PlcAddress _GunYaNum = new PlcAddress();
  146. /// <summary>
  147. /// 锁附/组装数量
  148. /// </summary>
  149. public PlcAddress Out_GunYaNum
  150. {
  151. get { return _GunYaNum; }
  152. set { SetProperty(ref _GunYaNum, value); }
  153. }
  154. private PlcAddress _DownCameraStatus = new PlcAddress();
  155. /// <summary>
  156. /// 下相机拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  157. /// </summary>
  158. public PlcAddress Out_DownCameraStatus
  159. {
  160. get { return _DownCameraStatus; }
  161. set { SetProperty(ref _DownCameraStatus, value); }
  162. }
  163. private PlcAddress _UpCameraPickStatus = new PlcAddress();
  164. /// <summary>
  165. /// 上相机取料拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  166. /// </summary>
  167. public PlcAddress Out_UpCameraPickStatus
  168. {
  169. get { return _UpCameraPickStatus; }
  170. set { SetProperty(ref _UpCameraPickStatus, value); }
  171. }
  172. private PlcAddress _UpCameraPutStatus = new PlcAddress();
  173. /// <summary>
  174. /// 上相机锁附/组装拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  175. /// </summary>
  176. public PlcAddress Out_UpCameraPutStatus
  177. {
  178. get { return _UpCameraPutStatus; }
  179. set { SetProperty(ref _UpCameraPutStatus, value); }
  180. }
  181. private PlcAddress _UPCameracheckStatus = new PlcAddress();
  182. /// <summary>
  183. /// 上相机检测拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  184. /// </summary>
  185. public PlcAddress Out_UPCameracheckStatus
  186. {
  187. get { return _UPCameracheckStatus; }
  188. set { SetProperty(ref _UPCameracheckStatus, value); }
  189. }
  190. private PlcAddress _FixedCameraPickStatus = new PlcAddress();
  191. /// <summary>
  192. /// 固定相机取料拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  193. /// </summary>
  194. public PlcAddress Out_FixedCameraPickStatus
  195. {
  196. get { return _FixedCameraPickStatus; }
  197. set { SetProperty(ref _FixedCameraPickStatus, value); }
  198. }
  199. private PlcAddress _FixedCameraPutStatus = new PlcAddress();
  200. /// <summary>
  201. /// 固定相机锁附/组装拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  202. /// </summary>
  203. public PlcAddress Out_FixedCameraPutStatus
  204. {
  205. get { return _FixedCameraPutStatus; }
  206. set { SetProperty(ref _FixedCameraPutStatus, value); }
  207. }
  208. private PlcAddress _FixedCameracheckStatus = new PlcAddress();
  209. /// <summary>
  210. /// 固定相机检测拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK
  211. /// </summary>
  212. public PlcAddress Out_FixedCameracheckStatus
  213. {
  214. get { return _FixedCameracheckStatus; }
  215. set { SetProperty(ref _FixedCameracheckStatus, value); }
  216. }
  217. private PlcAddress _Out_CameraDone = new PlcAddress();
  218. /// <summary>
  219. /// 相机坐标拟合完成
  220. /// </summary>
  221. public PlcAddress Out_CameraDone
  222. {
  223. get { return _Out_CameraDone; }
  224. set { SetProperty(ref _Out_CameraDone, value); }
  225. }
  226. private PlcAddress _MesStatus = new PlcAddress();
  227. /// <summary>
  228. /// 过站信息 =1 允许工作 =2 本站放行 =3 数据上传完成
  229. /// </summary>
  230. public PlcAddress Out_MesStatus
  231. {
  232. get { return _MesStatus; }
  233. set { SetProperty(ref _MesStatus, value); }
  234. }
  235. private PlcPointAddress _PickCamera = new PlcPointAddress();
  236. /// <summary>
  237. /// 取料拍照点位参数
  238. /// </summary>
  239. public PlcPointAddress Out_PickCamera
  240. {
  241. get { return _PickCamera; }
  242. set { SetProperty(ref _PickCamera, value); }
  243. }
  244. private PlcPointAddress _Pick = new PlcPointAddress();
  245. /// <summary>
  246. /// 取料点位参数
  247. /// </summary>
  248. public PlcPointAddress Out_Pick
  249. {
  250. get { return _Pick; }
  251. set { SetProperty(ref _Pick, value); }
  252. }
  253. private PlcPointAddress _SecPosCamera = new PlcPointAddress();
  254. /// <summary>
  255. /// 下相机二次定位点位参数
  256. /// </summary>
  257. public PlcPointAddress Out_SecPosCamera
  258. {
  259. get { return _SecPosCamera; }
  260. set { SetProperty(ref _SecPosCamera, value); }
  261. }
  262. private PlcPointAddress _ScrewCamera = new PlcPointAddress();
  263. /// <summary>
  264. /// 锁附拍照点位参数
  265. /// </summary>
  266. public PlcPointAddress Out_ScrewCamera
  267. {
  268. get { return _ScrewCamera; }
  269. set { SetProperty(ref _ScrewCamera, value); }
  270. }
  271. private PlcPointAddress _Screw = new PlcPointAddress();
  272. /// <summary>
  273. /// 锁附点位参数
  274. /// </summary>
  275. public PlcPointAddress Out_Screw
  276. {
  277. get { return _Screw; }
  278. set { SetProperty(ref _Screw, value); }
  279. }
  280. private PlcPointAddress _CheckCamera = new PlcPointAddress();
  281. /// <summary>
  282. /// 复检点位参数
  283. /// </summary>
  284. public PlcPointAddress Out_CheckCamera
  285. {
  286. get { return _CheckCamera; }
  287. set { SetProperty(ref _CheckCamera, value); }
  288. }
  289. private PlcPointAddress _Out_RemovePos = new PlcPointAddress();
  290. /// <summary>
  291. /// 撕膜点位参数
  292. /// </summary>
  293. public PlcPointAddress Out_RemovePos
  294. {
  295. get { return _Out_RemovePos; }
  296. set { SetProperty(ref _Out_RemovePos, value); }
  297. }
  298. private PlcPointAddress _Out_PressurePlace = new PlcPointAddress();
  299. /// <summary>
  300. /// 压力组装点位参数
  301. /// </summary>
  302. public PlcPointAddress Out_PressurePlace
  303. {
  304. get { return _Out_PressurePlace; }
  305. set { SetProperty(ref _Out_PressurePlace, value); }
  306. }
  307. private PlcPointAddress _Out_Photo_Positipn = new PlcPointAddress();
  308. /// <summary>
  309. /// 扫码点位参数
  310. /// </summary>
  311. public PlcPointAddress Out_Photo_Positipn
  312. {
  313. get { return _Out_Photo_Positipn; }
  314. set { SetProperty(ref _Out_Photo_Positipn, value); }
  315. }
  316. private PlcPointAddress _Out_ProductPlace_Positipn = new PlcPointAddress();
  317. /// <summary>
  318. /// 产品升降取料位参数
  319. /// </summary>
  320. public PlcPointAddress Out_ProductPlace_Positipn
  321. {
  322. get { return _Out_ProductPlace_Positipn; }
  323. set { SetProperty(ref _Out_ProductPlace_Positipn, value); }
  324. }
  325. private PlcPointAddress _Out_GunPressure_Positipn = new PlcPointAddress();
  326. /// <summary>
  327. /// 滚压点位参数
  328. /// </summary>
  329. public PlcPointAddress Out_GunPressure_Positipn
  330. {
  331. get { return _Out_GunPressure_Positipn; }
  332. set { SetProperty(ref _Out_GunPressure_Positipn, value); }
  333. }
  334. private PlcAddress _Out_ScrewTeachNum;
  335. /// <summary>
  336. /// 披头矫正的模式,1:初始化时矫正,2:每个产品矫正一次,3:每颗螺丝矫正一次
  337. /// </summary>
  338. public PlcAddress Out_ScrewTeachNum
  339. {
  340. get { return _Out_ScrewTeachNum; }
  341. set { SetProperty(ref _Out_ScrewTeachNum, value); }
  342. }
  343. private PlcAddress _Out_ScrewTeachOk;
  344. /// <summary>
  345. /// 下相机矫正披头的结果,1:OK,2:NG
  346. /// </summary>
  347. public PlcAddress Out_ScrewTeachOk
  348. {
  349. get { return _Out_ScrewTeachOk; }
  350. set { SetProperty(ref _Out_ScrewTeachOk, value); }
  351. }
  352. private PlcAddress _Out_ScrewFeederIsChanged;
  353. /// <summary>
  354. /// 螺丝供料器发生改变
  355. /// </summary>
  356. public PlcAddress Out_ScrewFeederIsChanged
  357. {
  358. get { return _Out_ScrewFeederIsChanged; }
  359. set { SetProperty(ref _Out_ScrewFeederIsChanged, value); }
  360. }
  361. private PlcAddress _Down_Time;
  362. /// <summary>
  363. /// A_Camera Assy组装时间
  364. /// </summary>
  365. public PlcAddress Down_Time
  366. {
  367. get { return _Down_Time; }
  368. set { SetProperty(ref _Down_Time, value); }
  369. }
  370. private PlcAddress _Down_WetOut_Num;
  371. /// <summary>
  372. /// A_Camera Assy组装压力
  373. /// </summary>
  374. public PlcAddress Down_WetOut_Num
  375. {
  376. get { return _Down_WetOut_Num; }
  377. set { SetProperty(ref _Down_WetOut_Num, value); }
  378. }
  379. private PlcAddress _Down_WetOut_Num_max;
  380. /// <summary>
  381. /// A_Camera Assy组装压力最大值
  382. /// </summary>
  383. public PlcAddress Down_WetOut_Num_max
  384. {
  385. get { return _Down_WetOut_Num_max; }
  386. set { SetProperty(ref _Down_WetOut_Num_max, value); }
  387. }
  388. private PlcAddress _Out_PartCode;
  389. /// <summary>
  390. /// 零件的扫码编号写入到PLC
  391. /// </summary>
  392. public PlcAddress Out_PartCode
  393. {
  394. get { return _Out_PartCode; }
  395. set { SetProperty(ref _Out_PartCode, value); }
  396. }
  397. #endregion
  398. #region 从PLC读取的地址
  399. private PlcAddress _In_QrCodePhotoRequest = new PlcAddress();
  400. /// <summary>
  401. /// 二维码拍照请求
  402. /// </summary>
  403. public PlcAddress In_QrCodePhotoRequest
  404. {
  405. get { return _In_QrCodePhotoRequest; }
  406. set { SetProperty(ref _In_QrCodePhotoRequest, value); }
  407. }
  408. private PlcAddress _In_QrCodeCamera_ScanNum = new PlcAddress();
  409. /// <summary>
  410. /// 二维码拍照请求序号
  411. /// </summary>
  412. public PlcAddress In_QrCodeCamera_ScanNum
  413. {
  414. get { return _In_QrCodeCamera_ScanNum; }
  415. set { SetProperty(ref _In_QrCodeCamera_ScanNum, value); }
  416. }
  417. private PlcAddress _In_Code = new PlcAddress();
  418. /// <summary>
  419. /// 产品编码
  420. /// </summary>
  421. public PlcAddress In_Code
  422. {
  423. get { return _In_Code; }
  424. set { SetProperty(ref _In_Code, value); }
  425. }
  426. private PlcAddress _In_MesCheck = new PlcAddress();
  427. /// <summary>
  428. /// Mes交互 =1 获取过站信息当站是否生产,=2 上传本站数据
  429. /// </summary>
  430. public PlcAddress In_MesCheck
  431. {
  432. get { return _In_MesCheck; }
  433. set { SetProperty(ref _In_MesCheck, value); }
  434. }
  435. private PlcAddress _In_Result = new PlcAddress();
  436. /// <summary>
  437. /// 产品的最终结果
  438. /// </summary>
  439. public PlcAddress In_Result
  440. {
  441. get { return _In_Result; }
  442. set { SetProperty(ref _In_Result, value); }
  443. }
  444. private PlcAddress _In_DowmCameraNum = new PlcAddress();
  445. /// <summary>
  446. /// 下相机拍照编号
  447. /// </summary>
  448. public PlcAddress In_DowmCameraNum
  449. {
  450. get { return _In_DowmCameraNum; }
  451. set { SetProperty(ref _In_DowmCameraNum, value); }
  452. }
  453. private PlcAddress _In_DowmCameraExe = new PlcAddress();
  454. /// <summary>
  455. /// 下相机拍照触发
  456. /// </summary>
  457. public PlcAddress In_DowmCameraExe
  458. {
  459. get { return _In_DowmCameraExe; }
  460. set { SetProperty(ref _In_DowmCameraExe, value); }
  461. }
  462. private PlcAddress _In_UpCameraPickNum = new PlcAddress();
  463. /// <summary>
  464. /// 上相机取料拍照编号
  465. /// </summary>
  466. public PlcAddress In_UpCameraPickNum
  467. {
  468. get { return _In_UpCameraPickNum; }
  469. set { SetProperty(ref _In_UpCameraPickNum, value); }
  470. }
  471. private PlcAddress _In_UpCameraPickExe = new PlcAddress();
  472. /// <summary>
  473. /// 上相机取料拍照触发
  474. /// </summary>
  475. public PlcAddress In_UpCameraPickExe
  476. {
  477. get { return _In_UpCameraPickExe; }
  478. set { SetProperty(ref _In_UpCameraPickExe, value); }
  479. }
  480. private PlcAddress _In_UpCameraPutNum = new PlcAddress();
  481. /// <summary>
  482. /// 上相机锁附/组装拍照编号
  483. /// </summary>
  484. public PlcAddress In_UpCameraPutNum
  485. {
  486. get { return _In_UpCameraPutNum; }
  487. set { SetProperty(ref _In_UpCameraPutNum, value); }
  488. }
  489. private PlcAddress _In_UpCameraPutExe = new PlcAddress();
  490. /// <summary>
  491. /// 上相机锁附/组装拍照触发
  492. /// </summary>
  493. public PlcAddress In_UpCameraPutExe
  494. {
  495. get { return _In_UpCameraPutExe; }
  496. set { SetProperty(ref _In_UpCameraPutExe, value); }
  497. }
  498. private PlcAddress _In_UPCameracheckNum = new PlcAddress();
  499. /// <summary>
  500. /// 上相机检测拍照编号
  501. /// </summary>
  502. public PlcAddress In_UPCameracheckNum
  503. {
  504. get { return _In_UPCameracheckNum; }
  505. set { SetProperty(ref _In_UPCameracheckNum, value); }
  506. }
  507. private PlcAddress _In_UPCameracheckExe = new PlcAddress();
  508. /// <summary>
  509. /// 上相机检测拍照触发
  510. /// </summary>
  511. public PlcAddress In_UPCameracheckExe
  512. {
  513. get { return _In_UPCameracheckExe; }
  514. set { SetProperty(ref _In_UPCameracheckExe, value); }
  515. }
  516. private PlcAddress _In_FixedCameraPickNum = new PlcAddress();
  517. /// <summary>
  518. /// 固定相机取料拍照编号
  519. /// </summary>
  520. public PlcAddress In_FixedCameraPickNum
  521. {
  522. get { return _In_FixedCameraPickNum; }
  523. set { SetProperty(ref _In_FixedCameraPickNum, value); }
  524. }
  525. private PlcAddress _In_FixedCameraPickExe = new PlcAddress();
  526. /// <summary>
  527. /// 固定相机取料拍照触发
  528. /// </summary>
  529. public PlcAddress In_FixedCameraPickExe
  530. {
  531. get { return _In_FixedCameraPickExe; }
  532. set { SetProperty(ref _In_FixedCameraPickExe, value); }
  533. }
  534. private PlcAddress _In_FixedCameraPutNum = new PlcAddress();
  535. /// <summary>
  536. /// 固定相机锁附/组装拍照编号
  537. /// </summary>
  538. public PlcAddress In_FixedCameraPutNum
  539. {
  540. get { return _In_FixedCameraPutNum; }
  541. set { SetProperty(ref _In_FixedCameraPutNum, value); }
  542. }
  543. private PlcAddress _In_FixedCameraPutExe = new PlcAddress();
  544. /// <summary>
  545. /// 固定相机锁附/组装拍照触发
  546. /// </summary>
  547. public PlcAddress In_FixedCameraPutExe
  548. {
  549. get { return _In_FixedCameraPutExe; }
  550. set { SetProperty(ref _In_FixedCameraPutExe, value); }
  551. }
  552. private PlcAddress _In_FixedCameracheckNum = new PlcAddress();
  553. /// <summary>
  554. /// 固定相机检测拍照编号
  555. /// </summary>
  556. public PlcAddress In_FixedCameracheckNum
  557. {
  558. get { return _In_FixedCameracheckNum; }
  559. set { SetProperty(ref _In_FixedCameracheckNum, value); }
  560. }
  561. private PlcAddress _In_FixedCameracheckExe = new PlcAddress();
  562. /// <summary>
  563. /// 固定相机检测拍照触发
  564. /// </summary>
  565. public PlcAddress In_FixedCameracheckExe
  566. {
  567. get { return _In_FixedCameracheckExe; }
  568. set { SetProperty(ref _In_FixedCameracheckExe, value); }
  569. }
  570. private PlcAddress _In_ProductNum = new PlcAddress();
  571. /// <summary>
  572. /// 正在锁附/组装编号
  573. /// </summary>
  574. public PlcAddress In_ProductNum
  575. {
  576. get { return _In_ProductNum; }
  577. set { SetProperty(ref _In_ProductNum, value); }
  578. }
  579. private PlcAddress _In_RequestPosition = new PlcAddress();
  580. /// <summary>
  581. /// 请求目标位置
  582. /// </summary>
  583. public PlcAddress In_RequestPosition
  584. {
  585. get { return _In_RequestPosition; }
  586. set { SetProperty(ref _In_RequestPosition, value); }
  587. }
  588. private PlcAddress _In_WorkStart = new PlcAddress();
  589. /// <summary>
  590. /// 锁附/组装开始 =1
  591. /// </summary>
  592. public PlcAddress In_WorkStart
  593. {
  594. get { return _In_WorkStart; }
  595. set { SetProperty(ref _In_WorkStart, value); }
  596. }
  597. private PlcAddress _In_WorkDone = new PlcAddress();
  598. /// <summary>
  599. /// 锁附/组装结束 =1OK =2NG
  600. /// </summary>
  601. public PlcAddress In_WorkDone
  602. {
  603. get { return _In_WorkDone; }
  604. set { SetProperty(ref _In_WorkDone, value); }
  605. }
  606. private PlcAddress _In_PressureValue = new PlcAddress();
  607. /// <summary>
  608. /// 压力值
  609. /// </summary>
  610. public PlcAddress In_PressureValue
  611. {
  612. get { return _In_PressureValue; }
  613. set { SetProperty(ref _In_PressureValue, value); }
  614. }
  615. private PlcAddress _In_ScrewTeachExe;
  616. /// <summary>
  617. /// 触发披头视觉矫正
  618. /// </summary>
  619. public PlcAddress In_ScrewTeachExe
  620. {
  621. get { return _In_ScrewTeachExe; }
  622. set { SetProperty(ref _In_ScrewTeachExe, value); }
  623. }
  624. private PlcAddress _In_PickINC;
  625. /// <summary>
  626. /// 取一颗螺丝出发信号
  627. /// </summary>
  628. public PlcAddress In_PickINC
  629. {
  630. get { return _In_PickINC; }
  631. set { SetProperty(ref _In_PickINC, value); }
  632. }
  633. private PlcAddress _In_DryMode;
  634. /// <summary>
  635. /// 空跑模式
  636. /// </summary>
  637. public PlcAddress In_DryMode
  638. {
  639. get { return _In_DryMode; }
  640. set { SetProperty(ref _In_DryMode, value); }
  641. }
  642. private PlcAddress _In_Throw;
  643. /// <summary>
  644. /// 抛料信号
  645. /// </summary>
  646. public PlcAddress In_Throw
  647. {
  648. get { return _In_Throw; }
  649. set { SetProperty(ref _In_Throw, value); }
  650. }
  651. private PlcAddress _In_CurPressureValue = new PlcAddress();
  652. /// <summary>
  653. /// 压力值
  654. /// </summary>
  655. public PlcAddress In_CurPressureValue
  656. {
  657. get { return _In_CurPressureValue; }
  658. set { SetProperty(ref _In_CurPressureValue, value); }
  659. }
  660. private PlcAddress _RunMode;
  661. public PlcAddress RunMode
  662. {
  663. get { return _RunMode; }
  664. set { SetProperty(ref _RunMode, value); }
  665. }
  666. private PlcAddress _AutoRunning;
  667. public PlcAddress AutoRunning
  668. {
  669. get { return _AutoRunning; }
  670. set { SetProperty(ref _AutoRunning, value); }
  671. }
  672. private PlcAddress _ManualMode;
  673. public PlcAddress ManualMode
  674. {
  675. get { return _ManualMode; }
  676. set { SetProperty(ref _ManualMode, value); }
  677. }
  678. private PlcAddress _ClearMode;
  679. public PlcAddress ClearMode
  680. {
  681. get { return _ClearMode; }
  682. set { SetProperty(ref _ClearMode, value); }
  683. }
  684. private PlcAddress _Fault;
  685. public PlcAddress Fault
  686. {
  687. get { return _Fault; }
  688. set { SetProperty(ref _Fault, value); }
  689. }
  690. #endregion
  691. public PlcAddressConfig()
  692. {
  693. }
  694. // 初始默认值
  695. public void SetDefaultValue()
  696. {
  697. // 1. PlcNo 默认
  698. PlcNo = 1;
  699. // 辅助局部函数:确保 PlcAddress 实例存在
  700. PlcAddress Ensure(PlcAddress a)
  701. {
  702. if (a == null) return new PlcAddress();
  703. return a;
  704. }
  705. // 辅助局部函数:确保 PlcPointAddress 实例存在
  706. PlcPointAddress EnsurePoint(PlcPointAddress p)
  707. {
  708. if (p == null) return new PlcPointAddress();
  709. return p;
  710. }
  711. // Out_QrCodeCamera(二维码拍照点位)初始化并赋地址
  712. Out_QrCodeCamera = EnsurePoint(Out_QrCodeCamera);
  713. Out_QrCodeCamera.Description = "二维码拍照点位参数";
  714. Out_QrCodeCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].X_Position";
  715. Out_QrCodeCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].X_Velocity";
  716. Out_QrCodeCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Y_Position";
  717. Out_QrCodeCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Y_Velocity";
  718. Out_QrCodeCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Z_Position_Start";
  719. Out_QrCodeCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Z_Velocity_Start";
  720. Out_QrCodeCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Z_Position_Stop";
  721. Out_QrCodeCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Z_Velocity_Stop";
  722. Out_QrCodeCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].U_Position";
  723. Out_QrCodeCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].U_Velocity";
  724. Out_QrCodeCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].R_Position";
  725. Out_QrCodeCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].R_Velocity";
  726. Out_QrCodeCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Torque";
  727. Out_QrCodeCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].Feeder";
  728. Out_QrCodeCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Camera_Scan[{0}].ScrewProNum";
  729. In_QrCodePhotoRequest = Ensure(In_QrCodePhotoRequest);
  730. In_QrCodePhotoRequest.Address = "ns=4;s=DB_Communication|ToPC.Camera_ScanExe";
  731. In_QrCodePhotoRequest.DataType = "int16";
  732. In_QrCodePhotoRequest.Description = "二维码拍照请求";
  733. In_QrCodeCamera_ScanNum = Ensure(In_QrCodeCamera_ScanNum);
  734. In_QrCodeCamera_ScanNum.Address = "ns=4;s=DB_Communication|Camera_ScanNum";
  735. In_QrCodeCamera_ScanNum.DataType = "int16";
  736. In_QrCodeCamera_ScanNum.Description = "二维码拍照编号";
  737. Out_QrCodePhotoResault = Ensure(Out_QrCodePhotoResault);
  738. Out_QrCodePhotoResault.Address = "ns=4;s=DB_Communication|FromPC.Camera_ScanStatus";
  739. Out_QrCodePhotoResault.DataType = "int16";
  740. Out_QrCodePhotoResault.Description = "二维码拍照结果";
  741. // 2. 按 JSON 提供的数据设置默认值(以当前属性名为准)
  742. Out_ProductLoadMode = Ensure(Out_ProductLoadMode);
  743. Out_ProductLoadMode.Address = "ns=4;s=DB_Communication|FromPC.ProductLoadMode";
  744. Out_ProductLoadMode.DataType = "int16";
  745. Out_ProductLoadMode.Description = "产品切换类型";
  746. Out_WorkMode = Ensure(Out_WorkMode);
  747. Out_WorkMode.Address = "ns=4;s=DB_Communication|FromPC.WorkMode";
  748. Out_WorkMode.DataType = "int16";
  749. Out_WorkMode.Description = "工作模式 =1 拍1打1 =2 拍1打所有";
  750. Out_PickPointNum = Ensure(Out_PickPointNum);
  751. Out_PickPointNum.Address = "ns=4;s=DB_Communication|FromPC.PickPointNum";
  752. Out_PickPointNum.DataType = "int16";
  753. Out_PickPointNum.Description = "取料位置 =0 不需要取料 =1 需要取料";
  754. Out_DowmCameraNum = Ensure(Out_DowmCameraNum);
  755. Out_DowmCameraNum.Address = "ns=4;s=DB_Communication|FromPC.DowmCameraNum";
  756. Out_DowmCameraNum.DataType = "int16";
  757. Out_DowmCameraNum.Description = "下相机拍照次数=0 无";
  758. Out_UpCameraPickNum = Ensure(Out_UpCameraPickNum);
  759. Out_UpCameraPickNum.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPickNum";
  760. Out_UpCameraPickNum.DataType = "int16";
  761. Out_UpCameraPickNum.Description = "上相机取料拍照次数=0 无";
  762. Out_UpCameraPutNum = Ensure(Out_UpCameraPutNum);
  763. Out_UpCameraPutNum.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPutNum";
  764. Out_UpCameraPutNum.DataType = "int16";
  765. Out_UpCameraPutNum.Description = "上相机放料拍照次数=0 无";
  766. Out_UPCameracheckNum = Ensure(Out_UPCameracheckNum);
  767. Out_UPCameracheckNum.Address = "ns=4;s=DB_Communication|FromPC.UPCameracheckNum";
  768. Out_UPCameracheckNum.DataType = "int16";
  769. Out_UPCameracheckNum.Description = "上相机锁附/组装次数=0 无";
  770. Out_FixedCameraPickNum = Ensure(Out_FixedCameraPickNum);
  771. Out_FixedCameraPickNum.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPickNum";
  772. Out_FixedCameraPickNum.DataType = "int16";
  773. Out_FixedCameraPickNum.Description = "取料固定位置拍产品相机数量 =0 无";
  774. Out_FixedCameraPutNum = Ensure(Out_FixedCameraPutNum);
  775. Out_FixedCameraPutNum.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPutNum";
  776. Out_FixedCameraPutNum.DataType = "int16";
  777. Out_FixedCameraPutNum.Description = "锁附/组装固定位置拍产品相机数量 =0 无";
  778. Out_FixedCameracheckNum = Ensure(Out_FixedCameracheckNum);
  779. Out_FixedCameracheckNum.Address = "ns=4;s=DB_Communication|FromPC.FixedCameracheckNum";
  780. Out_FixedCameracheckNum.DataType = "int16";
  781. Out_FixedCameracheckNum.Description = "固定相机检测锁附/组装次数=0 无";
  782. Out_PickCamera = EnsurePoint(Out_PickCamera);
  783. // 3. 为其余 Out_* 设置合理默认(基于注释)
  784. Out_WorkNum = Ensure(Out_WorkNum);
  785. Out_WorkNum.Address = "ns=4;s=DB_Communication|FromPC.WorkNum";
  786. Out_WorkNum.DataType = "int16";
  787. Out_WorkNum.Description = "锁附/组装数量";
  788. Out_RemoveNum = Ensure(Out_RemoveNum);
  789. Out_RemoveNum.Address = "ns=4;s=DB_Communication|FromPC.RemoveNum";
  790. Out_RemoveNum.DataType = "int16";
  791. Out_RemoveNum.Description = "撕膜点位数量";
  792. //Out_GunYaNum
  793. Out_GunYaNum = Ensure(Out_GunYaNum);
  794. Out_GunYaNum.Address = "ns=4;s=DB_Communication|FromPC.GunYaNum";
  795. Out_GunYaNum.DataType = "int16";
  796. Out_GunYaNum.Description = "滚压点位数量";
  797. Out_DownCameraStatus = Ensure(Out_DownCameraStatus);
  798. Out_DownCameraStatus.Address = "ns=4;s=DB_Communication|FromPC.DownCameraStatus";
  799. Out_DownCameraStatus.DataType = "int16";
  800. Out_DownCameraStatus.Description = "下相机拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  801. Out_UpCameraPickStatus = Ensure(Out_UpCameraPickStatus);
  802. Out_UpCameraPickStatus.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPickStatus";
  803. Out_UpCameraPickStatus.DataType = "int16";
  804. Out_UpCameraPickStatus.Description = "上相机取料拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  805. Out_UpCameraPutStatus = Ensure(Out_UpCameraPutStatus);
  806. Out_UpCameraPutStatus.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPutStatus";
  807. Out_UpCameraPutStatus.DataType = "int16";
  808. Out_UpCameraPutStatus.Description = "上相机锁附/组装拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  809. Out_UPCameracheckStatus = Ensure(Out_UPCameracheckStatus);
  810. Out_UPCameracheckStatus.Address = "ns=4;s=DB_Communication|FromPC.UPCameracheckStatus";
  811. Out_UPCameracheckStatus.DataType = "int16";
  812. Out_UPCameracheckStatus.Description = "上相机检测拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  813. Out_FixedCameraPickStatus = Ensure(Out_FixedCameraPickStatus);
  814. Out_FixedCameraPickStatus.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPickStatus";
  815. Out_FixedCameraPickStatus.DataType = "int16";
  816. Out_FixedCameraPickStatus.Description = "固定相机取料拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  817. Out_FixedCameraPutStatus = Ensure(Out_FixedCameraPutStatus);
  818. Out_FixedCameraPutStatus.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPutStatus";
  819. Out_FixedCameraPutStatus.DataType = "int16";
  820. Out_FixedCameraPutStatus.Description = "固定相机锁附/组装拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  821. Out_FixedCameracheckStatus = Ensure(Out_FixedCameracheckStatus);
  822. Out_FixedCameracheckStatus.Address = "ns=4;s=DB_Communication|FromPC.FixedCameracheckStatus";
  823. Out_FixedCameracheckStatus.DataType = "int16";
  824. Out_FixedCameracheckStatus.Description = "固定相机检测拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  825. Out_CameraDone = Ensure(Out_CameraDone);
  826. Out_CameraDone.Address = "ns=4;s=DB_Communication|FromPC.CameraDone";
  827. Out_CameraDone.DataType = "int16";
  828. Out_CameraDone.Description = "相机坐标拟合完成";
  829. Out_MesStatus = Ensure(Out_MesStatus);
  830. Out_MesStatus.Address = "ns=4;s=DB_Communication|FromPC.MesStatus[{0}]";
  831. Out_MesStatus.DataType = "int16";
  832. Out_MesStatus.Description = "过站信息 =1 允许工作 =2 本站放行 =3 数据上传完成";
  833. // Out_PickCamera 初始化并赋地址
  834. Out_PickCamera = EnsurePoint(Out_PickCamera);
  835. Out_PickCamera.Description = "取料拍照点位参数";
  836. Out_PickCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Position";
  837. Out_PickCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Velocity";
  838. Out_PickCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Position";
  839. Out_PickCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Velocity";
  840. Out_PickCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Position_Start";
  841. Out_PickCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Velocity_Start";
  842. Out_PickCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Position_Stop";
  843. Out_PickCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Velocity_Stop";
  844. Out_PickCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Position";
  845. Out_PickCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Velocity";
  846. Out_PickCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Position";
  847. Out_PickCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Velocity";
  848. Out_PickCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Torque";
  849. Out_PickCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Feeder";
  850. Out_PickCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].ScrewProNum";
  851. // Out_Pick(取料点位)初始化并赋地址
  852. Out_Pick = EnsurePoint(Out_Pick);
  853. Out_Pick.Description = "取料点位参数";
  854. Out_Pick.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Position";
  855. Out_Pick.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Velocity";
  856. Out_Pick.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Position";
  857. Out_Pick.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Velocity";
  858. Out_Pick.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Position_Start";
  859. Out_Pick.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Velocity_Start";
  860. Out_Pick.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Position_Stop";
  861. Out_Pick.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Velocity_Stop";
  862. Out_Pick.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Position";
  863. Out_Pick.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Velocity";
  864. Out_Pick.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Position";
  865. Out_Pick.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Velocity";
  866. Out_Pick.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Torque";
  867. Out_Pick.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Feeder";
  868. Out_Pick.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].ScrewProNum";
  869. // Out_SecPosCamera(下相机二次定位)初始化并赋地址
  870. Out_SecPosCamera = EnsurePoint(Out_SecPosCamera);
  871. Out_SecPosCamera.Description = "下相机二次定位点位参数";
  872. Out_SecPosCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Position";
  873. Out_SecPosCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Velocity";
  874. Out_SecPosCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Position";
  875. Out_SecPosCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Velocity";
  876. Out_SecPosCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Position_Start";
  877. Out_SecPosCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Velocity_Start";
  878. Out_SecPosCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Position_Stop";
  879. Out_SecPosCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Velocity_Stop";
  880. Out_SecPosCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Position";
  881. Out_SecPosCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Velocity";
  882. Out_SecPosCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Position";
  883. Out_SecPosCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Velocity";
  884. Out_SecPosCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Torque";
  885. Out_SecPosCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Feeder";
  886. Out_SecPosCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].ScrewProNum";
  887. // Out_ScrewCamera(锁附拍照点位)初始化并赋地址
  888. Out_ScrewCamera = EnsurePoint(Out_ScrewCamera);
  889. Out_ScrewCamera.Description = "锁附拍照点位参数";
  890. Out_ScrewCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Position";
  891. Out_ScrewCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Velocity";
  892. Out_ScrewCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Position";
  893. Out_ScrewCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Velocity";
  894. Out_ScrewCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Position_Start";
  895. Out_ScrewCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Velocity_Start";
  896. Out_ScrewCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Position_Stop";
  897. Out_ScrewCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Velocity_Stop";
  898. Out_ScrewCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Position";
  899. Out_ScrewCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Velocity";
  900. Out_ScrewCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Position";
  901. Out_ScrewCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Velocity";
  902. Out_ScrewCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Torque";
  903. Out_ScrewCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Feeder";
  904. Out_ScrewCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].ScrewProNum";
  905. // Out_Screw(锁附点位)初始化并赋地址
  906. Out_Screw = EnsurePoint(Out_Screw);
  907. Out_Screw.Description = "锁附点位参数";
  908. Out_Screw.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Position";
  909. Out_Screw.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Velocity";
  910. Out_Screw.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Position";
  911. Out_Screw.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Velocity";
  912. Out_Screw.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Position_Start";
  913. Out_Screw.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Velocity_Start";
  914. Out_Screw.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Position_Stop";
  915. Out_Screw.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Velocity_Stop";
  916. Out_Screw.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Position";
  917. Out_Screw.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Velocity";
  918. Out_Screw.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Position";
  919. Out_Screw.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Velocity";
  920. Out_Screw.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Torque";
  921. Out_Screw.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Feeder";
  922. Out_Screw.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].ScrewProNum";
  923. // Out_CheckCamera(复检点位)初始化并赋地址
  924. Out_CheckCamera = EnsurePoint(Out_CheckCamera);
  925. Out_CheckCamera.Description = "复检点位参数";
  926. Out_CheckCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Position";
  927. Out_CheckCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Velocity";
  928. Out_CheckCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Position";
  929. Out_CheckCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Velocity";
  930. Out_CheckCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Position_Start";
  931. Out_CheckCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Velocity_Start";
  932. Out_CheckCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Position_Stop";
  933. Out_CheckCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Velocity_Stop";
  934. Out_CheckCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Position";
  935. Out_CheckCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Velocity";
  936. Out_CheckCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Position";
  937. Out_CheckCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Velocity";
  938. Out_CheckCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Torque";
  939. Out_CheckCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Feeder";
  940. Out_CheckCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].ScrewProNum";
  941. //撕膜点位
  942. Out_RemovePos = EnsurePoint(Out_RemovePos);
  943. Out_RemovePos.Description = "撕膜点位参数";
  944. Out_RemovePos.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].X_Position";
  945. Out_RemovePos.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].X_Velocity";
  946. Out_RemovePos.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Y_Position";
  947. Out_RemovePos.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Y_Velocity";
  948. Out_RemovePos.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Z_Position_Start";
  949. Out_RemovePos.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Z_Velocity_Start";
  950. Out_RemovePos.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Z_Position_Stop";
  951. Out_RemovePos.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Z_Velocity_Stop";
  952. Out_RemovePos.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].U_Position";
  953. Out_RemovePos.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].U_Velocity";
  954. Out_RemovePos.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].R_Position";
  955. Out_RemovePos.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].R_Velocity";
  956. Out_RemovePos.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Torque";
  957. Out_RemovePos.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].Feeder";
  958. Out_RemovePos.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Remove[{0}].ScrewProNum";
  959. //扫码点位
  960. Out_Photo_Positipn = EnsurePoint(Out_Photo_Positipn);
  961. Out_Photo_Positipn.Description = "扫码点位参数";
  962. Out_Photo_Positipn.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].X_Position";
  963. Out_Photo_Positipn.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].X_Velocity";
  964. Out_Photo_Positipn.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Y_Position";
  965. Out_Photo_Positipn.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Y_Velocity";
  966. Out_Photo_Positipn.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Position_Start";
  967. Out_Photo_Positipn.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Velocity_Start";
  968. Out_Photo_Positipn.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Position_Stop";
  969. Out_Photo_Positipn.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Velocity_Stop";
  970. Out_Photo_Positipn.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].U_Position";
  971. Out_Photo_Positipn.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].U_Velocity";
  972. Out_Photo_Positipn.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].R_Position";
  973. Out_Photo_Positipn.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].R_Velocity";
  974. Out_Photo_Positipn.Torque.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Torque";
  975. Out_Photo_Positipn.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Feeder";
  976. Out_Photo_Positipn.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].ScrewProNum";
  977. // 产品升降取料位参数
  978. Out_ProductPlace_Positipn = EnsurePoint(Out_ProductPlace_Positipn);
  979. Out_ProductPlace_Positipn.Description = "产品升降取料位参数";
  980. Out_ProductPlace_Positipn.X_Position.Address = "ns=4;s=DB_Communication|";
  981. Out_ProductPlace_Positipn.X_Velocity.Address = "ns=4;s=DB_Communication|";
  982. Out_ProductPlace_Positipn.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Move[{0}].Y_Position";//取料移栽Y轴
  983. Out_ProductPlace_Positipn.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Move[{0}].Y_Velocity";
  984. Out_ProductPlace_Positipn.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Move[{0}].Z_Position_Start";//取料升降Z轴
  985. Out_ProductPlace_Positipn.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Move[{0}].Z_Velocity_Start";
  986. Out_ProductPlace_Positipn.Z_Position_Stop.Address = "ns=4;s=DB_Communication|";
  987. Out_ProductPlace_Positipn.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|";
  988. Out_ProductPlace_Positipn.U_Position.Address = "ns=4;s=DB_Communication|";
  989. Out_ProductPlace_Positipn.U_Velocity.Address = "ns=4;s=DB_Communication|";
  990. Out_ProductPlace_Positipn.R_Position.Address = "ns=4;s=DB_Communication|";
  991. Out_ProductPlace_Positipn.R_Velocity.Address = "ns=4;s=DB_Communication|";
  992. Out_ProductPlace_Positipn.Torque.Address = "ns=4;s=DB_Communication|";
  993. Out_ProductPlace_Positipn.Feeder.Address = "ns=4;s=DB_Communication|";
  994. Out_ProductPlace_Positipn.ScrewProNum.Address = "ns=4;s=DB_Communication|";
  995. // 滚压点位参数
  996. Out_GunPressure_Positipn = EnsurePoint(Out_GunPressure_Positipn);
  997. Out_GunPressure_Positipn.Description = "滚压点位参数";
  998. Out_GunPressure_Positipn.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_gunya[{0}].X_Position";
  999. Out_GunPressure_Positipn.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_gunya[{0}].X_Velocity";
  1000. Out_GunPressure_Positipn.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_gunya[{0}].Y_Position";
  1001. Out_GunPressure_Positipn.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_gunya[{0}].Y_Velocity";
  1002. Out_GunPressure_Positipn.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_gunya[{0}].Z_Position_Start";//滚压升降Z轴
  1003. Out_GunPressure_Positipn.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_gunya[{0}].Z_Velocity_Start";
  1004. Out_GunPressure_Positipn.Z_Position_Stop.Address = "ns=4;s=DB_Communication|";
  1005. Out_GunPressure_Positipn.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|";
  1006. Out_GunPressure_Positipn.U_Position.Address = "ns=4;s=DB_Communication|";
  1007. Out_GunPressure_Positipn.U_Velocity.Address = "ns=4;s=DB_Communication|";
  1008. Out_GunPressure_Positipn.R_Position.Address = "ns=4;s=DB_Communication|";
  1009. Out_GunPressure_Positipn.R_Velocity.Address = "ns=4;s=DB_Communication|";
  1010. Out_GunPressure_Positipn.Torque.Address = "ns=4;s=DB_Communication|";
  1011. Out_GunPressure_Positipn.Feeder.Address = "ns=4;s=DB_Communication|";
  1012. Out_GunPressure_Positipn.ScrewProNum.Address = "ns=4;s=DB_Communication|";
  1013. ////压力组装点位
  1014. //Out_PressurePlace = EnsurePoint(Out_PressurePlace);
  1015. //Out_PressurePlace.Description = "压力组装点位参数";
  1016. //Out_PressurePlace.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].X_Position";
  1017. //Out_PressurePlace.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].X_Velocity";
  1018. //Out_PressurePlace.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Y_Position";
  1019. //Out_PressurePlace.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Y_Velocity";
  1020. //Out_PressurePlace.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Z_Position_Start";
  1021. //Out_PressurePlace.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Z_Velocity_Start";
  1022. //Out_PressurePlace.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Z_Position_Stop";
  1023. //Out_PressurePlace.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Z_Velocity_Stop";
  1024. //Out_PressurePlace.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].U_Position";
  1025. //Out_PressurePlace.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].U_Velocity";
  1026. //Out_PressurePlace.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].R_Position";
  1027. //Out_PressurePlace.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].R_Velocity";
  1028. //Out_PressurePlace.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Torque";
  1029. //Out_PressurePlace.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].Feeder";
  1030. //Out_PressurePlace.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Wetout[{0}].ScrewProNum";
  1031. // Out_CheckCamera(附加轴点位)初始化并赋地址,
  1032. Out_ScrewTeachNum = Ensure(Out_ScrewTeachNum);
  1033. Out_ScrewTeachNum.Address = "ns=4;s=DB_Communication|FromPC.ScrewTeachNum";
  1034. Out_ScrewTeachNum.DataType = "int16";
  1035. Out_ScrewTeachNum.Description = "披头矫正的模式,1:初始化时矫正,2:每个产品矫正一次,3:每颗螺丝矫正一次";
  1036. Out_ScrewTeachOk = Ensure(Out_ScrewTeachOk);
  1037. Out_ScrewTeachOk.Address = "ns=4;s=DB_Communication|FromPC.ScrewTeachOK";
  1038. Out_ScrewTeachOk.DataType = "int16";
  1039. Out_ScrewTeachOk.Description = "下相机矫正披头的结果,1:OK,2:NG";
  1040. Out_ScrewFeederIsChanged = Ensure(Out_ScrewFeederIsChanged);
  1041. Out_ScrewFeederIsChanged.Address = "ns=4;s=DB_Communication|FromPC.PickNumChange";
  1042. Out_ScrewFeederIsChanged.DataType = "int16";
  1043. Out_ScrewFeederIsChanged.Description = "供料器发生改变";
  1044. Out_PartCode = Ensure(Out_PartCode);
  1045. Out_PartCode.Address = "ns=4;s=DB_Communication|FromPC.Code";
  1046. Out_PartCode.DataType = "string";
  1047. Out_PartCode.Description = "零件的扫码编号写入到PLC";
  1048. // 4. In_* 默认(假定从 PLC 读到 PC,使用 ToPC 前缀)
  1049. In_Code = Ensure(In_Code);
  1050. In_Code.Address = "ns=4;s=DB_Communication|ToPC.Mes[{0}].Code";
  1051. In_Code.DataType = "string";
  1052. In_Code.Description = "产品编码";
  1053. In_MesCheck = Ensure(In_MesCheck);
  1054. In_MesCheck.Address = "ns=4;s=DB_Communication|ToPC.Mes[{0}].Check";
  1055. In_MesCheck.DataType = "int16";
  1056. In_MesCheck.Description = "Mes交互 =1 获取过站信息当站是否生产,=2 上传本站数据";
  1057. In_Result = Ensure(In_Result);
  1058. In_Result.Address = "ns=4;s=DB_Communication|ToPC.Mes[{0}].Product_Status";
  1059. In_Result.DataType = "int16";
  1060. In_Result.Description = "产品的最终结果,1:OK; 2:NG";
  1061. In_DowmCameraNum = Ensure(In_DowmCameraNum);
  1062. In_DowmCameraNum.Address = "ns=4;s=DB_Communication|ToPC.DowmCameraNum";
  1063. In_DowmCameraNum.DataType = "int16";
  1064. In_DowmCameraNum.Description = "下相机拍照编号";
  1065. In_DowmCameraExe = Ensure(In_DowmCameraExe);
  1066. In_DowmCameraExe.Address = "ns=4;s=DB_Communication|ToPC.DowmCameraExe";
  1067. In_DowmCameraExe.DataType = "int16";
  1068. In_DowmCameraExe.Description = "下相机拍照触发";
  1069. In_UpCameraPickNum = Ensure(In_UpCameraPickNum);
  1070. In_UpCameraPickNum.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPickNum";
  1071. In_UpCameraPickNum.DataType = "int16";
  1072. In_UpCameraPickNum.Description = "上相机取料拍照编号";
  1073. In_UpCameraPickExe = Ensure(In_UpCameraPickExe);
  1074. In_UpCameraPickExe.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPickExe";
  1075. In_UpCameraPickExe.DataType = "int16";
  1076. In_UpCameraPickExe.Description = "上相机取料拍照触发";
  1077. In_UpCameraPutNum = Ensure(In_UpCameraPutNum);
  1078. In_UpCameraPutNum.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPutNum";
  1079. In_UpCameraPutNum.DataType = "int16";
  1080. In_UpCameraPutNum.Description = "上相机锁附/组装拍照编号";
  1081. In_UpCameraPutExe = Ensure(In_UpCameraPutExe);
  1082. In_UpCameraPutExe.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPutExe";
  1083. In_UpCameraPutExe.DataType = "int16";
  1084. In_UpCameraPutExe.Description = "上相机锁附/组装拍照触发";
  1085. In_UPCameracheckNum = Ensure(In_UPCameracheckNum);
  1086. In_UPCameracheckNum.Address = "ns=4;s=DB_Communication|ToPC.UPCameracheckNum";
  1087. In_UPCameracheckNum.DataType = "int16";
  1088. In_UPCameracheckNum.Description = "上相机检测拍照编号";
  1089. In_UPCameracheckExe = Ensure(In_UPCameracheckExe);
  1090. In_UPCameracheckExe.Address = "ns=4;s=DB_Communication|ToPC.UPCameracheckExe";
  1091. In_UPCameracheckExe.DataType = "int16";
  1092. In_UPCameracheckExe.Description = "上相机检测拍照触发";
  1093. In_FixedCameraPickNum = Ensure(In_FixedCameraPickNum);
  1094. In_FixedCameraPickNum.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPickNum";
  1095. In_FixedCameraPickNum.DataType = "int16";
  1096. In_FixedCameraPickNum.Description = "固定相机取料拍照编号";
  1097. In_FixedCameraPickExe = Ensure(In_FixedCameraPickExe);
  1098. In_FixedCameraPickExe.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPickExe";
  1099. In_FixedCameraPickExe.DataType = "int16";
  1100. In_FixedCameraPickExe.Description = "固定相机取料拍照触发";
  1101. In_FixedCameraPutNum = Ensure(In_FixedCameraPutNum);
  1102. In_FixedCameraPutNum.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPutNum";
  1103. In_FixedCameraPutNum.DataType = "int16";
  1104. In_FixedCameraPutNum.Description = "固定相机锁附/组装拍照编号";
  1105. In_FixedCameraPutExe = Ensure(In_FixedCameraPutExe);
  1106. In_FixedCameraPutExe.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPutExe";
  1107. In_FixedCameraPutExe.DataType = "int16";
  1108. In_FixedCameraPutExe.Description = "固定相机锁附/组装拍照触发";
  1109. In_FixedCameracheckNum = Ensure(In_FixedCameracheckNum);
  1110. In_FixedCameracheckNum.Address = "ns=4;s=DB_Communication|ToPC.FixedCameracheckNum";
  1111. In_FixedCameracheckNum.DataType = "int16";
  1112. In_FixedCameracheckNum.Description = "固定相机检测拍照编号";
  1113. In_FixedCameracheckExe = Ensure(In_FixedCameracheckExe);
  1114. In_FixedCameracheckExe.Address = "ns=4;s=DB_Communication|ToPC.FixedCameracheckExe";
  1115. In_FixedCameracheckExe.DataType = "int16";
  1116. In_FixedCameracheckExe.Description = "固定相机检测拍照触发";
  1117. In_ProductNum = Ensure(In_ProductNum);
  1118. In_ProductNum.Address = "ns=4;s=DB_Communication|ToPC.ProductNum";
  1119. In_ProductNum.DataType = "int16";
  1120. In_ProductNum.Description = "正在锁附/组装编号";
  1121. In_RequestPosition = Ensure(In_RequestPosition);
  1122. In_RequestPosition.Address = "ns=4;s=DB_Communication|ToPC.RequestPosition";
  1123. In_RequestPosition.DataType = "int16";
  1124. In_RequestPosition.Description = "请求目标位置";
  1125. In_WorkStart = Ensure(In_WorkStart);
  1126. In_WorkStart.Address = "ns=4;s=DB_Communication|ToPC.WorkStart[{0}]";
  1127. In_WorkStart.DataType = "int16";
  1128. In_WorkStart.Description = "锁附/组装开始 =1";
  1129. In_WorkDone = Ensure(In_WorkDone);
  1130. In_WorkDone.Address = "ns=4;s=DB_Communication|ToPC.WorkDone[{0}]";
  1131. In_WorkDone.DataType = "int16";
  1132. In_WorkDone.Description = "锁附/组装结束 =1OK =2NG";
  1133. In_PressureValue = Ensure(In_PressureValue);
  1134. In_PressureValue.Address = "ns=4;s=DB_other|WetOut";// "ns=4;s=DB_DriveControl|AICtrl[{0}].Status.UserData";
  1135. In_PressureValue.DataType = "float";
  1136. In_PressureValue.Description = "压力值";
  1137. In_CurPressureValue = Ensure(In_CurPressureValue);
  1138. In_CurPressureValue.Address = "ns=4;s=DB_DriveControl|AICtrl[{0}].Status.UserData2"; ;// "ns=4;s=DB_DriveControl|AICtrl[{0}].Status.UserData";
  1139. In_CurPressureValue.DataType = "float";
  1140. In_CurPressureValue.Description = "实时压力值";
  1141. In_ScrewTeachExe = Ensure(In_ScrewTeachExe);
  1142. In_ScrewTeachExe.Address = "ns=4;s=DB_Communication|ToPC.ScrewTeachExe";
  1143. In_ScrewTeachExe.DataType = "bool";
  1144. In_ScrewTeachExe.Description = "触发披头视觉矫正";
  1145. In_PickINC = Ensure(In_PickINC);
  1146. In_PickINC.Address = "ns=4;s=DB_Communication|ToPC.PickINC";
  1147. In_PickINC.DataType = "int16";
  1148. In_PickINC.Description = "取一颗螺丝触发信号";
  1149. In_DryMode = Ensure(In_DryMode);
  1150. In_DryMode.Address = "ns=4;s=DB_Control|Mode.Status.DryMode";
  1151. In_DryMode.DataType = "bool";
  1152. In_DryMode.Description = "空跑模式";
  1153. Down_Time = Ensure(Down_Time);
  1154. Down_Time.Address = "ns=4;s=DB_other|Down_Time";
  1155. Down_Time.DataType = "int32";
  1156. Down_Time.Description = "A_Camera Assy时间";
  1157. Down_WetOut_Num = Ensure(Down_WetOut_Num);
  1158. Down_WetOut_Num.Address = "ns=4;s=DB_other|WetOut_Num";
  1159. Down_WetOut_Num.DataType = "float";
  1160. Down_WetOut_Num.Description = "A_Camera Assy压力";
  1161. Down_WetOut_Num_max = Ensure(Down_WetOut_Num_max);
  1162. Down_WetOut_Num_max.Address = "ns=4;s=DB_other|WetOut_MAX";
  1163. Down_WetOut_Num_max.DataType = "float";
  1164. Down_WetOut_Num_max.Description = "A_Camera Assy压力最大值";
  1165. In_Throw = Ensure(In_Throw);
  1166. In_Throw.Address = "ns=4;s=DB_Communication|Throw[0]";
  1167. In_Throw.DataType = "Bool";
  1168. In_Throw.Description = "抛料信号";
  1169. RunMode = Ensure(RunMode);
  1170. RunMode.Address = "ns=4;s=DB_Control|Mode.Status.RunMode";
  1171. RunMode.DataType = "Bool";
  1172. RunMode.Description = "自动运行模式";
  1173. AutoRunning = Ensure(AutoRunning);
  1174. AutoRunning.Address = "ns=4;s=DB_Control|Mode.Status.AutoRunning";
  1175. AutoRunning.DataType = "Bool";
  1176. AutoRunning.Description = "生产模式";
  1177. ManualMode = Ensure(ManualMode);
  1178. ManualMode.Address = "ns=4;s=DB_Control|Mode.Status.ManualMode";
  1179. ManualMode.DataType = "Bool";
  1180. ManualMode.Description = "维修模式";
  1181. ClearMode = Ensure(ClearMode);
  1182. ClearMode.Address = "ns=4;s=DB_Control|Mode.Status.ClearMode";
  1183. ClearMode.DataType = "Bool";
  1184. ClearMode.Description = "流线模式";
  1185. Fault = Ensure(Fault);
  1186. Fault.Address = "ns=4;s=DB_Control|Mode.Status.Fault";
  1187. Fault.DataType = "Bool";
  1188. Fault.Description = "报警";
  1189. // 说明:若项目中 PlcAddress 的实际属性名或类型与此不同(例如使用枚举、不同字段名),
  1190. // 请根据实际类型调整赋值。本方法主要提供合理的默认字符串地址、数据类型及描述,便于后续从配置覆盖。
  1191. }
  1192. }
  1193. }