PlcAddressConfig.cs 61 KB

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