PlcAddressConfig.cs 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433
  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_RobotWPosition;
  315. public PlcAddress Out_RobotWPosition
  316. {
  317. get { return _Out_RobotWPosition; }
  318. set { SetProperty(ref _Out_RobotWPosition, value); }
  319. }
  320. private PlcAddress _Out_RobotVPosition;
  321. public PlcAddress Out_RobotVPosition
  322. {
  323. get { return _Out_RobotVPosition; }
  324. set { SetProperty(ref _Out_RobotVPosition, value); }
  325. }
  326. private PlcAddress _Out_ScrewTeachOk;
  327. /// <summary>
  328. /// 下相机矫正披头的结果,1:OK,2:NG
  329. /// </summary>
  330. public PlcAddress Out_ScrewTeachOk
  331. {
  332. get { return _Out_ScrewTeachOk; }
  333. set { SetProperty(ref _Out_ScrewTeachOk, value); }
  334. }
  335. private PlcAddress _Out_ScrewFeederIsChanged;
  336. /// <summary>
  337. /// 螺丝供料器发生改变
  338. /// </summary>
  339. public PlcAddress Out_ScrewFeederIsChanged
  340. {
  341. get { return _Out_ScrewFeederIsChanged; }
  342. set { SetProperty(ref _Out_ScrewFeederIsChanged, value); }
  343. }
  344. private PlcAddress _Check_Screw;
  345. /// <summary>
  346. /// 点检扭力 电批正转
  347. /// </summary>
  348. public PlcAddress Check_ScrewTorque
  349. {
  350. get { return _Check_Screw; }
  351. set { SetProperty(ref _Check_Screw, value); }
  352. }
  353. private PlcAddress _Screw_OK;
  354. public PlcAddress Screw_OK
  355. {
  356. get { return _Screw_OK; }
  357. set { SetProperty(ref _Screw_OK, value); }
  358. }
  359. private PlcAddress _Screw_NG;
  360. public PlcAddress Screw_NG
  361. {
  362. get { return _Screw_NG; }
  363. set { SetProperty(ref _Screw_NG, value); }
  364. }
  365. private PlcAddress _OP_AutoManual;
  366. /// <summary>
  367. /// PLC手动模式与自动模式切换
  368. /// </summary>
  369. public PlcAddress OP_AutoManual
  370. {
  371. get { return _OP_AutoManual; }
  372. set { _OP_AutoManual = value; }
  373. }
  374. private PlcAddress _ManuToHome;
  375. /// <summary>
  376. /// 关闭真空
  377. /// </summary>
  378. public PlcAddress ManuToHome
  379. {
  380. get { return _ManuToHome; }
  381. set { _ManuToHome = value; }
  382. }
  383. private PlcAddress _ManuTOWork;
  384. /// <summary>
  385. /// 打开真空
  386. /// </summary>
  387. public PlcAddress ManuTOWork
  388. {
  389. get { return _ManuTOWork; }
  390. set { _ManuTOWork = value; }
  391. }
  392. private PlcAddress _InWork;
  393. /// <summary>
  394. /// 真空关闭反馈
  395. /// </summary>
  396. public PlcAddress InWork
  397. {
  398. get { return _InWork; }
  399. set { _InWork = value; }
  400. }
  401. private PlcAddress _Screw_Backward;
  402. /// <summary>
  403. /// 电批反转 需要一直给true
  404. /// </summary>
  405. public PlcAddress Screw_Backward
  406. {
  407. get { return _Screw_Backward; }
  408. set { _Screw_Backward = value; }
  409. }
  410. private PlcAddress _Manu_XAxis_Velocity;
  411. /// <summary>
  412. /// 设置X轴速度
  413. /// </summary>
  414. public PlcAddress Manu_XAxis_Velocity
  415. {
  416. get { return _Manu_XAxis_Velocity; }
  417. set { _Manu_XAxis_Velocity = value; }
  418. }
  419. private PlcAddress _Manu_YAxis_Velocity;
  420. /// <summary>
  421. /// 设置Y轴速度
  422. /// </summary>
  423. public PlcAddress Manu_YAxis_Velocity
  424. {
  425. get { return _Manu_YAxis_Velocity; }
  426. set { _Manu_YAxis_Velocity = value; }
  427. }
  428. private PlcAddress _Manu_ZAxis_Velocity;
  429. /// <summary>
  430. /// 设置Z轴速度
  431. /// </summary>
  432. public PlcAddress Manu_ZAxis_Velocity
  433. {
  434. get { return _Manu_ZAxis_Velocity; }
  435. set { _Manu_ZAxis_Velocity = value; }
  436. }
  437. private PlcAddress _PC_code = new PlcAddress();
  438. /// <summary>
  439. /// 发送plc流程码
  440. /// </summary>
  441. public PlcAddress Out_PC_code
  442. {
  443. get { return _PC_code; }
  444. set { SetProperty(ref _PC_code, value); }
  445. }
  446. #endregion
  447. #region 从PLC读取的地址
  448. private PlcAddress _In_Code = new PlcAddress();
  449. /// <summary>
  450. /// 产品编码
  451. /// </summary>
  452. public PlcAddress In_Code
  453. {
  454. get { return _In_Code; }
  455. set { SetProperty(ref _In_Code, value); }
  456. }
  457. private PlcAddress _Cam_code_mode;
  458. public PlcAddress Cam_code_mode
  459. {
  460. get { return _Cam_code_mode; }
  461. set { SetProperty(ref _Cam_code_mode, value); }
  462. }
  463. private PlcAddress _In_MesCheck = new PlcAddress();
  464. /// <summary>
  465. /// Mes交互 =1 获取过站信息当站是否生产,=2 上传本站数据
  466. /// </summary>
  467. public PlcAddress In_MesCheck
  468. {
  469. get { return _In_MesCheck; }
  470. set { SetProperty(ref _In_MesCheck, value); }
  471. }
  472. private PlcAddress _In_Result = new PlcAddress();
  473. /// <summary>
  474. /// 产品的最终结果
  475. /// </summary>
  476. public PlcAddress In_Result
  477. {
  478. get { return _In_Result; }
  479. set { SetProperty(ref _In_Result, value); }
  480. }
  481. private PlcAddress _In_DowmCameraNum = new PlcAddress();
  482. /// <summary>
  483. /// 下相机拍照编号
  484. /// </summary>
  485. public PlcAddress In_DowmCameraNum
  486. {
  487. get { return _In_DowmCameraNum; }
  488. set { SetProperty(ref _In_DowmCameraNum, value); }
  489. }
  490. private PlcAddress _In_DowmCameraExe = new PlcAddress();
  491. /// <summary>
  492. /// 下相机拍照触发
  493. /// </summary>
  494. public PlcAddress In_DowmCameraExe
  495. {
  496. get { return _In_DowmCameraExe; }
  497. set { SetProperty(ref _In_DowmCameraExe, value); }
  498. }
  499. private PlcAddress _In_UpCameraPickNum = new PlcAddress();
  500. /// <summary>
  501. /// 上相机取料拍照编号
  502. /// </summary>
  503. public PlcAddress In_UpCameraPickNum
  504. {
  505. get { return _In_UpCameraPickNum; }
  506. set { SetProperty(ref _In_UpCameraPickNum, value); }
  507. }
  508. private PlcAddress _In_UpCameraPickExe = new PlcAddress();
  509. /// <summary>
  510. /// 上相机取料拍照触发
  511. /// </summary>
  512. public PlcAddress In_UpCameraPickExe
  513. {
  514. get { return _In_UpCameraPickExe; }
  515. set { SetProperty(ref _In_UpCameraPickExe, value); }
  516. }
  517. private PlcAddress _In_UpCameraPutNum = new PlcAddress();
  518. /// <summary>
  519. /// 上相机锁附/组装拍照编号
  520. /// </summary>
  521. public PlcAddress In_UpCameraPutNum
  522. {
  523. get { return _In_UpCameraPutNum; }
  524. set { SetProperty(ref _In_UpCameraPutNum, value); }
  525. }
  526. private PlcAddress _In_UpCameraPutExe = new PlcAddress();
  527. /// <summary>
  528. /// 上相机锁附/组装拍照触发
  529. /// </summary>
  530. public PlcAddress In_UpCameraPutExe
  531. {
  532. get { return _In_UpCameraPutExe; }
  533. set { SetProperty(ref _In_UpCameraPutExe, value); }
  534. }
  535. private PlcAddress _In_UPCameracheckNum = new PlcAddress();
  536. /// <summary>
  537. /// 上相机检测拍照编号
  538. /// </summary>
  539. public PlcAddress In_UPCameracheckNum
  540. {
  541. get { return _In_UPCameracheckNum; }
  542. set { SetProperty(ref _In_UPCameracheckNum, value); }
  543. }
  544. private PlcAddress _In_UPCameracheckExe = new PlcAddress();
  545. /// <summary>
  546. /// 上相机检测拍照触发
  547. /// </summary>
  548. public PlcAddress In_UPCameracheckExe
  549. {
  550. get { return _In_UPCameracheckExe; }
  551. set { SetProperty(ref _In_UPCameracheckExe, value); }
  552. }
  553. private PlcAddress _In_FixedCameraPickNum = new PlcAddress();
  554. /// <summary>
  555. /// 固定相机取料拍照编号
  556. /// </summary>
  557. public PlcAddress In_FixedCameraPickNum
  558. {
  559. get { return _In_FixedCameraPickNum; }
  560. set { SetProperty(ref _In_FixedCameraPickNum, value); }
  561. }
  562. private PlcAddress _In_FixedCameraPickExe = new PlcAddress();
  563. /// <summary>
  564. /// 固定相机取料拍照触发
  565. /// </summary>
  566. public PlcAddress In_FixedCameraPickExe
  567. {
  568. get { return _In_FixedCameraPickExe; }
  569. set { SetProperty(ref _In_FixedCameraPickExe, value); }
  570. }
  571. private PlcAddress _In_FixedCameraPutNum = new PlcAddress();
  572. /// <summary>
  573. /// 固定相机锁附/组装拍照编号
  574. /// </summary>
  575. public PlcAddress In_FixedCameraPutNum
  576. {
  577. get { return _In_FixedCameraPutNum; }
  578. set { SetProperty(ref _In_FixedCameraPutNum, value); }
  579. }
  580. private PlcAddress _In_FixedCameraPutExe = new PlcAddress();
  581. /// <summary>
  582. /// 固定相机锁附/组装拍照触发
  583. /// </summary>
  584. public PlcAddress In_FixedCameraPutExe
  585. {
  586. get { return _In_FixedCameraPutExe; }
  587. set { SetProperty(ref _In_FixedCameraPutExe, value); }
  588. }
  589. private PlcAddress _In_FixedCameracheckNum = new PlcAddress();
  590. /// <summary>
  591. /// 固定相机检测拍照编号
  592. /// </summary>
  593. public PlcAddress In_FixedCameracheckNum
  594. {
  595. get { return _In_FixedCameracheckNum; }
  596. set { SetProperty(ref _In_FixedCameracheckNum, value); }
  597. }
  598. private PlcAddress _In_FixedCameracheckExe = new PlcAddress();
  599. /// <summary>
  600. /// 固定相机检测拍照触发
  601. /// </summary>
  602. public PlcAddress In_FixedCameracheckExe
  603. {
  604. get { return _In_FixedCameracheckExe; }
  605. set { SetProperty(ref _In_FixedCameracheckExe, value); }
  606. }
  607. private PlcAddress _In_QrCodePhotoRequest = new PlcAddress();
  608. /// <summary>
  609. /// 二维码拍照请求
  610. /// </summary>
  611. public PlcAddress In_QrCodePhotoRequest
  612. {
  613. get { return _In_QrCodePhotoRequest; }
  614. set { SetProperty(ref _In_QrCodePhotoRequest, value); }
  615. }
  616. private PlcAddress _In_ProductNum = new PlcAddress();
  617. /// <summary>
  618. /// 正在锁附/组装编号
  619. /// </summary>
  620. public PlcAddress In_ProductNum
  621. {
  622. get { return _In_ProductNum; }
  623. set { SetProperty(ref _In_ProductNum, value); }
  624. }
  625. private PlcAddress _In_RequestPosition = new PlcAddress();
  626. /// <summary>
  627. /// 请求目标位置
  628. /// </summary>
  629. public PlcAddress In_RequestPosition
  630. {
  631. get { return _In_RequestPosition; }
  632. set { SetProperty(ref _In_RequestPosition, value); }
  633. }
  634. private PlcAddress _In_WorkStart = new PlcAddress();
  635. /// <summary>
  636. /// 锁附/组装开始 =1
  637. /// </summary>
  638. public PlcAddress In_WorkStart
  639. {
  640. get { return _In_WorkStart; }
  641. set { SetProperty(ref _In_WorkStart, value); }
  642. }
  643. private PlcAddress _In_WorkDone = new PlcAddress();
  644. /// <summary>
  645. /// 锁附/组装结束 =1OK =2NG
  646. /// </summary>
  647. public PlcAddress In_WorkDone
  648. {
  649. get { return _In_WorkDone; }
  650. set { SetProperty(ref _In_WorkDone, value); }
  651. }
  652. private PlcAddress _In_PressureValue = new PlcAddress();
  653. /// <summary>
  654. /// 压力值
  655. /// </summary>
  656. public PlcAddress In_PressureValue
  657. {
  658. get { return _In_PressureValue; }
  659. set { SetProperty(ref _In_PressureValue, value); }
  660. }
  661. private PlcAddress _In_ScrewTeachExe;
  662. /// <summary>
  663. /// 触发披头视觉矫正
  664. /// </summary>
  665. public PlcAddress In_ScrewTeachExe
  666. {
  667. get { return _In_ScrewTeachExe; }
  668. set { SetProperty(ref _In_ScrewTeachExe, value); }
  669. }
  670. private PlcAddress _In_Screw_checkExe;
  671. /// <summary>
  672. /// 触发相机拍照螺丝复检
  673. /// </summary>
  674. public PlcAddress In_Screw_checkExe
  675. {
  676. get { return _In_Screw_checkExe; }
  677. set { SetProperty(ref _In_Screw_checkExe, value); }
  678. }
  679. private PlcAddress _In_PickINC;
  680. /// <summary>
  681. /// 取一颗螺丝出发信号
  682. /// </summary>
  683. public PlcAddress In_PickINC
  684. {
  685. get { return _In_PickINC; }
  686. set { SetProperty(ref _In_PickINC, value); }
  687. }
  688. private PlcAddress _ScrewProvide1;
  689. /// <summary>
  690. /// 螺丝供料器1到位信号
  691. /// </summary>
  692. public PlcAddress ScrewProvide1
  693. {
  694. get { return _ScrewProvide1; }
  695. set { _ScrewProvide1 = value; }
  696. }
  697. private PlcAddress _ScrewProvide2;
  698. /// <summary>
  699. /// 螺丝供料器1到位信号
  700. /// </summary>
  701. public PlcAddress ScrewProvide2
  702. {
  703. get { return _ScrewProvide2; }
  704. set { _ScrewProvide2 = value; }
  705. }
  706. private PlcAddress _In_Throw;
  707. /// <summary>
  708. /// 抛料信号
  709. /// </summary>
  710. public PlcAddress In_Throw
  711. {
  712. get { return _In_Throw; }
  713. set { SetProperty(ref _In_Throw, value); }
  714. }
  715. private PlcAddress _RunMode;
  716. /// <summary>
  717. /// 自动运行模式
  718. /// </summary>
  719. public PlcAddress RunMode
  720. {
  721. get { return _RunMode; }
  722. set { SetProperty(ref _RunMode, value); }
  723. }
  724. private PlcAddress _AutoRunning;
  725. public PlcAddress AutoRunning
  726. {
  727. get { return _AutoRunning; }
  728. set { SetProperty(ref _AutoRunning, value); }
  729. }
  730. /// <summary>
  731. /// 维修模式
  732. /// </summary>
  733. private PlcAddress _ManualMode;
  734. public PlcAddress ManualMode
  735. {
  736. get { return _ManualMode; }
  737. set { SetProperty(ref _ManualMode, value); }
  738. }
  739. private PlcAddress _ClearMode;
  740. /// <summary>
  741. /// 流线模式
  742. /// </summary>
  743. public PlcAddress ClearMode
  744. {
  745. get { return _ClearMode; }
  746. set { SetProperty(ref _ClearMode, value); }
  747. }
  748. private PlcAddress _Fault;
  749. /// <summary>
  750. /// 报警
  751. /// </summary>
  752. public PlcAddress Fault
  753. {
  754. get { return _Fault; }
  755. set { SetProperty(ref _Fault, value); }
  756. }
  757. private PlcAddress _In_FzCameraPixExe = new PlcAddress();
  758. /// <summary>
  759. /// 翻转相机触发拍照
  760. /// </summary>
  761. public PlcAddress In_FzCameraPixExe
  762. {
  763. get { return _In_FzCameraPixExe; }
  764. set { SetProperty(ref _In_FzCameraPixExe, value); }
  765. }
  766. #endregion
  767. public PlcAddressConfig()
  768. {
  769. }
  770. // 初始默认值
  771. public void SetDefaultValue()
  772. {
  773. // 1. PlcNo 默认
  774. PlcNo = 1;
  775. // 辅助局部函数:确保 PlcAddress 实例存在
  776. PlcAddress Ensure(PlcAddress a)
  777. {
  778. if (a == null) return new PlcAddress();
  779. return a;
  780. }
  781. // 辅助局部函数:确保 PlcPointAddress 实例存在
  782. PlcPointAddress EnsurePoint(PlcPointAddress p)
  783. {
  784. if (p == null) return new PlcPointAddress();
  785. return p;
  786. }
  787. // 2. 按 JSON 提供的数据设置默认值(以当前属性名为准)
  788. Out_ProductLoadMode = Ensure(Out_ProductLoadMode);
  789. Out_ProductLoadMode.Address = "ns=4;s=DB_Communication|FromPC.ProductLoadMode";
  790. Out_ProductLoadMode.DataType = "int16";
  791. Out_ProductLoadMode.Description = "产品切换类型";
  792. Out_WorkMode = Ensure(Out_WorkMode);
  793. Out_WorkMode.Address = "ns=4;s=DB_Communication|FromPC.WorkMode";
  794. Out_WorkMode.DataType = "int16";
  795. Out_WorkMode.Description = Lang.工作模式1拍1打12拍1打所有;
  796. Out_PickPointNum = Ensure(Out_PickPointNum);
  797. Out_PickPointNum.Address = "ns=4;s=DB_Communication|FromPC.PickPointNum";
  798. Out_PickPointNum.DataType = "int16";
  799. Out_PickPointNum.Description = Lang.取料位置0不需要取料1需要取料;
  800. Out_DowmCameraNum = Ensure(Out_DowmCameraNum);
  801. Out_DowmCameraNum.Address = "ns=4;s=DB_Communication|FromPC.DowmCameraNum";
  802. Out_DowmCameraNum.DataType = "int16";
  803. Out_DowmCameraNum.Description = Lang.下相机拍照次数0无;
  804. Out_UpCameraPickNum = Ensure(Out_UpCameraPickNum);
  805. Out_UpCameraPickNum.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPickNum";
  806. Out_UpCameraPickNum.DataType = "int16";
  807. Out_UpCameraPickNum.Description = Lang.上相机取料拍照次数0无;
  808. Out_UpCameraPutNum = Ensure(Out_UpCameraPutNum);
  809. Out_UpCameraPutNum.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPutNum";
  810. Out_UpCameraPutNum.DataType = "int16";
  811. Out_UpCameraPutNum.Description = Lang.上相机放料拍照次数0无;
  812. Out_UPCameracheckNum = Ensure(Out_UPCameracheckNum);
  813. Out_UPCameracheckNum.Address = "ns=4;s=DB_Communication|FromPC.UPCameracheckNum";
  814. Out_UPCameracheckNum.DataType = "int16";
  815. Out_UPCameracheckNum.Description = Lang.上相机锁附组装次数0无;
  816. Out_FixedCameraPickNum = Ensure(Out_FixedCameraPickNum);
  817. Out_FixedCameraPickNum.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPickNum";
  818. Out_FixedCameraPickNum.DataType = "int16";
  819. Out_FixedCameraPickNum.Description = Lang.取料固定位置拍产品相机数量0无;
  820. Out_FixedCameraPutNum = Ensure(Out_FixedCameraPutNum);
  821. Out_FixedCameraPutNum.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPutNum";
  822. Out_FixedCameraPutNum.DataType = "int16";
  823. Out_FixedCameraPutNum.Description = Lang.锁附组装固定位置拍产品相机数量0无;
  824. Out_FixedCameracheckNum = Ensure(Out_FixedCameracheckNum);
  825. Out_FixedCameracheckNum.Address = "ns=4;s=DB_Communication|FromPC.FixedCameracheckNum";
  826. Out_FixedCameracheckNum.DataType = "int16";
  827. Out_FixedCameracheckNum.Description = Lang.固定相机检测锁附组装次数0无;
  828. Out_PickCamera = EnsurePoint(Out_PickCamera);
  829. // 3. 为其余 Out_* 设置合理默认(基于注释)
  830. Out_WorkNum = Ensure(Out_WorkNum);
  831. Out_WorkNum.Address = "ns=4;s=DB_Communication|FromPC.WorkNum";
  832. Out_WorkNum.DataType = "int16";
  833. Out_WorkNum.Description = Lang.锁附组装数量;
  834. Out_DownCameraStatus = Ensure(Out_DownCameraStatus);
  835. Out_DownCameraStatus.Address = "ns=4;s=DB_Communication|FromPC.DownCameraStatus";
  836. Out_DownCameraStatus.DataType = "int16";
  837. Out_DownCameraStatus.Description = Lang.下相机拍照结果1拍照OK2拍照NG3取图拍照OK;
  838. Out_AddScrewView = Ensure(Out_AddScrewView);
  839. Out_AddScrewView.Address = "ns=4;s=DB_Communication|FromPC.Out_AddScrewView";
  840. Out_AddScrewView.DataType = "int16";
  841. Out_AddScrewView.Description = Lang.添加螺丝型号结果1成功2失败;
  842. Out_Screw_check_status = Ensure(Out_Screw_check_status);
  843. Out_Screw_check_status.Address = "ns=4;s=DB_Communication|FromPC.Screw_check_status";
  844. Out_Screw_check_status.DataType = "int16";
  845. Out_Screw_check_status.Description = Lang.相机拍照螺丝复检的结果1OK2NG;
  846. Out_UpCameraPickStatus = Ensure(Out_UpCameraPickStatus);
  847. Out_UpCameraPickStatus.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPickStatus";
  848. Out_UpCameraPickStatus.DataType = "int16";
  849. Out_UpCameraPickStatus.Description = Lang.上相机取料拍照结果1拍照OK2拍照NG3取图拍照OK;
  850. Out_UpCameraPutStatus = Ensure(Out_UpCameraPutStatus);
  851. Out_UpCameraPutStatus.Address = "ns=4;s=DB_Communication|FromPC.UpCameraPutStatus";
  852. Out_UpCameraPutStatus.DataType = "int16";
  853. Out_UpCameraPutStatus.Description = Lang.上相机锁附组装拍照结果1拍照OK2拍照NG3取图拍照OK;
  854. Out_UPCameracheckStatus = Ensure(Out_UPCameracheckStatus);
  855. Out_UPCameracheckStatus.Address = "ns=4;s=DB_Communication|FromPC.UPCameracheckStatus";
  856. Out_UPCameracheckStatus.DataType = "int16";
  857. Out_UPCameracheckStatus.Description = Lang.上相机检测拍照结果1拍照OK2拍照NG3取图拍照OK;
  858. Out_FixedCameraPickStatus = Ensure(Out_FixedCameraPickStatus);
  859. Out_FixedCameraPickStatus.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPickStatus";
  860. Out_FixedCameraPickStatus.DataType = "int16";
  861. Out_FixedCameraPickStatus.Description = Lang.固定相机取料拍照结果1拍照OK2拍照NG3取图拍照OK;
  862. Out_FixedCameraPutStatus = Ensure(Out_FixedCameraPutStatus);
  863. Out_FixedCameraPutStatus.Address = "ns=4;s=DB_Communication|FromPC.FixedCameraPutStatus";
  864. Out_FixedCameraPutStatus.DataType = "int16";
  865. Out_FixedCameraPutStatus.Description = Lang.固定相机锁附组装拍照结果1拍照OK2拍照NG3取图拍照OK;
  866. Out_FixedCameracheckStatus = Ensure(Out_FixedCameracheckStatus);
  867. Out_FixedCameracheckStatus.Address = "ns=4;s=DB_Communication|FromPC.FixedCameracheckStatus";
  868. Out_FixedCameracheckStatus.DataType = "int16";
  869. Out_FixedCameracheckStatus.Description = Lang.固定相机检测拍照结果1拍照OK2拍照NG3取图拍照OK;
  870. Out_CameraDone = Ensure(Out_CameraDone);
  871. Out_CameraDone.Address = "ns=4;s=DB_Communication|FromPC.CameraDone";
  872. Out_CameraDone.DataType = "int16";
  873. Out_CameraDone.Description = Lang.相机坐标拟合完成;
  874. Out_MesStatus = Ensure(Out_MesStatus);
  875. Out_MesStatus.Address = "ns=4;s=DB_Communication|FromPC.MesStatus[{0}]";
  876. Out_MesStatus.DataType = "int16";
  877. Out_MesStatus.Description = Lang.过站信息1允许工作2本站放行3数据上传完成;
  878. Out_QrCodePhotoResault = Ensure(Out_QrCodePhotoResault);
  879. Out_QrCodePhotoResault.Address = "ns=4;s=DB_Communication|FromPC.photo_dwon";
  880. Out_QrCodePhotoResault.DataType = "int16";
  881. Out_QrCodePhotoResault.Description = "pc发送二维码拍照点位 1=成功 2=失败";
  882. Check_ScrewTorque = Ensure(Check_ScrewTorque);
  883. Check_ScrewTorque.Address = "ns=4;s=DB_DriveControl|ScrewCtrl[1].Cmd.ManuStart";
  884. Check_ScrewTorque.DataType = "Bool";
  885. Check_ScrewTorque.Description = "电批正转";
  886. Out_PC_code = Ensure(Out_PC_code);
  887. Out_PC_code.Address = "ns=4;s=DB_Communication|FromPC.PC_code[{0}]";
  888. Out_PC_code.DataType = "string";
  889. Out_PC_code.Description = "发送plc流程码";
  890. //首先到废料桶上方投料
  891. //有三个示教的地方
  892. //
  893. //Machine.OP_AutoManual ns=4;s=DB_Control|Machine.OP_AutoManual 手自动 都是bool
  894. //ns=4;s=DB_DriveControl|VacCtrl[1].Cmd.ManuToHome 关闭真空 只需要给true就行
  895. //ns=4;s=DB_DriveControl|VacCtrl[1].Cmd.ManuTOWork 打开真空 只需要给true就行
  896. //ns=4;s=DB_DriveControl|VacCtrl[1].Status.InWork 真空到位反馈 吸到料
  897. //ns=4;s=DB_DriveControl|ScrewCtrl[1].Cmd.ManuBackward 电批反转
  898. //ns=4;s=DB_DriveControl|AxisCtrl[1].Parm.ManuVelocity Manu_Axis_Velocity
  899. Manu_XAxis_Velocity = Ensure(Manu_XAxis_Velocity);
  900. Manu_XAxis_Velocity.Address = "ns=4;s=DB_DriveControl|AxisCtrl[1].Parm.ManuVelocity";
  901. Manu_XAxis_Velocity.DataType = "Float";
  902. Manu_XAxis_Velocity.Description = "手动设置X轴速度";
  903. Manu_YAxis_Velocity = Ensure(Manu_YAxis_Velocity);
  904. Manu_YAxis_Velocity.Address = "ns=4;s=DB_DriveControl|AxisCtrl[2].Parm.ManuVelocity";
  905. Manu_YAxis_Velocity.DataType = "Float";
  906. Manu_YAxis_Velocity.Description = "手动设置Y轴速度";
  907. Manu_ZAxis_Velocity = Ensure(Manu_ZAxis_Velocity);
  908. Manu_ZAxis_Velocity.Address = "ns=4;s=DB_DriveControl|AxisCtrl[3].Parm.ManuVelocity";
  909. Manu_ZAxis_Velocity.DataType = "Float";
  910. Manu_ZAxis_Velocity.Description = "手动设置Z轴速度";
  911. OP_AutoManual = Ensure(OP_AutoManual);
  912. OP_AutoManual.Address = "ns=4;s=DB_Control|Machine.OP_AutoManual";
  913. OP_AutoManual.DataType = "Bool";
  914. OP_AutoManual.Description = "手自动切换";
  915. ManuToHome = Ensure(ManuToHome);
  916. ManuToHome.Address = "ns=4;s=DB_DriveControl|VacCtrl[1].Cmd.ManuToHome";
  917. ManuToHome.DataType = "Bool";
  918. ManuToHome.Description = "关闭真空";
  919. ManuTOWork = Ensure(ManuTOWork);
  920. ManuTOWork.Address = "ns=4;s=DB_DriveControl|VacCtrl[1].Cmd.ManuToWork";
  921. ManuTOWork.DataType = "Bool";
  922. ManuTOWork.Description = "打开真空";
  923. InWork = Ensure(InWork);
  924. InWork.Address = "ns=4;s=DB_DriveControl|VacCtrl[1].Status.InWork";
  925. InWork.DataType = "Bool";
  926. InWork.Description = "真空到位反馈";
  927. Screw_OK = Ensure(Screw_OK);
  928. Screw_OK.Address = "ns=4;s=DB_DriveControl|ScrewCtrl[1].Status.OK";
  929. Screw_OK.DataType = "Bool";
  930. Screw_OK.Description = "电批OK";
  931. Screw_NG = Ensure(Screw_NG);
  932. Screw_NG.Address = "ns=4;s=DB_DriveControl|ScrewCtrl[1].Status.NG";
  933. Screw_NG.DataType = "Bool";
  934. Screw_NG.Description = "电批NG";
  935. Screw_Backward = Ensure(Screw_Backward);
  936. Screw_Backward.Address = "ns=4;s=DB_DriveControl|ScrewCtrl[1].Cmd.ManuBackward";
  937. Screw_Backward.DataType = "Bool";
  938. Screw_Backward.Description = "电批反转";
  939. Out_FzCameraPickStatus = Ensure(Out_FzCameraPickStatus);
  940. Out_FzCameraPickStatus.Address = "ns=4;s=DB_Communication|FromPC.FzCameraPickStatus";
  941. Out_FzCameraPickStatus.DataType = "int16";
  942. Out_FzCameraPickStatus.Description = "翻转相机取料拍照结果 =1 拍照OK =2 拍照NG =3 取图拍照OK";
  943. // Out_PickCamera 初始化并赋地址
  944. Out_PickCamera = EnsurePoint(Out_PickCamera);
  945. Out_PickCamera.Description = Lang.取料拍照点位参数;
  946. Out_PickCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Position";
  947. Out_PickCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].X_Velocity";
  948. Out_PickCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Position";
  949. Out_PickCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Y_Velocity";
  950. Out_PickCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Position_Start";
  951. Out_PickCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Velocity_Start";
  952. Out_PickCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Position_Stop";
  953. Out_PickCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Z_Velocity_Stop";
  954. Out_PickCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Position";
  955. Out_PickCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].U_Velocity";
  956. Out_PickCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Position";
  957. Out_PickCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].R_Velocity";
  958. Out_PickCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Torque";
  959. Out_PickCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].Feeder";
  960. Out_PickCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_PickCamera[{0}].ScrewProNum";
  961. // Out_Pick(取料点位)初始化并赋地址
  962. Out_Pick = EnsurePoint(Out_Pick);
  963. Out_Pick.Description = Lang.取料点位参数;
  964. Out_Pick.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Position";
  965. Out_Pick.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].X_Velocity";
  966. Out_Pick.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Position";
  967. Out_Pick.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Y_Velocity";
  968. Out_Pick.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Position_Start";
  969. Out_Pick.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Velocity_Start";
  970. Out_Pick.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Position_Stop";
  971. Out_Pick.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Z_Velocity_Stop";
  972. Out_Pick.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Position";
  973. Out_Pick.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].U_Velocity";
  974. Out_Pick.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Position";
  975. Out_Pick.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].R_Velocity";
  976. Out_Pick.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Torque";
  977. Out_Pick.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].Feeder";
  978. Out_Pick.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Pick[{0}].ScrewProNum";
  979. // Out_SecPosCamera(下相机二次定位)初始化并赋地址
  980. Out_SecPosCamera = EnsurePoint(Out_SecPosCamera);
  981. Out_SecPosCamera.Description = Lang.下相机二次定位点位参数;
  982. Out_SecPosCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Position";
  983. Out_SecPosCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].X_Velocity";
  984. Out_SecPosCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Position";
  985. Out_SecPosCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Y_Velocity";
  986. Out_SecPosCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Position_Start";
  987. Out_SecPosCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Velocity_Start";
  988. Out_SecPosCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Position_Stop";
  989. Out_SecPosCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Z_Velocity_Stop";
  990. Out_SecPosCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Position";
  991. Out_SecPosCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].U_Velocity";
  992. Out_SecPosCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Position";
  993. Out_SecPosCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].R_Velocity";
  994. Out_SecPosCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Torque";
  995. Out_SecPosCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].Feeder";
  996. Out_SecPosCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_SecPosCamera[{0}].ScrewProNum";
  997. // Out_ScrewCamera(锁附拍照点位)初始化并赋地址
  998. Out_ScrewCamera = EnsurePoint(Out_ScrewCamera);
  999. Out_ScrewCamera.Description = Lang.锁附拍照点位参数;
  1000. Out_ScrewCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Position";
  1001. Out_ScrewCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].X_Velocity";
  1002. Out_ScrewCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Position";
  1003. Out_ScrewCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Y_Velocity";
  1004. Out_ScrewCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Position_Start";
  1005. Out_ScrewCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Velocity_Start";
  1006. Out_ScrewCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Position_Stop";
  1007. Out_ScrewCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Z_Velocity_Stop";
  1008. Out_ScrewCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Position";
  1009. Out_ScrewCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].U_Velocity";
  1010. Out_ScrewCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Position";
  1011. Out_ScrewCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].R_Velocity";
  1012. Out_ScrewCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Torque";
  1013. Out_ScrewCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].Feeder";
  1014. Out_ScrewCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_ScrewCamera[{0}].ScrewProNum";
  1015. // Out_Screw(锁附点位)初始化并赋地址
  1016. Out_Screw = EnsurePoint(Out_Screw);
  1017. Out_Screw.Description = Lang.锁附点位参数;
  1018. Out_Screw.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Position";
  1019. Out_Screw.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].X_Velocity";
  1020. Out_Screw.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Position";
  1021. Out_Screw.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Y_Velocity";
  1022. Out_Screw.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Position_Start";
  1023. Out_Screw.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Velocity_Start";
  1024. Out_Screw.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Position_Stop";
  1025. Out_Screw.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Z_Velocity_Stop";
  1026. Out_Screw.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Position";
  1027. Out_Screw.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].U_Velocity";
  1028. Out_Screw.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Position";
  1029. Out_Screw.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].R_Velocity";
  1030. Out_Screw.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Torque";
  1031. Out_Screw.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].Feeder";
  1032. Out_Screw.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_Screw[{0}].ScrewProNum";
  1033. // Out_CheckCamera(复检点位)初始化并赋地址
  1034. Out_CheckCamera = EnsurePoint(Out_CheckCamera);
  1035. Out_CheckCamera.Description = Lang.复检点位参数;
  1036. Out_CheckCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Position";
  1037. Out_CheckCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].X_Velocity";
  1038. Out_CheckCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Position";
  1039. Out_CheckCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Y_Velocity";
  1040. Out_CheckCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Position_Start";
  1041. Out_CheckCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Velocity_Start";
  1042. Out_CheckCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Position_Stop";
  1043. Out_CheckCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Z_Velocity_Stop";
  1044. Out_CheckCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Position";
  1045. Out_CheckCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].U_Velocity";
  1046. Out_CheckCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Position";
  1047. Out_CheckCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].R_Velocity";
  1048. Out_CheckCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Torque";
  1049. Out_CheckCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].Feeder";
  1050. Out_CheckCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Point_CheckCamera[{0}].ScrewProNum";
  1051. // Out_QrCodeCamera(二维码拍照点位)初始化并赋地址
  1052. Out_QrCodeCamera = EnsurePoint(Out_QrCodeCamera);
  1053. Out_QrCodeCamera.Description = Lang.二维码拍照点位参数;
  1054. Out_QrCodeCamera.X_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].X_Position";
  1055. Out_QrCodeCamera.X_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].X_Velocity";
  1056. Out_QrCodeCamera.Y_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Y_Position";
  1057. Out_QrCodeCamera.Y_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Y_Velocity";
  1058. Out_QrCodeCamera.Z_Position_Start.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Position_Start";
  1059. Out_QrCodeCamera.Z_Velocity_Start.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Velocity_Start";
  1060. Out_QrCodeCamera.Z_Position_Stop.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Position_Stop";
  1061. Out_QrCodeCamera.Z_Velocity_Stop.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Z_Velocity_Stop";
  1062. Out_QrCodeCamera.U_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].U_Position";
  1063. Out_QrCodeCamera.U_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].U_Velocity";
  1064. Out_QrCodeCamera.R_Position.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].R_Position";
  1065. Out_QrCodeCamera.R_Velocity.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].R_Velocity";
  1066. Out_QrCodeCamera.Torque.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Torque";
  1067. Out_QrCodeCamera.Feeder.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].Feeder";
  1068. Out_QrCodeCamera.ScrewProNum.Address = "ns=4;s=DB_Communication|FromPC.Photo_Positipn[{0}].ScrewProNum";
  1069. Out_ScrewTeachNum = Ensure(Out_ScrewTeachNum);
  1070. Out_ScrewTeachNum.Address = "ns=4;s=DB_Communication|FromPC.ScrewTeachNum";
  1071. Out_ScrewTeachNum.DataType = "int16";
  1072. Out_ScrewTeachNum.Description = Lang.披头矫正的模式1初始化时矫正2每个产品矫正一次3每颗螺丝矫正一次;
  1073. Out_ScrewTeachOk = Ensure(Out_ScrewTeachOk);
  1074. Out_ScrewTeachOk.Address = "ns=4;s=DB_Communication|FromPC.ScrewTeachOK";
  1075. Out_ScrewTeachOk.DataType = "int16";
  1076. Out_ScrewTeachOk.Description = Lang.下相机矫正披头的结果1OK2NG;
  1077. Out_ScrewFeederIsChanged = Ensure(Out_ScrewFeederIsChanged);
  1078. Out_ScrewFeederIsChanged.Address = "ns=4;s=DB_Communication|FromPC.PickNumChange";
  1079. Out_ScrewFeederIsChanged.DataType = "int16";
  1080. Out_ScrewFeederIsChanged.Description = Lang.供料器发生改变;
  1081. // 4. In_* 默认(假定从 PLC 读到 PC,使用 ToPC 前缀)
  1082. In_Code = Ensure(In_Code);
  1083. In_Code.Address = "ns=4;s=DB_Communication|ToPC.Mes[{0}].Code";
  1084. In_Code.DataType = "string";
  1085. In_Code.Description = Lang.产品编码;
  1086. In_MesCheck = Ensure(In_MesCheck);
  1087. In_MesCheck.Address = "ns=4;s=DB_Communication|ToPC.Mes[{0}].Check";
  1088. In_MesCheck.DataType = "int16";
  1089. In_MesCheck.Description = Lang.Mes交互1获取过站信息当站是否生产2上传本站数据;
  1090. In_Result = Ensure(In_Result);
  1091. In_Result.Address = "ns=4;s=DB_Communication|ToPC.Mes[0].Product_Status";
  1092. In_Result.DataType = "int16";
  1093. In_Result.Description = "产品的最终结果,1:OK; 2:NG";
  1094. In_DowmCameraNum = Ensure(In_DowmCameraNum);
  1095. In_DowmCameraNum.Address = "ns=4;s=DB_Communication|ToPC.DowmCameraNum";
  1096. In_DowmCameraNum.DataType = "int16";
  1097. In_DowmCameraNum.Description = Lang.下相机拍照编号;
  1098. In_DowmCameraExe = Ensure(In_DowmCameraExe);
  1099. In_DowmCameraExe.Address = "ns=4;s=DB_Communication|ToPC.DowmCameraExe";
  1100. In_DowmCameraExe.DataType = "int16";
  1101. In_DowmCameraExe.Description = Lang.下相机拍照触发;
  1102. In_UpCameraPickNum = Ensure(In_UpCameraPickNum);
  1103. In_UpCameraPickNum.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPickNum";
  1104. In_UpCameraPickNum.DataType = "int16";
  1105. In_UpCameraPickNum.Description = Lang.上相机取料拍照编号;
  1106. In_UpCameraPickExe = Ensure(In_UpCameraPickExe);
  1107. In_UpCameraPickExe.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPickExe";
  1108. In_UpCameraPickExe.DataType = "int16";
  1109. In_UpCameraPickExe.Description = Lang.上相机取料拍照触发;
  1110. In_UpCameraPutNum = Ensure(In_UpCameraPutNum);
  1111. In_UpCameraPutNum.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPutNum";
  1112. In_UpCameraPutNum.DataType = "int16";
  1113. In_UpCameraPutNum.Description = Lang.上相机锁附组装拍照编号;
  1114. In_UpCameraPutExe = Ensure(In_UpCameraPutExe);
  1115. In_UpCameraPutExe.Address = "ns=4;s=DB_Communication|ToPC.UpCameraPutExe";
  1116. In_UpCameraPutExe.DataType = "int16";
  1117. In_UpCameraPutExe.Description = Lang.上相机锁附组装拍照触发;
  1118. In_UPCameracheckNum = Ensure(In_UPCameracheckNum);
  1119. In_UPCameracheckNum.Address = "ns=4;s=DB_Communication|ToPC.UPCameracheckNum";
  1120. In_UPCameracheckNum.DataType = "int16";
  1121. In_UPCameracheckNum.Description = Lang.上相机检测拍照编号;
  1122. In_UPCameracheckExe = Ensure(In_UPCameracheckExe);
  1123. In_UPCameracheckExe.Address = "ns=4;s=DB_Communication|ToPC.UPCameracheckExe";
  1124. In_UPCameracheckExe.DataType = "int16";
  1125. In_UPCameracheckExe.Description = Lang.上相机检测拍照触发;
  1126. In_FixedCameraPickNum = Ensure(In_FixedCameraPickNum);
  1127. In_FixedCameraPickNum.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPickNum";
  1128. In_FixedCameraPickNum.DataType = "int16";
  1129. In_FixedCameraPickNum.Description = Lang.固定相机取料拍照编号;
  1130. In_FixedCameraPickExe = Ensure(In_FixedCameraPickExe);
  1131. In_FixedCameraPickExe.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPickExe";
  1132. In_FixedCameraPickExe.DataType = "int16";
  1133. In_FixedCameraPickExe.Description = Lang.固定相机取料拍照触发;
  1134. In_FixedCameraPutNum = Ensure(In_FixedCameraPutNum);
  1135. In_FixedCameraPutNum.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPutNum";
  1136. In_FixedCameraPutNum.DataType = "int16";
  1137. In_FixedCameraPutNum.Description = Lang.固定相机锁附组装拍照编号;
  1138. In_FixedCameraPutExe = Ensure(In_FixedCameraPutExe);
  1139. In_FixedCameraPutExe.Address = "ns=4;s=DB_Communication|ToPC.FixedCameraPutExe";
  1140. In_FixedCameraPutExe.DataType = "int16";
  1141. In_FixedCameraPutExe.Description = Lang.固定相机锁附组装拍照触发;
  1142. In_FixedCameracheckNum = Ensure(In_FixedCameracheckNum);
  1143. In_FixedCameracheckNum.Address = "ns=4;s=DB_Communication|ToPC.FixedCameracheckNum";
  1144. In_FixedCameracheckNum.DataType = "int16";
  1145. In_FixedCameracheckNum.Description = Lang.固定相机检测拍照编号;
  1146. In_FixedCameracheckExe = Ensure(In_FixedCameracheckExe);
  1147. In_FixedCameracheckExe.Address = "ns=4;s=DB_Communication|ToPC.FixedCameracheckExe";
  1148. In_FixedCameracheckExe.DataType = "int16";
  1149. In_FixedCameracheckExe.Description = Lang.固定相机检测拍照触发;
  1150. In_QrCodePhotoRequest = Ensure(In_QrCodePhotoRequest);
  1151. In_QrCodePhotoRequest.Address = "ns=4;s=DB_Communication|ToPC.photo_request";
  1152. In_QrCodePhotoRequest.DataType = "int16";
  1153. In_QrCodePhotoRequest.Description = Lang.二维码拍照请求;
  1154. In_ProductNum = Ensure(In_ProductNum);
  1155. In_ProductNum.Address = "ns=4;s=DB_Communication|ToPC.ProductNum";
  1156. In_ProductNum.DataType = "int16";
  1157. In_ProductNum.Description = Lang.正在锁附组装编号;
  1158. In_RequestPosition = Ensure(In_RequestPosition);
  1159. In_RequestPosition.Address = "ns=4;s=DB_Communication|ToPC.RequestPosition";
  1160. In_RequestPosition.DataType = "int16";
  1161. In_RequestPosition.Description = Lang.请求目标位置;
  1162. In_WorkStart = Ensure(In_WorkStart);
  1163. In_WorkStart.Address = "ns=4;s=DB_Communication|ToPC.WorkStart";
  1164. In_WorkStart.DataType = "int16";
  1165. In_WorkStart.Description = Lang.锁附组装开始1;
  1166. In_WorkDone = Ensure(In_WorkDone);
  1167. In_WorkDone.Address = "ns=4;s=DB_Communication|ToPC.WorkDone";
  1168. In_WorkDone.DataType = "int16";
  1169. In_WorkDone.Description = Lang.锁附组装结束1OK2NG;
  1170. In_PressureValue = Ensure(In_PressureValue);
  1171. In_PressureValue.Address = "ns=4;s=DB_DriveControl|AICtrl[1].Status.UserData";
  1172. In_PressureValue.DataType = "float";
  1173. In_PressureValue.Description = Lang.压力值;
  1174. In_ScrewTeachExe = Ensure(In_ScrewTeachExe);
  1175. In_ScrewTeachExe.Address = "ns=4;s=DB_Communication|ToPC.ScrewTeachExe";
  1176. In_ScrewTeachExe.DataType = "bool";
  1177. In_ScrewTeachExe.Description = Lang.触发披头视觉矫正;
  1178. In_Screw_checkExe = Ensure(In_Screw_checkExe);
  1179. In_Screw_checkExe.Address = "ns=4;s=DB_Communication|ToPC.Screw_checkExe";
  1180. In_Screw_checkExe.DataType = "bool";
  1181. In_Screw_checkExe.Description = Lang.触发相机拍照螺丝复检;
  1182. In_PickINC = Ensure(In_PickINC);
  1183. In_PickINC.Address = "ns=4;s=DB_Communication|ToPC.PickINC";
  1184. In_PickINC.DataType = "int16";
  1185. In_PickINC.Description = Lang.取一颗螺丝触发信号;
  1186. //ns=4;s=DB_HMI|Cam_code_mode 读取plc模式 0普通读取plc寄存器的二维码询问mes 1由上位机拍照获取二维码上传mes
  1187. Cam_code_mode = Ensure(Cam_code_mode);
  1188. Cam_code_mode.Address = "ns=4;s=DB_HMI|Cam_code_mode";
  1189. Cam_code_mode.DataType = "Bool";
  1190. Cam_code_mode.Description = "PLC二维码读取模式";
  1191. ScrewProvide1 = Ensure(ScrewProvide1);
  1192. ScrewProvide1.Address = "ns=4;s=DB_Input|X16_螺丝供料器1螺丝到位";
  1193. ScrewProvide1.DataType = "Bool";
  1194. ScrewProvide1.Description = "螺丝供料器1螺丝到位";
  1195. ScrewProvide2 = Ensure(ScrewProvide2);
  1196. ScrewProvide2.Address = "ns=4;s=DB_Input|X17_螺丝供料器2螺丝到位";
  1197. ScrewProvide2.DataType = "Bool";
  1198. ScrewProvide2.Description = "螺丝供料器1螺丝到位";
  1199. In_Throw = Ensure(In_Throw);
  1200. In_Throw.Address = "ns=4;s=DB_Communication|Throw[0]";
  1201. In_Throw.DataType = "Bool";
  1202. In_Throw.Description = "抛料信号";
  1203. RunMode = Ensure(RunMode);
  1204. RunMode.Address = "ns=4;s=DB_Control|Mode.Status.RunMode";
  1205. RunMode.DataType = "Bool";
  1206. RunMode.Description = "自动运行模式";
  1207. AutoRunning = Ensure(AutoRunning);
  1208. AutoRunning.Address = "ns=4;s=DB_Control|Mode.Status.AutoRunning";
  1209. AutoRunning.DataType = "Bool";
  1210. AutoRunning.Description = "生产模式";
  1211. ManualMode = Ensure(ManualMode);
  1212. ManualMode.Address = "ns=4;s=DB_Control|Mode.Status.ManualMode";
  1213. ManualMode.DataType = "Bool";
  1214. ManualMode.Description = "维修模式";
  1215. ClearMode = Ensure(ClearMode);
  1216. ClearMode.Address = "ns=4;s=DB_Control|Mode.Status.ClearMode";
  1217. ClearMode.DataType = "Bool";
  1218. ClearMode.Description = "流线模式";
  1219. Fault = Ensure(Fault);
  1220. Fault.Address = "ns=4;s=DB_Control|Mode.Status.Fault";
  1221. Fault.DataType = "Bool";
  1222. Fault.Description = "报警";
  1223. In_FzCameraPixExe = Ensure(In_FzCameraPixExe);
  1224. In_FzCameraPixExe.Address = "ns=4;s=DB_Communication|ToPC.In_FzCameraPickExe";
  1225. In_FzCameraPixExe.DataType = "Bool";
  1226. In_FzCameraPixExe.Description = "翻转相机检测拍照触发";
  1227. Out_PlcFail = Ensure(Out_PlcFail);
  1228. Out_PlcFail.Address = "ns=4;s=DB_Communication|FromPC.PC反馈NG交互[0]";
  1229. Out_PlcFail.DataType = "Bool";
  1230. Out_PlcFail.Description = "PLC触发报警信号";
  1231. Out_RobotWPosition = Ensure(Out_RobotWPosition);
  1232. Out_RobotWPosition.Address = "ns=4;s=DB_Communication|FromPC.Point_Clamp[1].X_Position";
  1233. Out_RobotWPosition.DataType = "float";
  1234. Out_RobotWPosition.Description = "";
  1235. Out_RobotVPosition = Ensure(Out_RobotVPosition);
  1236. Out_RobotVPosition.Address = "ns=4;s=DB_Communication|FromPC.Point_Clamp[1].Y_Position";
  1237. Out_RobotVPosition.DataType = "float";
  1238. Out_RobotVPosition.Description = "";
  1239. //ns=4;s=DB_Input|X16_螺丝供料器1螺丝到位 FromPC.Point_Clamp[1].X_Velocity FromPC.Point_Clamp[1].Y_Velocity
  1240. //ns=4;s=DB_Input|X17_螺丝供料器2螺丝到位
  1241. // 说明:若项目中 PlcAddress 的实际属性名或类型与此不同(例如使用枚举、不同字段名),
  1242. // 请根据实际类型调整赋值。本方法主要提供合理的默认字符串地址、数据类型及描述,便于后续从配置覆盖。
  1243. }
  1244. }
  1245. }