cos12a-21701 发表于 2016-3-29 12:49:45

【STM32L0方案秀】NUCLEO-L073RZ 步进马达脉冲输出实验

本人的想法是:
  用NUCLEO-L073RZ去移植 开源的Grbl CNC内马达控制部分进行实验:
1。验证马达运行效果。


2。验证自己程序与开源的Grbl 程序运行效果。
3。NUCLEO-L073RZ功能够强,加入一个创意性的控制来做上面两种实验。


这一个基础性的实验,主要是提高写程序技巧和发挥一点创意。

沐紫 发表于 2016-3-29 13:56:48

优惠券已发,请尽快购买:http://www.eeboard.com/shop/?c=products&a=view&t=s&id=3656

cos12a-21701 发表于 2016-4-6 12:42:27

先上一个步进马达加减速控制方式:(GRBL)
摘自 GRBL0.9J 程序内注释。
如果需要源代码可以到github.com中下载,里面有很详细的说明。

/*    BLOCK VELOCITY PROFILE DEFINITION
          __________________________
         /|                        |\   _________________         ^
      / |                        | \   /|               |\      |
       /|                        |\ / |               | \       s
      /   |                        |   ||               |\      p
   /    |                        |   ||               |   \   e
    +-----+------------------------+---+--+---------------+----+    e
    |               BLOCK 1            ^      BLOCK 2          |    d
                                       |
                  time ----->      EXAMPLE: Block 2 entry speed is at max junction velocity

The planner block buffer is planned assuming constant acceleration velocity profiles and are
continuously joined at block junctions as shown above. However, the planner only actively computes
the block entry speeds for an optimal velocity plan, but does not compute the block internal
velocity profiles. These velocity profiles are computed ad-hoc as they are executed by the
stepper algorithm and consists of only 7 possible types of profiles: cruise-only, cruise-
deceleration, acceleration-cruise, acceleration-only, deceleration-only, full-trapezoid, and
triangle(no cruise).

                                        maximum_speed (< nominal_speed) ->+
                  +--------+ <- maximum_speed (= nominal_speed)          /|\                                       
                   /          \                                           / | \                     
current_speed -> +            \                                       /|+ <- exit_speed
                  |             + <- exit_speed                         /   ||                     
                  +-------------+                     current_speed -> +----+--+                  
                   time -->^^                                           ^^                     
                           ||                                           ||                     
                decelerate_after(in mm)                           decelerate_after(in mm)
                  ^         ^                                           ^^
                  |         |                                           ||
                accelerate_until(in mm)                           accelerate_until(in mm)
                  
The step segment buffer computes the executing block velocity profile and tracks the critical
parameters for the stepper algorithm to accurately trace the profile. These critical parameters
are shown and defined in the above illustration.
*/
页: [1]
查看完整版本: 【STM32L0方案秀】NUCLEO-L073RZ 步进马达脉冲输出实验