Advertisement
Guest User

Untitled

a guest
Nov 15th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. # Generated by stepconf at Sat May 19 22:24:17 2012
  2. # If you make changes to this file, they will be
  3. # overwritten when you run stepconf again
  4.  
  5. [EMC]
  6. MACHINE = old-lathe
  7. DEBUG = 0
  8.  
  9. [DISPLAY]
  10. DISPLAY = axis
  11. EDITOR = gedit
  12. POSITION_OFFSET = RELATIVE
  13. POSITION_FEEDBACK = ACTUAL
  14. MAX_FEED_OVERRIDE = 1.5
  15. INTRO_GRAPHIC = emc2.gif
  16. INTRO_TIME = 5
  17. PROGRAM_PREFIX = /home/stan/linexcnc/nc_files
  18. INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
  19. LATHE = 1
  20. PYVCP = spindle.xml
  21.  
  22. [FILTER]
  23. PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
  24. PROGRAM_EXTENSION = .py Python Script
  25. png = image-to-gcode
  26. gif = image-to-gcode
  27. jpg = image-to-gcode
  28. py = python
  29.  
  30. [TASK]
  31. TASK = milltask
  32. CYCLE_TIME = 0.010
  33.  
  34. [RS274NGC]
  35. PARAMETER_FILE = emc.var
  36.  
  37. [EMCMOT]
  38. EMCMOT = motmod
  39. COMM_TIMEOUT = 1.0
  40. COMM_WAIT = 0.010
  41. BASE_PERIOD = 25000
  42. SERVO_PERIOD = 1000000
  43.  
  44. [HAL]
  45. HALFILE = old-lathe.hal
  46. HALFILE = custom.hal
  47. # POSTGUI_HALFILE = custom_postgui.hal
  48. POSTGUI_HALFILE = spindle_to_pyvcp.hal
  49.  
  50. [TRAJ]
  51. AXES = 3
  52. COORDINATES = X Z
  53. LINEAR_UNITS = inch
  54. ANGULAR_UNITS = degree
  55. CYCLE_TIME = 0.010
  56. DEFAULT_VELOCITY = 0.21
  57. MAX_LINEAR_VELOCITY = 2.08
  58.  
  59. [EMCIO]
  60. EMCIO = io
  61. CYCLE_TIME = 0.100
  62. TOOL_TABLE = tool.tbl
  63. TOOL_CHANGE_WITH_SPINDLE_ON = 1
  64.  
  65. [AXIS_0]
  66. TYPE = LINEAR
  67. HOME = 0.0
  68. MAX_VELOCITY = 1.5
  69. MAX_ACCELERATION = 7
  70. STEPGEN_MAXACCEL = 18
  71. SCALE = 19875.0
  72. FERROR = 0.05
  73. MIN_FERROR = 0.01
  74. MIN_LIMIT = -8.0
  75. MAX_LIMIT = 8.0
  76. HOME_OFFSET = 0.0
  77. BACKLASH = 0.0083
  78.  
  79. [AXIS_2]
  80. TYPE = LINEAR
  81. HOME = 0.0
  82. MAX_VELOCITY = 0.8
  83. MAX_ACCELERATION = 4.0
  84. STEPGEN_MAXACCEL = 10
  85. SCALE = 11165
  86. FERROR = 0.05
  87. MIN_FERROR = 0.01
  88. MIN_LIMIT = -50.0
  89. MAX_LIMIT = 50.0
  90. HOME_OFFSET = 0.0
  91. BACKLASH = 0.0126
  92.  
  93. **************************************************************************************************
  94.  
  95. # Generated by stepconf at Mon May 21 18:43:24 2012
  96. # If you make changes to this file, they will be
  97. # overwritten when you run stepconf again
  98. loadrt trivkins
  99. loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
  100. loadrt probe_parport
  101. loadrt hal_parport cfg="0x378 out "
  102. setp parport.0.reset-time 5000
  103. loadrt stepgen step_type=0,0
  104. loadrt encoder num_chan=1
  105. loadrt pwmgen output_type=0
  106. #lowpass for spindle velocity
  107. loadrt lowpass count=1
  108. #scale for rpm
  109. loadrt scale count=1
  110.  
  111. addf parport.0.read base-thread
  112. addf stepgen.make-pulses base-thread
  113. addf encoder.update-counters base-thread
  114. addf pwmgen.make-pulses base-thread
  115. addf parport.0.write base-thread
  116. addf parport.0.reset base-thread
  117.  
  118. addf stepgen.capture-position servo-thread
  119. addf encoder.capture-position servo-thread
  120. addf motion-command-handler servo-thread
  121. addf motion-controller servo-thread
  122. addf stepgen.update-freq servo-thread
  123. addf pwmgen.update servo-thread
  124. addf lowpass.0 servo-thread
  125. addf scale.0 servo-thread
  126.  
  127. net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
  128. net spindle-enable <= motion.spindle-on => pwmgen.0.enable
  129. net spindle-pwm <= pwmgen.0.pwm
  130. setp pwmgen.0.pwm-freq 10000.0
  131. setp pwmgen.0.scale 1166.66666667
  132. setp pwmgen.0.offset 0.114285714286
  133. setp pwmgen.0.dither-pwm true
  134. net spindle-cw <= motion.spindle-forward
  135.  
  136. #Smoothing of spindle rps factor.
  137. setp lowpass.0.gain 0.01
  138.  
  139. #scale rps to rpm
  140. setp scale.0.gain 60
  141.  
  142. setp encoder.0.position-scale 1.000000
  143. setp encoder.0.counter-mode 1
  144.  
  145. # use interpolated postion because of 1 ppr
  146. net spindle-position encoder.0.position-interpolated => motion.spindle-revs
  147.  
  148. #hooking the low pass in for spindle velocity smoothing (remarked out original line)
  149. # net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
  150. net spindle-velocity encoder.0.velocity lowpass.0.in
  151. net spindle-velfiltered lowpass.0.out scale.0.in motion.spindle-speed-in
  152. #pin for rpm to pyvcp panel
  153. net spindle-rpm-filtered scale.0.out
  154.  
  155. net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
  156.  
  157. #hook index to a also..
  158. net spindle-index <= parport.0.pin-11-in
  159. net spindle-index encoder.0.phase-A
  160. #net spindle-phase-b encoder.0.phase-B
  161. net spindle-index encoder.0.phase-Z
  162.  
  163. net estop-out => parport.0.pin-01-out
  164. net xstep => parport.0.pin-02-out
  165. setp parport.0.pin-02-out-reset 1
  166. net xdir => parport.0.pin-03-out
  167. setp parport.0.pin-03-out-invert 1
  168. net ystep => parport.0.pin-04-out
  169. setp parport.0.pin-04-out-reset 1
  170. net ydir => parport.0.pin-05-out
  171. net zstep => parport.0.pin-06-out
  172. setp parport.0.pin-06-out-reset 1
  173. setp parport.0.pin-07-out-invert 1
  174. net zdir => parport.0.pin-07-out
  175. net astep => parport.0.pin-08-out
  176. setp parport.0.pin-08-out-reset 1
  177. net adir => parport.0.pin-09-out
  178. net spindle-cw => parport.0.pin-14-out
  179. net spindle-pwm => parport.0.pin-16-out
  180. net xenable => parport.0.pin-17-out
  181.  
  182.  
  183. net estop-ext <= parport.0.pin-10-in
  184. # net spindle-phase-a <= parport.0.pin-12-in
  185.  
  186.  
  187. setp stepgen.0.position-scale [AXIS_0]SCALE
  188. setp stepgen.0.steplen 1
  189. setp stepgen.0.stepspace 0
  190. setp stepgen.0.dirhold 35000
  191. setp stepgen.0.dirsetup 35000
  192. setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
  193. net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
  194. net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
  195. net xstep <= stepgen.0.step
  196. net xdir <= stepgen.0.dir
  197. net xenable axis.0.amp-enable-out => stepgen.0.enable
  198.  
  199. setp stepgen.1.position-scale [AXIS_2]SCALE
  200. setp stepgen.1.steplen 1
  201. setp stepgen.1.stepspace 0
  202. setp stepgen.1.dirhold 35000
  203. setp stepgen.1.dirsetup 35000
  204. setp stepgen.1.maxaccel [AXIS_2]STEPGEN_MAXACCEL
  205. net zpos-cmd axis.2.motor-pos-cmd => stepgen.1.position-cmd
  206. net zpos-fb stepgen.1.position-fb => axis.2.motor-pos-fb
  207. net zstep <= stepgen.1.step
  208. net zdir <= stepgen.1.dir
  209. net zenable axis.2.amp-enable-out => stepgen.1.enable
  210.  
  211. net estop-out <= iocontrol.0.user-enable-out
  212. net estop-ext => iocontrol.0.emc-enable-in
  213.  
  214. loadusr -W hal_manualtoolchange
  215. net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
  216. net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
  217. net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
  218. net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement