PlcAddressConfig.cs 62 KB

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