Advertisement
lcvette

spindle config for +/-10vanalog testing xk7130

Jun 14th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.64 KB | None | 0 0
  1. # Generated by PNCconf at Thu Nov 9 12:55:45 2017
  2. # If you make changes to this file, they will be
  3. # overwritten when you run PNCconf again
  4.  
  5. loadrt trivkins
  6. loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=16
  7. loadrt hostmot2
  8. loadrt hm2_eth board_ip="10.10.10.10" config=" num_encoders=6 num_pwmgens=0 num_stepgens=5 sserial_port_0=00000x"
  9. setp hm2_7i92.0.watchdog.timeout_ns 5000000
  10. loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.s
  11. loadrt abs names=abs.spindle
  12. loadrt lowpass names=lowpass.spindle
  13. loadrt scale names=scale.spindle
  14. loadrt near
  15. loadrt xor2 count=4
  16.  
  17. addf hm2_7i92.0.read servo-thread
  18. addf motion-command-handler servo-thread
  19. addf motion-controller servo-thread
  20. addf pid.x.do-pid-calcs servo-thread
  21. addf pid.y.do-pid-calcs servo-thread
  22. addf pid.z.do-pid-calcs servo-thread
  23. addf pid.a.do-pid-calcs servo-thread
  24. addf pid.s.do-pid-calcs servo-thread
  25. addf scale.spindle servo-thread
  26. addf abs.spindle servo-thread
  27. addf lowpass.spindle servo-thread
  28. addf near.0 servo-thread
  29. addf hm2_7i92.0.write servo-thread
  30. addf xor2.0 servo-thread
  31. addf xor2.1 servo-thread
  32.  
  33. # external output signals
  34.  
  35. # --- DIGITAL OUTPUT ---
  36. net atc-out hm2_7i92.0.7i76.0.3.output-07 <= motion.digital-out-00
  37. net atc-in hm2_7i92.0.7i76.0.3.output-08 <= motion.digital-out-01
  38.  
  39. # --- INCLUDES MANUAL TOOL RELEASE BUTTON INPUT BELOW ---
  40. net unclamp-tool-button xor2.0.in0 <= hm2_7i92.0.7i76.0.3.input-06
  41. net unclamp-tool-toolchange xor2.0.in1 <= motion.digital-out-02
  42. net drawbar-release hm2_7i92.0.7i76.0.3.output-03 <= xor2.0.out
  43. net atc-fwd hm2_7i92.0.7i76.0.3.output-05 <= motion.digital-out-03
  44. net atc-rev hm2_7i92.0.7i76.0.3.output-06 <= motion.digital-out-04
  45.  
  46. # --- SPINDLE ORIENT BEGIN ---
  47. net spindle-orient-start motion.spindle-orient hm2_7i92.0.7i77.0.0.output-08
  48.  
  49. # --- SPINDLE-CW ---
  50. #net spindle-cw hm2_7i92.0.7i77.0.0.output-09
  51.  
  52. # --- SPINDLE-CCW ---
  53. #net spindle-ccw hm2_7i92.0.7i77.0.0.output-10
  54.  
  55. # --- X-ENABLE ---
  56. net x-enable hm2_7i92.0.7i76.0.3.output-12
  57.  
  58. # --- Y-ENABLE ---
  59. net y-enable hm2_7i92.0.7i76.0.3.output-13
  60.  
  61. # --- Z-ENABLE ---
  62. net z-enable hm2_7i92.0.7i76.0.3.output-14
  63.  
  64. # --- A-ENABLE ---
  65. net a-enable hm2_7i92.0.7i76.0.3.output-15
  66.  
  67. # --- Z-ENABLE ---
  68. net z-enable hm2_7i92.0.7i76.0.3.output-01
  69.  
  70. # --- COOLANT-FLOOD ---
  71. net coolant-flood hm2_7i92.0.7i76.0.3.output-04
  72.  
  73. # external input signals
  74.  
  75. # --- SPINDLE ORIENT ENDED ---
  76. net spindle-orient-end motion.spindle-is-oriented hm2_7i92.0.7i77.0.0.input-31
  77.  
  78. # --- ESTOP-EXT ---
  79. net estop-ext <= hm2_7i92.0.7i76.0.3.input-21
  80.  
  81. # --- PROBE-IN ---
  82. net probe-in <= hm2_7i92.0.7i77.0.0.input-15
  83.  
  84. # --- DIGITAL INPUTS ---
  85. net atc-is-out hm2_7i92.0.7i76.0.3.input-00 <= motion.digital-in-00
  86.  
  87. net atc-is-in hm2_7i92.0.7i76.0.3.input-01 <= motion.digital-in-01
  88.  
  89. net Tool-Released hm2_7i92.0.7i76.0.3.input-05 <= motion.digital-in-02
  90.  
  91. net Atc-Zero hm2_7i92.0.7i76.0.3.input-03 <= motion.digital-in-03
  92.  
  93. net Atc-Index hm2_7i92.0.7i76.0.3.input-02 <= motion.digital-in-04
  94.  
  95. net Tool-Clamped hm2_7i92.0.7i76.0.3.input-07 <= motion.digital-in-05
  96.  
  97. # --- HOME-Z ---
  98. net home-z <= hm2_7i92.0.7i77.0.0.input-05-not
  99.  
  100. # --- LIMIT-Z ---
  101. net limit-z <= hm2_7i92.0.7i77.0.0.input-04-not
  102.  
  103. # --- HOME-Y ---
  104. net home-y <= hm2_7i92.0.7i77.0.0.input-03-not
  105.  
  106. # --- LIMIT-Y ---
  107. net limit-y <= hm2_7i92.0.7i77.0.0.input-02-not
  108.  
  109. # --- HOME-X ---
  110. net home-x <= hm2_7i92.0.7i77.0.0.input-01-not
  111.  
  112. # --- LIMIT-X ---
  113. net limit-x <= hm2_7i92.0.7i77.0.0.input-00-not
  114.  
  115. #*******************
  116. # AXIS X
  117. #*******************
  118.  
  119. setp pid.x.Pgain [AXIS_0]P
  120. setp pid.x.Igain [AXIS_0]I
  121. setp pid.x.Dgain [AXIS_0]D
  122. setp pid.x.bias [AXIS_0]BIAS
  123. setp pid.x.FF0 [AXIS_0]FF0
  124. setp pid.x.FF1 [AXIS_0]FF1
  125. setp pid.x.FF2 [AXIS_0]FF2
  126. setp pid.x.deadband [AXIS_0]DEADBAND
  127. setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
  128. setp pid.x.error-previous-target true
  129. setp pid.x.maxerror .0005
  130.  
  131. net x-index-enable <=> pid.x.index-enable
  132. net x-enable => pid.x.enable
  133. net x-pos-cmd => pid.x.command
  134. net x-vel-cmd => pid.x.command-deriv
  135. net x-pos-fb => pid.x.feedback
  136. net x-output => pid.x.output
  137.  
  138. # Step Gen signals/setup
  139.  
  140. setp hm2_7i92.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
  141. setp hm2_7i92.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
  142. setp hm2_7i92.0.stepgen.00.steplen [AXIS_0]STEPLEN
  143. setp hm2_7i92.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
  144. setp hm2_7i92.0.stepgen.00.position-scale [AXIS_0]STEP_SCALE
  145. setp hm2_7i92.0.stepgen.00.step_type 0
  146. setp hm2_7i92.0.stepgen.00.control-type 1
  147. setp hm2_7i92.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL
  148. setp hm2_7i92.0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAXVEL
  149.  
  150. # ---closedloop stepper signals---
  151.  
  152. net x-pos-cmd <= axis.0.motor-pos-cmd
  153. net x-vel-cmd <= axis.0.joint-vel-cmd
  154. net x-output <= hm2_7i92.0.stepgen.00.velocity-cmd
  155. net x-pos-fb <= hm2_7i92.0.stepgen.00.position-fb
  156. net x-pos-fb => axis.0.motor-pos-fb
  157. net x-enable <= axis.0.amp-enable-out
  158. net x-enable => hm2_7i92.0.stepgen.00.enable
  159. # ---Encoder feedback signals/setup---
  160.  
  161. setp hm2_7i92.0.encoder.01.counter-mode 0
  162. setp hm2_7i92.0.encoder.01.filter 1
  163. setp hm2_7i92.0.encoder.01.index-invert 0
  164. setp hm2_7i92.0.encoder.01.index-mask 0
  165. setp hm2_7i92.0.encoder.01.index-mask-invert 0
  166. setp hm2_7i92.0.encoder.01.scale [AXIS_0]ENCODER_SCALE
  167.  
  168. net x-encpos-fb <= hm2_7i92.0.encoder.01.position
  169. ##net x-vel-fb <= hm2_7i92.0.encoder.01.velocity
  170. ##net x-encpos-fb => axis.0.motor-pos-fb
  171. net x-index-enable axis.0.index-enable <=> hm2_7i92.0.encoder.01.index-enable
  172. net x-pos-rawcounts <= hm2_7i92.0.encoder.01.rawcounts
  173. # ---setup home / limit switch signals---
  174.  
  175. net home-x => axis.0.home-sw-in
  176. net min-x => axis.0.neg-lim-sw-in
  177. net max-x => axis.0.pos-lim-sw-in
  178.  
  179. #*******************
  180. # AXIS Y
  181. #*******************
  182.  
  183. setp pid.y.Pgain [AXIS_1]P
  184. setp pid.y.Igain [AXIS_1]I
  185. setp pid.y.Dgain [AXIS_1]D
  186. setp pid.y.bias [AXIS_1]BIAS
  187. setp pid.y.FF0 [AXIS_1]FF0
  188. setp pid.y.FF1 [AXIS_1]FF1
  189. setp pid.y.FF2 [AXIS_1]FF2
  190. setp pid.y.deadband [AXIS_1]DEADBAND
  191. setp pid.y.maxoutput [AXIS_1]MAX_OUTPUT
  192. setp pid.y.error-previous-target true
  193. setp pid.y.maxerror .0005
  194.  
  195. net y-index-enable <=> pid.y.index-enable
  196. net y-enable => pid.y.enable
  197. net y-pos-cmd => pid.y.command
  198. net y-vel-cmd => pid.y.command-deriv
  199. net y-pos-fb => pid.y.feedback
  200. net y-output => pid.y.output
  201.  
  202. # Step Gen signals/setup
  203.  
  204. setp hm2_7i92.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
  205. setp hm2_7i92.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
  206. setp hm2_7i92.0.stepgen.01.steplen [AXIS_1]STEPLEN
  207. setp hm2_7i92.0.stepgen.01.stepspace [AXIS_1]STEPSPACE
  208. setp hm2_7i92.0.stepgen.01.position-scale [AXIS_1]STEP_SCALE
  209. setp hm2_7i92.0.stepgen.01.step_type 0
  210. setp hm2_7i92.0.stepgen.01.control-type 1
  211. setp hm2_7i92.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL
  212. setp hm2_7i92.0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAXVEL
  213.  
  214. # ---closedloop stepper signals---
  215.  
  216. net y-pos-cmd <= axis.1.motor-pos-cmd
  217. net y-vel-cmd <= axis.1.joint-vel-cmd
  218. net y-output <= hm2_7i92.0.stepgen.01.velocity-cmd
  219. net y-pos-fb <= hm2_7i92.0.stepgen.01.position-fb
  220. net y-pos-fb => axis.1.motor-pos-fb
  221. net y-enable <= axis.1.amp-enable-out
  222. net y-enable => hm2_7i92.0.stepgen.01.enable
  223.  
  224. # ---Encoder feedback signals/setup---
  225.  
  226. setp hm2_7i92.0.encoder.02.counter-mode 0
  227. setp hm2_7i92.0.encoder.02.filter 1
  228. setp hm2_7i92.0.encoder.02.index-invert 0
  229. setp hm2_7i92.0.encoder.02.index-mask 0
  230. setp hm2_7i92.0.encoder.02.index-mask-invert 0
  231. setp hm2_7i92.0.encoder.02.scale [AXIS_1]ENCODER_SCALE
  232.  
  233. net y-encpos-fb <= hm2_7i92.0.encoder.02.position
  234. ##net y-vel-fb <= hm2_7i92.0.encoder.02.velocity
  235. ##net y-pos-fb => axis.1.motor-pos-fb
  236. net y-index-enable axis.1.index-enable <=> hm2_7i92.0.encoder.02.index-enable
  237. net y-pos-rawcounts <= hm2_7i92.0.encoder.02.rawcounts
  238. # ---setup home / limit switch signals---
  239.  
  240. net home-y => axis.1.home-sw-in
  241. net min-y => axis.1.neg-lim-sw-in
  242. net max-y => axis.1.pos-lim-sw-in
  243.  
  244. #*******************
  245. # AXIS Z
  246. #*******************
  247.  
  248. setp pid.z.Pgain [AXIS_2]P
  249. setp pid.z.Igain [AXIS_2]I
  250. setp pid.z.Dgain [AXIS_2]D
  251. setp pid.z.bias [AXIS_2]BIAS
  252. setp pid.z.FF0 [AXIS_2]FF0
  253. setp pid.z.FF1 [AXIS_2]FF1
  254. setp pid.z.FF2 [AXIS_2]FF2
  255. setp pid.z.deadband [AXIS_2]DEADBAND
  256. setp pid.z.maxoutput [AXIS_2]MAX_OUTPUT
  257. setp pid.z.error-previous-target true
  258. setp pid.z.maxerror .0005
  259.  
  260. net z-index-enable <=> pid.z.index-enable
  261. net z-enable => pid.z.enable
  262. net z-pos-cmd => pid.z.command
  263. net z-vel-cmd => pid.z.command-deriv
  264. net z-pos-fb => pid.z.feedback
  265. net z-output => pid.z.output
  266.  
  267. # Step Gen signals/setup
  268.  
  269. setp hm2_7i92.0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
  270. setp hm2_7i92.0.stepgen.02.dirhold [AXIS_2]DIRHOLD
  271. setp hm2_7i92.0.stepgen.02.steplen [AXIS_2]STEPLEN
  272. setp hm2_7i92.0.stepgen.02.stepspace [AXIS_2]STEPSPACE
  273. setp hm2_7i92.0.stepgen.02.position-scale [AXIS_2]STEP_SCALE
  274. setp hm2_7i92.0.stepgen.02.step_type 0
  275. setp hm2_7i92.0.stepgen.02.control-type 1
  276. setp hm2_7i92.0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAXACCEL
  277. setp hm2_7i92.0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAXVEL
  278.  
  279. # ---closedloop stepper signals---
  280.  
  281. net z-pos-cmd <= axis.2.motor-pos-cmd
  282. net z-vel-cmd <= axis.2.joint-vel-cmd
  283. net z-output <= hm2_7i92.0.stepgen.02.velocity-cmd
  284. net z-pos-fb <= hm2_7i92.0.stepgen.02.position-fb
  285. net z-pos-fb => axis.2.motor-pos-fb
  286. net z-enable <= axis.2.amp-enable-out
  287. net z-enable => hm2_7i92.0.stepgen.02.enable
  288.  
  289. # ---Encoder feedback signals/setup---
  290.  
  291. setp hm2_7i92.0.encoder.04.counter-mode 0
  292. setp hm2_7i92.0.encoder.04.filter 1
  293. setp hm2_7i92.0.encoder.04.index-invert 0
  294. setp hm2_7i92.0.encoder.04.index-mask 0
  295. setp hm2_7i92.0.encoder.04.index-mask-invert 0
  296. setp hm2_7i92.0.encoder.04.scale [AXIS_2]ENCODER_SCALE
  297.  
  298. net z-encpos-fb <= hm2_7i92.0.encoder.04.position
  299. ##net z-vel-fb <= hm2_7i92.0.encoder.04.velocity
  300. ##net z-pos-fb => axis.2.motor-pos-fb
  301. net z-index-enable axis.2.index-enable <=> hm2_7i92.0.encoder.04.index-enable
  302. net z-pos-rawcounts <= hm2_7i92.0.encoder.04.rawcounts
  303. # ---setup home / limit switch signals---
  304.  
  305. net home-z => axis.2.home-sw-in
  306. net min-z => axis.2.neg-lim-sw-in
  307. net max-z => axis.2.pos-lim-sw-in
  308.  
  309. #*******************
  310. # AXIS A
  311. #*******************
  312.  
  313. setp pid.a.Pgain [AXIS_3]P
  314. setp pid.a.Igain [AXIS_3]I
  315. setp pid.a.Dgain [AXIS_3]D
  316. setp pid.a.bias [AXIS_3]BIAS
  317. setp pid.a.FF0 [AXIS_3]FF0
  318. setp pid.a.FF1 [AXIS_3]FF1
  319. setp pid.a.FF2 [AXIS_3]FF2
  320. setp pid.a.deadband [AXIS_3]DEADBAND
  321. setp pid.a.maxoutput [AXIS_3]MAX_OUTPUT
  322. setp pid.a.error-previous-target true
  323. setp pid.a.maxerror .0005
  324.  
  325. net a-index-enable <=> pid.a.index-enable
  326. net a-enable => pid.a.enable
  327. net a-pos-cmd => pid.a.command
  328. net a-vel-cmd => pid.a.command-deriv
  329. net a-pos-fb => pid.a.feedback
  330. net a-output => pid.a.output
  331.  
  332. # Step Gen signals/setup
  333.  
  334. setp hm2_7i92.0.stepgen.03.dirsetup [AXIS_3]DIRSETUP
  335. setp hm2_7i92.0.stepgen.03.dirhold [AXIS_3]DIRHOLD
  336. setp hm2_7i92.0.stepgen.03.steplen [AXIS_3]STEPLEN
  337. setp hm2_7i92.0.stepgen.03.stepspace [AXIS_3]STEPSPACE
  338. setp hm2_7i92.0.stepgen.03.position-scale [AXIS_3]STEP_SCALE
  339. setp hm2_7i92.0.stepgen.03.step_type 0
  340. setp hm2_7i92.0.stepgen.03.control-type 1
  341. setp hm2_7i92.0.stepgen.03.maxaccel [AXIS_3]STEPGEN_MAXACCEL
  342. setp hm2_7i92.0.stepgen.03.maxvel [AXIS_3]STEPGEN_MAXVEL
  343.  
  344. # ---closedloop stepper signals---
  345.  
  346. net a-pos-cmd <= axis.3.motor-pos-cmd
  347. net a-vel-cmd <= axis.3.joint-vel-cmd
  348. net a-output <= hm2_7i92.0.stepgen.03.velocity-cmd
  349. net a-pos-fb <= hm2_7i92.0.stepgen.03.position-fb
  350. net a-pos-fb => axis.3.motor-pos-fb
  351. net a-enable <= axis.3.amp-enable-out
  352. net a-enable => hm2_7i92.0.stepgen.03.enable
  353.  
  354. # ---Encoder feedback signals/setup---
  355.  
  356. setp hm2_7i92.0.encoder.05.counter-mode 0
  357. setp hm2_7i92.0.encoder.05.filter 1
  358. setp hm2_7i92.0.encoder.05.index-invert 0
  359. setp hm2_7i92.0.encoder.05.index-mask 0
  360. setp hm2_7i92.0.encoder.05.index-mask-invert 0
  361. setp hm2_7i92.0.encoder.05.scale [AXIS_3]ENCODER_SCALE
  362.  
  363. net a-encpos-fb <= hm2_7i92.0.encoder.05.position
  364. ##net a-vel-fb <= hm2_7i92.0.encoder.05.velocity
  365. ##net a-pos-fb => axis.3.motor-pos-fb
  366. net a-index-enable axis.3.index-enable <=> hm2_7i92.0.encoder.05.index-enable
  367. net a-pos-rawcounts <= hm2_7i92.0.encoder.05.rawcounts
  368. # ---setup home / limit switch signals---
  369.  
  370. net a-home-sw => axis.3.home-sw-in
  371. net a-neg-limit => axis.3.neg-lim-sw-in
  372. net a-pos-limit => axis.3.pos-lim-sw-in
  373.  
  374. #*******************
  375. # SPINDLE S
  376. #*******************
  377.  
  378. setp pid.s.Pgain [SPINDLE_9]P
  379. setp pid.s.Igain [SPINDLE_9]I
  380. setp pid.s.Dgain [SPINDLE_9]D
  381. setp pid.s.bias [SPINDLE_9]BIAS
  382. setp pid.s.FF0 [SPINDLE_9]FF0
  383. setp pid.s.FF1 [SPINDLE_9]FF1
  384. setp pid.s.FF2 [SPINDLE_9]FF2
  385. setp pid.s.deadband [SPINDLE_9]DEADBAND
  386. setp pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
  387. setp pid.s.error-previous-target true
  388.  
  389. net spindle-index-enable <=> pid.s.index-enable
  390. net spindle-enable => pid.s.enable
  391. net spindle-vel-cmd-rpm-abs => pid.s.command
  392. net spindle-vel-fb-rpm-abs => pid.s.feedback
  393. net spindle-output <= pid.s.output
  394.  
  395. # ---PWM Generator signals/setup---
  396.  
  397. setp hm2_7i92.0.7i77.0.1.analogout0-scalemax [SPINDLE_9]OUTPUT_SCALE
  398. setp hm2_7i92.0.7i77.0.1.analogout0-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
  399. setp hm2_7i92.0.7i77.0.1.analogout0-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
  400.  
  401. net spindle-output => hm2_7i92.0.7i77.0.1.analogout0
  402. net spindle-enable hm2_7i92.0.7i77.0.1.analogena
  403.  
  404. # ---Encoder feedback signals/setup---
  405.  
  406. setp hm2_7i92.0.encoder.00.counter-mode 0
  407. setp hm2_7i92.0.encoder.00.filter 1
  408. setp hm2_7i92.0.encoder.00.index-invert 0
  409. setp hm2_7i92.0.encoder.00.index-mask 0
  410. setp hm2_7i92.0.encoder.00.index-mask-invert 0
  411. setp hm2_7i92.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
  412.  
  413. net spindle-revs <= hm2_7i92.0.encoder.00.position
  414. net spindle-vel-fb-rps <= hm2_7i92.0.encoder.00.velocity
  415. net spindle-index-enable <=> hm2_7i92.0.encoder.00.index-enable
  416.  
  417. # ---setup spindle control signals---
  418.  
  419. net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
  420. net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
  421. net spindle-vel-cmd-rpm <= motion.spindle-speed-out
  422. net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
  423. net spindle-enable <= motion.spindle-on
  424. net spindle-cw <= motion.spindle-forward
  425. net spindle-ccw <= motion.spindle-reverse
  426. net spindle-brake <= motion.spindle-brake
  427. net spindle-revs => motion.spindle-revs
  428. net spindle-at-speed => motion.spindle-at-speed
  429. net spindle-vel-fb-rps => motion.spindle-speed-in
  430. net spindle-index-enable <=> motion.spindle-index-enable
  431.  
  432. # ---Setup spindle at speed signals---
  433.  
  434. net spindle-vel-cmd-rps => near.0.in1
  435. net spindle-vel-fb-rps => near.0.in2
  436.  
  437. ##########################
  438. net spindle-at-speed <= near.0.out
  439. ##########################
  440. setp near.0.scale 1.000000
  441. ##########################
  442. setp near.0.difference 5
  443.  
  444. ##sets spindle-at-speed true
  445.  
  446. # Use ACTUAL spindle velocity from spindle encoder
  447. # spindle-velocity bounces around so we filter it with lowpass
  448. # spindle-velocity is signed so we use absolute component to remove sign
  449. # ACTUAL velocity is in RPS not RPM so we scale it.
  450.  
  451. setp scale.spindle.gain 60
  452. setp lowpass.spindle.gain 1.000000
  453. net spindle-vel-fb-rps => scale.spindle.in
  454. net spindle-fb-rpm scale.spindle.out => abs.spindle.in
  455. net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
  456. net spindle-fb-rpm-abs-filtered lowpass.spindle.out
  457.  
  458. # ---coolant signals---
  459. net coolant-mist <= iocontrol.0.coolant-mist
  460. net coolant-flood <= iocontrol.0.coolant-flood
  461.  
  462. # ---probe signal---
  463.  
  464. net probe-in => motion.probe-input
  465.  
  466. # ---motion control signals---
  467.  
  468. net in-position <= motion.in-position
  469. net machine-is-enabled <= motion.motion-enabled
  470.  
  471. # ---digital in / out signals---
  472.  
  473. # ---estop signals---
  474.  
  475. net estop-out <= iocontrol.0.user-enable-out
  476. net estop-ext => iocontrol.0.emc-enable-in
  477.  
  478. # ---manual tool change signals---
  479.  
  480. #loadusr -W hal_manualtoolchange
  481. #net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
  482. #net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
  483. #net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
  484. net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
  485. net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement