You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1307 lines
44 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <script lang="ts" setup>
  2. import SavePosition from 'components/SavePosition/index.vue'
  3. import { socket } from 'libs/socket'
  4. import { useDebugStore } from 'stores/debugStore'
  5. import { useSystemStore } from 'stores/systemStore'
  6. import { onMounted, onUnmounted, ref } from 'vue'
  7. const systemStore = useSystemStore()
  8. const debugStore = useDebugStore()
  9. let currentCommandId = ''
  10. onMounted(() => {
  11. socket.init(receiveMessage, 'cmd_debug')
  12. socket.init(receiveMessage, 'cmd_response')
  13. })
  14. onUnmounted(() => {
  15. socket.unregisterCallback(receiveMessage, 'cmd_debug')
  16. socket.unregisterCallback(receiveMessage, 'cmd_response')
  17. })
  18. const receiveMessage = (data: Socket.cmdData) => {
  19. data.commandId === currentCommandId && systemStore.pushSystemList(data)
  20. }
  21. const debug_pallet_elevator_lift_up = async () => {
  22. currentCommandId = Date.now().toString()
  23. const params = {
  24. commandId: currentCommandId,
  25. command: 'debug_pallet_elevator_lift_up',
  26. params: {
  27. index: debugStore.formData.heatArea.index,
  28. ...debugStore.formData.heatArea.heatMotorData,
  29. },
  30. }
  31. await debugStore.sendControl(params)
  32. }
  33. const debug_pallet_elevator_lift_down = async () => {
  34. currentCommandId = Date.now().toString()
  35. const params = {
  36. commandId: currentCommandId,
  37. command: 'debug_pallet_elevator_lift_down',
  38. params: {
  39. index: debugStore.formData.heatArea.index,
  40. ...debugStore.formData.heatArea.heatMotorData,
  41. },
  42. }
  43. await debugStore.sendControl(params)
  44. }
  45. const debug_pallet_elevator_stop = async () => {
  46. currentCommandId = Date.now().toString()
  47. const params = {
  48. commandId: currentCommandId,
  49. command: 'debug_pallet_elevator_stop',
  50. params: {
  51. index: debugStore.formData.heatArea.index,
  52. },
  53. }
  54. await debugStore.sendControl(params)
  55. }
  56. const debug_pallet_elevator_reset = async () => {
  57. currentCommandId = Date.now().toString()
  58. const params = {
  59. commandId: currentCommandId,
  60. command: 'debug_pallet_elevator_reset',
  61. params: {
  62. index: debugStore.formData.heatArea.index,
  63. },
  64. }
  65. await debugStore.sendControl(params)
  66. }
  67. const debug_heater_start = async () => {
  68. currentCommandId = Date.now().toString()
  69. const params = {
  70. commandId: currentCommandId,
  71. command: 'debug_heater_start',
  72. params: {
  73. index: debugStore.formData.heatArea.index,
  74. ...debugStore.formData.heatArea.heatTemperature,
  75. },
  76. }
  77. await debugStore.sendControl(params)
  78. }
  79. const debug_heater_stop = async () => {
  80. currentCommandId = Date.now().toString()
  81. const params = {
  82. commandId: currentCommandId,
  83. command: 'debug_heater_stop',
  84. params: {
  85. index: debugStore.formData.heatArea.index,
  86. },
  87. }
  88. await debugStore.sendControl(params)
  89. }
  90. const debug_cold_trap_start_refrigeration = async () => {
  91. currentCommandId = Date.now().toString()
  92. const params = {
  93. commandId: currentCommandId,
  94. command: 'debug_cold_trap_start_refrigeration',
  95. params: {
  96. index: debugStore.formData.heatArea.index,
  97. ...debugStore.formData.heatArea.coldTrap,
  98. },
  99. }
  100. await debugStore.sendControl(params)
  101. }
  102. const debug_cold_trap_stop_refrigeration = async () => {
  103. currentCommandId = Date.now().toString()
  104. const params = {
  105. commandId: currentCommandId,
  106. command: 'debug_cold_trap_stop_refrigeration',
  107. params: {
  108. index: debugStore.formData.heatArea.index,
  109. },
  110. }
  111. await debugStore.sendControl(params)
  112. }
  113. const debug_cold_trap_start_recycle = async () => {
  114. currentCommandId = Date.now().toString()
  115. const params = {
  116. commandId: currentCommandId,
  117. command: 'debug_cold_trap_start_recycle',
  118. params: {
  119. index: debugStore.formData.heatArea.index,
  120. },
  121. }
  122. await debugStore.sendControl(params)
  123. }
  124. const debug_cold_trap_stop_recycle = async () => {
  125. currentCommandId = Date.now().toString()
  126. const params = {
  127. commandId: currentCommandId,
  128. command: 'debug_cold_trap_stop_recycle',
  129. params: {
  130. index: debugStore.formData.heatArea.index,
  131. },
  132. }
  133. await debugStore.sendControl(params)
  134. }
  135. // const debug_heater_start_heat_maintaining = async () => {
  136. // currentCommandId = Date.now().toString()
  137. // const params = {
  138. // commandId: currentCommandId,
  139. // command: 'debug_heater_start_heat_maintaining',
  140. // params: {
  141. // index: debugStore.formData.heatArea.index,
  142. // ...debugStore.formData.heatArea.heatTemperature,
  143. // },
  144. // }
  145. // await debugStore.sendControl(params)
  146. // }
  147. //
  148. // const debug_heater_stop_heat_maintaining = async () => {
  149. // currentCommandId = Date.now().toString()
  150. // const params = {
  151. // commandId: currentCommandId,
  152. // command: 'debug_heater_stop_heat_maintaining',
  153. // params: {
  154. // index: debugStore.formData.heatArea.index,
  155. // },
  156. // }
  157. // await debugStore.sendControl(params)
  158. // }
  159. const debug_fan_start = async () => {
  160. currentCommandId = Date.now().toString()
  161. const params = {
  162. commandId: currentCommandId,
  163. command: 'debug_fan_start',
  164. params: {
  165. index: debugStore.formData.heatArea.index,
  166. },
  167. }
  168. await debugStore.sendControl(params)
  169. }
  170. const debug_fan_stop = async () => {
  171. currentCommandId = Date.now().toString()
  172. const params = {
  173. commandId: currentCommandId,
  174. command: 'debug_fan_stop',
  175. params: {
  176. index: debugStore.formData.heatArea.index,
  177. },
  178. }
  179. await debugStore.sendControl(params)
  180. }
  181. const debug_cover_elevator_lift_up = async () => {
  182. currentCommandId = Date.now().toString()
  183. const params = {
  184. commandId: currentCommandId,
  185. command: 'debug_cover_elevator_lift_up',
  186. params: {
  187. ...debugStore.formData.lidData,
  188. },
  189. }
  190. await debugStore.sendControl(params)
  191. }
  192. const debug_cover_elevator_lift_down = async () => {
  193. currentCommandId = Date.now().toString()
  194. const params = {
  195. commandId: currentCommandId,
  196. command: 'debug_cover_elevator_lift_down',
  197. params: {
  198. ...debugStore.formData.lidData,
  199. },
  200. }
  201. await debugStore.sendControl(params)
  202. }
  203. const debug_cover_elevator_reset = async () => {
  204. currentCommandId = Date.now().toString()
  205. const params = {
  206. commandId: currentCommandId,
  207. command: 'debug_cover_elevator_reset',
  208. params: {},
  209. }
  210. await debugStore.sendControl(params)
  211. }
  212. const debug_cover_elevator_stop = async () => {
  213. currentCommandId = Date.now().toString()
  214. const params = {
  215. commandId: currentCommandId,
  216. command: 'debug_cover_elevator_stop',
  217. params: {},
  218. }
  219. await debugStore.sendControl(params)
  220. }
  221. const debug_liquid_arm_reset = async () => {
  222. currentCommandId = Date.now().toString()
  223. const params = {
  224. commandId: currentCommandId,
  225. command: 'debug_liquid_arm_reset',
  226. params: {
  227. target: ['largeArm', 'smallArm'],
  228. },
  229. }
  230. await debugStore.sendControl(params)
  231. }
  232. const debug_liquid_arm_rotation = async () => {
  233. currentCommandId = Date.now().toString()
  234. const params = {
  235. commandId: currentCommandId,
  236. command: 'debug_liquid_arm_rotation',
  237. params: {
  238. ...debugStore.formData.liquidArmData,
  239. },
  240. }
  241. await debugStore.sendControl(params)
  242. }
  243. const debug_liquid_arm_stop = async () => {
  244. currentCommandId = Date.now().toString()
  245. const params = {
  246. commandId: currentCommandId,
  247. command: 'debug_liquid_arm_stop',
  248. params: {
  249. target: ['largeArm', 'smallArm'],
  250. },
  251. }
  252. await debugStore.sendControl(params)
  253. }
  254. // const liquid_pump_pre_filling = async () => {
  255. // currentCommandId = Date.now().toString()
  256. // const params = {
  257. // commandId: currentCommandId,
  258. // command: 'debug_liquid_pump_pre_filling',
  259. // params: {
  260. // index: debugStore.formData.liquidPumpData.index,
  261. // },
  262. // }
  263. // await debugStore.sendControl(params)
  264. // }
  265. //
  266. // const liquid_pump_pre_evacuation = async () => {
  267. // currentCommandId = Date.now().toString()
  268. // const params = {
  269. // commandId: currentCommandId,
  270. // command: 'debug_liquid_pump_pre_evacuation',
  271. // params: {
  272. // index: debugStore.formData.liquidPumpData.index,
  273. // },
  274. // }
  275. // await debugStore.sendControl(params)
  276. // }
  277. const debug_liquid_pump_start = async () => {
  278. currentCommandId = Date.now().toString()
  279. const params = {
  280. commandId: currentCommandId,
  281. command: 'debug_liquid_pump_start',
  282. params: {
  283. ...debugStore.formData.liquidPumpData,
  284. },
  285. }
  286. await debugStore.sendControl(params)
  287. }
  288. const debug_liquid_pump_stop = async () => {
  289. currentCommandId = Date.now().toString()
  290. const params = {
  291. commandId: currentCommandId,
  292. command: 'debug_liquid_pump_stop',
  293. params: {
  294. index: debugStore.formData.liquidPumpData.index,
  295. },
  296. }
  297. await debugStore.sendControl(params)
  298. }
  299. const debug_shaker_start = async () => {
  300. currentCommandId = Date.now().toString()
  301. const params = {
  302. commandId: currentCommandId,
  303. command: 'debug_shaker_start',
  304. params: {
  305. ...debugStore.formData.shakeSpeed,
  306. },
  307. }
  308. await debugStore.sendControl(params)
  309. }
  310. const debug_shaker_stop = async () => {
  311. currentCommandId = Date.now().toString()
  312. const params = {
  313. commandId: currentCommandId,
  314. command: 'debug_shaker_stop',
  315. params: {},
  316. }
  317. await debugStore.sendControl(params)
  318. }
  319. const debug_shaker_reset = async () => {
  320. currentCommandId = Date.now().toString()
  321. const params = {
  322. commandId: currentCommandId,
  323. command: 'debug_shaker_reset',
  324. params: {},
  325. }
  326. await debugStore.sendControl(params)
  327. }
  328. const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => {
  329. console.log(debugStore.formData.transferModule[`${motor}MotorData`])
  330. currentCommandId = Date.now().toString()
  331. const params = {
  332. commandId: currentCommandId,
  333. command: 'debug_transportation_arm_reset',
  334. params: {
  335. dim: [motor],
  336. },
  337. }
  338. await debugStore.sendControl(params)
  339. }
  340. const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z', direction: 'forward' | 'backward') => {
  341. const distance = direction === 'backward' ? -debugStore.formData.transferModule[`${motor}MotorData`][`${motor}DimDistance`] : debugStore.formData.transferModule[`${motor}MotorData`][`${motor}DimDistance`]
  342. currentCommandId = Date.now().toString()
  343. const params = {
  344. commandId: currentCommandId,
  345. command: 'debug_transportation_arm_move',
  346. params: {
  347. ...debugStore.formData.transferModule[`${motor}MotorData`],
  348. [`${motor}DimDistance`]: distance,
  349. },
  350. }
  351. await debugStore.sendControl(params)
  352. }
  353. const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => {
  354. currentCommandId = Date.now().toString()
  355. const params = {
  356. commandId: currentCommandId,
  357. command: 'debug_transportation_arm_stop',
  358. params: {
  359. dim: [motor],
  360. },
  361. }
  362. await debugStore.sendControl(params)
  363. }
  364. const debug_gantry_position = async (motor: 'x' | 'y' | 'z') => {
  365. currentCommandId = Date.now().toString()
  366. const params = {
  367. commandId: currentCommandId,
  368. command: `debug_gantry_${motor}_position`,
  369. params: {
  370. position: debugStore.formData.transferModule[`${motor}MotorData`].position,
  371. },
  372. }
  373. await debugStore.sendControl(params)
  374. }
  375. const debug_holding_jaw_open = async () => {
  376. currentCommandId = Date.now().toString()
  377. const params = {
  378. commandId: currentCommandId,
  379. command: 'debug_holding_jaw_open',
  380. params: {
  381. ...debugStore.formData.transferModule.JawData,
  382. },
  383. }
  384. await debugStore.sendControl(params)
  385. }
  386. // const debug_holding_jaw_close = async () => {
  387. // currentCommandId = Date.now().toString()
  388. // const params = {
  389. // commandId: currentCommandId,
  390. // command: 'debug_holding_jaw_close',
  391. // params: {
  392. // ...debugStore.formData.transferModule.JawData,
  393. // },
  394. // }
  395. // await debugStore.sendControl(params)
  396. // }
  397. const debug_holding_jaw_pause = async () => {
  398. currentCommandId = Date.now().toString()
  399. const params = {
  400. commandId: currentCommandId,
  401. command: 'debug_holding_jaw_pause',
  402. params: {},
  403. }
  404. await debugStore.sendControl(params)
  405. }
  406. const debug_door_open = async () => {
  407. currentCommandId = Date.now().toString()
  408. const params = {
  409. commandId: currentCommandId,
  410. command: 'debug_door_open',
  411. params: {},
  412. }
  413. await debugStore.sendControl(params)
  414. }
  415. const debug_door_close = async () => {
  416. currentCommandId = Date.now().toString()
  417. const params = {
  418. commandId: currentCommandId,
  419. command: 'debug_door_close',
  420. params: {},
  421. }
  422. await debugStore.sendControl(params)
  423. }
  424. const debug_door_stop = async () => {
  425. currentCommandId = Date.now().toString()
  426. const params = {
  427. commandId: currentCommandId,
  428. command: 'debug_door_stop',
  429. params: {},
  430. }
  431. await debugStore.sendControl(params)
  432. }
  433. const debug_move_tray_to_solution_area = async () => {
  434. currentCommandId = Date.now().toString()
  435. const params = {
  436. commandId: currentCommandId,
  437. command: 'debug_move_tray_to_solution_area',
  438. params: {
  439. heatId: debugStore.formData.heatArea.index,
  440. },
  441. }
  442. await debugStore.sendControl(params)
  443. }
  444. const debug_move_tray_to_heat_area = async () => {
  445. currentCommandId = Date.now().toString()
  446. const params = {
  447. commandId: currentCommandId,
  448. command: 'debug_move_tray_to_heat_area',
  449. params: {
  450. heatId: debugStore.formData.heatArea.index,
  451. },
  452. }
  453. await debugStore.sendControl(params)
  454. }
  455. const debug_gantry_to_heat_area_cap = async () => {
  456. currentCommandId = Date.now().toString()
  457. const params = {
  458. commandId: currentCommandId,
  459. command: 'debug_gantry_to_heat_area_cap',
  460. params: {
  461. heatId: debugStore.formData.heatArea.index,
  462. },
  463. }
  464. await debugStore.sendControl(params)
  465. }
  466. const debug_gantry_to_heat_area_tray = async () => {
  467. currentCommandId = Date.now().toString()
  468. const params = {
  469. commandId: currentCommandId,
  470. command: 'debug_gantry_to_heat_area_tray',
  471. params: {
  472. heatId: debugStore.formData.heatArea.index,
  473. },
  474. }
  475. await debugStore.sendControl(params)
  476. }
  477. const debug_cap_in_heat_area = async () => {
  478. currentCommandId = Date.now().toString()
  479. const params = {
  480. commandId: currentCommandId,
  481. command: 'debug_cap_in_heat_area',
  482. params: {
  483. heatId: debugStore.formData.heatArea.index,
  484. },
  485. }
  486. await debugStore.sendControl(params)
  487. }
  488. const debug_cap_out_heat_area = async () => {
  489. currentCommandId = Date.now().toString()
  490. const params = {
  491. commandId: currentCommandId,
  492. command: 'debug_cap_out_heat_area',
  493. params: {
  494. heatId: debugStore.formData.heatArea.index,
  495. },
  496. }
  497. await debugStore.sendControl(params)
  498. }
  499. const debug_cap_up_one = async () => {
  500. currentCommandId = Date.now().toString()
  501. const params = {
  502. commandId: currentCommandId,
  503. command: 'debug_cap_up_one',
  504. params: {},
  505. }
  506. await debugStore.sendControl(params)
  507. }
  508. const debug_cap_down_one = async () => {
  509. currentCommandId = Date.now().toString()
  510. const params = {
  511. commandId: currentCommandId,
  512. command: 'debug_cap_up_one',
  513. params: {},
  514. }
  515. await debugStore.sendControl(params)
  516. }
  517. const debug_enable_all_motor = async () => {
  518. currentCommandId = Date.now().toString()
  519. const params = {
  520. commandId: currentCommandId,
  521. command: 'debug_enable_all_motor',
  522. params: {},
  523. }
  524. await debugStore.sendControl(params)
  525. }
  526. const debug_disabled_all_motor = async () => {
  527. currentCommandId = Date.now().toString()
  528. const params = {
  529. commandId: currentCommandId,
  530. command: 'debug_disabled_all_motor',
  531. params: {},
  532. }
  533. await debugStore.sendControl(params)
  534. }
  535. const debug_stop_all_motor = async () => {
  536. currentCommandId = Date.now().toString()
  537. const params = {
  538. commandId: currentCommandId,
  539. command: 'debug_stop_all_motor',
  540. params: {},
  541. }
  542. await debugStore.sendControl(params)
  543. }
  544. const savePositionVisible = ref(false)
  545. </script>
  546. <template>
  547. <div class="debug-content">
  548. <!-- <el-tabs v-model="activeTab" type="card"> -->
  549. <!-- <el-tab-pane label="单步指令" :name="1" /> -->
  550. <!-- <el-tab-pane label="复合指令" :name="2" /> -->
  551. <!-- </el-tabs> -->
  552. <el-row class="button-content">
  553. <el-col :span="8">
  554. <div class="button-box">
  555. <ft-button type="primary" :click-handle="debug_enable_all_motor">
  556. 使能所有电机
  557. </ft-button>
  558. </div>
  559. </el-col>
  560. <el-col :span="8">
  561. <div class="button-box">
  562. <ft-button type="primary" :click-handle="debug_disabled_all_motor">
  563. 失能所有电机
  564. </ft-button>
  565. </div>
  566. </el-col>
  567. <el-col :span="8">
  568. <div class="button-box">
  569. <ft-button type="primary" :click-handle="debug_stop_all_motor">
  570. 停止所有电机
  571. </ft-button>
  572. </div>
  573. </el-col>
  574. </el-row>
  575. <el-row :gutter="10" class="card-content">
  576. <el-col :span="8">
  577. <el-card>
  578. <template #header>
  579. <div class="card-header">
  580. <span>转运模组</span>
  581. </div>
  582. </template>
  583. <el-form-item class="button-center">
  584. <ft-button type="primary" size="small" @click="savePositionVisible = true">
  585. 保存当前坐标
  586. </ft-button>
  587. </el-form-item>
  588. <el-divider>X轴电机</el-divider>
  589. <div class="card-box">
  590. <el-form>
  591. <el-form-item label="距离">
  592. <el-input v-model.number="debugStore.formData.transferModule.xMotorData.xDimDistance" type="number" placeholder="请输入距离">
  593. <template #append>
  594. mm
  595. </template>
  596. </el-input>
  597. </el-form-item>
  598. <el-form-item label="速度">
  599. <el-input v-model.number="debugStore.formData.transferModule.xMotorData.xDimVelocity" type="number" placeholder="请输入速度">
  600. <template #append>
  601. rpm/min
  602. </template>
  603. </el-input>
  604. </el-form-item>
  605. <el-form-item label="循环">
  606. <el-input v-model.number="debugStore.formData.transferModule.xMotorData.times" type="number" placeholder="请输入次数">
  607. <template #append>
  608. </template>
  609. </el-input>
  610. </el-form-item>
  611. <el-form-item>
  612. <ft-button size="small" type="primary" :click-handle="() => debug_transportation_arm_move('x', 'forward')">
  613. 前进
  614. </ft-button>
  615. <ft-button size="small" type="primary" :click-handle="() => debug_transportation_arm_move('x', 'backward')">
  616. 后退
  617. </ft-button>
  618. <ft-button size="small" :click-handle="() => debug_transportation_arm_stop('x')">
  619. 停止
  620. </ft-button>
  621. <ft-button type="primary" size="small" :click-handle="() => debug_transportation_arm_reset('x')">
  622. 回原点
  623. </ft-button>
  624. </el-form-item>
  625. <el-form-item label="指定位置">
  626. <el-input v-model.number="debugStore.formData.transferModule.xMotorData.position" type="number" placeholder="请输入位置">
  627. <template #append>
  628. mm
  629. </template>
  630. </el-input>
  631. </el-form-item>
  632. <el-form-item>
  633. <ft-button size="small" type="primary" :click-handle="() => debug_gantry_position('x')">
  634. 移动
  635. </ft-button>
  636. <ft-button size="small" :click-handle="() => debug_transportation_arm_stop('x')">
  637. 停止
  638. </ft-button>
  639. </el-form-item>
  640. </el-form>
  641. </div>
  642. <el-divider>Y轴电机</el-divider>
  643. <div class="card-box">
  644. <el-form>
  645. <el-form-item label="距离">
  646. <el-input v-model.number="debugStore.formData.transferModule.yMotorData.yDimDistance" type="number" placeholder="请输入距离">
  647. <template #append>
  648. mm
  649. </template>
  650. </el-input>
  651. </el-form-item>
  652. <el-form-item label="速度">
  653. <el-input v-model.number="debugStore.formData.transferModule.yMotorData.yDimVelocity" type="number" placeholder="请输入速度">
  654. <template #append>
  655. rpm/min
  656. </template>
  657. </el-input>
  658. </el-form-item>
  659. <el-form-item label="循环">
  660. <el-input v-model.number="debugStore.formData.transferModule.yMotorData.times" type="number" placeholder="请输入次数">
  661. <template #append>
  662. </template>
  663. </el-input>
  664. </el-form-item>
  665. <el-form-item>
  666. <ft-button type="primary" size="small" :click-handle="() => debug_transportation_arm_move('y', 'forward')">
  667. 前进
  668. </ft-button>
  669. <ft-button type="primary" size="small" :click-handle="() => debug_transportation_arm_move('y', 'backward')">
  670. 后退
  671. </ft-button>
  672. <ft-button size="small" :click-handle="() => debug_transportation_arm_stop('y')">
  673. 停止
  674. </ft-button>
  675. <ft-button size="small" type="primary" :click-handle="() => debug_transportation_arm_reset('y')">
  676. 回原点
  677. </ft-button>
  678. </el-form-item>
  679. <el-form-item label="指定位置">
  680. <el-input v-model.number="debugStore.formData.transferModule.xMotorData.position" type="number" placeholder="请输入位置">
  681. <template #append>
  682. mm
  683. </template>
  684. </el-input>
  685. </el-form-item>
  686. <el-form-item>
  687. <ft-button size="small" type="primary" :click-handle="() => debug_gantry_position('y')">
  688. 移动
  689. </ft-button>
  690. <ft-button size="small" :click-handle="() => debug_transportation_arm_stop('y')">
  691. 停止
  692. </ft-button>
  693. </el-form-item>
  694. </el-form>
  695. </div>
  696. <el-divider>Z轴电机</el-divider>
  697. <div class="card-box">
  698. <el-form>
  699. <el-form-item label="距离">
  700. <el-input v-model.number="debugStore.formData.transferModule.zMotorData.zDimDistance" type="number" placeholder="请输入距离">
  701. <template #append>
  702. mm
  703. </template>
  704. </el-input>
  705. </el-form-item>
  706. <el-form-item label="速度">
  707. <el-input v-model.number="debugStore.formData.transferModule.zMotorData.zDimVelocity" type="number" placeholder="请输入速度">
  708. <template #append>
  709. rpm/min
  710. </template>
  711. </el-input>
  712. </el-form-item>
  713. <el-form-item label="循环">
  714. <el-input v-model.number="debugStore.formData.transferModule.zMotorData.times" type="number" placeholder="请输入次数">
  715. <template #append>
  716. </template>
  717. </el-input>
  718. </el-form-item>
  719. <el-form-item>
  720. <ft-button size="small" type="primary" :click-handle="() => debug_transportation_arm_move('z', 'forward')">
  721. 前进
  722. </ft-button>
  723. <ft-button size="small" type="primary" :click-handle="() => debug_transportation_arm_move('z', 'backward')">
  724. 后退
  725. </ft-button>
  726. <ft-button size="small" :click-handle="() => debug_transportation_arm_stop('z')">
  727. 停止
  728. </ft-button>
  729. <ft-button size="small" type="primary" :click-handle="() => debug_transportation_arm_reset('z')">
  730. 回原点
  731. </ft-button>
  732. </el-form-item>
  733. <el-form-item label="指定位置">
  734. <el-input v-model.number="debugStore.formData.transferModule.xMotorData.position" type="number" placeholder="请输入位置">
  735. <template #append>
  736. mm
  737. </template>
  738. </el-input>
  739. </el-form-item>
  740. <el-form-item>
  741. <ft-button size="small" type="primary" :click-handle="() => debug_gantry_position('z')">
  742. 移动
  743. </ft-button>
  744. <ft-button size="small" :click-handle="() => debug_transportation_arm_stop('z')">
  745. 停止
  746. </ft-button>
  747. </el-form-item>
  748. </el-form>
  749. </div>
  750. <el-divider>夹爪舵机</el-divider>
  751. <div class="card-box">
  752. <el-form>
  753. <el-form-item label="打开位置">
  754. <el-input v-model.number="debugStore.formData.transferModule.JawData.openDistance" type="number" placeholder="请输入打开位置">
  755. <template #append>
  756. mm
  757. </template>
  758. </el-input>
  759. </el-form-item>
  760. <el-form-item label="闭合位置">
  761. <el-input v-model.number="debugStore.formData.transferModule.JawData.closeDistance" type="number" placeholder="请输入闭合位置">
  762. <template #append>
  763. mm
  764. </template>
  765. </el-input>
  766. </el-form-item>
  767. <el-form-item label="速度">
  768. <el-input v-model.number="debugStore.formData.transferModule.JawData.velocity" type="number" placeholder="请输入速度">
  769. <template #append>
  770. rpm/min
  771. </template>
  772. </el-input>
  773. </el-form-item>
  774. <el-form-item label="循环">
  775. <el-input v-model.number="debugStore.formData.transferModule.JawData.times" type="number" placeholder="请输入次数">
  776. <template #append>
  777. </template>
  778. </el-input>
  779. </el-form-item>
  780. <el-form-item>
  781. <ft-button size="small" type="primary" :click-handle="debug_holding_jaw_open">
  782. 执行
  783. </ft-button>
  784. <ft-button size="small" :click-handle="debug_holding_jaw_pause">
  785. 停止
  786. </ft-button>
  787. </el-form-item>
  788. </el-form>
  789. </div>
  790. </el-card>
  791. </el-col>
  792. <el-col :span="8">
  793. <el-card>
  794. <template #header>
  795. <div class="card-header">
  796. <span>加液模组</span>
  797. </div>
  798. </template>
  799. <el-divider>加液臂</el-divider>
  800. <div class="card-box">
  801. <el-form>
  802. <el-form-item label="大臂速度">
  803. <el-input v-model.number="debugStore.formData.liquidArmData.largeArmRotationVelocity" type="number" placeholder="请输入速度">
  804. <template #append>
  805. rpm/min
  806. </template>
  807. </el-input>
  808. </el-form-item>
  809. <el-form-item label="大臂角度">
  810. <el-input v-model.number="debugStore.formData.liquidArmData.largeArmAngle" type="number" placeholder="请输入角度">
  811. <template #append>
  812. °
  813. </template>
  814. </el-input>
  815. </el-form-item>
  816. <el-form-item label="小臂速度">
  817. <el-input v-model.number="debugStore.formData.liquidArmData.smallArmRotationVelocity" type="number" placeholder="请输入速度">
  818. <template #append>
  819. rpm/min
  820. </template>
  821. </el-input>
  822. </el-form-item>
  823. <el-form-item label="小臂角度">
  824. <el-input v-model.number="debugStore.formData.liquidArmData.smallArmAngle" type="number" placeholder="请输入角度">
  825. <template #append>
  826. °
  827. </template>
  828. </el-input>
  829. </el-form-item>
  830. </el-form>
  831. <ft-button size="small" type="primary" :click-handle="debug_liquid_arm_rotation">
  832. 开始
  833. </ft-button>
  834. <ft-button size="small" :click-handle="debug_liquid_arm_stop">
  835. 停止
  836. </ft-button>
  837. <ft-button size="small" type="primary" :click-handle="debug_liquid_arm_reset">
  838. 回原点
  839. </ft-button>
  840. </div>
  841. <el-divider>加液泵</el-divider>
  842. <div class="card-box">
  843. <el-form>
  844. <!-- <el-form-item label="方向"> -->
  845. <!-- <el-radio-group v-model="debugStore.formData.liquidPumpData.direction"> -->
  846. <!-- <el-radio-button value="forward"> -->
  847. <!-- 正转 -->
  848. <!-- </el-radio-button> -->
  849. <!-- <el-radio-button value="backward"> -->
  850. <!-- 反转 -->
  851. <!-- </el-radio-button> -->
  852. <!-- </el-radio-group> -->
  853. <!-- </el-form-item> -->
  854. <el-form-item label="加液泵头">
  855. <el-select v-model="debugStore.formData.liquidPumpData.index" placeholder="请选择泵头">
  856. <el-option v-for="item in 8" :key="item" :label="item" :value="`acid_pump_0${item}`" />
  857. </el-select>
  858. </el-form-item>
  859. <el-form-item label="加液容量">
  860. <el-input v-model.number="debugStore.formData.liquidPumpData.volume" type="number" placeholder="请输入速度">
  861. <template #append>
  862. ml
  863. </template>
  864. </el-input>
  865. </el-form-item>
  866. <el-form-item label="加液速度">
  867. <el-input v-model.number="debugStore.formData.liquidPumpData.velocity" type="number" placeholder="请输入速度">
  868. <template #append>
  869. rpm/min
  870. </template>
  871. </el-input>
  872. </el-form-item>
  873. <!-- <el-form-item> -->
  874. <!-- <ft-button type="primary" :click-handle="liquid_pump_pre_filling"> -->
  875. <!-- 预充 -->
  876. <!-- </ft-button> -->
  877. <!-- <ft-button :click-handle="liquid_pump_pre_evacuation"> -->
  878. <!-- 排空 -->
  879. <!-- </ft-button> -->
  880. <!-- </el-form-item> -->
  881. <el-form-item>
  882. <ft-button size="small" type="primary" :click-handle="debug_liquid_pump_start">
  883. 启动
  884. </ft-button>
  885. <ft-button size="small" :click-handle="debug_liquid_pump_stop">
  886. 停止
  887. </ft-button>
  888. </el-form-item>
  889. </el-form>
  890. </div>
  891. <el-divider>摇匀</el-divider>
  892. <div class="card-box">
  893. <el-form>
  894. <el-form-item label="摇匀速度">
  895. <el-input v-model.number="debugStore.formData.shakeSpeed.velocity" type="number" placeholder="请输入速度">
  896. <template #append>
  897. rpm/min
  898. </template>
  899. </el-input>
  900. </el-form-item>
  901. </el-form>
  902. <ft-button size="small" type="primary" :click-handle="debug_shaker_start">
  903. 开始
  904. </ft-button>
  905. <ft-button size="small" :click-handle="debug_shaker_stop">
  906. 停止
  907. </ft-button>
  908. <ft-button size="small" type="primary" :click-handle="debug_shaker_reset">
  909. 回原点
  910. </ft-button>
  911. </div>
  912. </el-card>
  913. <el-card>
  914. <template #header>
  915. <div class="card-header">
  916. <span>相机模组</span>
  917. </div>
  918. </template>
  919. <div class="card-box">
  920. <!-- <el-form> -->
  921. <!-- <el-form-item label="速度"> -->
  922. <!-- <el-input> -->
  923. <!-- <template #append> -->
  924. <!-- rpm/min -->
  925. <!-- </template> -->
  926. <!-- </el-input> -->
  927. <!-- </el-form-item> -->
  928. <!-- <el-form-item label="距离"> -->
  929. <!-- <el-input> -->
  930. <!-- <template #append> -->
  931. <!-- ° -->
  932. <!-- </template> -->
  933. <!-- </el-input> -->
  934. <!-- </el-form-item> -->
  935. <!-- <el-form-item> -->
  936. <!-- <ft-button type="primary"> -->
  937. <!-- 抬升 -->
  938. <!-- </ft-button> -->
  939. <!-- <ft-button type="primary"> -->
  940. <!-- 下降 -->
  941. <!-- </ft-button> -->
  942. <!-- </el-form-item> -->
  943. <!-- <el-form-item> -->
  944. <!-- <ft-button type="primary"> -->
  945. <!-- 复位 -->
  946. <!-- </ft-button> -->
  947. <!-- <ft-button> -->
  948. <!-- 停止 -->
  949. <!-- </ft-button> -->
  950. <!-- </el-form-item> -->
  951. <!-- </el-form> -->
  952. </div>
  953. </el-card>
  954. <el-card>
  955. <template #header>
  956. <div class="card-header">
  957. <span></span>
  958. </div>
  959. </template>
  960. <div class="card-box">
  961. <ft-button size="small" type="primary" :click-handle="debug_door_open">
  962. 开门
  963. </ft-button>
  964. <ft-button size="small" type="primary" :click-handle="debug_door_close">
  965. 关门
  966. </ft-button>
  967. <ft-button size="small" :click-handle="debug_door_stop">
  968. 停止
  969. </ft-button>
  970. </div>
  971. </el-card>
  972. <el-card>
  973. <template #header>
  974. <div class="card-header">
  975. <span>拍子存放模组</span>
  976. </div>
  977. </template>
  978. <div class="card-box">
  979. <el-form>
  980. <el-form-item label="速度">
  981. <el-input v-model.number="debugStore.formData.lidData.velocity" type="number" placeholder="请输入速度">
  982. <template #append>
  983. rpm/min
  984. </template>
  985. </el-input>
  986. </el-form-item>
  987. <el-form-item label="距离">
  988. <el-input v-model.number="debugStore.formData.lidData.distance" type="number" placeholder="请输入距离">
  989. <template #append>
  990. mm
  991. </template>
  992. </el-input>
  993. </el-form-item>
  994. <el-form-item>
  995. <ft-button type="primary" size="small" :click-handle="debug_cover_elevator_lift_up">
  996. 抬升
  997. </ft-button>
  998. <ft-button type="primary" size="small" :click-handle="debug_cover_elevator_lift_down">
  999. 下降
  1000. </ft-button>
  1001. <ft-button size="small" :click-handle="debug_cover_elevator_stop">
  1002. 停止
  1003. </ft-button>
  1004. <ft-button type="primary" size="small" :click-handle="debug_cover_elevator_reset">
  1005. 回原点
  1006. </ft-button>
  1007. <ft-button type="primary" :click-handle="debug_cap_up_one">
  1008. 提升一个拍子高度
  1009. </ft-button>
  1010. <ft-button type="primary" :click-handle="debug_cap_down_one">
  1011. 下降一个拍子高度
  1012. </ft-button>
  1013. </el-form-item>
  1014. </el-form>
  1015. </div>
  1016. </el-card>
  1017. </el-col>
  1018. <el-col :span="8">
  1019. <el-card>
  1020. <template #header>
  1021. <div class="card-header">
  1022. <span>加热模组</span>
  1023. <div>
  1024. <el-select v-model="debugStore.formData.heatArea.index" style="width: 150px" placeholder="请选择区域">
  1025. <el-option v-for="item in 6" :key="item" :label="`A-${item}`" :value="`heat_module_0${item}`" />
  1026. </el-select>
  1027. </div>
  1028. </div>
  1029. </template>
  1030. <el-divider>复合操作</el-divider>
  1031. <div class="card-box">
  1032. <el-form>
  1033. <el-form-item>
  1034. <ft-button size="small" type="primary" :click-handle="debug_move_tray_to_solution_area">
  1035. 加热托盘移至加液
  1036. </ft-button>
  1037. <ft-button size="small" type="primary" :click-handle="debug_cap_in_heat_area">
  1038. 安装拍子
  1039. </ft-button>
  1040. <ft-button size="small" type="primary" :click-handle="debug_move_tray_to_heat_area">
  1041. 加液托盘移至加热
  1042. </ft-button>
  1043. <ft-button size="small" type="primary" :click-handle="debug_cap_out_heat_area">
  1044. 拆卸拍子
  1045. </ft-button>
  1046. <ft-button size="small" type="primary" :click-handle="debug_gantry_to_heat_area_cap">
  1047. 机械臂移至拍子位
  1048. </ft-button>
  1049. <ft-button size="small" type="primary" :click-handle="debug_gantry_to_heat_area_tray">
  1050. 机械臂移至托盘位
  1051. </ft-button>
  1052. </el-form-item>
  1053. </el-form>
  1054. </div>
  1055. <el-divider>升降电机</el-divider>
  1056. <div class="card-box">
  1057. <el-form>
  1058. <el-form-item label="距离">
  1059. <el-input v-model.number="debugStore.formData.heatArea.heatMotorData.distance" type="number" placeholder="请输入距离">
  1060. <template #append>
  1061. mm
  1062. </template>
  1063. </el-input>
  1064. </el-form-item>
  1065. <el-form-item label="速度">
  1066. <el-input v-model.number="debugStore.formData.heatArea.heatMotorData.velocity" type="number" placeholder="请输入速度">
  1067. <template #append>
  1068. rpm/min
  1069. </template>
  1070. </el-input>
  1071. </el-form-item>
  1072. <el-form-item label="循环">
  1073. <el-input v-model.number="debugStore.formData.heatArea.heatMotorData.times" type="number" placeholder="请输入次数">
  1074. <template #append>
  1075. </template>
  1076. </el-input>
  1077. </el-form-item>
  1078. <el-form-item>
  1079. <ft-button size="small" type="primary" :click-handle="debug_pallet_elevator_lift_up">
  1080. 上升
  1081. </ft-button>
  1082. <ft-button size="small" type="primary" :click-handle="debug_pallet_elevator_lift_down">
  1083. 下降
  1084. </ft-button>
  1085. <ft-button size="small" :click-handle="debug_pallet_elevator_stop">
  1086. 停止
  1087. </ft-button>
  1088. <ft-button size="small" type="primary" :click-handle="debug_pallet_elevator_reset">
  1089. 回原点
  1090. </ft-button>
  1091. </el-form-item>
  1092. </el-form>
  1093. </div>
  1094. <el-divider>加热棒</el-divider>
  1095. <div class="card-box">
  1096. <el-form>
  1097. <el-form-item label="温度">
  1098. <el-input v-model.number="debugStore.formData.heatArea.heatTemperature.temperature" type="number" placeholder="请输入温度">
  1099. <template #append>
  1100. </template>
  1101. </el-input>
  1102. </el-form-item>
  1103. <el-form-item>
  1104. <ft-button size="small" type="primary" :click-handle="debug_heater_start">
  1105. 开始加热
  1106. </ft-button>
  1107. <ft-button size="small" :click-handle="debug_heater_stop">
  1108. 停止加热
  1109. </ft-button>
  1110. </el-form-item>
  1111. <!-- <el-form-item> -->
  1112. <!-- <ft-button type="primary" :click-handle="debug_heater_start_heat_maintaining"> -->
  1113. <!-- 开始恒温 -->
  1114. <!-- </ft-button> -->
  1115. <!-- <ft-button :click-handle="debug_heater_stop_heat_maintaining"> -->
  1116. <!-- 停止恒温 -->
  1117. <!-- </ft-button> -->
  1118. <!-- </el-form-item> -->
  1119. </el-form>
  1120. </div>
  1121. <el-divider>冷阱</el-divider>
  1122. <div class="card-box">
  1123. <el-form>
  1124. <el-form-item label="温度">
  1125. <el-input v-model.number="debugStore.formData.heatArea.coldTrap.temperature" type="number" placeholder="请输入温度">
  1126. <template #append>
  1127. </template>
  1128. </el-input>
  1129. </el-form-item>
  1130. <el-form-item>
  1131. <ft-button size="small" type="primary" :click-handle="debug_cold_trap_start_refrigeration">
  1132. 启动制冷
  1133. </ft-button>
  1134. <ft-button size="small" :click-handle="debug_cold_trap_stop_refrigeration">
  1135. 停止制冷
  1136. </ft-button>
  1137. </el-form-item>
  1138. <el-form-item>
  1139. <ft-button size="small" type="primary" :click-handle="debug_cold_trap_start_recycle">
  1140. 启动循环
  1141. </ft-button>
  1142. <ft-button size="small" :click-handle="debug_cold_trap_stop_recycle">
  1143. 停止循环
  1144. </ft-button>
  1145. </el-form-item>
  1146. </el-form>
  1147. </div>
  1148. <!-- <el-divider>拍子</el-divider> -->
  1149. <!-- <div class="card-box"> -->
  1150. <!-- <ft-button type="primary"> -->
  1151. <!-- 启动吸附 -->
  1152. <!-- </ft-button> -->
  1153. <!-- <ft-button> -->
  1154. <!-- 停止吸附 -->
  1155. <!-- </ft-button> -->
  1156. <!-- </div> -->
  1157. <el-divider>风扇</el-divider>
  1158. <div class="card-box">
  1159. <ft-button size="small" type="primary" :click-handle="debug_fan_start">
  1160. 打开风扇
  1161. </ft-button>
  1162. <ft-button size="small" :click-handle="debug_fan_stop">
  1163. 关闭风扇
  1164. </ft-button>
  1165. </div>
  1166. </el-card>
  1167. </el-col>
  1168. </el-row>
  1169. <SavePosition v-if="savePositionVisible" @ok="savePositionVisible = false" @cancel="savePositionVisible = false" />
  1170. </div>
  1171. </template>
  1172. <style lang="scss" scoped>
  1173. .debug-content {
  1174. overflow: hidden;
  1175. max-height: 100%;
  1176. .button-content {
  1177. height: 40px;
  1178. }
  1179. .card-content {
  1180. height: calc(100% - 40px);
  1181. overflow: auto;
  1182. }
  1183. }
  1184. .el-card {
  1185. margin-bottom: 10px;
  1186. }
  1187. :deep(.el-card__header) {
  1188. padding: 5px 10px;
  1189. }
  1190. .el-input, .el-select {
  1191. width: 100%;
  1192. }
  1193. .el-form-item {
  1194. margin-bottom: 10px;
  1195. margin-right: 10px;
  1196. }
  1197. .card-box {
  1198. //display: flex;
  1199. //align-items: center;
  1200. }
  1201. :deep(.el-input-group__append) {
  1202. padding: 0 10px;
  1203. }
  1204. :deep(.el-card__header) {
  1205. background:rgba(0,0,0,0.03);
  1206. }
  1207. .card-header {
  1208. display: flex;
  1209. align-items: center;
  1210. justify-content: space-between;
  1211. }
  1212. .select-label {
  1213. margin-right: 10px;
  1214. }
  1215. :deep(.el-card__body) {
  1216. padding: 10px;
  1217. }
  1218. .el-form-item__content {
  1219. .ft-button {
  1220. margin-bottom: 10px;
  1221. }
  1222. }
  1223. .button-box {
  1224. display: flex;
  1225. justify-content: center;
  1226. }
  1227. :deep(.el-form-item).button-center {
  1228. .el-form-item__content {
  1229. width: 100%;
  1230. display: flex;
  1231. justify-content: center;
  1232. }
  1233. }
  1234. </style>