Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2011
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. #*******************
  2. # AXIS Y
  3. #*******************
  4.  
  5. # Step Gen signals/setup
  6. setp hm2_7i43.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
  7. setp hm2_7i43.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
  8. setp hm2_7i43.0.stepgen.01.steplen [AXIS_1]STEPLEN
  9. setp hm2_7i43.0.stepgen.01.stepspace [AXIS_1]STEPSPACE
  10. setp hm2_7i43.0.stepgen.01.position-scale [AXIS_1]SCALE
  11. setp hm2_7i43.0.stepgen.01.maxaccel [AXIS_1]MMAX_ACCELERATION
  12. setp hm2_7i43.0.stepgen.01.maxvel [AXIS_1]MMAX_VELOCITY
  13. setp hm2_7i43.0.stepgen.01.step_type 0
  14. setp hm2_7i43.0.stepgen.01.control-type 1
  15.  
  16. # ---PID signals/setup---
  17. setp pid.1.Pgain [AXIS_1]P
  18. setp pid.1.Igain [AXIS_1]I
  19. setp pid.1.Dgain [AXIS_1]D
  20. setp pid.1.bias [AXIS_1]BIAS
  21. setp pid.1.FF0 [AXIS_1]FF0
  22. setp pid.1.FF1 [AXIS_1]FF1
  23. setp pid.1.FF2 [AXIS_1]FF2
  24. setp pid.1.deadband [AXIS_1]DEADBAND
  25. setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
  26.  
  27. # ---Encoder feedback signals/setup---
  28. setp hm2_7i43.0.encoder.01.counter-mode 0
  29. setp hm2_7i43.0.encoder.01.filter 1
  30. setp hm2_7i43.0.encoder.01.index-invert 0
  31. setp hm2_7i43.0.encoder.01.index-mask 0
  32. setp hm2_7i43.0.encoder.01.index-mask-invert 0
  33. setp hm2_7i43.0.encoder.01.scale [AXIS_1]INPUT_SCALE
  34.  
  35. net Y.pos-fb axis.1.motor-pos-fb <= hm2_7i43.0.encoder.01.position => pid.1.feedback
  36. net Y.pos-cmd axis.1.motor-pos-cmd => pid.1.command
  37. net Y.enable axis.1.amp-enable-out => hm2_7i43.0.stepgen.01.enable => pid.1.enable
  38. net Y.pos-out pid.1.output => hm2_7i43.0.stepgen.01.velocity-cmd
  39. net y-index-enable axis.1.index-enable <=> hm2_7i43.0.encoder.01.index-enable
  40.  
  41. #*******************
  42. # AXIS Y2
  43. #*******************
  44.  
  45. # Step Gen signals/setup
  46. setp hm2_7i43.0.stepgen.03.dirsetup [AXIS_3]DIRSETUP
  47. setp hm2_7i43.0.stepgen.03.dirhold [AXIS_3]DIRHOLD
  48. setp hm2_7i43.0.stepgen.03.steplen [AXIS_3]STEPLEN
  49. setp hm2_7i43.0.stepgen.03.stepspace [AXIS_3]STEPSPACE
  50. setp hm2_7i43.0.stepgen.03.position-scale [AXIS_3]SCALE
  51. setp hm2_7i43.0.stepgen.03.maxaccel [AXIS_3]MMAX_ACCELERATION
  52. setp hm2_7i43.0.stepgen.03.maxvel [AXIS_3]MMAX_VELOCITY
  53. setp hm2_7i43.0.stepgen.03.step_type 0
  54. setp hm2_7i43.0.stepgen.03.control-type 1
  55.  
  56. # ---PID signals/setup---
  57. setp pid.3.Pgain [AXIS_3]P
  58. setp pid.3.Igain [AXIS_3]I
  59. setp pid.3.Dgain [AXIS_3]D
  60. setp pid.3.bias [AXIS_3]BIAS
  61. setp pid.3.FF0 [AXIS_3]FF0
  62. setp pid.3.FF1 [AXIS_3]FF1
  63. setp pid.3.FF2 [AXIS_3]FF2
  64. setp pid.3.deadband [AXIS_3]DEADBAND
  65. setp pid.3.maxoutput [AXIS_3]MAX_OUTPUT
  66.  
  67.  
  68. # ---Encoder feedback signals/setup---
  69. setp hm2_7i43.0.encoder.03.counter-mode 0
  70. setp hm2_7i43.0.encoder.03.filter 1
  71. setp hm2_7i43.0.encoder.03.index-invert 0
  72. setp hm2_7i43.0.encoder.03.index-mask 0
  73. setp hm2_7i43.0.encoder.03.index-mask-invert 0
  74. setp hm2_7i43.0.encoder.03.scale [AXIS_3]INPUT_SCALE
  75.  
  76. #Mod to try to slave Y(1) and Y2:
  77. net A.pos-fb axis.3.motor-pos-fb <= hm2_7i43.0.encoder.03.position => pid.3.feedback
  78. net Y.pos-cmd axis.1.motor-pos-cmd => pid.3.command
  79. net A.enable axis.3.amp-enable-out => hm2_7i43.0.stepgen.03.enable => pid.3.enable
  80. net A.pos-out pid.3.output => hm2_7i43.0.stepgen.03.velocity-cmd
  81. net a-index-enable axis.3.index-enable <=> hm2_7i43.0.encoder.03.index-enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement