2016-06-21 03:19 PM
I am trying to find the correct value to send to the speed register. The manual says:
The SPEED register contains the current motor speed, expressed in step/tick (format unsigned fixed point 0.28). In order to convert the SPEED value in step/s the following formula can be used: Equation 1 [steps/s] = (SPEED * 2^-28)/tick where SPEED is the integer number stored in the register and tick is 250 ns. The available range is from 0 to 15625 step/s with a resolution of 0.015 step/s. Lets say I want to go 15000steps/s. Using the above equation I find that SPEED = 1006632. My question now is what do I do with the fixed point value given. I think that I multiply the above value by .28 to get 281856 and send it to the L6472 chip, but I am not sure. #l6472 #register #fixed-point2016-06-22 01:49 PM
Never mind I realized that I don't need to pay attention to what it says about fixed point. I just need to use the equation.
2018-04-03 03:04 AM
The speed register you can only read, writing is not allowed. If you want to move a stepper, you can use RUN with a specified speed & direction (speed should be between min and max speed, these registers you can change), or MOVE with a specified amount of steps, or moving to an absolute position...read datasheet carefully. For code examples see manufacturer website. Otherwise, you don't have to use fixed-point numbers, only the given equations, as you mentioned.